diff --git a/assets/Color-F6OSRLHC-yxyMlzvt.js b/assets/Color-F6OSRLHC-1QiaxRT-.js similarity index 99% rename from assets/Color-F6OSRLHC-yxyMlzvt.js rename to assets/Color-F6OSRLHC-1QiaxRT-.js index 2d1f539508..e76552ee15 100644 --- a/assets/Color-F6OSRLHC-yxyMlzvt.js +++ b/assets/Color-F6OSRLHC-1QiaxRT-.js @@ -1 +1 @@ -import{ae as ce,af as M,a2 as J,a0 as he,N as fe,ag as de,ah as ge,ai as be,aj as q}from"./DocsRenderer-CFRXHY34-FMg1UtII.js";import{R as m,r as p}from"./index-6oxdNXpR.js";import"./iframe-7Gh6p0LC.js";import"../sb-preview/runtime.js";import"./jsx-runtime-63Ea5SlK.js";import"./index-9gkyvru-.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-4FLvW62B.js";import"./index-mQRHDdot.js";import"./index-PPLHz8o0.js";import"./react-18-8FLnVqma.js";import"./client-Rb4DelHy.js";var me=q({"../../node_modules/color-name/index.js"(n,l){l.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}}),Q=q({"../../node_modules/color-convert/conversions.js"(n,l){var c=me(),h={};for(let e of Object.keys(c))h[c[e]]=e;var u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};l.exports=u;for(let e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:r})}u.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,a=e[2]/255,o=Math.min(t,r,a),i=Math.max(t,r,a),s=i-o,f,g;i===o?f=0:t===i?f=(r-a)/s:r===i?f=2+(a-t)/s:a===i&&(f=4+(t-r)/s),f=Math.min(f*60,360),f<0&&(f+=360);let b=(o+i)/2;return i===o?g=0:b<=.5?g=s/(i+o):g=s/(2-i-o),[f,g*100,b*100]},u.rgb.hsv=function(e){let t,r,a,o,i,s=e[0]/255,f=e[1]/255,g=e[2]/255,b=Math.max(s,f,g),y=b-Math.min(s,f,g),v=function(w){return(b-w)/6/y+1/2};return y===0?(o=0,i=0):(i=y/b,t=v(s),r=v(f),a=v(g),s===b?o=a-r:f===b?o=1/3+t-a:g===b&&(o=2/3+r-t),o<0?o+=1:o>1&&(o-=1)),[o*360,i*100,b*100]},u.rgb.hwb=function(e){let t=e[0],r=e[1],a=e[2],o=u.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(r,a));return a=1-1/255*Math.max(t,Math.max(r,a)),[o,i*100,a*100]},u.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,a=e[2]/255,o=Math.min(1-t,1-r,1-a),i=(1-t-o)/(1-o)||0,s=(1-r-o)/(1-o)||0,f=(1-a-o)/(1-o)||0;return[i*100,s*100,f*100,o*100]};function d(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){let t=h[e];if(t)return t;let r=1/0,a;for(let o of Object.keys(c)){let i=c[o],s=d(e,i);s.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92;let o=t*.4124+r*.3576+a*.1805,i=t*.2126+r*.7152+a*.0722,s=t*.0193+r*.1192+a*.9505;return[o*100,i*100,s*100]},u.rgb.lab=function(e){let t=u.rgb.xyz(e),r=t[0],a=t[1],o=t[2];r/=95.047,a/=100,o/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;let i=116*a-16,s=500*(r-a),f=200*(a-o);return[i,s,f]},u.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,a=e[2]/100,o,i,s;if(r===0)return s=a*255,[s,s,s];a<.5?o=a*(1+r):o=a+r-a*r;let f=2*a-o,g=[0,0,0];for(let b=0;b<3;b++)i=t+1/3*-(b-1),i<0&&i++,i>1&&i--,6*i<1?s=f+(o-f)*6*i:2*i<1?s=o:3*i<2?s=f+(o-f)*(2/3-i)*6:s=f,g[b]=s*255;return g},u.hsl.hsv=function(e){let t=e[0],r=e[1]/100,a=e[2]/100,o=r,i=Math.max(a,.01);a*=2,r*=a<=1?a:2-a,o*=i<=1?i:2-i;let s=(a+r)/2,f=a===0?2*o/(i+o):2*r/(a+r);return[t,f*100,s*100]},u.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,a=e[2]/100,o=Math.floor(t)%6,i=t-Math.floor(t),s=255*a*(1-r),f=255*a*(1-r*i),g=255*a*(1-r*(1-i));switch(a*=255,o){case 0:return[a,g,s];case 1:return[f,a,s];case 2:return[s,a,g];case 3:return[s,f,a];case 4:return[g,s,a];case 5:return[a,s,f]}},u.hsv.hsl=function(e){let t=e[0],r=e[1]/100,a=e[2]/100,o=Math.max(a,.01),i,s;s=(2-r)*a;let f=(2-r)*o;return i=r*o,i/=f<=1?f:2-f,i=i||0,s/=2,[t,i*100,s*100]},u.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,a=e[2]/100,o=r+a,i;o>1&&(r/=o,a/=o);let s=Math.floor(6*t),f=1-a;i=6*t-s,s&1&&(i=1-i);let g=r+i*(f-r),b,y,v;switch(s){default:case 6:case 0:b=f,y=g,v=r;break;case 1:b=g,y=f,v=r;break;case 2:b=r,y=f,v=g;break;case 3:b=r,y=g,v=f;break;case 4:b=g,y=r,v=f;break;case 5:b=f,y=r,v=g;break}return[b*255,y*255,v*255]},u.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,a=e[2]/100,o=e[3]/100,i=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,r*(1-o)+o),f=1-Math.min(1,a*(1-o)+o);return[i*255,s*255,f*255]},u.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,a=e[2]/100,o,i,s;return o=t*3.2406+r*-1.5372+a*-.4986,i=t*-.9689+r*1.8758+a*.0415,s=t*.0557+r*-.204+a*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),[o*255,i*255,s*255]},u.xyz.lab=function(e){let t=e[0],r=e[1],a=e[2];t/=95.047,r/=100,a/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;let o=116*r-16,i=500*(t-r),s=200*(r-a);return[o,i,s]},u.lab.xyz=function(e){let t=e[0],r=e[1],a=e[2],o,i,s;i=(t+16)/116,o=r/500+i,s=i-a/200;let f=i**3,g=o**3,b=s**3;return i=f>.008856?f:(i-16/116)/7.787,o=g>.008856?g:(o-16/116)/7.787,s=b>.008856?b:(s-16/116)/7.787,o*=95.047,i*=100,s*=108.883,[o,i,s]},u.lab.lch=function(e){let t=e[0],r=e[1],a=e[2],o;o=Math.atan2(a,r)*360/2/Math.PI,o<0&&(o+=360);let i=Math.sqrt(r*r+a*a);return[t,i,o]},u.lch.lab=function(e){let t=e[0],r=e[1],a=e[2]/360*2*Math.PI,o=r*Math.cos(a),i=r*Math.sin(a);return[t,o,i]},u.rgb.ansi16=function(e,t=null){let[r,a,o]=e,i=t===null?u.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),i===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(a/255)<<1|Math.round(r/255));return i===2&&(s+=60),s},u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])},u.rgb.ansi256=function(e){let t=e[0],r=e[1],a=e[2];return t===r&&r===a?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(a/255*5)},u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let r=(~~(e>50)+1)*.5,a=(t&1)*r*255,o=(t>>1&1)*r*255,i=(t>>2&1)*r*255;return[a,o,i]},u.ansi256.rgb=function(e){if(e>=232){let i=(e-232)*10+8;return[i,i,i]}e-=16;let t,r=Math.floor(e/36)/5*255,a=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[r,a,o]},u.rgb.hex=function(e){let t=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(t.length)+t},u.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(f=>f+f).join(""));let a=parseInt(r,16),o=a>>16&255,i=a>>8&255,s=a&255;return[o,i,s]},u.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,a=e[2]/255,o=Math.max(Math.max(t,r),a),i=Math.min(Math.min(t,r),a),s=o-i,f,g;return s<1?f=i/(1-s):f=0,s<=0?g=0:o===t?g=(r-a)/s%6:o===r?g=2+(a-t)/s:g=4+(t-r)/s,g/=6,g%=1,[g*360,s*100,f*100]},u.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,a=r<.5?2*t*r:2*t*(1-r),o=0;return a<1&&(o=(r-.5*a)/(1-a)),[e[0],a*100,o*100]},u.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,a=t*r,o=0;return a<1&&(o=(r-a)/(1-a)),[e[0],a*100,o*100]},u.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,a=e[2]/100;if(r===0)return[a*255,a*255,a*255];let o=[0,0,0],i=t%1*6,s=i%1,f=1-s,g=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=f,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=f,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=f}return g=(1-r)*a,[(r*o[0]+g)*255,(r*o[1]+g)*255,(r*o[2]+g)*255]},u.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,a=t+r*(1-t),o=0;return a>0&&(o=t/a),[e[0],o*100,a*100]},u.hcg.hsl=function(e){let t=e[1]/100,r=e[2]/100*(1-t)+.5*t,a=0;return r>0&&r<.5?a=t/(2*r):r>=.5&&r<1&&(a=t/(2*(1-r))),[e[0],a*100,r*100]},u.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,a=t+r*(1-t);return[e[0],(a-t)*100,(1-a)*100]},u.hwb.hcg=function(e){let t=e[1]/100,r=1-e[2]/100,a=r-t,o=0;return a<1&&(o=(r-a)/(1-a)),[e[0],a*100,o*100]},u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},u.gray.hsl=function(e){return[0,0,e[0]]},u.gray.hsv=u.gray.hsl,u.gray.hwb=function(e){return[0,100,e[0]]},u.gray.cmyk=function(e){return[0,0,0,e[0]]},u.gray.lab=function(e){return[e[0],0,0]},u.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}}}),ve=q({"../../node_modules/color-convert/route.js"(n,l){var c=Q();function h(){let t={},r=Object.keys(c);for(let a=r.length,o=0;o1&&(o=i),r(o))};return"conversion"in r&&(a.conversion=r.conversion),a}function t(r){let a=function(...o){let i=o[0];if(i==null)return i;i.length>1&&(o=i);let s=r(o);if(typeof s=="object")for(let f=s.length,g=0;g{u[r]={},Object.defineProperty(u[r],"channels",{value:c[r].channels}),Object.defineProperty(u[r],"labels",{value:c[r].labels});let a=h(r);Object.keys(a).forEach(o=>{let i=a[o];u[r][o]=t(i),u[r][o].raw=e(i)})}),l.exports=u}}),_=ce(pe());function C(){return(C=Object.assign||function(n){for(var l=1;l=0||(u[c]=n[c]);return u}function L(n){var l=p.useRef(n),c=p.useRef(function(h){l.current&&l.current(h)});return l.current=n,c.current}var N=function(n,l,c){return l===void 0&&(l=0),c===void 0&&(c=1),n>c?c:n0:y.buttons>0)&&u.current?d(F(u.current,y,t.current)):b(!1)},g=function(){return b(!1)};function b(y){var v=r.current,w=B(u.current),E=y?w.addEventListener:w.removeEventListener;E(v?"touchmove":"mousemove",f),E(v?"touchend":"mouseup",g)}return[function(y){var v=y.nativeEvent,w=u.current;if(w&&(W(v),!function(k,P){return P&&!O(k)}(v,r.current)&&w)){if(O(v)){r.current=!0;var E=v.changedTouches||[];E.length&&(t.current=E[0].identifier)}w.focus(),d(F(w,v,t.current)),b(!0)}},function(y){var v=y.which||y.keyCode;v<37||v>40||(y.preventDefault(),e({left:v===39?.05:v===37?-.05:0,top:v===40?.05:v===38?-.05:0}))},b]},[e,d]),o=a[0],i=a[1],s=a[2];return p.useEffect(function(){return s},[s]),m.createElement("div",C({},h,{onTouchStart:o,onMouseDown:o,className:"react-colorful__interactive",ref:u,onKeyDown:i,tabIndex:0,role:"slider"}))}),S=function(n){return n.filter(Boolean).join(" ")},T=function(n){var l=n.color,c=n.left,h=n.top,u=h===void 0?.5:h,d=S(["react-colorful__pointer",n.className]);return m.createElement("div",{className:d,style:{top:100*u+"%",left:100*c+"%"}},m.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:l}}))},x=function(n,l,c){return l===void 0&&(l=0),c===void 0&&(c=Math.pow(10,l)),Math.round(c*n)/c},ye={grad:.9,turn:360,rad:360/(2*Math.PI)},xe=function(n){return re(K(n))},K=function(n){return n[0]==="#"&&(n=n.substring(1)),n.length<6?{r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:n.length===4?x(parseInt(n[3]+n[3],16)/255,2):1}:{r:parseInt(n.substring(0,2),16),g:parseInt(n.substring(2,4),16),b:parseInt(n.substring(4,6),16),a:n.length===8?x(parseInt(n.substring(6,8),16)/255,2):1}},we=function(n,l){return l===void 0&&(l="deg"),Number(n)*(ye[l]||1)},ke=function(n){var l=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(n);return l?_e({h:we(l[1],l[2]),s:Number(l[3]),l:Number(l[4]),a:l[5]===void 0?1:Number(l[5])/(l[6]?100:1)}):{h:0,s:0,v:0,a:1}},_e=function(n){var l=n.s,c=n.l;return{h:n.h,s:(l*=(c<50?c:100-c)/100)>0?2*l/(c+l)*100:0,v:c+l,a:n.a}},Ee=function(n){return Ce(ee(n))},Z=function(n){var l=n.s,c=n.v,h=n.a,u=(200-l)*c/100;return{h:x(n.h),s:x(u>0&&u<200?l*c/100/(u<=100?u:200-u)*100:0),l:x(u/2),a:x(h,2)}},X=function(n){var l=Z(n);return"hsl("+l.h+", "+l.s+"%, "+l.l+"%)"},I=function(n){var l=Z(n);return"hsla("+l.h+", "+l.s+"%, "+l.l+"%, "+l.a+")"},ee=function(n){var l=n.h,c=n.s,h=n.v,u=n.a;l=l/360*6,c/=100,h/=100;var d=Math.floor(l),e=h*(1-c),t=h*(1-(l-d)*c),r=h*(1-(1-l+d)*c),a=d%6;return{r:x(255*[h,t,e,e,r,h][a]),g:x(255*[r,h,h,t,e,e][a]),b:x(255*[e,e,r,h,h,t][a]),a:x(u,2)}},Me=function(n){var l=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(n);return l?re({r:Number(l[1])/(l[2]?100/255:1),g:Number(l[3])/(l[4]?100/255:1),b:Number(l[5])/(l[6]?100/255:1),a:l[7]===void 0?1:Number(l[7])/(l[8]?100:1)}):{h:0,s:0,v:0,a:1}},j=function(n){var l=n.toString(16);return l.length<2?"0"+l:l},Ce=function(n){var l=n.r,c=n.g,h=n.b,u=n.a,d=u<1?j(x(255*u)):"";return"#"+j(l)+j(c)+j(h)+d},re=function(n){var l=n.r,c=n.g,h=n.b,u=n.a,d=Math.max(l,c,h),e=d-Math.min(l,c,h),t=e?d===l?(c-h)/e:d===c?2+(h-l)/e:4+(l-c)/e:0;return{h:x(60*(t<0?t+6:t)),s:x(d?e/d*100:0),v:x(d/255*100),a:u}},te=m.memo(function(n){var l=n.hue,c=n.onChange,h=S(["react-colorful__hue",n.className]);return m.createElement("div",{className:h},m.createElement(G,{onMove:function(u){c({h:360*u.left})},onKey:function(u){c({h:N(l+360*u.left,0,360)})},"aria-label":"Hue","aria-valuenow":x(l),"aria-valuemax":"360","aria-valuemin":"0"},m.createElement(T,{className:"react-colorful__hue-pointer",left:l/360,color:X({h:l,s:100,v:100,a:1})})))}),ne=m.memo(function(n){var l=n.hsva,c=n.onChange,h={backgroundColor:X({h:l.h,s:100,v:100,a:1})};return m.createElement("div",{className:"react-colorful__saturation",style:h},m.createElement(G,{onMove:function(u){c({s:100*u.left,v:100-100*u.top})},onKey:function(u){c({s:N(l.s+100*u.left,0,100),v:N(l.v-100*u.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+x(l.s)+"%, Brightness "+x(l.v)+"%"},m.createElement(T,{className:"react-colorful__saturation-pointer",top:1-l.v/100,left:l.s/100,color:X(l)})))}),ae=function(n,l){if(n===l)return!0;for(var c in n)if(n[c]!==l[c])return!1;return!0},oe=function(n,l){return n.replace(/\s/g,"")===l.replace(/\s/g,"")},$e=function(n,l){return n.toLowerCase()===l.toLowerCase()||ae(K(n),K(l))};function le(n,l,c){var h=L(c),u=p.useState(function(){return n.toHsva(l)}),d=u[0],e=u[1],t=p.useRef({color:l,hsva:d});p.useEffect(function(){if(!n.equal(l,t.current.color)){var a=n.toHsva(l);t.current={hsva:a,color:l},e(a)}},[l,n]),p.useEffect(function(){var a;ae(d,t.current.hsva)||n.equal(a=n.fromHsva(d),t.current.color)||(t.current={hsva:d,color:a},h(a))},[d,n,h]);var r=p.useCallback(function(a){e(function(o){return Object.assign({},o,a)})},[]);return[d,r]}var Ne=typeof window<"u"?p.useLayoutEffect:p.useEffect,Oe=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},A=new Map,ie=function(n){Ne(function(){var l=n.current?n.current.ownerDocument:document;if(l!==void 0&&!A.has(l)){var c=l.createElement("style");c.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,A.set(l,c);var h=Oe();h&&c.setAttribute("nonce",h),l.head.appendChild(c)}},[])},Se=function(n){var l=n.className,c=n.colorModel,h=n.color,u=h===void 0?c.defaultColor:h,d=n.onChange,e=V(n,["className","colorModel","color","onChange"]),t=p.useRef(null);ie(t);var r=le(c,u,d),a=r[0],o=r[1],i=S(["react-colorful",l]);return m.createElement("div",C({},e,{ref:t,className:i}),m.createElement(ne,{hsva:a,onChange:o}),m.createElement(te,{hue:a.h,onChange:o,className:"react-colorful__last-control"}))},je={defaultColor:"000",toHsva:xe,fromHsva:function(n){return Ee({h:n.h,s:n.s,v:n.v,a:1})},equal:$e},Re=function(n){return m.createElement(Se,C({},n,{colorModel:je}))},ze=function(n){var l=n.className,c=n.hsva,h=n.onChange,u={backgroundImage:"linear-gradient(90deg, "+I(Object.assign({},c,{a:0}))+", "+I(Object.assign({},c,{a:1}))+")"},d=S(["react-colorful__alpha",l]),e=x(100*c.a);return m.createElement("div",{className:d},m.createElement("div",{className:"react-colorful__alpha-gradient",style:u}),m.createElement(G,{onMove:function(t){h({a:t.left})},onKey:function(t){h({a:N(c.a+t.left)})},"aria-label":"Alpha","aria-valuetext":e+"%","aria-valuenow":e,"aria-valuemin":"0","aria-valuemax":"100"},m.createElement(T,{className:"react-colorful__alpha-pointer",left:c.a,color:I(c)})))},ue=function(n){var l=n.className,c=n.colorModel,h=n.color,u=h===void 0?c.defaultColor:h,d=n.onChange,e=V(n,["className","colorModel","color","onChange"]),t=p.useRef(null);ie(t);var r=le(c,u,d),a=r[0],o=r[1],i=S(["react-colorful",l]);return m.createElement("div",C({},e,{ref:t,className:i}),m.createElement(ne,{hsva:a,onChange:o}),m.createElement(te,{hue:a.h,onChange:o}),m.createElement(ze,{hsva:a,onChange:o,className:"react-colorful__last-control"}))},Ie={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:ke,fromHsva:I,equal:oe},He=function(n){return m.createElement(ue,C({},n,{colorModel:Ie}))},qe={defaultColor:"rgba(0, 0, 0, 1)",toHsva:Me,fromHsva:function(n){var l=ee(n);return"rgba("+l.r+", "+l.g+", "+l.b+", "+l.a+")"},equal:oe},Pe=function(n){return m.createElement(ue,C({},n,{colorModel:qe}))},Le=M.div({position:"relative",maxWidth:250,'&[aria-readonly="true"]':{opacity:.5}}),Be=M(J)({position:"absolute",zIndex:1,top:4,left:4,"[aria-readonly=true] &":{cursor:"not-allowed"}}),Ke=M.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Xe=M(he)(({theme:n})=>({fontFamily:n.typography.fonts.base})),De=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Ve=M.div(({theme:n,active:l})=>({width:16,height:16,boxShadow:l?`${n.appBorderColor} 0 0 0 1px inset, ${n.textMutedColor}50 0 0 0 4px`:`${n.appBorderColor} 0 0 0 1px inset`,borderRadius:n.appBorderRadius})),Ge=`url('data:image/svg+xml;charset=utf-8,')`,U=({value:n,style:l,...c})=>{let h=`linear-gradient(${n}, ${n}), ${Ge}, linear-gradient(#fff, #fff)`;return m.createElement(Ve,{...c,style:{...l,backgroundImage:h}})},Te=M(fe.Input)(({theme:n,readOnly:l})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:n.typography.fonts.base})),Fe=M(de)(({theme:n})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:n.input.color})),se=(n=>(n.RGB="rgb",n.HSL="hsl",n.HEX="hex",n))(se||{}),R=Object.values(se),We=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Ae=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ue=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,D=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Ye=/^\s*#?([0-9a-f]{3})\s*$/i,Je={hex:Re,rgb:Pe,hsl:He},z={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},Y=n=>{let l=n==null?void 0:n.match(We);if(!l)return[0,0,0,1];let[,c,h,u,d=1]=l;return[c,h,u,d].map(Number)},$=n=>{if(!n)return;let l=!0;if(Ae.test(n)){let[e,t,r,a]=Y(n),[o,i,s]=_.default.rgb.hsl([e,t,r])||[0,0,0];return{valid:l,value:n,keyword:_.default.rgb.keyword([e,t,r]),colorSpace:"rgb",rgb:n,hsl:`hsla(${o}, ${i}%, ${s}%, ${a})`,hex:`#${_.default.rgb.hex([e,t,r]).toLowerCase()}`}}if(Ue.test(n)){let[e,t,r,a]=Y(n),[o,i,s]=_.default.hsl.rgb([e,t,r])||[0,0,0];return{valid:l,value:n,keyword:_.default.hsl.keyword([e,t,r]),colorSpace:"hsl",rgb:`rgba(${o}, ${i}, ${s}, ${a})`,hsl:n,hex:`#${_.default.hsl.hex([e,t,r]).toLowerCase()}`}}let c=n.replace("#",""),h=_.default.keyword.rgb(c)||_.default.hex.rgb(c),u=_.default.rgb.hsl(h),d=n;if(/[^#a-f0-9]/i.test(n)?d=c:D.test(n)&&(d=`#${c}`),d.startsWith("#"))l=D.test(d);else try{_.default.keyword.hex(d)}catch{l=!1}return{valid:l,value:d,keyword:_.default.rgb.keyword(h),colorSpace:"hex",rgb:`rgba(${h[0]}, ${h[1]}, ${h[2]}, 1)`,hsl:`hsla(${u[0]}, ${u[1]}%, ${u[2]}%, 1)`,hex:d}},Qe=(n,l,c)=>{if(!n||!(l!=null&&l.valid))return z[c];if(c!=="hex")return(l==null?void 0:l[c])||z[c];if(!l.hex.startsWith("#"))try{return`#${_.default.keyword.hex(l.hex)}`}catch{return z.hex}let h=l.hex.match(Ye);if(!h)return D.test(l.hex)?l.hex:z.hex;let[u,d,e]=h[1].split("");return`#${u}${u}${d}${d}${e}${e}`},Ze=(n,l)=>{let[c,h]=p.useState(n||""),[u,d]=p.useState(()=>$(c)),[e,t]=p.useState((u==null?void 0:u.colorSpace)||"hex");p.useEffect(()=>{let i=n||"",s=$(i);h(i),d(s),t((s==null?void 0:s.colorSpace)||"hex")},[n]);let r=p.useMemo(()=>Qe(c,u,e).toLowerCase(),[c,u,e]),a=p.useCallback(i=>{let s=$(i),f=(s==null?void 0:s.value)||i||"";h(f),f===""&&(d(void 0),l(void 0)),s&&(d(s),t(s.colorSpace),l(s.value))},[l]),o=p.useCallback(()=>{let i=R.indexOf(e)+1;i>=R.length&&(i=0),t(R[i]);let s=(u==null?void 0:u[R[i]])||"";h(s),l(s)},[u,e,l]);return{value:c,realValue:r,updateValue:a,color:u,colorSpace:e,cycleColorSpace:o}},H=n=>n.replace(/\s*/,"").toLowerCase(),er=(n,l,c)=>{let[h,u]=p.useState(l!=null&&l.valid?[l]:[]);p.useEffect(()=>{l===void 0&&u([])},[l]);let d=p.useMemo(()=>(n||[]).map(t=>typeof t=="string"?$(t):t.title?{...$(t.color),keyword:t.title}:$(t.color)).concat(h).filter(Boolean).slice(-27),[n,h]),e=p.useCallback(t=>{t!=null&&t.valid&&(d.some(r=>H(r[c])===H(t[c]))||u(r=>r.concat(t)))},[c,d]);return{presets:d,addPreset:e}},rr=({name:n,value:l,onChange:c,onFocus:h,onBlur:u,presetColors:d,startOpen:e=!1,argType:t})=>{var E;let r=p.useCallback(ge(c,200),[c]),{value:a,realValue:o,updateValue:i,color:s,colorSpace:f,cycleColorSpace:g}=Ze(l,r),{presets:b,addPreset:y}=er(d,s,f),v=Je[f],w=!!((E=t==null?void 0:t.table)!=null&&E.readonly);return m.createElement(Le,{"aria-readonly":w},m.createElement(Be,{startOpen:e,trigger:w?[null]:void 0,closeOnOutsideClick:!0,onVisibleChange:()=>y(s),tooltip:m.createElement(Ke,null,m.createElement(v,{color:o==="transparent"?"#000000":o,onChange:i,onFocus:h,onBlur:u}),b.length>0&&m.createElement(De,null,b.map((k,P)=>m.createElement(J,{key:`${k.value}-${P}`,hasChrome:!1,tooltip:m.createElement(Xe,{note:k.keyword||k.value})},m.createElement(U,{value:k[f],active:s&&H(k[f])===H(s[f]),onClick:()=>i(k.value)})))))},m.createElement(U,{value:o,style:{margin:4}})),m.createElement(Te,{id:be(n),value:a,onChange:k=>i(k.target.value),onFocus:k=>k.target.select(),readOnly:w,placeholder:"Choose color..."}),a?m.createElement(Fe,{onClick:g}):null)},gr=rr;export{rr as ColorControl,gr as default}; +import{ae as ce,af as M,a2 as J,a0 as he,N as fe,ag as de,ah as ge,ai as be,aj as q}from"./DocsRenderer-CFRXHY34-9NOLoDuI.js";import{R as m,r as p}from"./index-6oxdNXpR.js";import"./iframe-8qXcTeqo.js";import"../sb-preview/runtime.js";import"./jsx-runtime-63Ea5SlK.js";import"./index-9gkyvru-.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-4FLvW62B.js";import"./index-mQRHDdot.js";import"./index-PPLHz8o0.js";import"./react-18-8FLnVqma.js";import"./client-Rb4DelHy.js";var me=q({"../../node_modules/color-name/index.js"(n,l){l.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}}),Q=q({"../../node_modules/color-convert/conversions.js"(n,l){var c=me(),h={};for(let e of Object.keys(c))h[c[e]]=e;var u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};l.exports=u;for(let e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:r})}u.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,a=e[2]/255,o=Math.min(t,r,a),i=Math.max(t,r,a),s=i-o,f,g;i===o?f=0:t===i?f=(r-a)/s:r===i?f=2+(a-t)/s:a===i&&(f=4+(t-r)/s),f=Math.min(f*60,360),f<0&&(f+=360);let b=(o+i)/2;return i===o?g=0:b<=.5?g=s/(i+o):g=s/(2-i-o),[f,g*100,b*100]},u.rgb.hsv=function(e){let t,r,a,o,i,s=e[0]/255,f=e[1]/255,g=e[2]/255,b=Math.max(s,f,g),y=b-Math.min(s,f,g),v=function(w){return(b-w)/6/y+1/2};return y===0?(o=0,i=0):(i=y/b,t=v(s),r=v(f),a=v(g),s===b?o=a-r:f===b?o=1/3+t-a:g===b&&(o=2/3+r-t),o<0?o+=1:o>1&&(o-=1)),[o*360,i*100,b*100]},u.rgb.hwb=function(e){let t=e[0],r=e[1],a=e[2],o=u.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(r,a));return a=1-1/255*Math.max(t,Math.max(r,a)),[o,i*100,a*100]},u.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,a=e[2]/255,o=Math.min(1-t,1-r,1-a),i=(1-t-o)/(1-o)||0,s=(1-r-o)/(1-o)||0,f=(1-a-o)/(1-o)||0;return[i*100,s*100,f*100,o*100]};function d(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){let t=h[e];if(t)return t;let r=1/0,a;for(let o of Object.keys(c)){let i=c[o],s=d(e,i);s.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92;let o=t*.4124+r*.3576+a*.1805,i=t*.2126+r*.7152+a*.0722,s=t*.0193+r*.1192+a*.9505;return[o*100,i*100,s*100]},u.rgb.lab=function(e){let t=u.rgb.xyz(e),r=t[0],a=t[1],o=t[2];r/=95.047,a/=100,o/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;let i=116*a-16,s=500*(r-a),f=200*(a-o);return[i,s,f]},u.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,a=e[2]/100,o,i,s;if(r===0)return s=a*255,[s,s,s];a<.5?o=a*(1+r):o=a+r-a*r;let f=2*a-o,g=[0,0,0];for(let b=0;b<3;b++)i=t+1/3*-(b-1),i<0&&i++,i>1&&i--,6*i<1?s=f+(o-f)*6*i:2*i<1?s=o:3*i<2?s=f+(o-f)*(2/3-i)*6:s=f,g[b]=s*255;return g},u.hsl.hsv=function(e){let t=e[0],r=e[1]/100,a=e[2]/100,o=r,i=Math.max(a,.01);a*=2,r*=a<=1?a:2-a,o*=i<=1?i:2-i;let s=(a+r)/2,f=a===0?2*o/(i+o):2*r/(a+r);return[t,f*100,s*100]},u.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,a=e[2]/100,o=Math.floor(t)%6,i=t-Math.floor(t),s=255*a*(1-r),f=255*a*(1-r*i),g=255*a*(1-r*(1-i));switch(a*=255,o){case 0:return[a,g,s];case 1:return[f,a,s];case 2:return[s,a,g];case 3:return[s,f,a];case 4:return[g,s,a];case 5:return[a,s,f]}},u.hsv.hsl=function(e){let t=e[0],r=e[1]/100,a=e[2]/100,o=Math.max(a,.01),i,s;s=(2-r)*a;let f=(2-r)*o;return i=r*o,i/=f<=1?f:2-f,i=i||0,s/=2,[t,i*100,s*100]},u.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,a=e[2]/100,o=r+a,i;o>1&&(r/=o,a/=o);let s=Math.floor(6*t),f=1-a;i=6*t-s,s&1&&(i=1-i);let g=r+i*(f-r),b,y,v;switch(s){default:case 6:case 0:b=f,y=g,v=r;break;case 1:b=g,y=f,v=r;break;case 2:b=r,y=f,v=g;break;case 3:b=r,y=g,v=f;break;case 4:b=g,y=r,v=f;break;case 5:b=f,y=r,v=g;break}return[b*255,y*255,v*255]},u.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,a=e[2]/100,o=e[3]/100,i=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,r*(1-o)+o),f=1-Math.min(1,a*(1-o)+o);return[i*255,s*255,f*255]},u.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,a=e[2]/100,o,i,s;return o=t*3.2406+r*-1.5372+a*-.4986,i=t*-.9689+r*1.8758+a*.0415,s=t*.0557+r*-.204+a*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),[o*255,i*255,s*255]},u.xyz.lab=function(e){let t=e[0],r=e[1],a=e[2];t/=95.047,r/=100,a/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;let o=116*r-16,i=500*(t-r),s=200*(r-a);return[o,i,s]},u.lab.xyz=function(e){let t=e[0],r=e[1],a=e[2],o,i,s;i=(t+16)/116,o=r/500+i,s=i-a/200;let f=i**3,g=o**3,b=s**3;return i=f>.008856?f:(i-16/116)/7.787,o=g>.008856?g:(o-16/116)/7.787,s=b>.008856?b:(s-16/116)/7.787,o*=95.047,i*=100,s*=108.883,[o,i,s]},u.lab.lch=function(e){let t=e[0],r=e[1],a=e[2],o;o=Math.atan2(a,r)*360/2/Math.PI,o<0&&(o+=360);let i=Math.sqrt(r*r+a*a);return[t,i,o]},u.lch.lab=function(e){let t=e[0],r=e[1],a=e[2]/360*2*Math.PI,o=r*Math.cos(a),i=r*Math.sin(a);return[t,o,i]},u.rgb.ansi16=function(e,t=null){let[r,a,o]=e,i=t===null?u.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),i===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(a/255)<<1|Math.round(r/255));return i===2&&(s+=60),s},u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])},u.rgb.ansi256=function(e){let t=e[0],r=e[1],a=e[2];return t===r&&r===a?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(a/255*5)},u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let r=(~~(e>50)+1)*.5,a=(t&1)*r*255,o=(t>>1&1)*r*255,i=(t>>2&1)*r*255;return[a,o,i]},u.ansi256.rgb=function(e){if(e>=232){let i=(e-232)*10+8;return[i,i,i]}e-=16;let t,r=Math.floor(e/36)/5*255,a=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[r,a,o]},u.rgb.hex=function(e){let t=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(t.length)+t},u.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(f=>f+f).join(""));let a=parseInt(r,16),o=a>>16&255,i=a>>8&255,s=a&255;return[o,i,s]},u.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,a=e[2]/255,o=Math.max(Math.max(t,r),a),i=Math.min(Math.min(t,r),a),s=o-i,f,g;return s<1?f=i/(1-s):f=0,s<=0?g=0:o===t?g=(r-a)/s%6:o===r?g=2+(a-t)/s:g=4+(t-r)/s,g/=6,g%=1,[g*360,s*100,f*100]},u.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,a=r<.5?2*t*r:2*t*(1-r),o=0;return a<1&&(o=(r-.5*a)/(1-a)),[e[0],a*100,o*100]},u.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,a=t*r,o=0;return a<1&&(o=(r-a)/(1-a)),[e[0],a*100,o*100]},u.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,a=e[2]/100;if(r===0)return[a*255,a*255,a*255];let o=[0,0,0],i=t%1*6,s=i%1,f=1-s,g=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=f,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=f,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=f}return g=(1-r)*a,[(r*o[0]+g)*255,(r*o[1]+g)*255,(r*o[2]+g)*255]},u.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,a=t+r*(1-t),o=0;return a>0&&(o=t/a),[e[0],o*100,a*100]},u.hcg.hsl=function(e){let t=e[1]/100,r=e[2]/100*(1-t)+.5*t,a=0;return r>0&&r<.5?a=t/(2*r):r>=.5&&r<1&&(a=t/(2*(1-r))),[e[0],a*100,r*100]},u.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,a=t+r*(1-t);return[e[0],(a-t)*100,(1-a)*100]},u.hwb.hcg=function(e){let t=e[1]/100,r=1-e[2]/100,a=r-t,o=0;return a<1&&(o=(r-a)/(1-a)),[e[0],a*100,o*100]},u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},u.gray.hsl=function(e){return[0,0,e[0]]},u.gray.hsv=u.gray.hsl,u.gray.hwb=function(e){return[0,100,e[0]]},u.gray.cmyk=function(e){return[0,0,0,e[0]]},u.gray.lab=function(e){return[e[0],0,0]},u.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}}}),ve=q({"../../node_modules/color-convert/route.js"(n,l){var c=Q();function h(){let t={},r=Object.keys(c);for(let a=r.length,o=0;o1&&(o=i),r(o))};return"conversion"in r&&(a.conversion=r.conversion),a}function t(r){let a=function(...o){let i=o[0];if(i==null)return i;i.length>1&&(o=i);let s=r(o);if(typeof s=="object")for(let f=s.length,g=0;g{u[r]={},Object.defineProperty(u[r],"channels",{value:c[r].channels}),Object.defineProperty(u[r],"labels",{value:c[r].labels});let a=h(r);Object.keys(a).forEach(o=>{let i=a[o];u[r][o]=t(i),u[r][o].raw=e(i)})}),l.exports=u}}),_=ce(pe());function C(){return(C=Object.assign||function(n){for(var l=1;l=0||(u[c]=n[c]);return u}function L(n){var l=p.useRef(n),c=p.useRef(function(h){l.current&&l.current(h)});return l.current=n,c.current}var N=function(n,l,c){return l===void 0&&(l=0),c===void 0&&(c=1),n>c?c:n0:y.buttons>0)&&u.current?d(F(u.current,y,t.current)):b(!1)},g=function(){return b(!1)};function b(y){var v=r.current,w=B(u.current),E=y?w.addEventListener:w.removeEventListener;E(v?"touchmove":"mousemove",f),E(v?"touchend":"mouseup",g)}return[function(y){var v=y.nativeEvent,w=u.current;if(w&&(W(v),!function(k,P){return P&&!O(k)}(v,r.current)&&w)){if(O(v)){r.current=!0;var E=v.changedTouches||[];E.length&&(t.current=E[0].identifier)}w.focus(),d(F(w,v,t.current)),b(!0)}},function(y){var v=y.which||y.keyCode;v<37||v>40||(y.preventDefault(),e({left:v===39?.05:v===37?-.05:0,top:v===40?.05:v===38?-.05:0}))},b]},[e,d]),o=a[0],i=a[1],s=a[2];return p.useEffect(function(){return s},[s]),m.createElement("div",C({},h,{onTouchStart:o,onMouseDown:o,className:"react-colorful__interactive",ref:u,onKeyDown:i,tabIndex:0,role:"slider"}))}),S=function(n){return n.filter(Boolean).join(" ")},T=function(n){var l=n.color,c=n.left,h=n.top,u=h===void 0?.5:h,d=S(["react-colorful__pointer",n.className]);return m.createElement("div",{className:d,style:{top:100*u+"%",left:100*c+"%"}},m.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:l}}))},x=function(n,l,c){return l===void 0&&(l=0),c===void 0&&(c=Math.pow(10,l)),Math.round(c*n)/c},ye={grad:.9,turn:360,rad:360/(2*Math.PI)},xe=function(n){return re(K(n))},K=function(n){return n[0]==="#"&&(n=n.substring(1)),n.length<6?{r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:n.length===4?x(parseInt(n[3]+n[3],16)/255,2):1}:{r:parseInt(n.substring(0,2),16),g:parseInt(n.substring(2,4),16),b:parseInt(n.substring(4,6),16),a:n.length===8?x(parseInt(n.substring(6,8),16)/255,2):1}},we=function(n,l){return l===void 0&&(l="deg"),Number(n)*(ye[l]||1)},ke=function(n){var l=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(n);return l?_e({h:we(l[1],l[2]),s:Number(l[3]),l:Number(l[4]),a:l[5]===void 0?1:Number(l[5])/(l[6]?100:1)}):{h:0,s:0,v:0,a:1}},_e=function(n){var l=n.s,c=n.l;return{h:n.h,s:(l*=(c<50?c:100-c)/100)>0?2*l/(c+l)*100:0,v:c+l,a:n.a}},Ee=function(n){return Ce(ee(n))},Z=function(n){var l=n.s,c=n.v,h=n.a,u=(200-l)*c/100;return{h:x(n.h),s:x(u>0&&u<200?l*c/100/(u<=100?u:200-u)*100:0),l:x(u/2),a:x(h,2)}},X=function(n){var l=Z(n);return"hsl("+l.h+", "+l.s+"%, "+l.l+"%)"},I=function(n){var l=Z(n);return"hsla("+l.h+", "+l.s+"%, "+l.l+"%, "+l.a+")"},ee=function(n){var l=n.h,c=n.s,h=n.v,u=n.a;l=l/360*6,c/=100,h/=100;var d=Math.floor(l),e=h*(1-c),t=h*(1-(l-d)*c),r=h*(1-(1-l+d)*c),a=d%6;return{r:x(255*[h,t,e,e,r,h][a]),g:x(255*[r,h,h,t,e,e][a]),b:x(255*[e,e,r,h,h,t][a]),a:x(u,2)}},Me=function(n){var l=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(n);return l?re({r:Number(l[1])/(l[2]?100/255:1),g:Number(l[3])/(l[4]?100/255:1),b:Number(l[5])/(l[6]?100/255:1),a:l[7]===void 0?1:Number(l[7])/(l[8]?100:1)}):{h:0,s:0,v:0,a:1}},j=function(n){var l=n.toString(16);return l.length<2?"0"+l:l},Ce=function(n){var l=n.r,c=n.g,h=n.b,u=n.a,d=u<1?j(x(255*u)):"";return"#"+j(l)+j(c)+j(h)+d},re=function(n){var l=n.r,c=n.g,h=n.b,u=n.a,d=Math.max(l,c,h),e=d-Math.min(l,c,h),t=e?d===l?(c-h)/e:d===c?2+(h-l)/e:4+(l-c)/e:0;return{h:x(60*(t<0?t+6:t)),s:x(d?e/d*100:0),v:x(d/255*100),a:u}},te=m.memo(function(n){var l=n.hue,c=n.onChange,h=S(["react-colorful__hue",n.className]);return m.createElement("div",{className:h},m.createElement(G,{onMove:function(u){c({h:360*u.left})},onKey:function(u){c({h:N(l+360*u.left,0,360)})},"aria-label":"Hue","aria-valuenow":x(l),"aria-valuemax":"360","aria-valuemin":"0"},m.createElement(T,{className:"react-colorful__hue-pointer",left:l/360,color:X({h:l,s:100,v:100,a:1})})))}),ne=m.memo(function(n){var l=n.hsva,c=n.onChange,h={backgroundColor:X({h:l.h,s:100,v:100,a:1})};return m.createElement("div",{className:"react-colorful__saturation",style:h},m.createElement(G,{onMove:function(u){c({s:100*u.left,v:100-100*u.top})},onKey:function(u){c({s:N(l.s+100*u.left,0,100),v:N(l.v-100*u.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+x(l.s)+"%, Brightness "+x(l.v)+"%"},m.createElement(T,{className:"react-colorful__saturation-pointer",top:1-l.v/100,left:l.s/100,color:X(l)})))}),ae=function(n,l){if(n===l)return!0;for(var c in n)if(n[c]!==l[c])return!1;return!0},oe=function(n,l){return n.replace(/\s/g,"")===l.replace(/\s/g,"")},$e=function(n,l){return n.toLowerCase()===l.toLowerCase()||ae(K(n),K(l))};function le(n,l,c){var h=L(c),u=p.useState(function(){return n.toHsva(l)}),d=u[0],e=u[1],t=p.useRef({color:l,hsva:d});p.useEffect(function(){if(!n.equal(l,t.current.color)){var a=n.toHsva(l);t.current={hsva:a,color:l},e(a)}},[l,n]),p.useEffect(function(){var a;ae(d,t.current.hsva)||n.equal(a=n.fromHsva(d),t.current.color)||(t.current={hsva:d,color:a},h(a))},[d,n,h]);var r=p.useCallback(function(a){e(function(o){return Object.assign({},o,a)})},[]);return[d,r]}var Ne=typeof window<"u"?p.useLayoutEffect:p.useEffect,Oe=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},A=new Map,ie=function(n){Ne(function(){var l=n.current?n.current.ownerDocument:document;if(l!==void 0&&!A.has(l)){var c=l.createElement("style");c.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,A.set(l,c);var h=Oe();h&&c.setAttribute("nonce",h),l.head.appendChild(c)}},[])},Se=function(n){var l=n.className,c=n.colorModel,h=n.color,u=h===void 0?c.defaultColor:h,d=n.onChange,e=V(n,["className","colorModel","color","onChange"]),t=p.useRef(null);ie(t);var r=le(c,u,d),a=r[0],o=r[1],i=S(["react-colorful",l]);return m.createElement("div",C({},e,{ref:t,className:i}),m.createElement(ne,{hsva:a,onChange:o}),m.createElement(te,{hue:a.h,onChange:o,className:"react-colorful__last-control"}))},je={defaultColor:"000",toHsva:xe,fromHsva:function(n){return Ee({h:n.h,s:n.s,v:n.v,a:1})},equal:$e},Re=function(n){return m.createElement(Se,C({},n,{colorModel:je}))},ze=function(n){var l=n.className,c=n.hsva,h=n.onChange,u={backgroundImage:"linear-gradient(90deg, "+I(Object.assign({},c,{a:0}))+", "+I(Object.assign({},c,{a:1}))+")"},d=S(["react-colorful__alpha",l]),e=x(100*c.a);return m.createElement("div",{className:d},m.createElement("div",{className:"react-colorful__alpha-gradient",style:u}),m.createElement(G,{onMove:function(t){h({a:t.left})},onKey:function(t){h({a:N(c.a+t.left)})},"aria-label":"Alpha","aria-valuetext":e+"%","aria-valuenow":e,"aria-valuemin":"0","aria-valuemax":"100"},m.createElement(T,{className:"react-colorful__alpha-pointer",left:c.a,color:I(c)})))},ue=function(n){var l=n.className,c=n.colorModel,h=n.color,u=h===void 0?c.defaultColor:h,d=n.onChange,e=V(n,["className","colorModel","color","onChange"]),t=p.useRef(null);ie(t);var r=le(c,u,d),a=r[0],o=r[1],i=S(["react-colorful",l]);return m.createElement("div",C({},e,{ref:t,className:i}),m.createElement(ne,{hsva:a,onChange:o}),m.createElement(te,{hue:a.h,onChange:o}),m.createElement(ze,{hsva:a,onChange:o,className:"react-colorful__last-control"}))},Ie={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:ke,fromHsva:I,equal:oe},He=function(n){return m.createElement(ue,C({},n,{colorModel:Ie}))},qe={defaultColor:"rgba(0, 0, 0, 1)",toHsva:Me,fromHsva:function(n){var l=ee(n);return"rgba("+l.r+", "+l.g+", "+l.b+", "+l.a+")"},equal:oe},Pe=function(n){return m.createElement(ue,C({},n,{colorModel:qe}))},Le=M.div({position:"relative",maxWidth:250,'&[aria-readonly="true"]':{opacity:.5}}),Be=M(J)({position:"absolute",zIndex:1,top:4,left:4,"[aria-readonly=true] &":{cursor:"not-allowed"}}),Ke=M.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Xe=M(he)(({theme:n})=>({fontFamily:n.typography.fonts.base})),De=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Ve=M.div(({theme:n,active:l})=>({width:16,height:16,boxShadow:l?`${n.appBorderColor} 0 0 0 1px inset, ${n.textMutedColor}50 0 0 0 4px`:`${n.appBorderColor} 0 0 0 1px inset`,borderRadius:n.appBorderRadius})),Ge=`url('data:image/svg+xml;charset=utf-8,')`,U=({value:n,style:l,...c})=>{let h=`linear-gradient(${n}, ${n}), ${Ge}, linear-gradient(#fff, #fff)`;return m.createElement(Ve,{...c,style:{...l,backgroundImage:h}})},Te=M(fe.Input)(({theme:n,readOnly:l})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:n.typography.fonts.base})),Fe=M(de)(({theme:n})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:n.input.color})),se=(n=>(n.RGB="rgb",n.HSL="hsl",n.HEX="hex",n))(se||{}),R=Object.values(se),We=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Ae=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ue=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,D=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Ye=/^\s*#?([0-9a-f]{3})\s*$/i,Je={hex:Re,rgb:Pe,hsl:He},z={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},Y=n=>{let l=n==null?void 0:n.match(We);if(!l)return[0,0,0,1];let[,c,h,u,d=1]=l;return[c,h,u,d].map(Number)},$=n=>{if(!n)return;let l=!0;if(Ae.test(n)){let[e,t,r,a]=Y(n),[o,i,s]=_.default.rgb.hsl([e,t,r])||[0,0,0];return{valid:l,value:n,keyword:_.default.rgb.keyword([e,t,r]),colorSpace:"rgb",rgb:n,hsl:`hsla(${o}, ${i}%, ${s}%, ${a})`,hex:`#${_.default.rgb.hex([e,t,r]).toLowerCase()}`}}if(Ue.test(n)){let[e,t,r,a]=Y(n),[o,i,s]=_.default.hsl.rgb([e,t,r])||[0,0,0];return{valid:l,value:n,keyword:_.default.hsl.keyword([e,t,r]),colorSpace:"hsl",rgb:`rgba(${o}, ${i}, ${s}, ${a})`,hsl:n,hex:`#${_.default.hsl.hex([e,t,r]).toLowerCase()}`}}let c=n.replace("#",""),h=_.default.keyword.rgb(c)||_.default.hex.rgb(c),u=_.default.rgb.hsl(h),d=n;if(/[^#a-f0-9]/i.test(n)?d=c:D.test(n)&&(d=`#${c}`),d.startsWith("#"))l=D.test(d);else try{_.default.keyword.hex(d)}catch{l=!1}return{valid:l,value:d,keyword:_.default.rgb.keyword(h),colorSpace:"hex",rgb:`rgba(${h[0]}, ${h[1]}, ${h[2]}, 1)`,hsl:`hsla(${u[0]}, ${u[1]}%, ${u[2]}%, 1)`,hex:d}},Qe=(n,l,c)=>{if(!n||!(l!=null&&l.valid))return z[c];if(c!=="hex")return(l==null?void 0:l[c])||z[c];if(!l.hex.startsWith("#"))try{return`#${_.default.keyword.hex(l.hex)}`}catch{return z.hex}let h=l.hex.match(Ye);if(!h)return D.test(l.hex)?l.hex:z.hex;let[u,d,e]=h[1].split("");return`#${u}${u}${d}${d}${e}${e}`},Ze=(n,l)=>{let[c,h]=p.useState(n||""),[u,d]=p.useState(()=>$(c)),[e,t]=p.useState((u==null?void 0:u.colorSpace)||"hex");p.useEffect(()=>{let i=n||"",s=$(i);h(i),d(s),t((s==null?void 0:s.colorSpace)||"hex")},[n]);let r=p.useMemo(()=>Qe(c,u,e).toLowerCase(),[c,u,e]),a=p.useCallback(i=>{let s=$(i),f=(s==null?void 0:s.value)||i||"";h(f),f===""&&(d(void 0),l(void 0)),s&&(d(s),t(s.colorSpace),l(s.value))},[l]),o=p.useCallback(()=>{let i=R.indexOf(e)+1;i>=R.length&&(i=0),t(R[i]);let s=(u==null?void 0:u[R[i]])||"";h(s),l(s)},[u,e,l]);return{value:c,realValue:r,updateValue:a,color:u,colorSpace:e,cycleColorSpace:o}},H=n=>n.replace(/\s*/,"").toLowerCase(),er=(n,l,c)=>{let[h,u]=p.useState(l!=null&&l.valid?[l]:[]);p.useEffect(()=>{l===void 0&&u([])},[l]);let d=p.useMemo(()=>(n||[]).map(t=>typeof t=="string"?$(t):t.title?{...$(t.color),keyword:t.title}:$(t.color)).concat(h).filter(Boolean).slice(-27),[n,h]),e=p.useCallback(t=>{t!=null&&t.valid&&(d.some(r=>H(r[c])===H(t[c]))||u(r=>r.concat(t)))},[c,d]);return{presets:d,addPreset:e}},rr=({name:n,value:l,onChange:c,onFocus:h,onBlur:u,presetColors:d,startOpen:e=!1,argType:t})=>{var E;let r=p.useCallback(ge(c,200),[c]),{value:a,realValue:o,updateValue:i,color:s,colorSpace:f,cycleColorSpace:g}=Ze(l,r),{presets:b,addPreset:y}=er(d,s,f),v=Je[f],w=!!((E=t==null?void 0:t.table)!=null&&E.readonly);return m.createElement(Le,{"aria-readonly":w},m.createElement(Be,{startOpen:e,trigger:w?[null]:void 0,closeOnOutsideClick:!0,onVisibleChange:()=>y(s),tooltip:m.createElement(Ke,null,m.createElement(v,{color:o==="transparent"?"#000000":o,onChange:i,onFocus:h,onBlur:u}),b.length>0&&m.createElement(De,null,b.map((k,P)=>m.createElement(J,{key:`${k.value}-${P}`,hasChrome:!1,tooltip:m.createElement(Xe,{note:k.keyword||k.value})},m.createElement(U,{value:k[f],active:s&&H(k[f])===H(s[f]),onClick:()=>i(k.value)})))))},m.createElement(U,{value:o,style:{margin:4}})),m.createElement(Te,{id:be(n),value:a,onChange:k=>i(k.target.value),onFocus:k=>k.target.select(),readOnly:w,placeholder:"Choose color..."}),a?m.createElement(Fe,{onClick:g}):null)},gr=rr;export{rr as ColorControl,gr as default}; diff --git a/assets/DocsRenderer-CFRXHY34-FMg1UtII.js b/assets/DocsRenderer-CFRXHY34-9NOLoDuI.js similarity index 99% rename from assets/DocsRenderer-CFRXHY34-FMg1UtII.js rename to assets/DocsRenderer-CFRXHY34-9NOLoDuI.js index fd2af41021..d2d8396960 100644 --- a/assets/DocsRenderer-CFRXHY34-FMg1UtII.js +++ b/assets/DocsRenderer-CFRXHY34-9NOLoDuI.js @@ -1,4 +1,4 @@ -var Vx=Object.defineProperty;var Ux=(e,t,r)=>t in e?Vx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Rn=(e,t,r)=>(Ux(e,typeof t!="symbol"?t+"":t,r),r);import{_ as Y1}from"./iframe-7Gh6p0LC.js";import{r as l,R as y}from"./index-6oxdNXpR.js";import{j as J}from"./jsx-runtime-63Ea5SlK.js";import{r as fs,F as G4}from"./index-9gkyvru-.js";import{O as Y4,P as qx}from"./index-4FLvW62B.js";import{y as hh,g as Eu}from"./index-mQRHDdot.js";import{d as Wx}from"./index-PPLHz8o0.js";import{renderElement as Gx,unmountElement as Yx}from"./react-18-8FLnVqma.js";var Kx=Object.create,K4=Object.defineProperty,Zx=Object.getOwnPropertyDescriptor,Z4=Object.getOwnPropertyNames,Jx=Object.getPrototypeOf,Xx=Object.prototype.hasOwnProperty,xi=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),mn=(e,t)=>function(){return t||(0,e[Z4(e)[0]])((t={exports:{}}).exports,t),t.exports},Qx=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Z4(t))!Xx.call(e,a)&&a!==r&&K4(e,a,{get:()=>t[a],enumerable:!(n=Zx(t,a))||n.enumerable});return e},K1=(e,t,r)=>(r=e!=null?Kx(Jx(e)):{},Qx(t||!e||!e.__esModule?K4(r,"default",{value:e,enumerable:!0}):r,e));function eD(e,t,{signal:r,edges:n}={}){let a,o=null,i=n!=null&&n.includes("leading"),s=n==null||n.includes("trailing"),c=()=>{o!==null&&(e.apply(a,o),a=void 0,o=null)},d=()=>{s&&c(),f()},p=null,m=()=>{p!=null&&clearTimeout(p),p=setTimeout(()=>{p=null,d()},t)},h=()=>{p!==null&&(clearTimeout(p),p=null)},f=()=>{h(),a=void 0,o=null},v=()=>{h(),c()},g=function(...w){if(r!=null&&r.aborted)return;a=this,o=w;let x=p==null;m(),i&&x&&c()};return g.schedule=m,g.cancel=f,g.flush=v,r==null||r.addEventListener("abort",f,{once:!0}),g}function vV(e,t=0,r={}){typeof r!="object"&&(r={});let{signal:n,leading:a=!1,trailing:o=!0,maxWait:i}=r,s=Array(2);a&&(s[0]="leading"),o&&(s[1]="trailing");let c,d=null,p=eD(function(...f){c=e.apply(this,f),d=null},t,{signal:n,edges:s}),m=function(...f){if(i!=null){if(d===null)d=Date.now();else if(Date.now()-d>=i)return c=e.apply(this,f),d=Date.now(),p.cancel(),p.schedule(),c}return p.apply(this,f),c},h=()=>(p.flush(),c);return m.cancel=p.cancel,m.flush=h,m}function tD(e){return Array.from(new Set(e))}function rD(e,t){let r={},n=Object.entries(e);for(let a=0;a`control-${e.replace(/\s+/g,"-")}`,hs=e=>`set-${e.replace(/\s+/g,"-")}`,cD=Object.create,Z1=Object.defineProperty,dD=Object.getOwnPropertyDescriptor,pD=Object.getOwnPropertyNames,fD=Object.getPrototypeOf,hD=Object.prototype.hasOwnProperty,R=(e,t)=>Z1(e,"name",{value:t,configurable:!0}),Di=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),ms=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mD=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of pD(t))!hD.call(e,a)&&a!==r&&Z1(e,a,{get:()=>t[a],enumerable:!(n=dD(t,a))||n.enumerable});return e},J1=(e,t,r)=>(r=e!=null?cD(fD(e)):{},mD(t||!e||!e.__esModule?Z1(r,"default",{value:e,enumerable:!0}):r,e)),gD=ms(e=>{(function(){var t=typeof Symbol=="function"&&Symbol.for,r=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,c=t?Symbol.for("react.context"):60110,d=t?Symbol.for("react.async_mode"):60111,p=t?Symbol.for("react.concurrent_mode"):60111,m=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,f=t?Symbol.for("react.suspense_list"):60120,v=t?Symbol.for("react.memo"):60115,g=t?Symbol.for("react.lazy"):60116,w=t?Symbol.for("react.block"):60121,x=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,E=t?Symbol.for("react.scope"):60119;function b($){return typeof $=="string"||typeof $=="function"||$===a||$===p||$===i||$===o||$===h||$===f||typeof $=="object"&&$!==null&&($.$$typeof===g||$.$$typeof===v||$.$$typeof===s||$.$$typeof===c||$.$$typeof===m||$.$$typeof===x||$.$$typeof===D||$.$$typeof===E||$.$$typeof===w)}R(b,"isValidElementType");function C($){if(typeof $=="object"&&$!==null){var rt=$.$$typeof;switch(rt){case r:var xt=$.type;switch(xt){case d:case p:case a:case i:case o:case h:return xt;default:var Mr=xt&&xt.$$typeof;switch(Mr){case c:case m:case g:case v:case s:return Mr;default:return rt}}case n:return rt}}}R(C,"typeOf");var S=d,k=p,A=c,_=s,I=r,B=m,z=a,L=g,M=v,O=n,P=i,j=o,U=h,V=!1;function G($){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),Q($)||C($)===d}R(G,"isAsyncMode");function Q($){return C($)===p}R(Q,"isConcurrentMode");function ne($){return C($)===c}R(ne,"isContextConsumer");function Z($){return C($)===s}R(Z,"isContextProvider");function ie($){return typeof $=="object"&&$!==null&&$.$$typeof===r}R(ie,"isElement");function N($){return C($)===m}R(N,"isForwardRef");function K($){return C($)===a}R(K,"isFragment");function re($){return C($)===g}R(re,"isLazy");function fe($){return C($)===v}R(fe,"isMemo");function Ce($){return C($)===n}R(Ce,"isPortal");function Et($){return C($)===i}R(Et,"isProfiler");function He($){return C($)===o}R(He,"isStrictMode");function tt($){return C($)===h}R(tt,"isSuspense"),e.AsyncMode=S,e.ConcurrentMode=k,e.ContextConsumer=A,e.ContextProvider=_,e.Element=I,e.ForwardRef=B,e.Fragment=z,e.Lazy=L,e.Memo=M,e.Portal=O,e.Profiler=P,e.StrictMode=j,e.Suspense=U,e.isAsyncMode=G,e.isConcurrentMode=Q,e.isContextConsumer=ne,e.isContextProvider=Z,e.isElement=ie,e.isForwardRef=N,e.isFragment=K,e.isLazy=re,e.isMemo=fe,e.isPortal=Ce,e.isProfiler=Et,e.isStrictMode=He,e.isSuspense=tt,e.isValidElementType=b,e.typeOf=C})()}),vD=ms((e,t)=>{t.exports=gD()}),J4=ms((e,t)=>{var r=vD(),n={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[r.ForwardRef]=o,s[r.Memo]=i;function c(w){return r.isMemo(w)?i:s[w.$$typeof]||n}R(c,"getStatics");var d=Object.defineProperty,p=Object.getOwnPropertyNames,m=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,v=Object.prototype;function g(w,x,D){if(typeof x!="string"){if(v){var E=f(x);E&&E!==v&&g(w,E,D)}var b=p(x);m&&(b=b.concat(m(x)));for(var C=c(w),S=c(x),k=0;k{(function(r){if(typeof e=="object"&&typeof t<"u")t.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var n;typeof window<"u"?n=window:typeof global<"u"?n=global:typeof self<"u"?n=self:n=this,n.memoizerific=r()}})(function(){return R(function r(n,a,o){function i(d,p){if(!a[d]){if(!n[d]){var m=typeof Di=="function"&&Di;if(!p&&m)return m(d,!0);if(s)return s(d,!0);var h=new Error("Cannot find module '"+d+"'");throw h.code="MODULE_NOT_FOUND",h}var f=a[d]={exports:{}};n[d][0].call(f.exports,function(v){var g=n[d][1][v];return i(g||v)},f,f.exports,r,n,a,o)}return a[d].exports}R(i,"s");for(var s=typeof Di=="function"&&Di,c=0;c=0)return this.lastItem=this.list[s],this.list[s].val},o.prototype.set=function(i,s){var c;return this.lastItem&&this.isEqual(this.lastItem.key,i)?(this.lastItem.val=s,this):(c=this.indexOf(i),c>=0?(this.lastItem=this.list[c],this.list[c].val=s,this):(this.lastItem={key:i,val:s},this.list.push(this.lastItem),this.size++,this))},o.prototype.delete=function(i){var s;if(this.lastItem&&this.isEqual(this.lastItem.key,i)&&(this.lastItem=void 0),s=this.indexOf(i),s>=0)return this.size--,this.list.splice(s,1)[0]},o.prototype.has=function(i){var s;return this.lastItem&&this.isEqual(this.lastItem.key,i)?!0:(s=this.indexOf(i),s>=0?(this.lastItem=this.list[s],!0):!1)},o.prototype.forEach=function(i,s){var c;for(c=0;c0&&(D[x]={cacheItem:v,arg:arguments[x]},E?i(m,D):m.push(D),m.length>d&&s(m.shift())),f.wasMemoized=E,f.numArgs=x+1,w},"memoizerific");return f.limit=d,f.wasMemoized=!1,f.cache=p,f.lru=m,f}};function i(d,p){var m=d.length,h=p.length,f,v,g;for(v=0;v=0&&(m=d[f],h=m.cacheItem.get(m.arg),!h||!h.size);f--)m.cacheItem.delete(m.arg)}R(s,"removeCachedResult");function c(d,p){return d===p||d!==d&&p!==p}R(c,"isEqual")},{"map-or-similar":1}]},{},[3])(3)})});function $t(){return $t=Object.assign?Object.assign.bind():function(e){for(var t=1;tt in e?Vx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Rn=(e,t,r)=>(Ux(e,typeof t!="symbol"?t+"":t,r),r);import{_ as Y1}from"./iframe-8qXcTeqo.js";import{r as l,R as y}from"./index-6oxdNXpR.js";import{j as J}from"./jsx-runtime-63Ea5SlK.js";import{r as fs,F as G4}from"./index-9gkyvru-.js";import{O as Y4,P as qx}from"./index-4FLvW62B.js";import{y as hh,g as Eu}from"./index-mQRHDdot.js";import{d as Wx}from"./index-PPLHz8o0.js";import{renderElement as Gx,unmountElement as Yx}from"./react-18-8FLnVqma.js";var Kx=Object.create,K4=Object.defineProperty,Zx=Object.getOwnPropertyDescriptor,Z4=Object.getOwnPropertyNames,Jx=Object.getPrototypeOf,Xx=Object.prototype.hasOwnProperty,xi=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),mn=(e,t)=>function(){return t||(0,e[Z4(e)[0]])((t={exports:{}}).exports,t),t.exports},Qx=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Z4(t))!Xx.call(e,a)&&a!==r&&K4(e,a,{get:()=>t[a],enumerable:!(n=Zx(t,a))||n.enumerable});return e},K1=(e,t,r)=>(r=e!=null?Kx(Jx(e)):{},Qx(t||!e||!e.__esModule?K4(r,"default",{value:e,enumerable:!0}):r,e));function eD(e,t,{signal:r,edges:n}={}){let a,o=null,i=n!=null&&n.includes("leading"),s=n==null||n.includes("trailing"),c=()=>{o!==null&&(e.apply(a,o),a=void 0,o=null)},d=()=>{s&&c(),f()},p=null,m=()=>{p!=null&&clearTimeout(p),p=setTimeout(()=>{p=null,d()},t)},h=()=>{p!==null&&(clearTimeout(p),p=null)},f=()=>{h(),a=void 0,o=null},v=()=>{h(),c()},g=function(...w){if(r!=null&&r.aborted)return;a=this,o=w;let x=p==null;m(),i&&x&&c()};return g.schedule=m,g.cancel=f,g.flush=v,r==null||r.addEventListener("abort",f,{once:!0}),g}function vV(e,t=0,r={}){typeof r!="object"&&(r={});let{signal:n,leading:a=!1,trailing:o=!0,maxWait:i}=r,s=Array(2);a&&(s[0]="leading"),o&&(s[1]="trailing");let c,d=null,p=eD(function(...f){c=e.apply(this,f),d=null},t,{signal:n,edges:s}),m=function(...f){if(i!=null){if(d===null)d=Date.now();else if(Date.now()-d>=i)return c=e.apply(this,f),d=Date.now(),p.cancel(),p.schedule(),c}return p.apply(this,f),c},h=()=>(p.flush(),c);return m.cancel=p.cancel,m.flush=h,m}function tD(e){return Array.from(new Set(e))}function rD(e,t){let r={},n=Object.entries(e);for(let a=0;a`control-${e.replace(/\s+/g,"-")}`,hs=e=>`set-${e.replace(/\s+/g,"-")}`,cD=Object.create,Z1=Object.defineProperty,dD=Object.getOwnPropertyDescriptor,pD=Object.getOwnPropertyNames,fD=Object.getPrototypeOf,hD=Object.prototype.hasOwnProperty,R=(e,t)=>Z1(e,"name",{value:t,configurable:!0}),Di=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),ms=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mD=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of pD(t))!hD.call(e,a)&&a!==r&&Z1(e,a,{get:()=>t[a],enumerable:!(n=dD(t,a))||n.enumerable});return e},J1=(e,t,r)=>(r=e!=null?cD(fD(e)):{},mD(t||!e||!e.__esModule?Z1(r,"default",{value:e,enumerable:!0}):r,e)),gD=ms(e=>{(function(){var t=typeof Symbol=="function"&&Symbol.for,r=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,c=t?Symbol.for("react.context"):60110,d=t?Symbol.for("react.async_mode"):60111,p=t?Symbol.for("react.concurrent_mode"):60111,m=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,f=t?Symbol.for("react.suspense_list"):60120,v=t?Symbol.for("react.memo"):60115,g=t?Symbol.for("react.lazy"):60116,w=t?Symbol.for("react.block"):60121,x=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,E=t?Symbol.for("react.scope"):60119;function b($){return typeof $=="string"||typeof $=="function"||$===a||$===p||$===i||$===o||$===h||$===f||typeof $=="object"&&$!==null&&($.$$typeof===g||$.$$typeof===v||$.$$typeof===s||$.$$typeof===c||$.$$typeof===m||$.$$typeof===x||$.$$typeof===D||$.$$typeof===E||$.$$typeof===w)}R(b,"isValidElementType");function C($){if(typeof $=="object"&&$!==null){var rt=$.$$typeof;switch(rt){case r:var xt=$.type;switch(xt){case d:case p:case a:case i:case o:case h:return xt;default:var Mr=xt&&xt.$$typeof;switch(Mr){case c:case m:case g:case v:case s:return Mr;default:return rt}}case n:return rt}}}R(C,"typeOf");var S=d,k=p,A=c,_=s,I=r,B=m,z=a,L=g,M=v,O=n,P=i,j=o,U=h,V=!1;function G($){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),Q($)||C($)===d}R(G,"isAsyncMode");function Q($){return C($)===p}R(Q,"isConcurrentMode");function ne($){return C($)===c}R(ne,"isContextConsumer");function Z($){return C($)===s}R(Z,"isContextProvider");function ie($){return typeof $=="object"&&$!==null&&$.$$typeof===r}R(ie,"isElement");function N($){return C($)===m}R(N,"isForwardRef");function K($){return C($)===a}R(K,"isFragment");function re($){return C($)===g}R(re,"isLazy");function fe($){return C($)===v}R(fe,"isMemo");function Ce($){return C($)===n}R(Ce,"isPortal");function Et($){return C($)===i}R(Et,"isProfiler");function He($){return C($)===o}R(He,"isStrictMode");function tt($){return C($)===h}R(tt,"isSuspense"),e.AsyncMode=S,e.ConcurrentMode=k,e.ContextConsumer=A,e.ContextProvider=_,e.Element=I,e.ForwardRef=B,e.Fragment=z,e.Lazy=L,e.Memo=M,e.Portal=O,e.Profiler=P,e.StrictMode=j,e.Suspense=U,e.isAsyncMode=G,e.isConcurrentMode=Q,e.isContextConsumer=ne,e.isContextProvider=Z,e.isElement=ie,e.isForwardRef=N,e.isFragment=K,e.isLazy=re,e.isMemo=fe,e.isPortal=Ce,e.isProfiler=Et,e.isStrictMode=He,e.isSuspense=tt,e.isValidElementType=b,e.typeOf=C})()}),vD=ms((e,t)=>{t.exports=gD()}),J4=ms((e,t)=>{var r=vD(),n={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[r.ForwardRef]=o,s[r.Memo]=i;function c(w){return r.isMemo(w)?i:s[w.$$typeof]||n}R(c,"getStatics");var d=Object.defineProperty,p=Object.getOwnPropertyNames,m=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,v=Object.prototype;function g(w,x,D){if(typeof x!="string"){if(v){var E=f(x);E&&E!==v&&g(w,E,D)}var b=p(x);m&&(b=b.concat(m(x)));for(var C=c(w),S=c(x),k=0;k{(function(r){if(typeof e=="object"&&typeof t<"u")t.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var n;typeof window<"u"?n=window:typeof global<"u"?n=global:typeof self<"u"?n=self:n=this,n.memoizerific=r()}})(function(){return R(function r(n,a,o){function i(d,p){if(!a[d]){if(!n[d]){var m=typeof Di=="function"&&Di;if(!p&&m)return m(d,!0);if(s)return s(d,!0);var h=new Error("Cannot find module '"+d+"'");throw h.code="MODULE_NOT_FOUND",h}var f=a[d]={exports:{}};n[d][0].call(f.exports,function(v){var g=n[d][1][v];return i(g||v)},f,f.exports,r,n,a,o)}return a[d].exports}R(i,"s");for(var s=typeof Di=="function"&&Di,c=0;c=0)return this.lastItem=this.list[s],this.list[s].val},o.prototype.set=function(i,s){var c;return this.lastItem&&this.isEqual(this.lastItem.key,i)?(this.lastItem.val=s,this):(c=this.indexOf(i),c>=0?(this.lastItem=this.list[c],this.list[c].val=s,this):(this.lastItem={key:i,val:s},this.list.push(this.lastItem),this.size++,this))},o.prototype.delete=function(i){var s;if(this.lastItem&&this.isEqual(this.lastItem.key,i)&&(this.lastItem=void 0),s=this.indexOf(i),s>=0)return this.size--,this.list.splice(s,1)[0]},o.prototype.has=function(i){var s;return this.lastItem&&this.isEqual(this.lastItem.key,i)?!0:(s=this.indexOf(i),s>=0?(this.lastItem=this.list[s],!0):!1)},o.prototype.forEach=function(i,s){var c;for(c=0;c0&&(D[x]={cacheItem:v,arg:arguments[x]},E?i(m,D):m.push(D),m.length>d&&s(m.shift())),f.wasMemoized=E,f.numArgs=x+1,w},"memoizerific");return f.limit=d,f.wasMemoized=!1,f.cache=p,f.lru=m,f}};function i(d,p){var m=d.length,h=p.length,f,v,g;for(v=0;v=0&&(m=d[f],h=m.cacheItem.get(m.arg),!h||!h.size);f--)m.cacheItem.delete(m.arg)}R(s,"removeCachedResult");function c(d,p){return d===p||d!==d&&p!==p}R(c,"isEqual")},{"map-or-similar":1}]},{},[3])(3)})});function $t(){return $t=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?we(ka,--$e):0,la--,de===10&&(la=1,ys--),de}R(i3,"prev");function Oe(){return de=$e2||sa(de)>3?"":" "}R(l3,"whitespace");function s3(e,t){for(;--t&&Oe()&&!(de<48||de>102||de>57&&de<65||de>70&&de<97););return Aa(e,bo()+(t<6&&dt()==32&&Oe()==32))}R(s3,"escaping");function Cl(e){for(;Oe();)switch(de){case e:return $e;case 34:case 39:e!==34&&e!==39&&Cl(de);break;case 40:e===41&&Cl(e);break;case 92:Oe();break}return $e}R(Cl,"delimiter");function u3(e,t){for(;Oe()&&e+de!==57&&!(e+de===84&&dt()===47););return"/*"+Aa(t,$e-1)+"*"+gs(e===47?e:Oe())}R(u3,"commenter");function c3(e){for(;!sa(dt());)Oe();return Aa(e,$e)}R(c3,"identifier");function d3(e){return op(Eo("",null,null,null,[""],e=ap(e),0,[0],e))}R(d3,"compile");function Eo(e,t,r,n,a,o,i,s,c){for(var d=0,p=0,m=i,h=0,f=0,v=0,g=1,w=1,x=1,D=0,E="",b=a,C=o,S=n,k=E;w;)switch(v=D,D=Oe()){case 40:if(v!=108&&we(k,m-1)==58){Dl(k+=ee(wo(D),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:k+=wo(D);break;case 9:case 10:case 13:case 32:k+=l3(v);break;case 92:k+=s3(bo()-1,7);continue;case 47:switch(dt()){case 42:case 47:oo(p3(u3(Oe(),bo()),t,r),c);break;default:k+="/"}break;case 123*g:s[d++]=lt(k)*x;case 125*g:case 59:case 0:switch(D){case 0:case 125:w=0;case 59+p:x==-1&&(k=ee(k,/\f/g,"")),f>0&<(k)-m&&oo(f>32?Q0(k+";",n,r,m-1):Q0(ee(k," ","")+";",n,r,m-2),c);break;case 59:k+=";";default:if(oo(S=X0(k,t,r,d,p,a,s,E,b=[],C=[],m),o),D===123)if(p===0)Eo(k,t,S,S,b,o,m,s,C);else switch(h===99&&we(k,3)===110?100:h){case 100:case 108:case 109:case 115:Eo(e,S,S,n&&oo(X0(e,S,S,0,0,a,s,E,a,b=[],m),C),a,C,m,s,n?b:C);break;default:Eo(k,S,S,S,[""],C,0,s,C)}}d=p=f=0,g=x=1,E=k="",m=i;break;case 58:m=1+lt(k),f=v;default:if(g<1){if(D==123)--g;else if(D==125&&g++==0&&i3()==125)continue}switch(k+=gs(D),D*g){case 38:x=p>0?1:(k+="\f",-1);break;case 44:s[d++]=(lt(k)-1)*x,x=1;break;case 64:dt()===45&&(k+=wo(Oe())),h=dt(),p=m=lt(E=k+=c3(bo())),D++;break;case 45:v===45&<(k)==2&&(g=0)}}return o}R(Eo,"parse");function X0(e,t,r,n,a,o,i,s,c,d,p){for(var m=a-1,h=a===0?o:[""],f=vs(h),v=0,g=0,w=0;v0?h[x]+" "+D:ee(D,/&\f/g,h[x])))&&(c[w++]=E);return Ko(e,t,r,a===0?tp:s,c,d,p)}R(X0,"ruleset");function p3(e,t,r){return Ko(e,t,r,ep,gs(o3()),ia(e,2,-2),0)}R(p3,"comment");function Q0(e,t,r,n){return Ko(e,t,r,rp,ia(e,0,n),ia(e,n+1,-1),n)}R(Q0,"declaration");function an(e,t){for(var r="",n=vs(e),a=0;a-1},"isIgnoringComment"),BD=R(function(e){return function(t,r,n){if(!(t.type!=="rule"||e.compat)){var a=t.value.match(/(:first|:nth|:nth-last)-child/g);if(a){for(var o=!!t.parent,i=o?t.parent.children:n,s=i.length-1;s>=0;s--){var c=i[s];if(c.line=0;r--)if(!m3(t[r]))return!0;return!1},"isPrependedWithRegularRules"),yh=R(function(e){e.type="",e.value="",e.return="",e.children="",e.props=""},"nullifyElement"),zD=R(function(e,t,r){m3(e)&&(e.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),yh(e)):TD(t,r)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),yh(e)))},"incorrectImportAlarm");function ip(e,t){switch(t3(e,t)){case 5103:return te+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return te+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return te+e+xl+e+_e+e+e;case 6828:case 4268:return te+e+_e+e+e;case 6165:return te+e+_e+"flex-"+e+e;case 5187:return te+e+ee(e,/(\w+).+(:[^]+)/,te+"box-$1$2"+_e+"flex-$1$2")+e;case 5443:return te+e+_e+"flex-item-"+ee(e,/flex-|-self/,"")+e;case 4675:return te+e+_e+"flex-line-pack"+ee(e,/align-content|flex-|-self/,"")+e;case 5548:return te+e+_e+ee(e,"shrink","negative")+e;case 5292:return te+e+_e+ee(e,"basis","preferred-size")+e;case 6060:return te+"box-"+ee(e,"-grow","")+te+e+_e+ee(e,"grow","positive")+e;case 4554:return te+ee(e,/([^-])(transform)/g,"$1"+te+"$2")+e;case 6187:return ee(ee(ee(e,/(zoom-|grab)/,te+"$1"),/(image-set)/,te+"$1"),e,"")+e;case 5495:case 3959:return ee(e,/(image-set\([^]*)/,te+"$1$`$1");case 4968:return ee(ee(e,/(.+:)(flex-)?(.*)/,te+"box-pack:$3"+_e+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+te+e+e;case 4095:case 3583:case 4068:case 2532:return ee(e,/(.+)-inline(.+)/,te+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(lt(e)-1-t>6)switch(we(e,t+1)){case 109:if(we(e,t+4)!==45)break;case 102:return ee(e,/(.+:)(.+)-([^]+)/,"$1"+te+"$2-$3$1"+xl+(we(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Dl(e,"stretch")?ip(ee(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(we(e,t+1)!==115)break;case 6444:switch(we(e,lt(e)-3-(~Dl(e,"!important")&&10))){case 107:return ee(e,":",":"+te)+e;case 101:return ee(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+te+(we(e,14)===45?"inline-":"")+"box$3$1"+te+"$2$3$1"+_e+"$2box$3")+e}break;case 5936:switch(we(e,t+11)){case 114:return te+e+_e+ee(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return te+e+_e+ee(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return te+e+_e+ee(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return te+e+_e+e+e}return e}R(ip,"prefix");var LD=R(function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case rp:e.return=ip(e.value,e.length);break;case e3:return an([$n(e,{value:ee(e.value,"@","@"+te)})],n);case tp:if(e.length)return n3(e.props,function(a){switch(r3(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return an([$n(e,{props:[ee(a,/:(read-\w+)/,":"+xl+"$1")]})],n);case"::placeholder":return an([$n(e,{props:[ee(a,/:(plac\w+)/,":"+te+"input-$1")]}),$n(e,{props:[ee(a,/:(plac\w+)/,":"+xl+"$1")]}),$n(e,{props:[ee(a,/:(plac\w+)/,_e+"input-$1")]})],n)}return""})}},"prefixer"),OD=[LD],MD=R(function(e){var t=e.key;if(!t)throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache. If multiple caches share the same key they might "fight" for each other's style elements.`);if(t==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(v){var g=v.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var n=e.stylisPlugins||OD;if(/[^a-z-]/.test(t))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+t+'" was passed');var a={},o,i=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(v){for(var g=v.getAttribute("data-emotion").split(" "),w=1;w=4;++n,a-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}R(g3,"murmur2");var HD={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},bh=`You have illegal escape sequence in your template literal, most likely inside content's property value. Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';". @@ -676,7 +676,7 @@ To pass a single animation please supply them in simple values, e.g. animation(' `,77:`remToPx expects a value in "rem" but you provided it in "%s". `,78:`base must be set in "px" or "%" but you set it in "%s". -`};function YL(){for(var e=arguments.length,t=new Array(e),r=0;r1?a-1:0),i=1;i=0&&a<1?(s=o,c=i):a>=1&&a<2?(s=i,c=o):a>=2&&a<3?(c=o,d=i):a>=3&&a<4?(c=i,d=o):a>=4&&a<5?(s=i,d=o):a>=5&&a<6&&(s=o,d=i);var p=r-o/2,m=s+p,h=c+p,f=d+p;return n(m,h,f)}var w4={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function ZL(e){if(typeof e!="string")return e;var t=e.toLowerCase();return w4[t]?"#"+w4[t]:e}var JL=/^#[a-fA-F0-9]{6}$/,XL=/^#[a-fA-F0-9]{8}$/,QL=/^#[a-fA-F0-9]{3}$/,eO=/^#[a-fA-F0-9]{4}$/,j0=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,tO=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,rO=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,nO=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function du(e){if(typeof e!="string")throw new Ot(3);var t=ZL(e);if(t.match(JL))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(XL)){var r=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:r}}if(t.match(QL))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(eO)){var n=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:n}}var a=j0.exec(t);if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10)};var o=tO.exec(t.substring(0,50));if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10),alpha:parseFloat(""+o[4])>1?parseFloat(""+o[4])/100:parseFloat(""+o[4])};var i=rO.exec(t);if(i){var s=parseInt(""+i[1],10),c=parseInt(""+i[2],10)/100,d=parseInt(""+i[3],10)/100,p="rgb("+Go(s,c,d)+")",m=j0.exec(p);if(!m)throw new Ot(4,t,p);return{red:parseInt(""+m[1],10),green:parseInt(""+m[2],10),blue:parseInt(""+m[3],10)}}var h=nO.exec(t.substring(0,50));if(h){var f=parseInt(""+h[1],10),v=parseInt(""+h[2],10)/100,g=parseInt(""+h[3],10)/100,w="rgb("+Go(f,v,g)+")",x=j0.exec(w);if(!x)throw new Ot(4,t,w);return{red:parseInt(""+x[1],10),green:parseInt(""+x[2],10),blue:parseInt(""+x[3],10),alpha:parseFloat(""+h[4])>1?parseFloat(""+h[4])/100:parseFloat(""+h[4])}}throw new Ot(5)}function aO(e){var t=e.red/255,r=e.green/255,n=e.blue/255,a=Math.max(t,r,n),o=Math.min(t,r,n),i=(a+o)/2;if(a===o)return e.alpha!==void 0?{hue:0,saturation:0,lightness:i,alpha:e.alpha}:{hue:0,saturation:0,lightness:i};var s,c=a-o,d=i>.5?c/(2-a-o):c/(a+o);switch(a){case t:s=(r-n)/c+(r=1?ps(e,t,r):"rgba("+Go(e,t,r)+","+n+")";if(typeof e=="object"&&t===void 0&&r===void 0&&n===void 0)return e.alpha>=1?ps(e.hue,e.saturation,e.lightness):"rgba("+Go(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new Ot(2)}function P1(e,t,r){if(typeof e=="number"&&typeof t=="number"&&typeof r=="number")return M1("#"+Yr(e)+Yr(t)+Yr(r));if(typeof e=="object"&&t===void 0&&r===void 0)return M1("#"+Yr(e.red)+Yr(e.green)+Yr(e.blue));throw new Ot(6)}function nr(e,t,r,n){if(typeof e=="string"&&typeof t=="number"){var a=du(e);return"rgba("+a.red+","+a.green+","+a.blue+","+t+")"}else{if(typeof e=="number"&&typeof t=="number"&&typeof r=="number"&&typeof n=="number")return n>=1?P1(e,t,r):"rgba("+e+","+t+","+r+","+n+")";if(typeof e=="object"&&t===void 0&&r===void 0&&n===void 0)return e.alpha>=1?P1(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")"}throw new Ot(7)}var uO=function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&(typeof e.alpha!="number"||typeof e.alpha>"u")},cO=function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&typeof e.alpha=="number"},dO=function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&(typeof e.alpha!="number"||typeof e.alpha>"u")},pO=function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&typeof e.alpha=="number"};function O9(e){if(typeof e!="object")throw new Ot(8);if(cO(e))return nr(e);if(uO(e))return P1(e);if(pO(e))return sO(e);if(dO(e))return lO(e);throw new Ot(8)}function M9(e,t,r){return function(){var n=r.concat(Array.prototype.slice.call(arguments));return n.length>=t?e.apply(this,n):M9(e,t,n)}}function pu(e){return M9(e,e.length,[])}function fu(e,t,r){return Math.max(e,Math.min(t,r))}function fO(e,t){if(t==="transparent")return t;var r=L9(t);return O9(Ca({},r,{lightness:fu(0,1,r.lightness-parseFloat(e))}))}var hO=pu(fO),Rt=hO;function mO(e,t){if(t==="transparent")return t;var r=L9(t);return O9(Ca({},r,{lightness:fu(0,1,r.lightness+parseFloat(e))}))}var gO=pu(mO),Kr=gO;function vO(e,t){if(t==="transparent")return t;var r=du(t),n=typeof r.alpha=="number"?r.alpha:1,a=Ca({},r,{alpha:fu(0,1,(n*100+parseFloat(e)*100)/100)});return nr(a)}var yO=pu(vO),Zi=yO;function bO(e,t){if(t==="transparent")return t;var r=du(t),n=typeof r.alpha=="number"?r.alpha:1,a=Ca({},r,{alpha:fu(0,1,+(n*100-parseFloat(e)*100).toFixed(2)/100)});return nr(a)}var wO=pu(bO),oe=wO,EO=F.div(se,({theme:e})=>({backgroundColor:e.base==="light"?"rgba(0,0,0,.01)":"rgba(255,255,255,.01)",borderRadius:e.appBorderRadius,border:`1px dashed ${e.appBorderColor}`,display:"flex",alignItems:"center",justifyContent:"center",padding:20,margin:"25px 0 40px",color:oe(.3,e.color.defaultText),fontSize:e.typography.size.s2})),P9=e=>y.createElement(EO,{...e,className:"docblock-emptyblock sb-unstyled"}),xO=F(jf)(({theme:e})=>({fontSize:`${e.typography.size.s2-1}px`,lineHeight:"19px",margin:"25px 0 40px",borderRadius:e.appBorderRadius,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0","pre.prismjs":{padding:20,background:"inherit"}})),DO=F.div(({theme:e})=>({background:e.background.content,borderRadius:e.appBorderRadius,border:`1px solid ${e.appBorderColor}`,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0",margin:"25px 0 40px",padding:"20px 20px 20px 22px"})),Ji=F.div(({theme:e})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,height:17,marginTop:1,width:"60%",[`&:first-child${nd}`]:{margin:0}})),CO=()=>y.createElement(DO,null,y.createElement(Ji,null),y.createElement(Ji,{style:{width:"80%"}}),y.createElement(Ji,{style:{width:"30%"}}),y.createElement(Ji,{style:{width:"80%"}})),$9=({isLoading:e,error:t,language:r,code:n,dark:a,format:o=!1,...i})=>{let{typography:s}=x3();if(e)return y.createElement(CO,null);if(t)return y.createElement(P9,null,t);let c=y.createElement(xO,{bordered:!0,copyable:!0,format:o,language:r,className:"docblock-source sb-unstyled",...i},n);if(typeof a>"u")return c;let d=a?td.dark:td.light;return y.createElement(D3,{theme:rd({...d,fontCode:s.fonts.mono,fontBase:s.fonts.base})},c)},he=e=>`& :where(${e}:not(.sb-anchor, .sb-unstyled, .sb-unstyled ${e}))`,Qf=600,SO=F.h1(se,({theme:e})=>({color:e.color.defaultText,fontSize:e.typography.size.m3,fontWeight:e.typography.weight.bold,lineHeight:"32px",[`@media (min-width: ${Qf}px)`]:{fontSize:e.typography.size.l1,lineHeight:"36px",marginBottom:"16px"}})),kO=F.h2(se,({theme:e})=>({fontWeight:e.typography.weight.regular,fontSize:e.typography.size.s3,lineHeight:"20px",borderBottom:"none",marginBottom:15,[`@media (min-width: ${Qf}px)`]:{fontSize:e.typography.size.m1,lineHeight:"28px",marginBottom:24},color:oe(.25,e.color.defaultText)})),AO=F.div(({theme:e})=>{let t={fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s3,margin:0,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch"},r={margin:"20px 0 8px",padding:0,cursor:"text",position:"relative",color:e.color.defaultText,"&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& code":{fontSize:"inherit"}},n={lineHeight:1,margin:"0 2px",padding:"3px 5px",whiteSpace:"nowrap",borderRadius:3,fontSize:e.typography.size.s2-1,border:e.base==="light"?`1px solid ${e.color.mediumlight}`:`1px solid ${e.color.darker}`,color:e.base==="light"?oe(.1,e.color.defaultText):oe(.3,e.color.defaultText),backgroundColor:e.base==="light"?e.color.lighter:e.color.border};return{maxWidth:1e3,width:"100%",[he("a")]:{...t,fontSize:"inherit",lineHeight:"24px",color:e.color.secondary,textDecoration:"none","&.absent":{color:"#cc0000"},"&.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0}},[he("blockquote")]:{...t,margin:"16px 0",borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},[he("div")]:t,[he("dl")]:{...t,margin:"16px 0",padding:0,"& dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",padding:0,margin:"16px 0 4px"},"& dt:first-of-type":{padding:0},"& dt > :first-of-type":{marginTop:0},"& dt > :last-child":{marginBottom:0},"& dd":{margin:"0 0 16px",padding:"0 15px"},"& dd > :first-of-type":{marginTop:0},"& dd > :last-child":{marginBottom:0}},[he("h1")]:{...t,...r,fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},[he("h2")]:{...t,...r,fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`},[he("h3")]:{...t,...r,fontSize:`${e.typography.size.m1}px`,fontWeight:e.typography.weight.bold},[he("h4")]:{...t,...r,fontSize:`${e.typography.size.s3}px`},[he("h5")]:{...t,...r,fontSize:`${e.typography.size.s2}px`},[he("h6")]:{...t,...r,fontSize:`${e.typography.size.s2}px`,color:e.color.dark},[he("hr")]:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},[he("img")]:{maxWidth:"100%"},[he("li")]:{...t,fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:"24px","& + li":{marginTop:".25em"},"& ul, & ol":{marginTop:".25em",marginBottom:0},"& code":n},[he("ol")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},[he("p")]:{...t,margin:"16px 0",fontSize:e.typography.size.s2,lineHeight:"24px",color:e.color.defaultText,"& code":n},[he("pre")]:{...t,fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",lineHeight:"18px",padding:"11px 1rem",whiteSpace:"pre-wrap",color:"inherit",borderRadius:3,margin:"1rem 0","&:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"& pre, &.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px",code:{color:"inherit",fontSize:"inherit"}},"& code":{whiteSpace:"pre"},"& code, & tt":{border:"none"}},[he("span")]:{...t,"&.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${e.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:e.color.darkest,display:"block",padding:"5px 0 0"}},"&.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"&.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"&.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"&.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}}},[he("table")]:{...t,margin:"16px 0",fontSize:e.typography.size.s2,lineHeight:"24px",padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:e.appContentBg,margin:0,padding:0},"& tr:nth-of-type(2n)":{backgroundColor:e.base==="dark"?e.color.darker:e.color.lighter},"& tr th":{fontWeight:"bold",color:e.color.defaultText,border:`1px solid ${e.appBorderColor}`,margin:0,padding:"6px 13px"},"& tr td":{border:`1px solid ${e.appBorderColor}`,color:e.color.defaultText,margin:0,padding:"6px 13px"},"& tr th :first-of-type, & tr td :first-of-type":{marginTop:0},"& tr th :last-child, & tr td :last-child":{marginBottom:0}},[he("ul")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0},listStyle:"disc"}}}),FO=F.div(({theme:e})=>({background:e.background.content,display:"flex",justifyContent:"center",padding:"4rem 20px",minHeight:"100vh",boxSizing:"border-box",gap:"3rem",[`@media (min-width: ${Qf}px)`]:{}})),_O=({children:e,toc:t})=>y.createElement(FO,{className:"sbdocs sbdocs-wrapper"},y.createElement(AO,{className:"sbdocs sbdocs-content"},e),t),hu=e=>({borderRadius:e.appBorderRadius,background:e.background.content,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0",border:`1px solid ${e.appBorderColor}`}),{window:RO}=globalThis,IO=class extends l.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{id:e}=this.props;this.iframe=RO.document.getElementById(e)}shouldComponentUpdate(e){let{scale:t}=e;return t!==this.props.scale&&this.setIframeBodyStyle({width:`${t*100}%`,height:`${t*100}%`,transform:`scale(${1/t})`,transformOrigin:"top left"}),!1}setIframeBodyStyle(e){return Object.assign(this.iframe.contentDocument.body.style,e)}render(){let{id:e,title:t,src:r,allowFullScreen:n,scale:a,...o}=this.props;return y.createElement("iframe",{id:e,title:t,src:r,...n?{allow:"fullscreen"}:{},loading:"lazy",...o})}},N9=l.createContext({scale:1}),{PREVIEW_URL:BO}=globalThis,TO=BO||"iframe.html",$1=({story:e,primary:t})=>`story--${e.id}${t?"--primary":""}`,zO=e=>{let t=l.useRef(),[r,n]=l.useState(!0),[a,o]=l.useState(),{story:i,height:s,autoplay:c,forceInitialArgs:d,renderStoryToElement:p}=e;return l.useEffect(()=>{if(!(i&&t.current))return()=>{};let m=t.current,h=p(i,m,{showMain:()=>{},showError:({title:f,description:v})=>o(new Error(`${f} - ${v}`)),showException:f=>o(f)},{autoplay:c,forceInitialArgs:d});return n(!1),()=>{Promise.resolve().then(()=>h())}},[c,p,i]),a?y.createElement("pre",null,y.createElement(WT,{error:a})):y.createElement(y.Fragment,null,s?y.createElement("style",null,`#${$1(e)} { min-height: ${s}; transform: translateZ(0); overflow: auto }`):null,r&&y.createElement(H9,null),y.createElement("div",{ref:t,id:`${$1(e)}-inner`,"data-name":i.name}))},LO=({story:e,height:t="500px"})=>y.createElement("div",{style:{width:"100%",height:t}},y.createElement(N9.Consumer,null,({scale:r})=>y.createElement(IO,{key:"iframe",id:`iframe--${e.id}`,title:e.name,src:mL(TO,e.id,{viewMode:"story"}),allowFullScreen:!0,scale:r,style:{width:"100%",height:"100%",border:"0 none"}}))),OO=F.strong(({theme:e})=>({color:e.color.orange})),MO=e=>{let{inline:t,story:r}=e;return t&&!e.autoplay&&r.usesMount?y.createElement(OO,null,"This story mounts inside of play. Set"," ",y.createElement("a",{href:"https://storybook.js.org/docs/api/doc-blocks/doc-block-story#autoplay"},"autoplay")," ","to true to view this story."):y.createElement("div",{id:$1(e),className:"sb-story sb-unstyled","data-story-block":"true"},t?y.createElement(zO,{...e}):y.createElement(LO,{...e}))},H9=()=>y.createElement(hL,null),PO=F(Jf)({position:"absolute",left:0,right:0,top:0,transition:"transform .2s linear"}),$O=F.div({display:"flex",alignItems:"center",gap:4}),NO=F.div(({theme:e})=>({width:14,height:14,borderRadius:2,margin:"0 7px",backgroundColor:e.appBorderColor,animation:`${e.animation.glow} 1.5s ease-in-out infinite`})),HO=({isLoading:e,storyId:t,baseUrl:r,zoom:n,resetZoom:a,...o})=>y.createElement(PO,{...o},y.createElement($O,{key:"left"},e?[1,2,3].map(i=>y.createElement(NO,{key:i})):y.createElement(y.Fragment,null,y.createElement(sn,{key:"zoomin",onClick:i=>{i.preventDefault(),n(.8)},title:"Zoom in"},y.createElement(bL,null)),y.createElement(sn,{key:"zoomout",onClick:i=>{i.preventDefault(),n(1.25)},title:"Zoom out"},y.createElement(wL,null)),y.createElement(sn,{key:"zoomreset",onClick:i=>{i.preventDefault(),a()},title:"Reset zoom"},y.createElement(EL,null))))),jO=F.div(({isColumn:e,columns:t,layout:r})=>({display:e||!t?"block":"flex",position:"relative",flexWrap:"wrap",overflow:"auto",flexDirection:e?"column":"row","& .innerZoomElementWrapper > *":e?{width:r!=="fullscreen"?"calc(100% - 20px)":"100%",display:"block"}:{maxWidth:r!=="fullscreen"?"calc(100% - 20px)":"100%",display:"inline-block"}}),({layout:e="padded"})=>e==="centered"||e==="padded"?{padding:"30px 20px","& .innerZoomElementWrapper > *":{width:"auto",border:"10px solid transparent!important"}}:{},({layout:e="padded"})=>e==="centered"?{display:"flex",justifyContent:"center",justifyItems:"center",alignContent:"center",alignItems:"center"}:{},({columns:e})=>e&&e>1?{".innerZoomElementWrapper > *":{minWidth:`calc(100% / ${e} - 20px)`}}:{}),E4=F($9)(({theme:e})=>({margin:0,borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:e.appBorderRadius,borderBottomRightRadius:e.appBorderRadius,border:"none",background:e.base==="light"?"rgba(0, 0, 0, 0.85)":Rt(.05,e.background.content),color:e.color.lightest,button:{background:e.base==="light"?"rgba(0, 0, 0, 0.85)":Rt(.05,e.background.content)}})),VO=F.div(({theme:e,withSource:t,isExpanded:r})=>({position:"relative",overflow:"hidden",margin:"25px 0 40px",...hu(e),borderBottomLeftRadius:t&&r&&0,borderBottomRightRadius:t&&r&&0,borderBottomWidth:r&&0,"h3 + &":{marginTop:"16px"}}),({withToolbar:e})=>e&&{paddingTop:40}),UO=(e,t,r)=>{switch(!0){case!!(e&&e.error):return{source:null,actionItem:{title:"No code available",className:"docblock-code-toggle docblock-code-toggle--disabled",disabled:!0,onClick:()=>r(!1)}};case t:return{source:y.createElement(E4,{...e,dark:!0}),actionItem:{title:"Hide code",className:"docblock-code-toggle docblock-code-toggle--expanded",onClick:()=>r(!1)}};default:return{source:y.createElement(E4,{...e,dark:!0}),actionItem:{title:"Show code",className:"docblock-code-toggle",onClick:()=>r(!0)}}}};function qO(e){if(l.Children.count(e)===1){let t=e;if(t.props)return t.props.id}return null}var WO=F(HO)({position:"absolute",top:0,left:0,right:0,height:40}),GO=F.div({overflow:"hidden",position:"relative"}),j9=({isLoading:e,isColumn:t,columns:r,children:n,withSource:a,withToolbar:o=!1,isExpanded:i=!1,additionalActions:s,className:c,layout:d="padded",...p})=>{let[m,h]=l.useState(i),{source:f,actionItem:v}=UO(a,m,h),[g,w]=l.useState(1),x=[c].concat(["sbdocs","sbdocs-preview","sb-unstyled"]),D=a?[v]:[],[E,b]=l.useState(s?[...s]:[]),C=[...D,...E],{window:S}=globalThis,k=l.useCallback(async _=>{let{createCopyToClipboardFunction:I}=await Y1(()=>import("./index-eAyo8Lf0.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url);I()},[]),A=_=>{let I=S.getSelection();I&&I.type==="Range"||(_.preventDefault(),E.filter(B=>B.title==="Copied").length===0&&k(f.props.code).then(()=>{b([...E,{title:"Copied",onClick:()=>{}}]),S.setTimeout(()=>b(E.filter(B=>B.title!=="Copied")),1500)}))};return y.createElement(VO,{withSource:a,withToolbar:o,...p,className:x.join(" ")},o&&y.createElement(WO,{isLoading:e,border:!0,zoom:_=>w(g*_),resetZoom:()=>w(1),storyId:qO(n),baseUrl:"./iframe.html"}),y.createElement(N9.Provider,{value:{scale:g}},y.createElement(GO,{className:"docs-story",onCopyCapture:a&&A},y.createElement(jO,{isColumn:t||!Array.isArray(n),columns:r,layout:d},y.createElement(PT.Element,{scale:g},Array.isArray(n)?n.map((_,I)=>y.createElement("div",{key:I},_)):y.createElement("div",null,n))),y.createElement(Cp,{actionItems:C}))),a&&m&&f)};F(j9)(()=>({".docs-story":{paddingTop:32,paddingBottom:40}}));function Jr(){return Jr=Object.assign?Object.assign.bind():function(e){for(var t=1;t(e[t.toLowerCase()]=t,e),{for:"htmlFor"}),S4={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},KO=["style","script"],ZO=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,JO=/mailto:/i,XO=/\n{2,}$/,V9=/^(\s*>[\s\S]*?)(?=\n{2,})/,QO=/^ *> ?/gm,eM=/^ {2,}\n/,tM=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,U9=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,q9=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,rM=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,nM=/^(?:\n *)*\n/,aM=/\r\n?/g,oM=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,iM=/^\[\^([^\]]+)]/,lM=/\f/g,sM=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,uM=/^\s*?\[(x|\s)\]/,W9=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,G9=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Y9=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,N1=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?([^>]*)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,cM=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,K9=/^)/,dM=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,H1=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,pM=/^\{.*\}$/,fM=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,hM=/^<([^ >]+@[^ >]+)>/,mM=/^<([^ >]+:\/[^ >]+)>/,gM=/-([a-z])?/gi,Z9=/^(.*\|?.*)\n *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*)\n?/,vM=/^\[([^\]]*)\]:\s+]+)>?\s*("([^"]*)")?/,yM=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,bM=/^\[([^\]]*)\] ?\[([^\]]*)\]/,wM=/(\[|\])/g,EM=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,xM=/\t/g,DM=/^ *\| */,CM=/(^ *\||\| *$)/g,SM=/ *$/,kM=/^ *:-+: *$/,AM=/^ *:-+ *$/,FM=/^ *-+: *$/,mu="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~~.*?~~|==.*?==|.|\\n)*?)",_M=new RegExp(`^([*_])\\1${mu}\\1\\1(?!\\1)`),RM=new RegExp(`^([*_])${mu}\\1(?!\\1|\\w)`),IM=new RegExp(`^==${mu}==`),BM=new RegExp(`^~~${mu}~~`),TM=/^\\([^0-9A-Za-z\s])/,zM=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,LM=/^\n+/,OM=/^([ \t]*)/,MM=/\\([^\\])/g,k4=/ *\n+$/,PM=/(?:^|\n)( *)$/,eh="(?:\\d+\\.)",th="(?:[*+-])";function J9(e){return"( *)("+(e===1?eh:th)+") +"}var X9=J9(1),Q9=J9(2);function ex(e){return new RegExp("^"+(e===1?X9:Q9))}var $M=ex(1),NM=ex(2);function tx(e){return new RegExp("^"+(e===1?X9:Q9)+"[^\\n]*(?:\\n(?!\\1"+(e===1?eh:th)+" )[^\\n]*)*(\\n|$)","gm")}var rx=tx(1),nx=tx(2);function ax(e){let t=e===1?eh:th;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}var ox=ax(1),ix=ax(2);function A4(e,t){let r=t===1,n=r?ox:ix,a=r?rx:nx,o=r?$M:NM;return{match(i,s,c){let d=PM.exec(c);return d&&(s.list||!s.inline&&!s.simple)?n.exec(i=d[1]+i):null},order:1,parse(i,s,c){let d=r?+i[2]:void 0,p=i[0].replace(XO,` +`};function YL(){for(var e=arguments.length,t=new Array(e),r=0;r1?a-1:0),i=1;i=0&&a<1?(s=o,c=i):a>=1&&a<2?(s=i,c=o):a>=2&&a<3?(c=o,d=i):a>=3&&a<4?(c=i,d=o):a>=4&&a<5?(s=i,d=o):a>=5&&a<6&&(s=o,d=i);var p=r-o/2,m=s+p,h=c+p,f=d+p;return n(m,h,f)}var w4={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function ZL(e){if(typeof e!="string")return e;var t=e.toLowerCase();return w4[t]?"#"+w4[t]:e}var JL=/^#[a-fA-F0-9]{6}$/,XL=/^#[a-fA-F0-9]{8}$/,QL=/^#[a-fA-F0-9]{3}$/,eO=/^#[a-fA-F0-9]{4}$/,j0=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,tO=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,rO=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,nO=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function du(e){if(typeof e!="string")throw new Ot(3);var t=ZL(e);if(t.match(JL))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(XL)){var r=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:r}}if(t.match(QL))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(eO)){var n=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:n}}var a=j0.exec(t);if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10)};var o=tO.exec(t.substring(0,50));if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10),alpha:parseFloat(""+o[4])>1?parseFloat(""+o[4])/100:parseFloat(""+o[4])};var i=rO.exec(t);if(i){var s=parseInt(""+i[1],10),c=parseInt(""+i[2],10)/100,d=parseInt(""+i[3],10)/100,p="rgb("+Go(s,c,d)+")",m=j0.exec(p);if(!m)throw new Ot(4,t,p);return{red:parseInt(""+m[1],10),green:parseInt(""+m[2],10),blue:parseInt(""+m[3],10)}}var h=nO.exec(t.substring(0,50));if(h){var f=parseInt(""+h[1],10),v=parseInt(""+h[2],10)/100,g=parseInt(""+h[3],10)/100,w="rgb("+Go(f,v,g)+")",x=j0.exec(w);if(!x)throw new Ot(4,t,w);return{red:parseInt(""+x[1],10),green:parseInt(""+x[2],10),blue:parseInt(""+x[3],10),alpha:parseFloat(""+h[4])>1?parseFloat(""+h[4])/100:parseFloat(""+h[4])}}throw new Ot(5)}function aO(e){var t=e.red/255,r=e.green/255,n=e.blue/255,a=Math.max(t,r,n),o=Math.min(t,r,n),i=(a+o)/2;if(a===o)return e.alpha!==void 0?{hue:0,saturation:0,lightness:i,alpha:e.alpha}:{hue:0,saturation:0,lightness:i};var s,c=a-o,d=i>.5?c/(2-a-o):c/(a+o);switch(a){case t:s=(r-n)/c+(r=1?ps(e,t,r):"rgba("+Go(e,t,r)+","+n+")";if(typeof e=="object"&&t===void 0&&r===void 0&&n===void 0)return e.alpha>=1?ps(e.hue,e.saturation,e.lightness):"rgba("+Go(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new Ot(2)}function P1(e,t,r){if(typeof e=="number"&&typeof t=="number"&&typeof r=="number")return M1("#"+Yr(e)+Yr(t)+Yr(r));if(typeof e=="object"&&t===void 0&&r===void 0)return M1("#"+Yr(e.red)+Yr(e.green)+Yr(e.blue));throw new Ot(6)}function nr(e,t,r,n){if(typeof e=="string"&&typeof t=="number"){var a=du(e);return"rgba("+a.red+","+a.green+","+a.blue+","+t+")"}else{if(typeof e=="number"&&typeof t=="number"&&typeof r=="number"&&typeof n=="number")return n>=1?P1(e,t,r):"rgba("+e+","+t+","+r+","+n+")";if(typeof e=="object"&&t===void 0&&r===void 0&&n===void 0)return e.alpha>=1?P1(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")"}throw new Ot(7)}var uO=function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&(typeof e.alpha!="number"||typeof e.alpha>"u")},cO=function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&typeof e.alpha=="number"},dO=function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&(typeof e.alpha!="number"||typeof e.alpha>"u")},pO=function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&typeof e.alpha=="number"};function O9(e){if(typeof e!="object")throw new Ot(8);if(cO(e))return nr(e);if(uO(e))return P1(e);if(pO(e))return sO(e);if(dO(e))return lO(e);throw new Ot(8)}function M9(e,t,r){return function(){var n=r.concat(Array.prototype.slice.call(arguments));return n.length>=t?e.apply(this,n):M9(e,t,n)}}function pu(e){return M9(e,e.length,[])}function fu(e,t,r){return Math.max(e,Math.min(t,r))}function fO(e,t){if(t==="transparent")return t;var r=L9(t);return O9(Ca({},r,{lightness:fu(0,1,r.lightness-parseFloat(e))}))}var hO=pu(fO),Rt=hO;function mO(e,t){if(t==="transparent")return t;var r=L9(t);return O9(Ca({},r,{lightness:fu(0,1,r.lightness+parseFloat(e))}))}var gO=pu(mO),Kr=gO;function vO(e,t){if(t==="transparent")return t;var r=du(t),n=typeof r.alpha=="number"?r.alpha:1,a=Ca({},r,{alpha:fu(0,1,(n*100+parseFloat(e)*100)/100)});return nr(a)}var yO=pu(vO),Zi=yO;function bO(e,t){if(t==="transparent")return t;var r=du(t),n=typeof r.alpha=="number"?r.alpha:1,a=Ca({},r,{alpha:fu(0,1,+(n*100-parseFloat(e)*100).toFixed(2)/100)});return nr(a)}var wO=pu(bO),oe=wO,EO=F.div(se,({theme:e})=>({backgroundColor:e.base==="light"?"rgba(0,0,0,.01)":"rgba(255,255,255,.01)",borderRadius:e.appBorderRadius,border:`1px dashed ${e.appBorderColor}`,display:"flex",alignItems:"center",justifyContent:"center",padding:20,margin:"25px 0 40px",color:oe(.3,e.color.defaultText),fontSize:e.typography.size.s2})),P9=e=>y.createElement(EO,{...e,className:"docblock-emptyblock sb-unstyled"}),xO=F(jf)(({theme:e})=>({fontSize:`${e.typography.size.s2-1}px`,lineHeight:"19px",margin:"25px 0 40px",borderRadius:e.appBorderRadius,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0","pre.prismjs":{padding:20,background:"inherit"}})),DO=F.div(({theme:e})=>({background:e.background.content,borderRadius:e.appBorderRadius,border:`1px solid ${e.appBorderColor}`,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0",margin:"25px 0 40px",padding:"20px 20px 20px 22px"})),Ji=F.div(({theme:e})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,height:17,marginTop:1,width:"60%",[`&:first-child${nd}`]:{margin:0}})),CO=()=>y.createElement(DO,null,y.createElement(Ji,null),y.createElement(Ji,{style:{width:"80%"}}),y.createElement(Ji,{style:{width:"30%"}}),y.createElement(Ji,{style:{width:"80%"}})),$9=({isLoading:e,error:t,language:r,code:n,dark:a,format:o=!1,...i})=>{let{typography:s}=x3();if(e)return y.createElement(CO,null);if(t)return y.createElement(P9,null,t);let c=y.createElement(xO,{bordered:!0,copyable:!0,format:o,language:r,className:"docblock-source sb-unstyled",...i},n);if(typeof a>"u")return c;let d=a?td.dark:td.light;return y.createElement(D3,{theme:rd({...d,fontCode:s.fonts.mono,fontBase:s.fonts.base})},c)},he=e=>`& :where(${e}:not(.sb-anchor, .sb-unstyled, .sb-unstyled ${e}))`,Qf=600,SO=F.h1(se,({theme:e})=>({color:e.color.defaultText,fontSize:e.typography.size.m3,fontWeight:e.typography.weight.bold,lineHeight:"32px",[`@media (min-width: ${Qf}px)`]:{fontSize:e.typography.size.l1,lineHeight:"36px",marginBottom:"16px"}})),kO=F.h2(se,({theme:e})=>({fontWeight:e.typography.weight.regular,fontSize:e.typography.size.s3,lineHeight:"20px",borderBottom:"none",marginBottom:15,[`@media (min-width: ${Qf}px)`]:{fontSize:e.typography.size.m1,lineHeight:"28px",marginBottom:24},color:oe(.25,e.color.defaultText)})),AO=F.div(({theme:e})=>{let t={fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s3,margin:0,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch"},r={margin:"20px 0 8px",padding:0,cursor:"text",position:"relative",color:e.color.defaultText,"&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& code":{fontSize:"inherit"}},n={lineHeight:1,margin:"0 2px",padding:"3px 5px",whiteSpace:"nowrap",borderRadius:3,fontSize:e.typography.size.s2-1,border:e.base==="light"?`1px solid ${e.color.mediumlight}`:`1px solid ${e.color.darker}`,color:e.base==="light"?oe(.1,e.color.defaultText):oe(.3,e.color.defaultText),backgroundColor:e.base==="light"?e.color.lighter:e.color.border};return{maxWidth:1e3,width:"100%",[he("a")]:{...t,fontSize:"inherit",lineHeight:"24px",color:e.color.secondary,textDecoration:"none","&.absent":{color:"#cc0000"},"&.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0}},[he("blockquote")]:{...t,margin:"16px 0",borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},[he("div")]:t,[he("dl")]:{...t,margin:"16px 0",padding:0,"& dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",padding:0,margin:"16px 0 4px"},"& dt:first-of-type":{padding:0},"& dt > :first-of-type":{marginTop:0},"& dt > :last-child":{marginBottom:0},"& dd":{margin:"0 0 16px",padding:"0 15px"},"& dd > :first-of-type":{marginTop:0},"& dd > :last-child":{marginBottom:0}},[he("h1")]:{...t,...r,fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},[he("h2")]:{...t,...r,fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`},[he("h3")]:{...t,...r,fontSize:`${e.typography.size.m1}px`,fontWeight:e.typography.weight.bold},[he("h4")]:{...t,...r,fontSize:`${e.typography.size.s3}px`},[he("h5")]:{...t,...r,fontSize:`${e.typography.size.s2}px`},[he("h6")]:{...t,...r,fontSize:`${e.typography.size.s2}px`,color:e.color.dark},[he("hr")]:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},[he("img")]:{maxWidth:"100%"},[he("li")]:{...t,fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:"24px","& + li":{marginTop:".25em"},"& ul, & ol":{marginTop:".25em",marginBottom:0},"& code":n},[he("ol")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},[he("p")]:{...t,margin:"16px 0",fontSize:e.typography.size.s2,lineHeight:"24px",color:e.color.defaultText,"& code":n},[he("pre")]:{...t,fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",lineHeight:"18px",padding:"11px 1rem",whiteSpace:"pre-wrap",color:"inherit",borderRadius:3,margin:"1rem 0","&:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"& pre, &.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px",code:{color:"inherit",fontSize:"inherit"}},"& code":{whiteSpace:"pre"},"& code, & tt":{border:"none"}},[he("span")]:{...t,"&.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${e.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:e.color.darkest,display:"block",padding:"5px 0 0"}},"&.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"&.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"&.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"&.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}}},[he("table")]:{...t,margin:"16px 0",fontSize:e.typography.size.s2,lineHeight:"24px",padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:e.appContentBg,margin:0,padding:0},"& tr:nth-of-type(2n)":{backgroundColor:e.base==="dark"?e.color.darker:e.color.lighter},"& tr th":{fontWeight:"bold",color:e.color.defaultText,border:`1px solid ${e.appBorderColor}`,margin:0,padding:"6px 13px"},"& tr td":{border:`1px solid ${e.appBorderColor}`,color:e.color.defaultText,margin:0,padding:"6px 13px"},"& tr th :first-of-type, & tr td :first-of-type":{marginTop:0},"& tr th :last-child, & tr td :last-child":{marginBottom:0}},[he("ul")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0},listStyle:"disc"}}}),FO=F.div(({theme:e})=>({background:e.background.content,display:"flex",justifyContent:"center",padding:"4rem 20px",minHeight:"100vh",boxSizing:"border-box",gap:"3rem",[`@media (min-width: ${Qf}px)`]:{}})),_O=({children:e,toc:t})=>y.createElement(FO,{className:"sbdocs sbdocs-wrapper"},y.createElement(AO,{className:"sbdocs sbdocs-content"},e),t),hu=e=>({borderRadius:e.appBorderRadius,background:e.background.content,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0",border:`1px solid ${e.appBorderColor}`}),{window:RO}=globalThis,IO=class extends l.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{id:e}=this.props;this.iframe=RO.document.getElementById(e)}shouldComponentUpdate(e){let{scale:t}=e;return t!==this.props.scale&&this.setIframeBodyStyle({width:`${t*100}%`,height:`${t*100}%`,transform:`scale(${1/t})`,transformOrigin:"top left"}),!1}setIframeBodyStyle(e){return Object.assign(this.iframe.contentDocument.body.style,e)}render(){let{id:e,title:t,src:r,allowFullScreen:n,scale:a,...o}=this.props;return y.createElement("iframe",{id:e,title:t,src:r,...n?{allow:"fullscreen"}:{},loading:"lazy",...o})}},N9=l.createContext({scale:1}),{PREVIEW_URL:BO}=globalThis,TO=BO||"iframe.html",$1=({story:e,primary:t})=>`story--${e.id}${t?"--primary":""}`,zO=e=>{let t=l.useRef(),[r,n]=l.useState(!0),[a,o]=l.useState(),{story:i,height:s,autoplay:c,forceInitialArgs:d,renderStoryToElement:p}=e;return l.useEffect(()=>{if(!(i&&t.current))return()=>{};let m=t.current,h=p(i,m,{showMain:()=>{},showError:({title:f,description:v})=>o(new Error(`${f} - ${v}`)),showException:f=>o(f)},{autoplay:c,forceInitialArgs:d});return n(!1),()=>{Promise.resolve().then(()=>h())}},[c,p,i]),a?y.createElement("pre",null,y.createElement(WT,{error:a})):y.createElement(y.Fragment,null,s?y.createElement("style",null,`#${$1(e)} { min-height: ${s}; transform: translateZ(0); overflow: auto }`):null,r&&y.createElement(H9,null),y.createElement("div",{ref:t,id:`${$1(e)}-inner`,"data-name":i.name}))},LO=({story:e,height:t="500px"})=>y.createElement("div",{style:{width:"100%",height:t}},y.createElement(N9.Consumer,null,({scale:r})=>y.createElement(IO,{key:"iframe",id:`iframe--${e.id}`,title:e.name,src:mL(TO,e.id,{viewMode:"story"}),allowFullScreen:!0,scale:r,style:{width:"100%",height:"100%",border:"0 none"}}))),OO=F.strong(({theme:e})=>({color:e.color.orange})),MO=e=>{let{inline:t,story:r}=e;return t&&!e.autoplay&&r.usesMount?y.createElement(OO,null,"This story mounts inside of play. Set"," ",y.createElement("a",{href:"https://storybook.js.org/docs/api/doc-blocks/doc-block-story#autoplay"},"autoplay")," ","to true to view this story."):y.createElement("div",{id:$1(e),className:"sb-story sb-unstyled","data-story-block":"true"},t?y.createElement(zO,{...e}):y.createElement(LO,{...e}))},H9=()=>y.createElement(hL,null),PO=F(Jf)({position:"absolute",left:0,right:0,top:0,transition:"transform .2s linear"}),$O=F.div({display:"flex",alignItems:"center",gap:4}),NO=F.div(({theme:e})=>({width:14,height:14,borderRadius:2,margin:"0 7px",backgroundColor:e.appBorderColor,animation:`${e.animation.glow} 1.5s ease-in-out infinite`})),HO=({isLoading:e,storyId:t,baseUrl:r,zoom:n,resetZoom:a,...o})=>y.createElement(PO,{...o},y.createElement($O,{key:"left"},e?[1,2,3].map(i=>y.createElement(NO,{key:i})):y.createElement(y.Fragment,null,y.createElement(sn,{key:"zoomin",onClick:i=>{i.preventDefault(),n(.8)},title:"Zoom in"},y.createElement(bL,null)),y.createElement(sn,{key:"zoomout",onClick:i=>{i.preventDefault(),n(1.25)},title:"Zoom out"},y.createElement(wL,null)),y.createElement(sn,{key:"zoomreset",onClick:i=>{i.preventDefault(),a()},title:"Reset zoom"},y.createElement(EL,null))))),jO=F.div(({isColumn:e,columns:t,layout:r})=>({display:e||!t?"block":"flex",position:"relative",flexWrap:"wrap",overflow:"auto",flexDirection:e?"column":"row","& .innerZoomElementWrapper > *":e?{width:r!=="fullscreen"?"calc(100% - 20px)":"100%",display:"block"}:{maxWidth:r!=="fullscreen"?"calc(100% - 20px)":"100%",display:"inline-block"}}),({layout:e="padded"})=>e==="centered"||e==="padded"?{padding:"30px 20px","& .innerZoomElementWrapper > *":{width:"auto",border:"10px solid transparent!important"}}:{},({layout:e="padded"})=>e==="centered"?{display:"flex",justifyContent:"center",justifyItems:"center",alignContent:"center",alignItems:"center"}:{},({columns:e})=>e&&e>1?{".innerZoomElementWrapper > *":{minWidth:`calc(100% / ${e} - 20px)`}}:{}),E4=F($9)(({theme:e})=>({margin:0,borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:e.appBorderRadius,borderBottomRightRadius:e.appBorderRadius,border:"none",background:e.base==="light"?"rgba(0, 0, 0, 0.85)":Rt(.05,e.background.content),color:e.color.lightest,button:{background:e.base==="light"?"rgba(0, 0, 0, 0.85)":Rt(.05,e.background.content)}})),VO=F.div(({theme:e,withSource:t,isExpanded:r})=>({position:"relative",overflow:"hidden",margin:"25px 0 40px",...hu(e),borderBottomLeftRadius:t&&r&&0,borderBottomRightRadius:t&&r&&0,borderBottomWidth:r&&0,"h3 + &":{marginTop:"16px"}}),({withToolbar:e})=>e&&{paddingTop:40}),UO=(e,t,r)=>{switch(!0){case!!(e&&e.error):return{source:null,actionItem:{title:"No code available",className:"docblock-code-toggle docblock-code-toggle--disabled",disabled:!0,onClick:()=>r(!1)}};case t:return{source:y.createElement(E4,{...e,dark:!0}),actionItem:{title:"Hide code",className:"docblock-code-toggle docblock-code-toggle--expanded",onClick:()=>r(!1)}};default:return{source:y.createElement(E4,{...e,dark:!0}),actionItem:{title:"Show code",className:"docblock-code-toggle",onClick:()=>r(!0)}}}};function qO(e){if(l.Children.count(e)===1){let t=e;if(t.props)return t.props.id}return null}var WO=F(HO)({position:"absolute",top:0,left:0,right:0,height:40}),GO=F.div({overflow:"hidden",position:"relative"}),j9=({isLoading:e,isColumn:t,columns:r,children:n,withSource:a,withToolbar:o=!1,isExpanded:i=!1,additionalActions:s,className:c,layout:d="padded",...p})=>{let[m,h]=l.useState(i),{source:f,actionItem:v}=UO(a,m,h),[g,w]=l.useState(1),x=[c].concat(["sbdocs","sbdocs-preview","sb-unstyled"]),D=a?[v]:[],[E,b]=l.useState(s?[...s]:[]),C=[...D,...E],{window:S}=globalThis,k=l.useCallback(async _=>{let{createCopyToClipboardFunction:I}=await Y1(()=>import("./index-Ymxyq6zK.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url);I()},[]),A=_=>{let I=S.getSelection();I&&I.type==="Range"||(_.preventDefault(),E.filter(B=>B.title==="Copied").length===0&&k(f.props.code).then(()=>{b([...E,{title:"Copied",onClick:()=>{}}]),S.setTimeout(()=>b(E.filter(B=>B.title!=="Copied")),1500)}))};return y.createElement(VO,{withSource:a,withToolbar:o,...p,className:x.join(" ")},o&&y.createElement(WO,{isLoading:e,border:!0,zoom:_=>w(g*_),resetZoom:()=>w(1),storyId:qO(n),baseUrl:"./iframe.html"}),y.createElement(N9.Provider,{value:{scale:g}},y.createElement(GO,{className:"docs-story",onCopyCapture:a&&A},y.createElement(jO,{isColumn:t||!Array.isArray(n),columns:r,layout:d},y.createElement(PT.Element,{scale:g},Array.isArray(n)?n.map((_,I)=>y.createElement("div",{key:I},_)):y.createElement("div",null,n))),y.createElement(Cp,{actionItems:C}))),a&&m&&f)};F(j9)(()=>({".docs-story":{paddingTop:32,paddingBottom:40}}));function Jr(){return Jr=Object.assign?Object.assign.bind():function(e){for(var t=1;t(e[t.toLowerCase()]=t,e),{for:"htmlFor"}),S4={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},KO=["style","script"],ZO=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,JO=/mailto:/i,XO=/\n{2,}$/,V9=/^(\s*>[\s\S]*?)(?=\n{2,})/,QO=/^ *> ?/gm,eM=/^ {2,}\n/,tM=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,U9=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,q9=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,rM=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,nM=/^(?:\n *)*\n/,aM=/\r\n?/g,oM=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,iM=/^\[\^([^\]]+)]/,lM=/\f/g,sM=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,uM=/^\s*?\[(x|\s)\]/,W9=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,G9=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Y9=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,N1=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?([^>]*)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,cM=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,K9=/^)/,dM=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,H1=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,pM=/^\{.*\}$/,fM=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,hM=/^<([^ >]+@[^ >]+)>/,mM=/^<([^ >]+:\/[^ >]+)>/,gM=/-([a-z])?/gi,Z9=/^(.*\|?.*)\n *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*)\n?/,vM=/^\[([^\]]*)\]:\s+]+)>?\s*("([^"]*)")?/,yM=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,bM=/^\[([^\]]*)\] ?\[([^\]]*)\]/,wM=/(\[|\])/g,EM=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,xM=/\t/g,DM=/^ *\| */,CM=/(^ *\||\| *$)/g,SM=/ *$/,kM=/^ *:-+: *$/,AM=/^ *:-+ *$/,FM=/^ *-+: *$/,mu="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~~.*?~~|==.*?==|.|\\n)*?)",_M=new RegExp(`^([*_])\\1${mu}\\1\\1(?!\\1)`),RM=new RegExp(`^([*_])${mu}\\1(?!\\1|\\w)`),IM=new RegExp(`^==${mu}==`),BM=new RegExp(`^~~${mu}~~`),TM=/^\\([^0-9A-Za-z\s])/,zM=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,LM=/^\n+/,OM=/^([ \t]*)/,MM=/\\([^\\])/g,k4=/ *\n+$/,PM=/(?:^|\n)( *)$/,eh="(?:\\d+\\.)",th="(?:[*+-])";function J9(e){return"( *)("+(e===1?eh:th)+") +"}var X9=J9(1),Q9=J9(2);function ex(e){return new RegExp("^"+(e===1?X9:Q9))}var $M=ex(1),NM=ex(2);function tx(e){return new RegExp("^"+(e===1?X9:Q9)+"[^\\n]*(?:\\n(?!\\1"+(e===1?eh:th)+" )[^\\n]*)*(\\n|$)","gm")}var rx=tx(1),nx=tx(2);function ax(e){let t=e===1?eh:th;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}var ox=ax(1),ix=ax(2);function A4(e,t){let r=t===1,n=r?ox:ix,a=r?rx:nx,o=r?$M:NM;return{match(i,s,c){let d=PM.exec(c);return d&&(s.list||!s.inline&&!s.simple)?n.exec(i=d[1]+i):null},order:1,parse(i,s,c){let d=r?+i[2]:void 0,p=i[0].replace(XO,` `).match(a),m=!1;return{items:p.map(function(h,f){let v=o.exec(h)[0].length,g=new RegExp("^ {1,"+v+"}","gm"),w=h.replace(g,"").replace(o,""),x=f===p.length-1,D=w.indexOf(` `)!==-1||x&&m;m=D;let E=c.inline,b=c.list,C;c.list=!0,D?(c.inline=!1,C=w.replace(k4,` @@ -707,7 +707,7 @@ To pass a single animation please supply them in simple values, e.g. animation(' ${Rt(.02,e.input.background)} 100%)`:`linear-gradient(to right, ${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%, ${Kr(.02,e.input.background)} ${(n-t)/(r-t)*100}%, - ${Kr(.02,e.input.background)} 100%)`,boxShadow:`${e.appBorderColor} 0 0 0 1px inset`,color:"transparent",width:"100%",height:"6px",cursor:"pointer"},"&::-ms-fill-lower":{borderRadius:6},"&::-ms-fill-upper":{borderRadius:6},"&::-ms-thumb":{width:16,height:16,background:`${e.input.background}`,border:`1px solid ${nr(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),wx=F.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums","[aria-readonly=true] &":{opacity:.5}}),KP=F(wx)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),ZP=F.div({display:"flex",alignItems:"center",width:"100%"});function JP(e){let t=e.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}var XP=({name:e,value:t,onChange:r,min:n=0,max:a=100,step:o=1,onBlur:i,onFocus:s,argType:c})=>{var f;let d=v=>{r(sP(v.target.value))},p=t!==void 0,m=l.useMemo(()=>JP(o),[o]),h=!!((f=c==null?void 0:c.table)!=null&&f.readonly);return y.createElement(ZP,{"aria-readonly":h},y.createElement(wx,null,n),y.createElement(YP,{id:vt(e),type:"range",disabled:h,onChange:d,name:e,value:t,min:n,max:a,step:o,onFocus:s,onBlur:i}),y.createElement(KP,{numberOFDecimalsPlaces:m,max:a},p?t.toFixed(m):"--"," / ",a))},QP=F.label({display:"flex"}),e$=F.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),t$=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,maxLength:o,argType:i})=>{var f;let s=v=>{r(v.target.value)},c=!!((f=i==null?void 0:i.table)!=null&&f.readonly),[d,p]=l.useState(!1),m=l.useCallback(()=>{r(""),p(!0)},[p]);if(t===void 0)return y.createElement(Sn,{variant:"outline",size:"medium",disabled:c,id:hs(e),onClick:m},"Set string");let h=typeof t=="string";return y.createElement(QP,null,y.createElement(yi.Textarea,{id:vt(e),maxLength:o,onChange:s,disabled:c,size:"flex",placeholder:"Edit string...",autoFocus:d,valid:h?null:"error",name:e,value:h?t:"",onFocus:n,onBlur:a}),o&&y.createElement(e$,{isMaxed:(t==null?void 0:t.length)===o},(t==null?void 0:t.length)??0," / ",o))},r$=F(yi.Input)({padding:10});function n$(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var a$=({onChange:e,name:t,accept:r="image/*",value:n,argType:a})=>{var c;let o=l.useRef(null),i=(c=a==null?void 0:a.control)==null?void 0:c.readOnly;function s(d){if(!d.target.files)return;let p=Array.from(d.target.files).map(m=>URL.createObjectURL(m));e(p),n$(n)}return l.useEffect(()=>{n==null&&o.current&&(o.current.value=null)},[n,t]),y.createElement(r$,{ref:o,id:vt(t),type:"file",name:t,multiple:!0,disabled:i,onChange:s,accept:r,size:"flex"})},o$=l.lazy(()=>Y1(()=>import("./Color-F6OSRLHC-yxyMlzvt.js"),__vite__mapDeps([11,2,3,1,4,5,6,7,8,9,10]),import.meta.url)),i$=e=>y.createElement(l.Suspense,{fallback:y.createElement("div",null)},y.createElement(o$,{...e})),l$={array:M4,object:M4,boolean:eP,color:i$,date:iP,number:cP,check:Pn,"inline-check":Pn,radio:Pn,"inline-radio":Pn,select:Pn,"multi-select":Pn,range:XP,text:t$,file:a$},P4=()=>y.createElement(y.Fragment,null,"-"),s$=({row:e,arg:t,updateArgs:r,isHovered:n})=>{var g;let{key:a,control:o}=e,[i,s]=l.useState(!1),[c,d]=l.useState({value:t});l.useEffect(()=>{i||d({value:t})},[i,t]);let p=l.useCallback(w=>(d({value:w}),r({[a]:w}),w),[r,a]),m=l.useCallback(()=>s(!1),[]),h=l.useCallback(()=>s(!0),[]);if(!o||o.disable){let w=(o==null?void 0:o.disable)!==!0&&((g=e==null?void 0:e.type)==null?void 0:g.name)!=="function";return n&&w?y.createElement(oa,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):y.createElement(P4,null)}let f={name:a,argType:e,value:c.value,onChange:p,onBlur:m,onFocus:h},v=l$[o.type]||P4;return y.createElement(v,{...f,...o,controlType:o.type})},u$=F.table(({theme:e})=>({"&&":{borderCollapse:"collapse",borderSpacing:0,border:"none",tr:{border:"none !important",background:"none"},"td, th":{padding:0,border:"none",width:"auto!important"},marginTop:0,marginBottom:0,"th:first-of-type, td:first-of-type":{paddingLeft:0},"th:last-of-type, td:last-of-type":{paddingRight:0},td:{paddingTop:0,paddingBottom:4,"&:not(:first-of-type)":{paddingLeft:10,paddingRight:0}},tbody:{boxShadow:"none",border:"none"},code:Lr({theme:e}),div:{span:{fontWeight:"bold"}},"& code":{margin:0,display:"inline-block",fontSize:e.typography.size.s1}}})),c$=({tags:e})=>{let t=(e.params||[]).filter(o=>o.description),r=t.length!==0,n=e.deprecated!=null,a=e.returns!=null&&e.returns.description!=null;return!r&&!a&&!n?null:y.createElement(y.Fragment,null,y.createElement(u$,null,y.createElement("tbody",null,n&&y.createElement("tr",{key:"deprecated"},y.createElement("td",{colSpan:2},y.createElement("strong",null,"Deprecated"),": ",e.deprecated.toString())),r&&t.map(o=>y.createElement("tr",{key:o.name},y.createElement("td",null,y.createElement("code",null,o.name)),y.createElement("td",null,o.description))),a&&y.createElement("tr",{key:"returns"},y.createElement("td",null,y.createElement("code",null,"Returns")),y.createElement("td",null,e.returns.description)))))},d$=K1(T9()),U1=8,$4=F.div(({isExpanded:e})=>({display:"flex",flexDirection:e?"column":"row",flexWrap:"wrap",alignItems:"flex-start",marginBottom:"-4px",minWidth:100})),p$=F.span(Lr,({theme:e,simple:t=!1})=>({flex:"0 0 auto",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,wordBreak:"break-word",whiteSpace:"normal",maxWidth:"100%",margin:0,marginRight:"4px",marginBottom:"4px",paddingTop:"2px",paddingBottom:"2px",lineHeight:"13px",...t&&{background:"transparent",border:"0 none",paddingLeft:0}})),f$=F.button(({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,marginBottom:"4px",background:"none",border:"none"})),h$=F.div(Lr,({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,fontSize:e.typography.size.s1,margin:0,whiteSpace:"nowrap",display:"flex",alignItems:"center"})),m$=F.div(({theme:e,width:t})=>({width:t,minWidth:200,maxWidth:800,padding:15,fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,boxSizing:"content-box","& code":{padding:"0 !important"}})),g$=F(RL)({marginLeft:4}),v$=F(B9)({marginLeft:4}),y$=()=>y.createElement("span",null,"-"),Ex=({text:e,simple:t})=>y.createElement(p$,{simple:t},e),b$=(0,d$.default)(1e3)(e=>{let t=e.split(/\r?\n/);return`${Math.max(...t.map(r=>r.length))}ch`}),w$=e=>{if(!e)return[e];let t=e.split("|").map(r=>r.trim());return tD(t)},N4=(e,t=!0)=>{let r=e;return t||(r=e.slice(0,U1)),r.map(n=>y.createElement(Ex,{key:n,text:n===""?'""':n}))},E$=({value:e,initialExpandedArgs:t})=>{let{summary:r,detail:n}=e,[a,o]=l.useState(!1),[i,s]=l.useState(t||!1);if(r==null)return null;let c=typeof r.toString=="function"?r.toString():r;if(n==null){if(/[(){}[\]<>]/.test(c))return y.createElement(Ex,{text:c});let d=w$(c),p=d.length;return p>U1?y.createElement($4,{isExpanded:i},N4(d,i),y.createElement(f$,{onClick:()=>s(!i)},i?"Show less...":`Show ${p-U1} more...`)):y.createElement($4,null,N4(d))}return y.createElement(yz,{closeOnOutsideClick:!0,placement:"bottom",visible:a,onVisibleChange:d=>{o(d)},tooltip:y.createElement(m$,{width:b$(n)},y.createElement(jf,{language:"jsx",format:!1},n))},y.createElement(h$,{className:"sbdocs-expandable"},y.createElement("span",null,c),a?y.createElement(g$,null):y.createElement(v$,null)))},K0=({value:e,initialExpandedArgs:t})=>e==null?y.createElement(y$,null):y.createElement(E$,{value:e,initialExpandedArgs:t}),x$=F.span({fontWeight:"bold"}),D$=F.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),C$=F.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...Lr({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),S$=F.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?oe(.1,e.color.defaultText):oe(.2,e.color.defaultText),marginTop:t?4:0})),k$=F.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?oe(.1,e.color.defaultText):oe(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),A$=F.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),F$=e=>e&&{summary:typeof e=="string"?e:e.name},Xi=e=>{var g;let[t,r]=l.useState(!1),{row:n,updateArgs:a,compact:o,expandable:i,initialExpandedArgs:s}=e,{name:c,description:d}=n,p=n.table||{},m=p.type||F$(n.type),h=p.defaultValue||n.defaultValue,f=(g=n.type)==null?void 0:g.required,v=d!=null&&d!=="";return y.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},y.createElement(A$,{expandable:i},y.createElement(x$,null,c),f?y.createElement(D$,{title:"Required"},"*"):null),o?null:y.createElement("td",null,v&&y.createElement(C$,null,y.createElement(sx,null,d)),p.jsDocTags!=null?y.createElement(y.Fragment,null,y.createElement(k$,{hasDescription:v},y.createElement(K0,{value:m,initialExpandedArgs:s})),y.createElement(c$,{tags:p.jsDocTags})):y.createElement(S$,{hasDescription:v},y.createElement(K0,{value:m,initialExpandedArgs:s}))),o?null:y.createElement("td",null,y.createElement(K0,{value:h,initialExpandedArgs:s})),a?y.createElement("td",null,y.createElement(s$,{...e,isHovered:t})):null)},_$=F.div(({inAddonPanel:e,theme:t})=>({height:e?"100%":"auto",display:"flex",border:e?"none":`1px solid ${t.appBorderColor}`,borderRadius:e?0:t.appBorderRadius,padding:e?0:40,alignItems:"center",justifyContent:"center",flexDirection:"column",gap:15,background:t.background.content,boxShadow:"rgba(0, 0, 0, 0.10) 0 1px 3px 0"})),R$=F.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),I$=F.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),B$=({inAddonPanel:e})=>{let[t,r]=l.useState(!0);return l.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:y.createElement(_$,{inAddonPanel:e},y.createElement(S9,{title:e?"Interactive story playground":"Args table with interactive controls couldn't be auto-generated",description:y.createElement(y.Fragment,null,"Controls give you an easy to use interface to test your components. Set your story args and you'll see controls appearing here automatically."),footer:y.createElement(R$,null,e&&y.createElement(y.Fragment,null,y.createElement(oa,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},y.createElement(CL,null)," Watch 5m video"),y.createElement(I$,null),y.createElement(oa,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},y.createElement(z1,null)," Read docs")),!e&&y.createElement(oa,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},y.createElement(z1,null)," Learn how to set that up"))}))},T$=F(FL)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?oe(.25,e.color.defaultText):oe(.3,e.color.defaultText),border:"none",display:"inline-block"})),z$=F(_L)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?oe(.25,e.color.defaultText):oe(.3,e.color.defaultText),border:"none",display:"inline-block"})),L$=F.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),O$=F.td(({theme:e})=>({position:"relative",letterSpacing:"0.35em",textTransform:"uppercase",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s1-1,color:e.base==="light"?oe(.4,e.color.defaultText):oe(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),M$=F.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),P$=F.td(()=>({position:"relative"})),$$=F.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${Kr(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),H4=F.button(()=>({background:"none",border:"none",padding:"0",font:"inherit",position:"absolute",top:0,bottom:0,left:0,right:0,height:"100%",width:"100%",color:"transparent",cursor:"row-resize !important"})),Z0=({level:e="section",label:t,children:r,initialExpanded:n=!0,colSpan:a=3})=>{let[o,i]=l.useState(n),s=e==="subsection"?M$:O$,c=(r==null?void 0:r.length)||0,d=e==="subsection"?`${c} item${c!==1?"s":""}`:"",p=`${o?"Hide":"Show"} ${e==="subsection"?c:t} item${c!==1?"s":""}`;return y.createElement(y.Fragment,null,y.createElement($$,{title:p},y.createElement(s,{colSpan:1},y.createElement(H4,{onClick:m=>i(!o),tabIndex:0},p),y.createElement(L$,null,o?y.createElement(T$,null):y.createElement(z$,null),t)),y.createElement(P$,{colSpan:a-1},y.createElement(H4,{onClick:m=>i(!o),tabIndex:-1,style:{outline:"none"}},p),o?null:d)),o?r:null)},Qi=F.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),Ae=F.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),me=F.div(({theme:e,width:t,height:r})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,width:t||"100%",height:r||16,borderRadius:3})),Fe=[2,4,2,2],N$=()=>y.createElement(y.Fragment,null,y.createElement(Qi,null,y.createElement(Ae,{numColumn:Fe[0]},y.createElement(me,{width:"60%"})),y.createElement(Ae,{numColumn:Fe[1]},y.createElement(me,{width:"30%"})),y.createElement(Ae,{numColumn:Fe[2]},y.createElement(me,{width:"60%"})),y.createElement(Ae,{numColumn:Fe[3]},y.createElement(me,{width:"60%"}))),y.createElement(Qi,null,y.createElement(Ae,{numColumn:Fe[0]},y.createElement(me,{width:"60%"})),y.createElement(Ae,{numColumn:Fe[1]},y.createElement(me,{width:"80%"}),y.createElement(me,{width:"30%"})),y.createElement(Ae,{numColumn:Fe[2]},y.createElement(me,{width:"60%"})),y.createElement(Ae,{numColumn:Fe[3]},y.createElement(me,{width:"60%"}))),y.createElement(Qi,null,y.createElement(Ae,{numColumn:Fe[0]},y.createElement(me,{width:"60%"})),y.createElement(Ae,{numColumn:Fe[1]},y.createElement(me,{width:"80%"}),y.createElement(me,{width:"30%"})),y.createElement(Ae,{numColumn:Fe[2]},y.createElement(me,{width:"60%"})),y.createElement(Ae,{numColumn:Fe[3]},y.createElement(me,{width:"60%"}))),y.createElement(Qi,null,y.createElement(Ae,{numColumn:Fe[0]},y.createElement(me,{width:"60%"})),y.createElement(Ae,{numColumn:Fe[1]},y.createElement(me,{width:"80%"}),y.createElement(me,{width:"30%"})),y.createElement(Ae,{numColumn:Fe[2]},y.createElement(me,{width:"60%"})),y.createElement(Ae,{numColumn:Fe[3]},y.createElement(me,{width:"60%"})))),H$=F.table(({theme:e,compact:t,inAddonPanel:r})=>({"&&":{borderSpacing:0,color:e.color.defaultText,"td, th":{padding:0,border:"none",verticalAlign:"top",textOverflow:"ellipsis"},fontSize:e.typography.size.s2-1,lineHeight:"20px",textAlign:"left",width:"100%",marginTop:r?0:25,marginBottom:r?0:40,"thead th:first-of-type, td:first-of-type":{width:"25%"},"th:first-of-type, td:first-of-type":{paddingLeft:20},"th:nth-of-type(2), td:nth-of-type(2)":{...t?null:{width:"35%"}},"td:nth-of-type(3)":{...t?null:{width:"15%"}},"th:last-of-type, td:last-of-type":{paddingRight:20,...t?null:{width:"25%"}},th:{color:e.base==="light"?oe(.25,e.color.defaultText):oe(.45,e.color.defaultText),paddingTop:10,paddingBottom:10,paddingLeft:15,paddingRight:15},td:{paddingTop:"10px",paddingBottom:"10px","&:not(:first-of-type)":{paddingLeft:15,paddingRight:15},"&:last-of-type":{paddingRight:20}},marginLeft:r?0:1,marginRight:r?0:1,tbody:{...r?null:{filter:e.base==="light"?"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.10))":"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.20))"},"> tr > *":{background:e.background.content,borderTop:`1px solid ${e.appBorderColor}`},...r?null:{"> tr:first-of-type > *":{borderBlockStart:`1px solid ${e.appBorderColor}`},"> tr:last-of-type > *":{borderBlockEnd:`1px solid ${e.appBorderColor}`},"> tr > *:first-of-type":{borderInlineStart:`1px solid ${e.appBorderColor}`},"> tr > *:last-of-type":{borderInlineEnd:`1px solid ${e.appBorderColor}`},"> tr:first-of-type > td:first-of-type":{borderTopLeftRadius:e.appBorderRadius},"> tr:first-of-type > td:last-of-type":{borderTopRightRadius:e.appBorderRadius},"> tr:last-of-type > td:first-of-type":{borderBottomLeftRadius:e.appBorderRadius},"> tr:last-of-type > td:last-of-type":{borderBottomRightRadius:e.appBorderRadius}}}}})),j$=F(sn)(({theme:e})=>({margin:"-4px -12px -4px 0"})),V$=F.span({display:"flex",justifyContent:"space-between"}),U$={alpha:(e,t)=>e.name.localeCompare(t.name),requiredFirst:(e,t)=>{var r,n;return+!!((r=t.type)!=null&&r.required)-+!!((n=e.type)!=null&&n.required)||e.name.localeCompare(t.name)},none:void 0},q$=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([o,i])=>{let{category:s,subcategory:c}=(i==null?void 0:i.table)||{};if(s){let d=r.sections[s]||{ungrouped:[],subsections:{}};if(!c)d.ungrouped.push({key:o,...i});else{let p=d.subsections[c]||[];p.push({key:o,...i}),d.subsections[c]=p}r.sections[s]=d}else if(c){let d=r.ungroupedSubsections[c]||[];d.push({key:o,...i}),r.ungroupedSubsections[c]=d}else r.ungrouped.push({key:o,...i})});let n=U$[t],a=o=>n?Object.keys(o).reduce((i,s)=>({...i,[s]:o[s].sort(n)}),{}):o;return{ungrouped:r.ungrouped.sort(n),ungroupedSubsections:a(r.ungroupedSubsections),sections:Object.keys(r.sections).reduce((o,i)=>({...o,[i]:{ungrouped:r.sections[i].ungrouped.sort(n),subsections:a(r.sections[i].subsections)}}),{})}},W$=(e,t,r)=>{try{return qx(e,t,r)}catch(n){return TL.warn(n.message),!1}},q1=e=>{let{updateArgs:t,resetArgs:r,compact:n,inAddonPanel:a,initialExpandedArgs:o,sort:i="none",isLoading:s}=e;if("error"in e){let{error:D}=e;return y.createElement(P9,null,D," ",y.createElement(oa,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},y.createElement(z1,null)," Read the docs"))}if(s)return y.createElement(N$,null);let{rows:c,args:d,globals:p}="rows"in e&&e,m=q$(rD(c||{},D=>{var E;return!((E=D==null?void 0:D.table)!=null&&E.disable)&&W$(D,d||{},p||{})}),i),h=m.ungrouped.length===0,f=Object.entries(m.sections).length===0,v=Object.entries(m.ungroupedSubsections).length===0;if(h&&f&&v)return y.createElement(B$,{inAddonPanel:a});let g=1;t&&(g+=1),n||(g+=2);let w=Object.keys(m.sections).length>0,x={updateArgs:t,compact:n,inAddonPanel:a,initialExpandedArgs:o};return y.createElement(H8,null,y.createElement(H$,{compact:n,inAddonPanel:a,className:"docblock-argstable sb-unstyled"},y.createElement("thead",{className:"docblock-argstable-head"},y.createElement("tr",null,y.createElement("th",null,y.createElement("span",null,"Name")),n?null:y.createElement("th",null,y.createElement("span",null,"Description")),n?null:y.createElement("th",null,y.createElement("span",null,"Default")),t?y.createElement("th",null,y.createElement(V$,null,"Control"," ",!s&&r&&y.createElement(j$,{onClick:()=>r(),title:"Reset controls"},y.createElement(IL,{"aria-hidden":!0})))):null)),y.createElement("tbody",{className:"docblock-argstable-body"},m.ungrouped.map(D=>y.createElement(Xi,{key:D.key,row:D,arg:d&&d[D.key],...x})),Object.entries(m.ungroupedSubsections).map(([D,E])=>y.createElement(Z0,{key:D,label:D,level:"subsection",colSpan:g},E.map(b=>y.createElement(Xi,{key:b.key,row:b,arg:d&&d[b.key],expandable:w,...x})))),Object.entries(m.sections).map(([D,E])=>y.createElement(Z0,{key:D,label:D,level:"section",colSpan:g},E.ungrouped.map(b=>y.createElement(Xi,{key:b.key,row:b,arg:d&&d[b.key],...x})),Object.entries(E.subsections).map(([b,C])=>y.createElement(Z0,{key:b,label:b,level:"subsection",colSpan:g},C.map(S=>y.createElement(Xi,{key:S.key,row:S,arg:d&&d[S.key],expandable:w,...x})))))))))},G$=({tabs:e,...t})=>{let r=Object.entries(e);return r.length===1?y.createElement(q1,{...r[0][1],...t}):y.createElement(eL,null,r.map((n,a)=>{let[o,i]=n,s=`prop_table_div_${o}`,c="div",d=a===0?t:{sort:t.sort};return y.createElement(c,{key:s,id:s,title:o},({active:p})=>p?y.createElement(q1,{key:`prop_table_${o}`,...i,...d}):null)}))};F.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?oe(.4,e.color.defaultText):oe(.6,e.color.defaultText)}));F.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});F.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});F.div(se,({theme:e})=>({...hu(e),margin:"25px 0 40px",padding:"30px 20px"}));F.div(({theme:e})=>({fontWeight:e.typography.weight.bold,color:e.color.defaultText}));F.div(({theme:e})=>({color:e.base==="light"?oe(.2,e.color.defaultText):oe(.6,e.color.defaultText)}));F.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5});F.div(({theme:e})=>({flex:1,textAlign:"center",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,lineHeight:1,overflow:"hidden",color:e.base==="light"?oe(.4,e.color.defaultText):oe(.6,e.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}}));F.div({display:"flex",flexDirection:"row"});F.div(({background:e})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:e,content:'""'}}));F.div(({theme:e})=>({...hu(e),display:"flex",flexDirection:"row",height:50,marginBottom:5,overflow:"hidden",backgroundColor:"white",backgroundImage:"repeating-linear-gradient(-45deg, #ccc, #ccc 1px, #fff 1px, #fff 16px)",backgroundClip:"padding-box"}));F.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30});F.div({flex:1,display:"flex",flexDirection:"row"});F.div({display:"flex",alignItems:"flex-start"});F.div({flex:"0 0 30%"});F.div({flex:1});F.div(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:e.typography.weight.bold,color:e.base==="light"?oe(.4,e.color.defaultText):oe(.6,e.color.defaultText)}));F.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));F.div(({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,color:e.color.defaultText,marginLeft:10,lineHeight:1.2}));F.div(({theme:e})=>({...hu(e),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}}));F.div({display:"inline-flex",flexDirection:"row",alignItems:"center",flex:"0 1 calc(20% - 10px)",minWidth:120,margin:"0px 10px 30px 0"});F.div({display:"flex",flexFlow:"row wrap"});var Y$=e=>`anchor--${e}`,K$=({storyId:e,children:t})=>y.createElement("div",{id:Y$(e),className:"sb-anchor"},t);globalThis&&globalThis.__DOCS_CONTEXT__===void 0&&(globalThis.__DOCS_CONTEXT__=l.createContext(null),globalThis.__DOCS_CONTEXT__.displayName="DocsContext");var Yt=globalThis?globalThis.__DOCS_CONTEXT__:l.createContext(null),kn=(e,t)=>l.useContext(Yt).resolveOf(e,t),Z$=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""),J$=e=>{if(e)return typeof e=="string"?e.includes("-")?Z$(e):e:e.__docgenInfo&&e.__docgenInfo.displayName?e.__docgenInfo.displayName:e.name};function X$(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}var Q$=Object.create,xx=Object.defineProperty,eN=Object.getOwnPropertyDescriptor,Dx=Object.getOwnPropertyNames,tN=Object.getPrototypeOf,rN=Object.prototype.hasOwnProperty,et=(e,t)=>function(){return t||(0,e[Dx(e)[0]])((t={exports:{}}).exports,t),t.exports},nN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Dx(t))!rN.call(e,a)&&a!==r&&xx(e,a,{get:()=>t[a],enumerable:!(n=eN(t,a))||n.enumerable});return e},ah=(e,t,r)=>(r=e!=null?Q$(tN(e)):{},nN(t||!e||!e.__esModule?xx(r,"default",{value:e,enumerable:!0}):r,e)),aN=["bubbles","cancelBubble","cancelable","composed","currentTarget","defaultPrevented","eventPhase","isTrusted","returnValue","srcElement","target","timeStamp","type"],oN=["detail"];function iN(e){let t=aN.filter(r=>e[r]!==void 0).reduce((r,n)=>({...r,[n]:e[n]}),{});return e instanceof CustomEvent&&oN.filter(r=>e[r]!==void 0).forEach(r=>{t[r]=e[r]}),t}var lN=K1(T9(),1),Cx=et({"node_modules/has-symbols/shams.js"(e,t){t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},n=Symbol("test"),a=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var o=42;r[n]=o;for(n in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var i=Object.getOwnPropertySymbols(r);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(r,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(r,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0}}}),Sx=et({"node_modules/has-symbols/index.js"(e,t){var r=typeof Symbol<"u"&&Symbol,n=Cx();t.exports=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()}}}),sN=et({"node_modules/function-bind/implementation.js"(e,t){var r="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,a=Object.prototype.toString,o="[object Function]";t.exports=function(i){var s=this;if(typeof s!="function"||a.call(s)!==o)throw new TypeError(r+s);for(var c=n.call(arguments,1),d,p=function(){if(this instanceof d){var g=s.apply(this,c.concat(n.call(arguments)));return Object(g)===g?g:this}else return s.apply(i,c.concat(n.call(arguments)))},m=Math.max(0,s.length-c.length),h=[],f=0;f"u"?r:m(Uint8Array),v={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":p?m([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":a,"%GeneratorFunction%":h,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p?m(m([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!p?r:m(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!p?r:m(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p?m(""[Symbol.iterator]()):r,"%Symbol%":p?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":d,"%TypedArray%":f,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet},g=function z(L){var M;if(L==="%AsyncFunction%")M=i("async function () {}");else if(L==="%GeneratorFunction%")M=i("function* () {}");else if(L==="%AsyncGeneratorFunction%")M=i("async function* () {}");else if(L==="%AsyncGenerator%"){var O=z("%AsyncGeneratorFunction%");O&&(M=O.prototype)}else if(L==="%AsyncIteratorPrototype%"){var P=z("%AsyncGenerator%");P&&(M=m(P.prototype))}return v[L]=M,M},w={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},x=oh(),D=uN(),E=x.call(Function.call,Array.prototype.concat),b=x.call(Function.apply,Array.prototype.splice),C=x.call(Function.call,String.prototype.replace),S=x.call(Function.call,String.prototype.slice),k=x.call(Function.call,RegExp.prototype.exec),A=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,_=/\\(\\)?/g,I=function(z){var L=S(z,0,1),M=S(z,-1);if(L==="%"&&M!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(M==="%"&&L!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var O=[];return C(z,A,function(P,j,U,V){O[O.length]=U?C(V,_,"$1"):j||P}),O},B=function(z,L){var M=z,O;if(D(w,M)&&(O=w[M],M="%"+O[0]+"%"),D(v,M)){var P=v[M];if(P===h&&(P=g(M)),typeof P>"u"&&!L)throw new o("intrinsic "+z+" exists, but is not available. Please file an issue!");return{alias:O,name:M,value:P}}throw new n("intrinsic "+z+" does not exist!")};t.exports=function(z,L){if(typeof z!="string"||z.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof L!="boolean")throw new o('"allowMissing" argument must be a boolean');if(k(/^%?[^%]*%?$/,z)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var M=I(z),O=M.length>0?M[0]:"",P=B("%"+O+"%",L),j=P.name,U=P.value,V=!1,G=P.alias;G&&(O=G[0],b(M,E([0,1],G)));for(var Q=1,ne=!0;Q=M.length){var K=s(U,Z);ne=!!K,ne&&"get"in K&&!("originalValue"in K.get)?U=K.get:U=U[Z]}else ne=D(U,Z),U=U[Z];ne&&!V&&(v[j]=U)}}return U}}}),cN=et({"node_modules/call-bind/index.js"(e,t){var r=oh(),n=kx(),a=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||r.call(o,a),s=n("%Object.getOwnPropertyDescriptor%",!0),c=n("%Object.defineProperty%",!0),d=n("%Math.max%");if(c)try{c({},"a",{value:1})}catch{c=null}t.exports=function(m){var h=i(r,o,arguments);if(s&&c){var f=s(h,"length");f.configurable&&c(h,"length",{value:1+d(0,m.length-(arguments.length-1))})}return h};var p=function(){return i(r,a,arguments)};c?c(t.exports,"apply",{value:p}):t.exports.apply=p}}),dN=et({"node_modules/call-bind/callBound.js"(e,t){var r=kx(),n=cN(),a=n(r("String.prototype.indexOf"));t.exports=function(o,i){var s=r(o,!!i);return typeof s=="function"&&a(o,".prototype.")>-1?n(s):s}}}),pN=et({"node_modules/has-tostringtag/shams.js"(e,t){var r=Cx();t.exports=function(){return r()&&!!Symbol.toStringTag}}}),fN=et({"node_modules/is-regex/index.js"(e,t){var r=dN(),n=pN()(),a,o,i,s;n&&(a=r("Object.prototype.hasOwnProperty"),o=r("RegExp.prototype.exec"),i={},c=function(){throw i},s={toString:c,valueOf:c},typeof Symbol.toPrimitive=="symbol"&&(s[Symbol.toPrimitive]=c));var c,d=r("Object.prototype.toString"),p=Object.getOwnPropertyDescriptor,m="[object RegExp]";t.exports=n?function(h){if(!h||typeof h!="object")return!1;var f=p(h,"lastIndex"),v=f&&a(f,"value");if(!v)return!1;try{o(h,s)}catch(g){return g===i}}:function(h){return!h||typeof h!="object"&&typeof h!="function"?!1:d(h)===m}}}),hN=et({"node_modules/is-function/index.js"(e,t){t.exports=n;var r=Object.prototype.toString;function n(a){if(!a)return!1;var o=r.call(a);return o==="[object Function]"||typeof a=="function"&&o!=="[object RegExp]"||typeof window<"u"&&(a===window.setTimeout||a===window.alert||a===window.confirm||a===window.prompt)}}}),mN=et({"node_modules/is-symbol/index.js"(e,t){var r=Object.prototype.toString,n=Sx()();n?(a=Symbol.prototype.toString,o=/^Symbol\(.*\)$/,i=function(s){return typeof s.valueOf()!="symbol"?!1:o.test(a.call(s))},t.exports=function(s){if(typeof s=="symbol")return!0;if(r.call(s)!=="[object Symbol]")return!1;try{return i(s)}catch{return!1}}):t.exports=function(s){return!1};var a,o,i}}),gN=ah(fN()),vN=ah(hN()),yN=ah(mN());function bN(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1}var wN=typeof global=="object"&&global&&global.Object===Object&&global,EN=wN,xN=typeof self=="object"&&self&&self.Object===Object&&self,DN=EN||xN||Function("return this")(),ih=DN,CN=ih.Symbol,Sa=CN,Ax=Object.prototype,SN=Ax.hasOwnProperty,kN=Ax.toString,ao=Sa?Sa.toStringTag:void 0;function AN(e){var t=SN.call(e,ao),r=e[ao];try{e[ao]=void 0;var n=!0}catch{}var a=kN.call(e);return n&&(t?e[ao]=r:delete e[ao]),a}var FN=AN,_N=Object.prototype,RN=_N.toString;function IN(e){return RN.call(e)}var BN=IN,TN="[object Null]",zN="[object Undefined]",j4=Sa?Sa.toStringTag:void 0;function LN(e){return e==null?e===void 0?zN:TN:j4&&j4 in Object(e)?FN(e):BN(e)}var ON=LN,V4=Sa?Sa.prototype:void 0;V4&&V4.toString;function MN(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Fx=MN,PN="[object AsyncFunction]",$N="[object Function]",NN="[object GeneratorFunction]",HN="[object Proxy]";function jN(e){if(!Fx(e))return!1;var t=ON(e);return t==$N||t==NN||t==PN||t==HN}var VN=jN,UN=ih["__core-js_shared__"],J0=UN,U4=function(){var e=/[^.]+$/.exec(J0&&J0.keys&&J0.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function qN(e){return!!U4&&U4 in e}var WN=qN,GN=Function.prototype,YN=GN.toString;function KN(e){if(e!=null){try{return YN.call(e)}catch{}try{return e+""}catch{}}return""}var ZN=KN,JN=/[\\^$.*+?()[\]{}|]/g,XN=/^\[object .+?Constructor\]$/,QN=Function.prototype,eH=Object.prototype,tH=QN.toString,rH=eH.hasOwnProperty,nH=RegExp("^"+tH.call(rH).replace(JN,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function aH(e){if(!Fx(e)||WN(e))return!1;var t=VN(e)?nH:XN;return t.test(ZN(e))}var oH=aH;function iH(e,t){return e==null?void 0:e[t]}var lH=iH;function sH(e,t){var r=lH(e,t);return oH(r)?r:void 0}var _x=sH;function uH(e,t){return e===t||e!==e&&t!==t}var cH=uH,dH=_x(Object,"create"),Yo=dH;function pH(){this.__data__=Yo?Yo(null):{},this.size=0}var fH=pH;function hH(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var mH=hH,gH="__lodash_hash_undefined__",vH=Object.prototype,yH=vH.hasOwnProperty;function bH(e){var t=this.__data__;if(Yo){var r=t[e];return r===gH?void 0:r}return yH.call(t,e)?t[e]:void 0}var wH=bH,EH=Object.prototype,xH=EH.hasOwnProperty;function DH(e){var t=this.__data__;return Yo?t[e]!==void 0:xH.call(t,e)}var CH=DH,SH="__lodash_hash_undefined__";function kH(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Yo&&t===void 0?SH:t,this}var AH=kH;function La(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1}var PH=MH;function $H(e,t){var r=this.__data__,n=vu(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var NH=$H;function Oa(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{let t=null,r=!1,n=!1,a=!1,o="";if(e.indexOf("//")>=0||e.indexOf("/*")>=0)for(let i=0;i({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),ZP=F.div({display:"flex",alignItems:"center",width:"100%"});function JP(e){let t=e.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}var XP=({name:e,value:t,onChange:r,min:n=0,max:a=100,step:o=1,onBlur:i,onFocus:s,argType:c})=>{var f;let d=v=>{r(sP(v.target.value))},p=t!==void 0,m=l.useMemo(()=>JP(o),[o]),h=!!((f=c==null?void 0:c.table)!=null&&f.readonly);return y.createElement(ZP,{"aria-readonly":h},y.createElement(wx,null,n),y.createElement(YP,{id:vt(e),type:"range",disabled:h,onChange:d,name:e,value:t,min:n,max:a,step:o,onFocus:s,onBlur:i}),y.createElement(KP,{numberOFDecimalsPlaces:m,max:a},p?t.toFixed(m):"--"," / ",a))},QP=F.label({display:"flex"}),e$=F.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),t$=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,maxLength:o,argType:i})=>{var f;let s=v=>{r(v.target.value)},c=!!((f=i==null?void 0:i.table)!=null&&f.readonly),[d,p]=l.useState(!1),m=l.useCallback(()=>{r(""),p(!0)},[p]);if(t===void 0)return y.createElement(Sn,{variant:"outline",size:"medium",disabled:c,id:hs(e),onClick:m},"Set string");let h=typeof t=="string";return y.createElement(QP,null,y.createElement(yi.Textarea,{id:vt(e),maxLength:o,onChange:s,disabled:c,size:"flex",placeholder:"Edit string...",autoFocus:d,valid:h?null:"error",name:e,value:h?t:"",onFocus:n,onBlur:a}),o&&y.createElement(e$,{isMaxed:(t==null?void 0:t.length)===o},(t==null?void 0:t.length)??0," / ",o))},r$=F(yi.Input)({padding:10});function n$(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var a$=({onChange:e,name:t,accept:r="image/*",value:n,argType:a})=>{var c;let o=l.useRef(null),i=(c=a==null?void 0:a.control)==null?void 0:c.readOnly;function s(d){if(!d.target.files)return;let p=Array.from(d.target.files).map(m=>URL.createObjectURL(m));e(p),n$(n)}return l.useEffect(()=>{n==null&&o.current&&(o.current.value=null)},[n,t]),y.createElement(r$,{ref:o,id:vt(t),type:"file",name:t,multiple:!0,disabled:i,onChange:s,accept:r,size:"flex"})},o$=l.lazy(()=>Y1(()=>import("./Color-F6OSRLHC-1QiaxRT-.js"),__vite__mapDeps([11,2,3,1,4,5,6,7,8,9,10]),import.meta.url)),i$=e=>y.createElement(l.Suspense,{fallback:y.createElement("div",null)},y.createElement(o$,{...e})),l$={array:M4,object:M4,boolean:eP,color:i$,date:iP,number:cP,check:Pn,"inline-check":Pn,radio:Pn,"inline-radio":Pn,select:Pn,"multi-select":Pn,range:XP,text:t$,file:a$},P4=()=>y.createElement(y.Fragment,null,"-"),s$=({row:e,arg:t,updateArgs:r,isHovered:n})=>{var g;let{key:a,control:o}=e,[i,s]=l.useState(!1),[c,d]=l.useState({value:t});l.useEffect(()=>{i||d({value:t})},[i,t]);let p=l.useCallback(w=>(d({value:w}),r({[a]:w}),w),[r,a]),m=l.useCallback(()=>s(!1),[]),h=l.useCallback(()=>s(!0),[]);if(!o||o.disable){let w=(o==null?void 0:o.disable)!==!0&&((g=e==null?void 0:e.type)==null?void 0:g.name)!=="function";return n&&w?y.createElement(oa,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):y.createElement(P4,null)}let f={name:a,argType:e,value:c.value,onChange:p,onBlur:m,onFocus:h},v=l$[o.type]||P4;return y.createElement(v,{...f,...o,controlType:o.type})},u$=F.table(({theme:e})=>({"&&":{borderCollapse:"collapse",borderSpacing:0,border:"none",tr:{border:"none !important",background:"none"},"td, th":{padding:0,border:"none",width:"auto!important"},marginTop:0,marginBottom:0,"th:first-of-type, td:first-of-type":{paddingLeft:0},"th:last-of-type, td:last-of-type":{paddingRight:0},td:{paddingTop:0,paddingBottom:4,"&:not(:first-of-type)":{paddingLeft:10,paddingRight:0}},tbody:{boxShadow:"none",border:"none"},code:Lr({theme:e}),div:{span:{fontWeight:"bold"}},"& code":{margin:0,display:"inline-block",fontSize:e.typography.size.s1}}})),c$=({tags:e})=>{let t=(e.params||[]).filter(o=>o.description),r=t.length!==0,n=e.deprecated!=null,a=e.returns!=null&&e.returns.description!=null;return!r&&!a&&!n?null:y.createElement(y.Fragment,null,y.createElement(u$,null,y.createElement("tbody",null,n&&y.createElement("tr",{key:"deprecated"},y.createElement("td",{colSpan:2},y.createElement("strong",null,"Deprecated"),": ",e.deprecated.toString())),r&&t.map(o=>y.createElement("tr",{key:o.name},y.createElement("td",null,y.createElement("code",null,o.name)),y.createElement("td",null,o.description))),a&&y.createElement("tr",{key:"returns"},y.createElement("td",null,y.createElement("code",null,"Returns")),y.createElement("td",null,e.returns.description)))))},d$=K1(T9()),U1=8,$4=F.div(({isExpanded:e})=>({display:"flex",flexDirection:e?"column":"row",flexWrap:"wrap",alignItems:"flex-start",marginBottom:"-4px",minWidth:100})),p$=F.span(Lr,({theme:e,simple:t=!1})=>({flex:"0 0 auto",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,wordBreak:"break-word",whiteSpace:"normal",maxWidth:"100%",margin:0,marginRight:"4px",marginBottom:"4px",paddingTop:"2px",paddingBottom:"2px",lineHeight:"13px",...t&&{background:"transparent",border:"0 none",paddingLeft:0}})),f$=F.button(({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,marginBottom:"4px",background:"none",border:"none"})),h$=F.div(Lr,({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,fontSize:e.typography.size.s1,margin:0,whiteSpace:"nowrap",display:"flex",alignItems:"center"})),m$=F.div(({theme:e,width:t})=>({width:t,minWidth:200,maxWidth:800,padding:15,fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,boxSizing:"content-box","& code":{padding:"0 !important"}})),g$=F(RL)({marginLeft:4}),v$=F(B9)({marginLeft:4}),y$=()=>y.createElement("span",null,"-"),Ex=({text:e,simple:t})=>y.createElement(p$,{simple:t},e),b$=(0,d$.default)(1e3)(e=>{let t=e.split(/\r?\n/);return`${Math.max(...t.map(r=>r.length))}ch`}),w$=e=>{if(!e)return[e];let t=e.split("|").map(r=>r.trim());return tD(t)},N4=(e,t=!0)=>{let r=e;return t||(r=e.slice(0,U1)),r.map(n=>y.createElement(Ex,{key:n,text:n===""?'""':n}))},E$=({value:e,initialExpandedArgs:t})=>{let{summary:r,detail:n}=e,[a,o]=l.useState(!1),[i,s]=l.useState(t||!1);if(r==null)return null;let c=typeof r.toString=="function"?r.toString():r;if(n==null){if(/[(){}[\]<>]/.test(c))return y.createElement(Ex,{text:c});let d=w$(c),p=d.length;return p>U1?y.createElement($4,{isExpanded:i},N4(d,i),y.createElement(f$,{onClick:()=>s(!i)},i?"Show less...":`Show ${p-U1} more...`)):y.createElement($4,null,N4(d))}return y.createElement(yz,{closeOnOutsideClick:!0,placement:"bottom",visible:a,onVisibleChange:d=>{o(d)},tooltip:y.createElement(m$,{width:b$(n)},y.createElement(jf,{language:"jsx",format:!1},n))},y.createElement(h$,{className:"sbdocs-expandable"},y.createElement("span",null,c),a?y.createElement(g$,null):y.createElement(v$,null)))},K0=({value:e,initialExpandedArgs:t})=>e==null?y.createElement(y$,null):y.createElement(E$,{value:e,initialExpandedArgs:t}),x$=F.span({fontWeight:"bold"}),D$=F.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),C$=F.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...Lr({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),S$=F.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?oe(.1,e.color.defaultText):oe(.2,e.color.defaultText),marginTop:t?4:0})),k$=F.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?oe(.1,e.color.defaultText):oe(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),A$=F.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),F$=e=>e&&{summary:typeof e=="string"?e:e.name},Xi=e=>{var g;let[t,r]=l.useState(!1),{row:n,updateArgs:a,compact:o,expandable:i,initialExpandedArgs:s}=e,{name:c,description:d}=n,p=n.table||{},m=p.type||F$(n.type),h=p.defaultValue||n.defaultValue,f=(g=n.type)==null?void 0:g.required,v=d!=null&&d!=="";return y.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},y.createElement(A$,{expandable:i},y.createElement(x$,null,c),f?y.createElement(D$,{title:"Required"},"*"):null),o?null:y.createElement("td",null,v&&y.createElement(C$,null,y.createElement(sx,null,d)),p.jsDocTags!=null?y.createElement(y.Fragment,null,y.createElement(k$,{hasDescription:v},y.createElement(K0,{value:m,initialExpandedArgs:s})),y.createElement(c$,{tags:p.jsDocTags})):y.createElement(S$,{hasDescription:v},y.createElement(K0,{value:m,initialExpandedArgs:s}))),o?null:y.createElement("td",null,y.createElement(K0,{value:h,initialExpandedArgs:s})),a?y.createElement("td",null,y.createElement(s$,{...e,isHovered:t})):null)},_$=F.div(({inAddonPanel:e,theme:t})=>({height:e?"100%":"auto",display:"flex",border:e?"none":`1px solid ${t.appBorderColor}`,borderRadius:e?0:t.appBorderRadius,padding:e?0:40,alignItems:"center",justifyContent:"center",flexDirection:"column",gap:15,background:t.background.content,boxShadow:"rgba(0, 0, 0, 0.10) 0 1px 3px 0"})),R$=F.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),I$=F.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),B$=({inAddonPanel:e})=>{let[t,r]=l.useState(!0);return l.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:y.createElement(_$,{inAddonPanel:e},y.createElement(S9,{title:e?"Interactive story playground":"Args table with interactive controls couldn't be auto-generated",description:y.createElement(y.Fragment,null,"Controls give you an easy to use interface to test your components. Set your story args and you'll see controls appearing here automatically."),footer:y.createElement(R$,null,e&&y.createElement(y.Fragment,null,y.createElement(oa,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},y.createElement(CL,null)," Watch 5m video"),y.createElement(I$,null),y.createElement(oa,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},y.createElement(z1,null)," Read docs")),!e&&y.createElement(oa,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},y.createElement(z1,null)," Learn how to set that up"))}))},T$=F(FL)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?oe(.25,e.color.defaultText):oe(.3,e.color.defaultText),border:"none",display:"inline-block"})),z$=F(_L)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?oe(.25,e.color.defaultText):oe(.3,e.color.defaultText),border:"none",display:"inline-block"})),L$=F.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),O$=F.td(({theme:e})=>({position:"relative",letterSpacing:"0.35em",textTransform:"uppercase",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s1-1,color:e.base==="light"?oe(.4,e.color.defaultText):oe(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),M$=F.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),P$=F.td(()=>({position:"relative"})),$$=F.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${Kr(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),H4=F.button(()=>({background:"none",border:"none",padding:"0",font:"inherit",position:"absolute",top:0,bottom:0,left:0,right:0,height:"100%",width:"100%",color:"transparent",cursor:"row-resize !important"})),Z0=({level:e="section",label:t,children:r,initialExpanded:n=!0,colSpan:a=3})=>{let[o,i]=l.useState(n),s=e==="subsection"?M$:O$,c=(r==null?void 0:r.length)||0,d=e==="subsection"?`${c} item${c!==1?"s":""}`:"",p=`${o?"Hide":"Show"} ${e==="subsection"?c:t} item${c!==1?"s":""}`;return y.createElement(y.Fragment,null,y.createElement($$,{title:p},y.createElement(s,{colSpan:1},y.createElement(H4,{onClick:m=>i(!o),tabIndex:0},p),y.createElement(L$,null,o?y.createElement(T$,null):y.createElement(z$,null),t)),y.createElement(P$,{colSpan:a-1},y.createElement(H4,{onClick:m=>i(!o),tabIndex:-1,style:{outline:"none"}},p),o?null:d)),o?r:null)},Qi=F.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),Ae=F.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),me=F.div(({theme:e,width:t,height:r})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,width:t||"100%",height:r||16,borderRadius:3})),Fe=[2,4,2,2],N$=()=>y.createElement(y.Fragment,null,y.createElement(Qi,null,y.createElement(Ae,{numColumn:Fe[0]},y.createElement(me,{width:"60%"})),y.createElement(Ae,{numColumn:Fe[1]},y.createElement(me,{width:"30%"})),y.createElement(Ae,{numColumn:Fe[2]},y.createElement(me,{width:"60%"})),y.createElement(Ae,{numColumn:Fe[3]},y.createElement(me,{width:"60%"}))),y.createElement(Qi,null,y.createElement(Ae,{numColumn:Fe[0]},y.createElement(me,{width:"60%"})),y.createElement(Ae,{numColumn:Fe[1]},y.createElement(me,{width:"80%"}),y.createElement(me,{width:"30%"})),y.createElement(Ae,{numColumn:Fe[2]},y.createElement(me,{width:"60%"})),y.createElement(Ae,{numColumn:Fe[3]},y.createElement(me,{width:"60%"}))),y.createElement(Qi,null,y.createElement(Ae,{numColumn:Fe[0]},y.createElement(me,{width:"60%"})),y.createElement(Ae,{numColumn:Fe[1]},y.createElement(me,{width:"80%"}),y.createElement(me,{width:"30%"})),y.createElement(Ae,{numColumn:Fe[2]},y.createElement(me,{width:"60%"})),y.createElement(Ae,{numColumn:Fe[3]},y.createElement(me,{width:"60%"}))),y.createElement(Qi,null,y.createElement(Ae,{numColumn:Fe[0]},y.createElement(me,{width:"60%"})),y.createElement(Ae,{numColumn:Fe[1]},y.createElement(me,{width:"80%"}),y.createElement(me,{width:"30%"})),y.createElement(Ae,{numColumn:Fe[2]},y.createElement(me,{width:"60%"})),y.createElement(Ae,{numColumn:Fe[3]},y.createElement(me,{width:"60%"})))),H$=F.table(({theme:e,compact:t,inAddonPanel:r})=>({"&&":{borderSpacing:0,color:e.color.defaultText,"td, th":{padding:0,border:"none",verticalAlign:"top",textOverflow:"ellipsis"},fontSize:e.typography.size.s2-1,lineHeight:"20px",textAlign:"left",width:"100%",marginTop:r?0:25,marginBottom:r?0:40,"thead th:first-of-type, td:first-of-type":{width:"25%"},"th:first-of-type, td:first-of-type":{paddingLeft:20},"th:nth-of-type(2), td:nth-of-type(2)":{...t?null:{width:"35%"}},"td:nth-of-type(3)":{...t?null:{width:"15%"}},"th:last-of-type, td:last-of-type":{paddingRight:20,...t?null:{width:"25%"}},th:{color:e.base==="light"?oe(.25,e.color.defaultText):oe(.45,e.color.defaultText),paddingTop:10,paddingBottom:10,paddingLeft:15,paddingRight:15},td:{paddingTop:"10px",paddingBottom:"10px","&:not(:first-of-type)":{paddingLeft:15,paddingRight:15},"&:last-of-type":{paddingRight:20}},marginLeft:r?0:1,marginRight:r?0:1,tbody:{...r?null:{filter:e.base==="light"?"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.10))":"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.20))"},"> tr > *":{background:e.background.content,borderTop:`1px solid ${e.appBorderColor}`},...r?null:{"> tr:first-of-type > *":{borderBlockStart:`1px solid ${e.appBorderColor}`},"> tr:last-of-type > *":{borderBlockEnd:`1px solid ${e.appBorderColor}`},"> tr > *:first-of-type":{borderInlineStart:`1px solid ${e.appBorderColor}`},"> tr > *:last-of-type":{borderInlineEnd:`1px solid ${e.appBorderColor}`},"> tr:first-of-type > td:first-of-type":{borderTopLeftRadius:e.appBorderRadius},"> tr:first-of-type > td:last-of-type":{borderTopRightRadius:e.appBorderRadius},"> tr:last-of-type > td:first-of-type":{borderBottomLeftRadius:e.appBorderRadius},"> tr:last-of-type > td:last-of-type":{borderBottomRightRadius:e.appBorderRadius}}}}})),j$=F(sn)(({theme:e})=>({margin:"-4px -12px -4px 0"})),V$=F.span({display:"flex",justifyContent:"space-between"}),U$={alpha:(e,t)=>e.name.localeCompare(t.name),requiredFirst:(e,t)=>{var r,n;return+!!((r=t.type)!=null&&r.required)-+!!((n=e.type)!=null&&n.required)||e.name.localeCompare(t.name)},none:void 0},q$=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([o,i])=>{let{category:s,subcategory:c}=(i==null?void 0:i.table)||{};if(s){let d=r.sections[s]||{ungrouped:[],subsections:{}};if(!c)d.ungrouped.push({key:o,...i});else{let p=d.subsections[c]||[];p.push({key:o,...i}),d.subsections[c]=p}r.sections[s]=d}else if(c){let d=r.ungroupedSubsections[c]||[];d.push({key:o,...i}),r.ungroupedSubsections[c]=d}else r.ungrouped.push({key:o,...i})});let n=U$[t],a=o=>n?Object.keys(o).reduce((i,s)=>({...i,[s]:o[s].sort(n)}),{}):o;return{ungrouped:r.ungrouped.sort(n),ungroupedSubsections:a(r.ungroupedSubsections),sections:Object.keys(r.sections).reduce((o,i)=>({...o,[i]:{ungrouped:r.sections[i].ungrouped.sort(n),subsections:a(r.sections[i].subsections)}}),{})}},W$=(e,t,r)=>{try{return qx(e,t,r)}catch(n){return TL.warn(n.message),!1}},q1=e=>{let{updateArgs:t,resetArgs:r,compact:n,inAddonPanel:a,initialExpandedArgs:o,sort:i="none",isLoading:s}=e;if("error"in e){let{error:D}=e;return y.createElement(P9,null,D," ",y.createElement(oa,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},y.createElement(z1,null)," Read the docs"))}if(s)return y.createElement(N$,null);let{rows:c,args:d,globals:p}="rows"in e&&e,m=q$(rD(c||{},D=>{var E;return!((E=D==null?void 0:D.table)!=null&&E.disable)&&W$(D,d||{},p||{})}),i),h=m.ungrouped.length===0,f=Object.entries(m.sections).length===0,v=Object.entries(m.ungroupedSubsections).length===0;if(h&&f&&v)return y.createElement(B$,{inAddonPanel:a});let g=1;t&&(g+=1),n||(g+=2);let w=Object.keys(m.sections).length>0,x={updateArgs:t,compact:n,inAddonPanel:a,initialExpandedArgs:o};return y.createElement(H8,null,y.createElement(H$,{compact:n,inAddonPanel:a,className:"docblock-argstable sb-unstyled"},y.createElement("thead",{className:"docblock-argstable-head"},y.createElement("tr",null,y.createElement("th",null,y.createElement("span",null,"Name")),n?null:y.createElement("th",null,y.createElement("span",null,"Description")),n?null:y.createElement("th",null,y.createElement("span",null,"Default")),t?y.createElement("th",null,y.createElement(V$,null,"Control"," ",!s&&r&&y.createElement(j$,{onClick:()=>r(),title:"Reset controls"},y.createElement(IL,{"aria-hidden":!0})))):null)),y.createElement("tbody",{className:"docblock-argstable-body"},m.ungrouped.map(D=>y.createElement(Xi,{key:D.key,row:D,arg:d&&d[D.key],...x})),Object.entries(m.ungroupedSubsections).map(([D,E])=>y.createElement(Z0,{key:D,label:D,level:"subsection",colSpan:g},E.map(b=>y.createElement(Xi,{key:b.key,row:b,arg:d&&d[b.key],expandable:w,...x})))),Object.entries(m.sections).map(([D,E])=>y.createElement(Z0,{key:D,label:D,level:"section",colSpan:g},E.ungrouped.map(b=>y.createElement(Xi,{key:b.key,row:b,arg:d&&d[b.key],...x})),Object.entries(E.subsections).map(([b,C])=>y.createElement(Z0,{key:b,label:b,level:"subsection",colSpan:g},C.map(S=>y.createElement(Xi,{key:S.key,row:S,arg:d&&d[S.key],expandable:w,...x})))))))))},G$=({tabs:e,...t})=>{let r=Object.entries(e);return r.length===1?y.createElement(q1,{...r[0][1],...t}):y.createElement(eL,null,r.map((n,a)=>{let[o,i]=n,s=`prop_table_div_${o}`,c="div",d=a===0?t:{sort:t.sort};return y.createElement(c,{key:s,id:s,title:o},({active:p})=>p?y.createElement(q1,{key:`prop_table_${o}`,...i,...d}):null)}))};F.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?oe(.4,e.color.defaultText):oe(.6,e.color.defaultText)}));F.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});F.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});F.div(se,({theme:e})=>({...hu(e),margin:"25px 0 40px",padding:"30px 20px"}));F.div(({theme:e})=>({fontWeight:e.typography.weight.bold,color:e.color.defaultText}));F.div(({theme:e})=>({color:e.base==="light"?oe(.2,e.color.defaultText):oe(.6,e.color.defaultText)}));F.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5});F.div(({theme:e})=>({flex:1,textAlign:"center",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,lineHeight:1,overflow:"hidden",color:e.base==="light"?oe(.4,e.color.defaultText):oe(.6,e.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}}));F.div({display:"flex",flexDirection:"row"});F.div(({background:e})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:e,content:'""'}}));F.div(({theme:e})=>({...hu(e),display:"flex",flexDirection:"row",height:50,marginBottom:5,overflow:"hidden",backgroundColor:"white",backgroundImage:"repeating-linear-gradient(-45deg, #ccc, #ccc 1px, #fff 1px, #fff 16px)",backgroundClip:"padding-box"}));F.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30});F.div({flex:1,display:"flex",flexDirection:"row"});F.div({display:"flex",alignItems:"flex-start"});F.div({flex:"0 0 30%"});F.div({flex:1});F.div(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:e.typography.weight.bold,color:e.base==="light"?oe(.4,e.color.defaultText):oe(.6,e.color.defaultText)}));F.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));F.div(({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,color:e.color.defaultText,marginLeft:10,lineHeight:1.2}));F.div(({theme:e})=>({...hu(e),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}}));F.div({display:"inline-flex",flexDirection:"row",alignItems:"center",flex:"0 1 calc(20% - 10px)",minWidth:120,margin:"0px 10px 30px 0"});F.div({display:"flex",flexFlow:"row wrap"});var Y$=e=>`anchor--${e}`,K$=({storyId:e,children:t})=>y.createElement("div",{id:Y$(e),className:"sb-anchor"},t);globalThis&&globalThis.__DOCS_CONTEXT__===void 0&&(globalThis.__DOCS_CONTEXT__=l.createContext(null),globalThis.__DOCS_CONTEXT__.displayName="DocsContext");var Yt=globalThis?globalThis.__DOCS_CONTEXT__:l.createContext(null),kn=(e,t)=>l.useContext(Yt).resolveOf(e,t),Z$=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""),J$=e=>{if(e)return typeof e=="string"?e.includes("-")?Z$(e):e:e.__docgenInfo&&e.__docgenInfo.displayName?e.__docgenInfo.displayName:e.name};function X$(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}var Q$=Object.create,xx=Object.defineProperty,eN=Object.getOwnPropertyDescriptor,Dx=Object.getOwnPropertyNames,tN=Object.getPrototypeOf,rN=Object.prototype.hasOwnProperty,et=(e,t)=>function(){return t||(0,e[Dx(e)[0]])((t={exports:{}}).exports,t),t.exports},nN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Dx(t))!rN.call(e,a)&&a!==r&&xx(e,a,{get:()=>t[a],enumerable:!(n=eN(t,a))||n.enumerable});return e},ah=(e,t,r)=>(r=e!=null?Q$(tN(e)):{},nN(t||!e||!e.__esModule?xx(r,"default",{value:e,enumerable:!0}):r,e)),aN=["bubbles","cancelBubble","cancelable","composed","currentTarget","defaultPrevented","eventPhase","isTrusted","returnValue","srcElement","target","timeStamp","type"],oN=["detail"];function iN(e){let t=aN.filter(r=>e[r]!==void 0).reduce((r,n)=>({...r,[n]:e[n]}),{});return e instanceof CustomEvent&&oN.filter(r=>e[r]!==void 0).forEach(r=>{t[r]=e[r]}),t}var lN=K1(T9(),1),Cx=et({"node_modules/has-symbols/shams.js"(e,t){t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},n=Symbol("test"),a=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var o=42;r[n]=o;for(n in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var i=Object.getOwnPropertySymbols(r);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(r,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(r,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0}}}),Sx=et({"node_modules/has-symbols/index.js"(e,t){var r=typeof Symbol<"u"&&Symbol,n=Cx();t.exports=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()}}}),sN=et({"node_modules/function-bind/implementation.js"(e,t){var r="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,a=Object.prototype.toString,o="[object Function]";t.exports=function(i){var s=this;if(typeof s!="function"||a.call(s)!==o)throw new TypeError(r+s);for(var c=n.call(arguments,1),d,p=function(){if(this instanceof d){var g=s.apply(this,c.concat(n.call(arguments)));return Object(g)===g?g:this}else return s.apply(i,c.concat(n.call(arguments)))},m=Math.max(0,s.length-c.length),h=[],f=0;f"u"?r:m(Uint8Array),v={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":p?m([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":a,"%GeneratorFunction%":h,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p?m(m([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!p?r:m(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!p?r:m(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p?m(""[Symbol.iterator]()):r,"%Symbol%":p?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":d,"%TypedArray%":f,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet},g=function z(L){var M;if(L==="%AsyncFunction%")M=i("async function () {}");else if(L==="%GeneratorFunction%")M=i("function* () {}");else if(L==="%AsyncGeneratorFunction%")M=i("async function* () {}");else if(L==="%AsyncGenerator%"){var O=z("%AsyncGeneratorFunction%");O&&(M=O.prototype)}else if(L==="%AsyncIteratorPrototype%"){var P=z("%AsyncGenerator%");P&&(M=m(P.prototype))}return v[L]=M,M},w={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},x=oh(),D=uN(),E=x.call(Function.call,Array.prototype.concat),b=x.call(Function.apply,Array.prototype.splice),C=x.call(Function.call,String.prototype.replace),S=x.call(Function.call,String.prototype.slice),k=x.call(Function.call,RegExp.prototype.exec),A=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,_=/\\(\\)?/g,I=function(z){var L=S(z,0,1),M=S(z,-1);if(L==="%"&&M!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(M==="%"&&L!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var O=[];return C(z,A,function(P,j,U,V){O[O.length]=U?C(V,_,"$1"):j||P}),O},B=function(z,L){var M=z,O;if(D(w,M)&&(O=w[M],M="%"+O[0]+"%"),D(v,M)){var P=v[M];if(P===h&&(P=g(M)),typeof P>"u"&&!L)throw new o("intrinsic "+z+" exists, but is not available. Please file an issue!");return{alias:O,name:M,value:P}}throw new n("intrinsic "+z+" does not exist!")};t.exports=function(z,L){if(typeof z!="string"||z.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof L!="boolean")throw new o('"allowMissing" argument must be a boolean');if(k(/^%?[^%]*%?$/,z)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var M=I(z),O=M.length>0?M[0]:"",P=B("%"+O+"%",L),j=P.name,U=P.value,V=!1,G=P.alias;G&&(O=G[0],b(M,E([0,1],G)));for(var Q=1,ne=!0;Q=M.length){var K=s(U,Z);ne=!!K,ne&&"get"in K&&!("originalValue"in K.get)?U=K.get:U=U[Z]}else ne=D(U,Z),U=U[Z];ne&&!V&&(v[j]=U)}}return U}}}),cN=et({"node_modules/call-bind/index.js"(e,t){var r=oh(),n=kx(),a=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||r.call(o,a),s=n("%Object.getOwnPropertyDescriptor%",!0),c=n("%Object.defineProperty%",!0),d=n("%Math.max%");if(c)try{c({},"a",{value:1})}catch{c=null}t.exports=function(m){var h=i(r,o,arguments);if(s&&c){var f=s(h,"length");f.configurable&&c(h,"length",{value:1+d(0,m.length-(arguments.length-1))})}return h};var p=function(){return i(r,a,arguments)};c?c(t.exports,"apply",{value:p}):t.exports.apply=p}}),dN=et({"node_modules/call-bind/callBound.js"(e,t){var r=kx(),n=cN(),a=n(r("String.prototype.indexOf"));t.exports=function(o,i){var s=r(o,!!i);return typeof s=="function"&&a(o,".prototype.")>-1?n(s):s}}}),pN=et({"node_modules/has-tostringtag/shams.js"(e,t){var r=Cx();t.exports=function(){return r()&&!!Symbol.toStringTag}}}),fN=et({"node_modules/is-regex/index.js"(e,t){var r=dN(),n=pN()(),a,o,i,s;n&&(a=r("Object.prototype.hasOwnProperty"),o=r("RegExp.prototype.exec"),i={},c=function(){throw i},s={toString:c,valueOf:c},typeof Symbol.toPrimitive=="symbol"&&(s[Symbol.toPrimitive]=c));var c,d=r("Object.prototype.toString"),p=Object.getOwnPropertyDescriptor,m="[object RegExp]";t.exports=n?function(h){if(!h||typeof h!="object")return!1;var f=p(h,"lastIndex"),v=f&&a(f,"value");if(!v)return!1;try{o(h,s)}catch(g){return g===i}}:function(h){return!h||typeof h!="object"&&typeof h!="function"?!1:d(h)===m}}}),hN=et({"node_modules/is-function/index.js"(e,t){t.exports=n;var r=Object.prototype.toString;function n(a){if(!a)return!1;var o=r.call(a);return o==="[object Function]"||typeof a=="function"&&o!=="[object RegExp]"||typeof window<"u"&&(a===window.setTimeout||a===window.alert||a===window.confirm||a===window.prompt)}}}),mN=et({"node_modules/is-symbol/index.js"(e,t){var r=Object.prototype.toString,n=Sx()();n?(a=Symbol.prototype.toString,o=/^Symbol\(.*\)$/,i=function(s){return typeof s.valueOf()!="symbol"?!1:o.test(a.call(s))},t.exports=function(s){if(typeof s=="symbol")return!0;if(r.call(s)!=="[object Symbol]")return!1;try{return i(s)}catch{return!1}}):t.exports=function(s){return!1};var a,o,i}}),gN=ah(fN()),vN=ah(hN()),yN=ah(mN());function bN(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1}var wN=typeof global=="object"&&global&&global.Object===Object&&global,EN=wN,xN=typeof self=="object"&&self&&self.Object===Object&&self,DN=EN||xN||Function("return this")(),ih=DN,CN=ih.Symbol,Sa=CN,Ax=Object.prototype,SN=Ax.hasOwnProperty,kN=Ax.toString,ao=Sa?Sa.toStringTag:void 0;function AN(e){var t=SN.call(e,ao),r=e[ao];try{e[ao]=void 0;var n=!0}catch{}var a=kN.call(e);return n&&(t?e[ao]=r:delete e[ao]),a}var FN=AN,_N=Object.prototype,RN=_N.toString;function IN(e){return RN.call(e)}var BN=IN,TN="[object Null]",zN="[object Undefined]",j4=Sa?Sa.toStringTag:void 0;function LN(e){return e==null?e===void 0?zN:TN:j4&&j4 in Object(e)?FN(e):BN(e)}var ON=LN,V4=Sa?Sa.prototype:void 0;V4&&V4.toString;function MN(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Fx=MN,PN="[object AsyncFunction]",$N="[object Function]",NN="[object GeneratorFunction]",HN="[object Proxy]";function jN(e){if(!Fx(e))return!1;var t=ON(e);return t==$N||t==NN||t==PN||t==HN}var VN=jN,UN=ih["__core-js_shared__"],J0=UN,U4=function(){var e=/[^.]+$/.exec(J0&&J0.keys&&J0.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function qN(e){return!!U4&&U4 in e}var WN=qN,GN=Function.prototype,YN=GN.toString;function KN(e){if(e!=null){try{return YN.call(e)}catch{}try{return e+""}catch{}}return""}var ZN=KN,JN=/[\\^$.*+?()[\]{}|]/g,XN=/^\[object .+?Constructor\]$/,QN=Function.prototype,eH=Object.prototype,tH=QN.toString,rH=eH.hasOwnProperty,nH=RegExp("^"+tH.call(rH).replace(JN,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function aH(e){if(!Fx(e)||WN(e))return!1;var t=VN(e)?nH:XN;return t.test(ZN(e))}var oH=aH;function iH(e,t){return e==null?void 0:e[t]}var lH=iH;function sH(e,t){var r=lH(e,t);return oH(r)?r:void 0}var _x=sH;function uH(e,t){return e===t||e!==e&&t!==t}var cH=uH,dH=_x(Object,"create"),Yo=dH;function pH(){this.__data__=Yo?Yo(null):{},this.size=0}var fH=pH;function hH(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var mH=hH,gH="__lodash_hash_undefined__",vH=Object.prototype,yH=vH.hasOwnProperty;function bH(e){var t=this.__data__;if(Yo){var r=t[e];return r===gH?void 0:r}return yH.call(t,e)?t[e]:void 0}var wH=bH,EH=Object.prototype,xH=EH.hasOwnProperty;function DH(e){var t=this.__data__;return Yo?t[e]!==void 0:xH.call(t,e)}var CH=DH,SH="__lodash_hash_undefined__";function kH(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Yo&&t===void 0?SH:t,this}var AH=kH;function La(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1}var PH=MH;function $H(e,t){var r=this.__data__,n=vu(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var NH=$H;function Oa(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{let t=null,r=!1,n=!1,a=!1,o="";if(e.indexOf("//")>=0||e.indexOf("/*")>=0)for(let i=0;idj(e).replace(/\n\s*/g,"").trim()),fj=function(e,t){let r=t.slice(0,t.indexOf("{")),n=t.slice(t.indexOf("{"));if(r.includes("=>")||r.includes("function"))return t;let a=r;return a=a.replace(e,"function"),a+n},hj=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$/;function Ix(e){if(!cj(e))return e;let t=e,r=!1;return typeof Event<"u"&&e instanceof Event&&(t=iN(t),r=!0),t=Object.keys(t).reduce((n,a)=>{try{t[a]&&t[a].toJSON,n[a]=t[a]}catch{r=!0}return n},{}),r?t:e}var mj=function(e){let t,r,n,a;return function(o,i){try{if(o==="")return a=[],t=new Map([[i,"[]"]]),r=new Map,n=[],i;let s=r.get(this)||this;for(;n.length&&s!==n[0];)n.shift(),a.pop();if(typeof i=="boolean")return i;if(i===void 0)return e.allowUndefined?"_undefined_":void 0;if(i===null)return null;if(typeof i=="number")return i===-1/0?"_-Infinity_":i===1/0?"_Infinity_":Number.isNaN(i)?"_NaN_":i;if(typeof i=="bigint")return`_bigint_${i.toString()}`;if(typeof i=="string")return hj.test(i)?e.allowDate?`_date_${i}`:void 0:i;if((0,gN.default)(i))return e.allowRegExp?`_regexp_${i.flags}|${i.source}`:void 0;if((0,vN.default)(i)){if(!e.allowFunction)return;let{name:d}=i,p=i.toString();return p.match(/(\[native code\]|WEBPACK_IMPORTED_MODULE|__webpack_exports__|__webpack_require__)/)?`_function_${d}|${(()=>{}).toString()}`:`_function_${d}|${pj(fj(o,p))}`}if((0,yN.default)(i)){if(!e.allowSymbol)return;let d=Symbol.keyFor(i);return d!==void 0?`_gsymbol_${d}`:`_symbol_${i.toString().slice(7,-1)}`}if(n.length>=e.maxDepth)return Array.isArray(i)?`[Array(${i.length})]`:"[Object]";if(i===this)return`_duplicate_${JSON.stringify(a)}`;if(i instanceof Error&&e.allowError)return{__isConvertedError__:!0,errorProperties:{...i.cause?{cause:i.cause}:{},...i,name:i.name,message:i.message,stack:i.stack,"_constructor-name_":i.constructor.name}};if(i.constructor&&i.constructor.name&&i.constructor.name!=="Object"&&!Array.isArray(i)&&!e.allowClass)return;let c=t.get(i);if(!c){let d=Array.isArray(i)?i:Ix(i);if(i.constructor&&i.constructor.name&&i.constructor.name!=="Object"&&!Array.isArray(i)&&e.allowClass)try{Object.assign(d,{"_constructor-name_":i.constructor.name})}catch{}return a.push(o),n.unshift(d),t.set(i,JSON.stringify(a)),i!==d&&r.set(i,d),d}return`_duplicate_${c}`}catch{return}}},gj={maxDepth:10,space:void 0,allowFunction:!0,allowRegExp:!0,allowDate:!0,allowClass:!0,allowError:!0,allowUndefined:!0,allowSymbol:!0,lazyEval:!0},vj=(e,t={})=>{let r={...gj,...t};return JSON.stringify(Ix(e),mj(r),t.space)};function Bx(e){return vj(e,{allowFunction:!1})}var Tx=l.createContext({sources:{}}),zx="--unknown--",yj=({children:e,channel:t})=>{let[r,n]=l.useState({});return l.useEffect(()=>{let a=(o,i=null,s=!1)=>{let{id:c,args:d=void 0,source:p,format:m}=typeof o=="string"?{id:o,source:i,format:s}:o,h=d?Bx(d):zx;n(f=>({...f,[c]:{...f[c],[h]:{code:p,format:m}}}))};return t.on(hh,a),()=>t.off(hh,a)},[]),y.createElement(Tx.Provider,{value:{sources:r}},e)},bj=(e,t,r)=>{let{sources:n}=r,a=n==null?void 0:n[e];return(a==null?void 0:a[Bx(t)])||(a==null?void 0:a[zx])||{code:""}},wj=({snippet:e,storyContext:t,typeFromProps:r,transformFromProps:n})=>{var c,d;let{__isArgsStory:a}=t.parameters,o=((c=t.parameters.docs)==null?void 0:c.source)||{},i=r||o.type||Eu.AUTO;if(o.code!==void 0)return o.code;let s=i===Eu.DYNAMIC||i===Eu.AUTO&&e&&a?e:o.originalSource||"";return((d=n??o.transform)==null?void 0:d(s,t))||s},Ej=(e,t,r)=>{var f,v,g,w;let n,{of:a}=e;if("of"in e&&a===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");if(a)n=t.resolveOf(a,["story"]).story;else try{n=t.storyById()}catch{}let o=((v=(f=n==null?void 0:n.parameters)==null?void 0:f.docs)==null?void 0:v.source)||{},{code:i}=e,s=e.format??o.format,c=e.language??o.language??"jsx",d=e.dark??o.dark??!1;if(!i&&!n)return{error:"Oh no! The source is not available."};if(i)return{code:i,format:s,language:c,dark:d};let p=t.getStoryContext(n),m=e.__forceInitialArgs?p.initialArgs:p.unmappedArgs,h=bj(n.id,m,r);return s=h.format??((w=(g=n.parameters.docs)==null?void 0:g.source)==null?void 0:w.format)??!1,{code:wj({snippet:h.code,storyContext:{...p,args:m},typeFromProps:e.type,transformFromProps:e.transform}),format:s,language:c,dark:d}};function xj(e,t){let r=Dj([e],t);return r&&r[0]}function Dj(e,t){let[r,n]=l.useState({});return l.useEffect(()=>{Promise.all(e.map(async a=>{let o=await t.loadStory(a);n(i=>i[a]===o?i:{...i,[a]:o})}))}),e.map(a=>{if(r[a])return r[a];try{return t.storyById(a)}catch{return null}})}var Cj=(e,t)=>{let{of:r,meta:n}=e;if("of"in e&&r===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");return n&&t.referenceMeta(n,!1),t.resolveOf(r||"story",["story"]).story.id},Sj=(e,t,r)=>{let{parameters:n={}}=t||{},{docs:a={}}=n,o=a.story||{};if(a.disable)return null;if(e.inline??o.inline??!1){let s=e.height??o.height,c=e.autoplay??o.autoplay??!1;return{story:t,inline:!0,height:s,autoplay:c,forceInitialArgs:!!e.__forceInitialArgs,primary:!!e.__primary,renderStoryToElement:r.renderStoryToElement}}let i=e.height??o.height??o.iframeHeight??"100px";return{story:t,inline:!1,height:i,primary:!!e.__primary}},kj=(e={__forceInitialArgs:!1,__primary:!1})=>{let t=l.useContext(Yt),r=Cj(e,t),n=xj(r,t);if(!n)return y.createElement(H9,null);let a=Sj(e,n,t);return a?y.createElement(MO,{...a}):null},Aj=e=>{var h,f,v,g,w,x,D,E,b,C;let t=l.useContext(Yt),r=l.useContext(Tx),{of:n,source:a}=e;if("of"in e&&n===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let{story:o}=kn(n||"story",["story"]),i=Ej({...a,...n&&{of:n}},t,r),s=e.layout??o.parameters.layout??((f=(h=o.parameters.docs)==null?void 0:h.canvas)==null?void 0:f.layout)??"padded",c=e.withToolbar??((g=(v=o.parameters.docs)==null?void 0:v.canvas)==null?void 0:g.withToolbar)??!1,d=e.additionalActions??((x=(w=o.parameters.docs)==null?void 0:w.canvas)==null?void 0:x.additionalActions),p=e.sourceState??((E=(D=o.parameters.docs)==null?void 0:D.canvas)==null?void 0:E.sourceState)??"hidden",m=e.className??((C=(b=o.parameters.docs)==null?void 0:b.canvas)==null?void 0:C.className);return y.createElement(j9,{withSource:p==="none"?void 0:i,isExpanded:p==="shown",withToolbar:c,additionalActions:d,className:m,layout:s},y.createElement(kj,{of:n||o.moduleExport,meta:e.meta,...e.story}))},Fj=(e,t)=>{let r=_j(e,t);if(!r)throw new Error("No result when story was defined");return r},_j=(e,t)=>{let r=e?t.getStoryContext(e):{args:{}},{id:n}=e||{id:"none"},[a,o]=l.useState(r.args);l.useEffect(()=>{let c=d=>{d.storyId===n&&o(d.args)};return t.channel.on(y4,c),()=>t.channel.off(y4,c)},[n,t.channel]);let i=l.useCallback(c=>t.channel.emit(zL,{storyId:n,updatedArgs:c}),[n,t.channel]),s=l.useCallback(c=>t.channel.emit(LL,{storyId:n,argNames:c}),[n,t.channel]);return e&&[a,i,s]},Rj=(e,t)=>{let r=t.getStoryContext(e),[n,a]=l.useState(r.globals);return l.useEffect(()=>{let o=i=>{a(i.globals)};return t.channel.on(b4,o),()=>t.channel.off(b4,o)},[t.channel]),[n]};function Ij(e,t){let{extractArgTypes:r}=t.docs||{};if(!r)throw new Error("Args unsupported. See Args documentation for your framework.");return r(e)}var Bj=e=>{var b;let{of:t}=e;if("of"in e&&t===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let r=l.useContext(Yt),{story:n}=r.resolveOf(t||"story",["story"]),{parameters:a,argTypes:o,component:i,subcomponents:s}=n,c=((b=a.docs)==null?void 0:b.controls)||{},d=e.include??c.include,p=e.exclude??c.exclude,m=e.sort??c.sort,[h,f,v]=Fj(n,r),[g]=Rj(n,r),w=v4(o,d,p);if(!(s&&Object.keys(s).length>0))return Object.keys(w).length>0||Object.keys(h).length>0?y.createElement(q1,{rows:w,sort:m,args:h,globals:g,updateArgs:f,resetArgs:v}):null;let x=J$(i),D=Object.fromEntries(Object.entries(s).map(([C,S])=>[C,{rows:v4(Ij(S,a),d,p),sort:m}])),E={[x]:{rows:w,sort:m},...D};return y.createElement(G$,{tabs:E,sort:m,args:h,globals:g,updateArgs:f,resetArgs:v})},{document:Lx}=globalThis,Ox=({className:e,children:t,...r})=>{if(typeof e!="string"&&(typeof t!="string"||!t.match(/[\n\r]/g)))return y.createElement(j8,null,t);let n=e&&e.split("-");return y.createElement($9,{language:n&&n[1]||"text",format:!1,code:t,...r})};function sh(e,t){e.channel.emit(OL,t)}var W1=vL.a,Tj=({hash:e,children:t})=>{let r=l.useContext(Yt);return y.createElement(W1,{href:e,target:"_self",onClick:n=>{let a=e.substring(1);Lx.getElementById(a)&&sh(r,e)}},t)},Mx=e=>{let{href:t,target:r,children:n,...a}=e,o=l.useContext(Yt);return!t||r==="_blank"||/^https?:\/\//.test(t)?y.createElement(W1,{...e}):t.startsWith("#")?y.createElement(Tj,{hash:t},n):y.createElement(W1,{href:t,onClick:i=>{i.button===0&&!i.altKey&&!i.ctrlKey&&!i.metaKey&&!i.shiftKey&&(i.preventDefault(),sh(o,i.currentTarget.getAttribute("href")))},target:r,...a},n)},Px=["h1","h2","h3","h4","h5","h6"],zj=Px.reduce((e,t)=>({...e,[t]:F(t)({"& svg":{position:"relative",top:"-0.1em",visibility:"hidden"},"&:hover svg":{visibility:"visible"}})}),{}),Lj=F.a(()=>({float:"left",lineHeight:"inherit",paddingRight:"10px",marginLeft:"-24px",color:"inherit"})),Oj=({as:e,id:t,children:r,...n})=>{let a=l.useContext(Yt),o=zj[e],i=`#${t}`;return y.createElement(o,{id:t,...n},y.createElement(Lj,{"aria-hidden":"true",href:i,tabIndex:-1,target:"_self",onClick:s=>{Lx.getElementById(t)&&sh(a,i)}},y.createElement(AL,null)),r)},uh=e=>{let{as:t,id:r,children:n,...a}=e;if(r)return y.createElement(Oj,{as:t,id:r,...a},n);let o=t,{as:i,...s}=e;return y.createElement(o,{...le(s,t)})},$x=Px.reduce((e,t)=>({...e,[t]:r=>y.createElement(uh,{as:t,...r})}),{}),Mj=e=>{var t;if(!e.children)return null;if(typeof e.children!="string")throw new Error(Wx`The Markdown block only accepts children as a single string, but children were of type: '${typeof e.children}' @@ -729,7 +729,7 @@ To pass a single animation please supply them in simple values, e.g. animation(' `);return y.createElement(sx,{...e,options:{forceBlock:!0,overrides:{code:Ox,a:Mx,...$x,...(t=e==null?void 0:e.options)==null?void 0:t.overrides},...e==null?void 0:e.options}})},Pj=(e=>(e.INFO="info",e.NOTES="notes",e.DOCGEN="docgen",e.AUTO="auto",e))(Pj||{}),$j=e=>{var t,r,n,a,o,i,s,c;switch(e.type){case"story":return((r=(t=e.story.parameters.docs)==null?void 0:t.description)==null?void 0:r.story)||null;case"meta":{let{parameters:d,component:p}=e.preparedMeta;return((a=(n=d.docs)==null?void 0:n.description)==null?void 0:a.component)||((i=(o=d.docs)==null?void 0:o.extractComponentDescription)==null?void 0:i.call(o,p,{component:p,parameters:d}))||null}case"component":{let{component:d,projectAnnotations:{parameters:p}}=e;return((c=(s=p.docs)==null?void 0:s.extractComponentDescription)==null?void 0:c.call(s,d,{component:d,parameters:p}))||null}default:throw new Error(`Unrecognized module type resolved from 'useOf', got: ${e.type}`)}},G1=e=>{let{of:t}=e;if("of"in e&&t===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let r=kn(t||"meta"),n=$j(r);return n?y.createElement(Mj,null,n):null},W4=K1(jL()),Nj=F.div(({theme:e})=>({width:"10rem","@media (max-width: 768px)":{display:"none"}})),Hj=F.div(({theme:e})=>({position:"fixed",bottom:0,top:0,width:"10rem",paddingTop:"4rem",paddingBottom:"2rem",overflowY:"auto",fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch","& *":{boxSizing:"border-box"},"& > .toc-wrapper > .toc-list":{paddingLeft:0,borderLeft:`solid 2px ${e.color.mediumlight}`,".toc-list":{paddingLeft:0,borderLeft:`solid 2px ${e.color.mediumlight}`,".toc-list":{paddingLeft:0,borderLeft:`solid 2px ${e.color.mediumlight}`}}},"& .toc-list-item":{position:"relative",listStyleType:"none",marginLeft:20,paddingTop:3,paddingBottom:3},"& .toc-list-item::before":{content:'""',position:"absolute",height:"100%",top:0,left:0,transform:"translateX(calc(-2px - 20px))",borderLeft:`solid 2px ${e.color.mediumdark}`,opacity:0,transition:"opacity 0.2s"},"& .toc-list-item.is-active-li::before":{opacity:1},"& .toc-list-item > a":{color:e.color.defaultText,textDecoration:"none"},"& .toc-list-item.is-active-li > a":{fontWeight:600,color:e.color.secondary,textDecoration:"none"}})),jj=F.p(({theme:e})=>({fontWeight:600,fontSize:"0.875em",color:e.textColor,textTransform:"uppercase",marginBottom:10})),Vj=({title:e})=>e===null?null:typeof e=="string"?y.createElement(jj,null,e):e,Uj=({title:e,disable:t,headingSelector:r,contentsSelector:n,ignoreSelector:a,unsafeTocbotOptions:o})=>(l.useEffect(()=>{let i={tocSelector:".toc-wrapper",contentSelector:n??".sbdocs-content",headingSelector:r??"h3",ignoreSelector:a??".docs-story *, .skip-toc",headingsOffset:40,scrollSmoothOffset:-40,orderedList:!1,onClick:()=>!1,...o},s=setTimeout(()=>W4.init(i),100);return()=>{clearTimeout(s),W4.destroy()}},[t]),y.createElement(y.Fragment,null,y.createElement(Nj,null,t?null:y.createElement(Hj,null,y.createElement(Vj,{title:e||null}),y.createElement("div",{className:"toc-wrapper"}))))),{document:qj,window:Wj}=globalThis,Gj=({context:e,theme:t,children:r})=>{var a,o,i,s,c;let n;try{n=(o=(a=e.resolveOf("meta",["meta"]).preparedMeta.parameters)==null?void 0:a.docs)==null?void 0:o.toc}catch{n=(c=(s=(i=e==null?void 0:e.projectAnnotations)==null?void 0:i.parameters)==null?void 0:s.docs)==null?void 0:c.toc}return l.useEffect(()=>{let d;try{if(d=new URL(Wj.parent.location.toString()),d.hash){let p=qj.getElementById(decodeURIComponent(d.hash.substring(1)));p&&setTimeout(()=>{X$(p)},200)}}catch{}}),y.createElement(Yt.Provider,{value:e},y.createElement(yj,{channel:e.channel},y.createElement(D3,{theme:nS(t)},y.createElement(_O,{toc:n?y.createElement(Uj,{className:"sbdocs sbdocs-toc--custom",...n}):null},r))))},Yj=({children:e,disableAnchor:t})=>{if(t||typeof e!="string")return y.createElement(U8,null,e);let r=globalThis.encodeURIComponent(e.toLowerCase());return y.createElement(uh,{as:"h3",id:r},e)},Nx=({of:e,expanded:t=!0,withToolbar:r=!1,__forceInitialArgs:n=!1,__primary:a=!1})=>{var s,c;let{story:o}=kn(e||"story",["story"]),i=((c=(s=o.parameters.docs)==null?void 0:s.canvas)==null?void 0:c.withToolbar)??r;return y.createElement(K$,{storyId:o.id},t&&y.createElement(y.Fragment,null,y.createElement(Yj,null,o.name),y.createElement(G1,{of:e})),y.createElement(Aj,{of:e,withToolbar:i,story:{__forceInitialArgs:n,__primary:a},source:{__forceInitialArgs:n}}))},Kj=e=>{let{of:t}=e;if("of"in e&&t===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let{csfFile:r}=kn(t||"meta",["meta"]),n=l.useContext(Yt).componentStoriesFromCSFFile(r)[0];return n?y.createElement(Nx,{of:n.moduleExport,expanded:!1,__primary:!0,withToolbar:!0}):null},Zj=({children:e,disableAnchor:t,...r})=>{if(t||typeof e!="string")return y.createElement(V8,null,e);let n=e.toLowerCase().replace(/[^a-z0-9]/gi,"-");return y.createElement(uh,{as:"h2",id:n,...r},e)},Jj=F(Zj)(({theme:e})=>({fontSize:`${e.typography.size.s2-1}px`,fontWeight:e.typography.weight.bold,lineHeight:"16px",letterSpacing:"0.35em",textTransform:"uppercase",color:e.textMutedColor,border:0,marginBottom:"12px","&:first-of-type":{marginTop:"56px"}})),Xj=({title:e="Stories",includePrimary:t=!0})=>{var s;let{componentStories:r,projectAnnotations:n,getStoryContext:a}=l.useContext(Yt),o=r(),{stories:{filter:i}={filter:void 0}}=((s=n.parameters)==null?void 0:s.docs)||{};return i&&(o=o.filter(c=>i(c,a(c)))),o.some(c=>{var d;return(d=c.tags)==null?void 0:d.includes("autodocs")})&&(o=o.filter(c=>{var d;return((d=c.tags)==null?void 0:d.includes("autodocs"))&&!c.usesMount})),t||(o=o.slice(1)),!o||o.length===0?null:y.createElement(y.Fragment,null,y.createElement(Jj,null,e),o.map(c=>c&&y.createElement(Nx,{key:c.id,of:c.moduleExport,expanded:!0,__forceInitialArgs:!0})))},Qj="https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#subtitle-block-and-parameterscomponentsubtitle",eV=e=>{let{of:t,children:r}=e;if("of"in e&&t===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let n;try{n=kn(t||"meta",["meta"]).preparedMeta}catch(s){if(r&&!s.message.includes("did you forget to use ?"))throw s}let{componentSubtitle:a,docs:o}=(n==null?void 0:n.parameters)||{};a&&BL(`Using 'parameters.componentSubtitle' property to subtitle stories is deprecated. See ${Qj}`);let i=r||(o==null?void 0:o.subtitle)||a;return i?y.createElement(kO,{className:"sbdocs-subtitle sb-unstyled"},i):null},tV=/\s*\/\s*/,rV=e=>{let t=e.trim().split(tV);return(t==null?void 0:t[(t==null?void 0:t.length)-1])||e},nV=e=>{let{children:t,of:r}=e;if("of"in e&&r===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let n;try{n=kn(r||"meta",["meta"]).preparedMeta}catch(o){if(t&&!o.message.includes("did you forget to use ?"))throw o}let a=t||rV(n==null?void 0:n.title);return a?y.createElement(SO,{className:"sbdocs-title sb-unstyled"},a):null},aV=()=>{let e=kn("meta",["meta"]),{stories:t}=e.csfFile,r=Object.keys(t).length===1;return y.createElement(y.Fragment,null,y.createElement(nV,null),y.createElement(eV,null),y.createElement(G1,{of:"meta"}),r?y.createElement(G1,{of:"story"}):null,y.createElement(Kj,null),y.createElement(Bj,null),r?null:y.createElement(Xj,null))};function oV({context:e,docsParameter:t}){let r=t.container||Gj,n=t.page||aV;return y.createElement(r,{context:e,theme:t.theme},y.createElement(n,null))}var Hx={code:Ox,a:Mx,...$x},iV=class extends l.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){let{showException:t}=this.props;t(e)}render(){let{hasError:e}=this.state,{children:t}=this.props;return e?null:y.createElement(y.Fragment,null,t)}},lV=class{constructor(){this.render=async(e,t,r)=>{let n={...Hx,...t==null?void 0:t.components},a=oV;return new Promise((o,i)=>{Y1(()=>import("./index-fP2ooXcT.js"),__vite__mapDeps([12,2,3]),import.meta.url).then(({MDXProvider:s})=>Gx(y.createElement(iV,{showException:i,key:Math.random()},y.createElement(s,{components:n},y.createElement(a,{context:e,docsParameter:t}))),r)).then(()=>o())})},this.unmount=e=>{Yx(e)}}};const jV=Object.freeze(Object.defineProperty({__proto__:null,DocsRenderer:lV,defaultComponents:Hx},Symbol.toStringTag,{value:"Module"}));export{S9 as $,$A as A,LV as B,LA as C,V8 as D,bV as E,NA as F,BV as G,zV as H,sn as I,jf as J,yV as K,Sn as L,WA as M,yi as N,cu as O,x9 as P,_V as Q,PA as R,MA as S,VA as T,GA as U,F9 as V,EV as W,_9 as X,eL as Y,Mz as Z,kV as _,Cp as a,AV as a0,KA as a1,SV as a2,yz as a3,PT as a4,Lr as a5,vL as a6,sd as a7,mL as a8,T1 as a9,IV as aa,le as ab,yL as ac,se as ad,K1 as ae,F as af,PV as ag,vV as ah,vt as ai,mn as aj,jV as ak,MV as b,TA as c,Jf as d,zA as e,OA as f,AA as g,FV as h,TV as i,oa as j,zz as k,hL as l,kA as m,jA as n,UA as o,H8 as p,zl as q,R9 as r,xV as s,DV as t,qA as u,j8 as v,BA as w,U8 as x,WT as y,OV as z}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./index-eAyo8Lf0.js","./iframe-7Gh6p0LC.js","./index-6oxdNXpR.js","./_commonjsHelpers-4gQjN7DL.js","./jsx-runtime-63Ea5SlK.js","./index-9gkyvru-.js","./index-4FLvW62B.js","./index-mQRHDdot.js","./index-PPLHz8o0.js","./react-18-8FLnVqma.js","./client-Rb4DelHy.js","./Color-F6OSRLHC-yxyMlzvt.js","./index-fP2ooXcT.js"] + __vite__mapDeps.viteFileDeps = ["./index-Ymxyq6zK.js","./iframe-8qXcTeqo.js","./index-6oxdNXpR.js","./_commonjsHelpers-4gQjN7DL.js","./jsx-runtime-63Ea5SlK.js","./index-9gkyvru-.js","./index-4FLvW62B.js","./index-mQRHDdot.js","./index-PPLHz8o0.js","./react-18-8FLnVqma.js","./client-Rb4DelHy.js","./Color-F6OSRLHC-1QiaxRT-.js","./index-fP2ooXcT.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } diff --git a/assets/answer-choices-lVeJkx-U.js b/assets/answer-choices-iyIz6W_C.js similarity index 99% rename from assets/answer-choices-lVeJkx-U.js rename to assets/answer-choices-iyIz6W_C.js index 99b066293a..87cd4f9e94 100644 --- a/assets/answer-choices-lVeJkx-U.js +++ b/assets/answer-choices-iyIz6W_C.js @@ -1,4 +1,4 @@ -import{j as et}from"./jsx-runtime-63Ea5SlK.js";import{a as g,_ as d,b as yt,V as Ce,I as ke}from"./index-0DbkllkJ.js";import{r as o}from"./index-6oxdNXpR.js";import{l as v}from"./index-awljIyHI.js";import{C as gr,a as yr}from"./index-i1pBWAmI.js";import{s as m,c as a,m as ee,b as X,a as br,f as Sr}from"./index-deFLJwr4.js";import{a as bt,b as Qt,L as xr}from"./index-18qWGOW7.js";import{P as St}from"./index-469F30Ub.js";import{c as Gt,m as Cr}from"./minus-bold-ONmDo3Ve.js";import{r as Ie}from"./index-9gkyvru-.js";import{I as vr,x as Ir}from"./index-f-3iKkZU.js";import{w as kn}from"./index-7-BESUpx.js";import{P as wr,d as $r}from"./Popper-Y5KDXl-P.js";import{m as Er}from"./index-jxhLXBHb.js";import{u as kr}from"./i18n-context-fsWEgybQ.js";import{R as Rr}from"./renderer-1DxKQj1_.js";function Rn(s){const e=[];if(s)if(Array.isArray(s))for(const t of s)e.push(...Rn(t));else e.push(s);else return e;return e}function _n(s){const e=[],t=[];if(!s)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;Rn(s).forEach(l=>{const i=l._definition;if(i!=null)if(n){const c={};for(const[f,h]of Object.entries(i))c[f.replace(/-[a-z]/g,p=>p[1].toUpperCase())]=h;t.push(c)}else e.push(l);else t.push(l)});const r=Object.assign({},...t);if(t.length>0&&!n){const l=v.StyleSheet.create({inlineStyles:r});e.push(l.inlineStyles)}return{style:n?r:{},className:v.css(...e)}}const _r=["children","style","tag","testId"],Fr=/^h[1-6]$/,Jt=v.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}}),B=o.forwardRef(function(e,t){let{children:n,style:r,tag:l="span",testId:i}=e,c=g(e,_r);const f=Fr.test(l),h=_n([Jt.text,f&&Jt.header,r]),p=c.className?[c.className,h.className].join(" "):h.className;return o.createElement(l,d({},c,{style:h.style,className:p,"data-testid":i,ref:t}),n)}),Tr=["className","style"];function qe(s,e){return o.forwardRef((t,n)=>{const{className:r,style:l}=t,i=g(t,Tr),c=typeof s=="string"?zr[s]:null,{className:f,style:h}=_n([c,e,l]);return o.createElement(s,d({},i,{ref:n,className:[f,r].filter(Boolean).join(" "),style:h}))})}const zr=v.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),Pr=["testId","tag"],Ve=v.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),Or=qe("div",Ve.default),Br=qe("article",Ve.default),Lr=qe("aside",Ve.default),Dr=qe("nav",Ve.default),Nr=qe("section",Ve.default),Re=o.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,l=g(e,Pr),i=d({},l,{"data-testid":n});switch(r){case"article":return o.createElement(Br,d({},i,{ref:t}));case"aside":return o.createElement(Lr,d({},i,{ref:t}));case"nav":return o.createElement(Dr,d({},i,{ref:t}));case"section":return o.createElement(Nr,d({},i,{ref:t}));case"div":return o.createElement(Or,d({},i,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let be=function(s){return s.Root="root",s.Initial="initial",s.Standard="standard",s}({});const ut=o.createContext(be.Root);ut.displayName="RenderStateContext";let Hr=class extends o.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?o.createElement(ut.Provider,{value:be.Standard},t()):n?o.createElement(ut.Provider,{value:be.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case be.Root:return this._renderAsRootComponent();case be.Initial:return n?n():null;case be.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(be.Root)}}render(){return o.createElement(ut.Consumer,null,e=>this._maybeRender(e))}},Fn=class Tn{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${Tn._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}};Fn._factoryUniquenessCounter=0;let Mt=class{get(e){return e}};Mt.Default=new Mt;var Mr=Mt.Default;let Wr=class extends o.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(Mr):null:(this._idFactory||(this._idFactory=new Fn(r)),t(this._idFactory))}render(){return o.createElement(Hr,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}},Ar=class zn extends o.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(zn.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():o.createElement(Wr,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}};Ar.defaultId="wb-id";const Z=400,Be=700,qr=900,Rt="@media (max-width: 1023px)",_t="@media (min-width: 1024px)",z={display:"block"},A='Lato, "Noto Sans", sans-serif',en='"Noto Serif", serif',Vr="Inconsolata, monospace",L=v.StyleSheet.create({Title:d({},z,{fontFamily:A,fontWeight:qr,[_t]:{fontSize:36,lineHeight:"40px"},[Rt]:{fontSize:28,lineHeight:"32px"}}),Tagline:d({},z,{fontFamily:A,fontWeight:Z,fontSize:20,lineHeight:"24px"}),HeadingLarge:d({},z,{fontFamily:A,fontWeight:Be,[_t]:{fontSize:28,lineHeight:"32px"},[Rt]:{fontSize:24,lineHeight:"28px"}}),HeadingMedium:d({},z,{fontFamily:A,fontWeight:Be,[_t]:{fontSize:24,lineHeight:"28px"},[Rt]:{fontSize:22,lineHeight:"26px"}}),HeadingSmall:d({},z,{fontFamily:A,fontWeight:Be,fontSize:20,lineHeight:"24px"}),HeadingXSmall:d({},z,{fontFamily:A,fontWeight:Be,fontSize:12,lineHeight:"16px",letterSpacing:.6,textTransform:"uppercase"}),BodySerifBlock:d({},z,{fontFamily:en,fontWeight:Z,fontSize:22,lineHeight:"28px"}),BodySerif:d({},z,{fontFamily:en,fontWeight:Z,fontSize:18,lineHeight:"22px"}),BodyMonospace:d({},z,{fontFamily:Vr,fontWeight:Z,fontSize:17,lineHeight:"22px"}),Body:d({},z,{fontFamily:A,fontWeight:Z,fontSize:16,lineHeight:"22px"}),LabelLarge:d({},z,{fontFamily:A,fontWeight:Be,fontSize:16,lineHeight:"20px"}),LabelMedium:d({},z,{fontFamily:A,fontWeight:Z,fontSize:16,lineHeight:"20px"}),LabelSmall:d({},z,{fontFamily:A,fontWeight:Z,fontSize:14,lineHeight:"18px"}),LabelXSmall:d({},z,{fontFamily:A,fontWeight:Z,fontSize:12,lineHeight:"16px"}),Caption:d({},z,{fontFamily:A,fontWeight:Z,fontSize:14,lineHeight:"20px"}),Footnote:d({},z,{fontFamily:A,fontWeight:Z,fontSize:12,lineHeight:"18px"})}),Ur=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h1"}=e,i=g(e,Ur);return o.createElement(B,d({},i,{tag:l,style:[L.Title,n],ref:t}),r)});const Kr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h2"}=e,i=g(e,Kr);return o.createElement(B,d({},i,{tag:l,style:[L.HeadingLarge,n],ref:t}),r)});const jr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h3"}=e,i=g(e,jr);return o.createElement(B,d({},i,{tag:l,style:[L.HeadingMedium,n],ref:t}),r)});const Xr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,Xr);return o.createElement(B,d({},i,{tag:l,style:[L.HeadingSmall,n],ref:t}),r)});const Gr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,Gr);return o.createElement(B,d({},i,{tag:l,style:[L.HeadingXSmall,n],ref:t}),r)});const Zr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Zr);return o.createElement(B,d({},i,{tag:l,style:[L.BodySerifBlock,n],ref:t}),r)});const Yr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Yr);return o.createElement(B,d({},i,{tag:l,style:[L.BodySerif,n],ref:t}),r)});const Qr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Qr);return o.createElement(B,d({},i,{tag:l,style:[L.BodyMonospace,n],ref:t}),r)});const Jr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Jr);return o.createElement(B,d({},i,{tag:l,style:[L.Body,n],ref:t}),r)});const eo=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,eo);return o.createElement(B,d({},i,{tag:l,style:[L.LabelLarge,n],ref:t}),r)});const to=["style","children","tag"],Pn=o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,to);return o.createElement(B,d({},i,{tag:l,style:[L.LabelMedium,n],ref:t}),r)}),no=["style","children","tag"],ro=o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,no);return o.createElement(B,d({},i,{tag:l,style:[L.LabelSmall,n],ref:t}),r)}),oo=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,oo);return o.createElement(B,d({},i,{tag:l,style:[L.LabelXSmall,n],ref:t}),r)});const lo=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,lo);return o.createElement(B,d({},i,{tag:l,style:[L.Tagline,n],ref:t}),r)});const so=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,so);return o.createElement(B,d({},i,{tag:l,style:[L.Caption,n],ref:t}),r)});const io=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,io);return o.createElement(B,d({},i,{tag:l,style:[L.Footnote,n],ref:t}),r)});const tn=m.large_24,ao={small:{query:"(max-width: 767px)",totalColumns:4,gutterWidth:m.medium_16,marginWidth:m.medium_16},medium:{query:"(min-width: 768px) and (max-width: 1023px)",totalColumns:8,gutterWidth:m.xLarge_32,marginWidth:m.large_24},large:{query:"(min-width: 1024px)",totalColumns:12,gutterWidth:m.xLarge_32,marginWidth:tn,maxWidth:1120+tn*2}},co={ssrSize:"large",mediaSpec:ao},uo=o.createContext(co);uo.displayName="MediaLayoutContext";v.StyleSheet.create({grow:{flexGrow:1}});let gt=class extends o.Component{render(){const{size:e,style:t}=this.props;return o.createElement(Re,{"aria-hidden":"true",style:[ho(e),t]})}};const ho=s=>({width:s,MsFlexBasis:s,MsFlexPreferredSize:s,WebkitFlexBasis:s,flexBasis:s,flexShrink:0}),G={cellMinHeight:m.xxLarge_48,cellPadding:{paddingVertical:m.small_12,paddingHorizontal:m.medium_16},detailCellPadding:{paddingVertical:m.medium_16,paddingHorizontal:m.medium_16},accessoryHorizontalSpacing:m.medium_16},fo=s=>{switch(s){case"inset":return[Ft.horizontalRule,Ft.horizontalRuleInset];case"full-width":return Ft.horizontalRule;case"none":return{}}},Ft=v.StyleSheet.create({horizontalRule:{position:"relative",":after":{width:"100%",content:"''",position:"absolute",bottom:0,right:0,height:m.xxxxSmall_2,boxShadow:`inset 0px -1px 0px ${a.offBlack8}`}},horizontalRuleInset:{":after":{width:`calc(100% - ${G.cellPadding.paddingHorizontal}px)`}}}),po=({leftAccessory:s,leftAccessoryStyle:e,disabled:t})=>s?o.createElement(o.Fragment,null,o.createElement(Re,{style:[W.accessory,t&&W.accessoryDisabled,d({},e)]},s),o.createElement(gt,{size:G.accessoryHorizontalSpacing})):null,mo=({rightAccessory:s,rightAccessoryStyle:e,active:t,disabled:n})=>s?o.createElement(o.Fragment,null,o.createElement(gt,{size:G.accessoryHorizontalSpacing}),o.createElement(Re,{style:[W.accessory,W.accessoryRight,n&&W.accessoryDisabled,d({},e),t&&W.accessoryActive]},s)):null;function nn(s){const{active:e,children:t,disabled:n,horizontalRule:r="inset",contentStyle:l=void 0,leftAccessory:i=void 0,leftAccessoryStyle:c=void 0,rightAccessory:f=void 0,rightAccessoryStyle:h=void 0,style:p,testId:b,innerStyle:x}=s,C=fo(r);return o.createElement(Re,{style:[W.innerWrapper,x,p,C]},o.createElement(po,{leftAccessory:i,leftAccessoryStyle:c,disabled:n}),o.createElement(Re,{style:[W.content,l],testId:b},t),o.createElement(mo,{rightAccessory:f,rightAccessoryStyle:h,active:e,disabled:n}))}const On=s=>{const{active:e,disabled:t,href:n,onClick:r,"aria-label":l,"aria-selected":i,"aria-checked":c,target:f,role:h,rootStyle:p}=s;return r||n?o.createElement(gr,{disabled:t,onClick:r,href:n,hideDefaultFocusRing:!0,"aria-label":l||void 0,"aria-selected":i||void 0,"aria-checked":c,role:h,target:f,style:[W.wrapper,W.clickable,p,e&&W.active,t&&W.disabled],"aria-current":e?"true":void 0},()=>o.createElement(nn,s)):o.createElement(Re,{style:[W.wrapper,p,e&&W.active],"aria-current":e?"true":void 0,role:h},o.createElement(nn,s))},W=v.StyleSheet.create({wrapper:{background:a.white,color:a.offBlack,display:"flex",minHeight:G.cellMinHeight,textAlign:"left",width:"100%"},innerWrapper:{minHeight:G.cellMinHeight,padding:`${G.cellPadding.paddingVertical}px ${G.cellPadding.paddingHorizontal}px`,flexDirection:"row",flex:1,":focus-visible":{padding:`${G.cellPadding.paddingVertical-2}px ${G.cellPadding.paddingHorizontal-2}px`}},content:{alignSelf:"center",flex:1,overflowWrap:"break-word"},accessory:{minWidth:"auto",alignItems:"center",alignSelf:"center"},accessoryRight:{color:a.offBlack64},clickable:{outline:"none",":hover[aria-disabled=true]":{cursor:"not-allowed"},":focus-visible":{borderRadius:m.xxxSmall_4,overflow:"hidden",position:"relative"},":focus-visible:after":{content:"''",position:"absolute",top:0,left:0,zIndex:1,width:`calc(100% - ${m.xxxSmall_4}px)`,height:`calc(100% - ${m.xxxSmall_4}px)`,border:`${m.xxxxSmall_2}px solid ${a.blue}`,borderRadius:m.xxxSmall_4},":hover[aria-disabled=false]":{background:a.offBlack8},":active[aria-disabled=false]":{background:a.offBlack16}},active:{background:a.fadedBlue8,color:a.blue,":hover[aria-disabled=false]":{background:a.fadedBlue16},":active[aria-disabled=false]":{background:a.fadedBlue24}},disabled:{color:a.offBlack32,":focus-visible":{outline:"none"}},accessoryActive:{color:a.blue},accessoryDisabled:{color:a.offBlack,opacity:.32}}),go=["title"],yo=function(e){const{title:t}=e,n=g(e,go);return o.createElement(On,n,typeof t=="string"?o.createElement(Pn,null,t):t)},bo=["title","subtitle1","subtitle2"],rn=({subtitle:s,disabled:e})=>s?typeof s=="string"?o.createElement(ro,{style:!e&&Bn.subtitle},s):s:null,So=function(e){const{title:t,subtitle1:n,subtitle2:r}=e,l=g(e,bo);return o.createElement(On,d({},l,{innerStyle:Bn.innerWrapper}),o.createElement(rn,{subtitle:n,disabled:l.disabled}),n&&o.createElement(gt,{size:m.xxxxSmall_2}),typeof t=="string"?o.createElement(Pn,null,t):t,r&&o.createElement(gt,{size:m.xxxxSmall_2}),o.createElement(rn,{subtitle:r,disabled:l.disabled}))},Bn=v.StyleSheet.create({subtitle:{color:a.offBlack64},innerWrapper:{padding:`${G.detailCellPadding.paddingVertical}px ${G.detailCellPadding.paddingHorizontal}px`}});function Ln(s){const e=[];if(s)if(Array.isArray(s))for(const t of s)e.push(...Ln(t));else e.push(s);else return e;return e}function Dn(s){const e=[],t=[];if(!s)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;Ln(s).forEach(l=>{const i=l._definition;if(i!=null)if(n){const c={};for(const[f,h]of Object.entries(i))c[f.replace(/-[a-z]/g,p=>p[1].toUpperCase())]=h;t.push(c)}else e.push(l);else t.push(l)});const r=Object.assign({},...t);if(t.length>0&&!n){const l=v.StyleSheet.create({inlineStyles:r});e.push(l.inlineStyles)}return{style:n?r:{},className:v.css(...e)}}const xo=["children","style","tag","testId"],Co=/^h[1-6]$/,on=v.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}});o.forwardRef(function(e,t){let{children:n,style:r,tag:l="span",testId:i}=e,c=g(e,xo);const f=Co.test(l),h=Dn([on.text,f&&on.header,r]),p=c.className?[c.className,h.className].join(" "):h.className;return o.createElement(l,d({},c,{style:h.style,className:p,"data-testid":i,ref:t}),n)});const vo=["className","style"];function Ue(s,e){return o.forwardRef((t,n)=>{const{className:r,style:l}=t,i=g(t,vo),c=typeof s=="string"?Io[s]:null,{className:f,style:h}=Dn([c,e,l]);return o.createElement(s,d({},i,{ref:n,className:[f,r].filter(Boolean).join(" "),style:h}))})}const Io=v.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),wo=["testId","tag"],Ke=v.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),$o=Ue("div",Ke.default),Eo=Ue("article",Ke.default),ko=Ue("aside",Ke.default),Ro=Ue("nav",Ke.default),_o=Ue("section",Ke.default),Fo=o.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,l=g(e,wo),i=d({},l,{"data-testid":n});switch(r){case"article":return o.createElement(Eo,d({},i,{ref:t}));case"aside":return o.createElement(ko,d({},i,{ref:t}));case"nav":return o.createElement(Ro,d({},i,{ref:t}));case"section":return o.createElement(_o,d({},i,{ref:t}));case"div":return o.createElement($o,d({},i,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let Se=function(s){return s.Root="root",s.Initial="initial",s.Standard="standard",s}({});const ht=o.createContext(Se.Root);ht.displayName="RenderStateContext";let To=class extends o.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?o.createElement(ht.Provider,{value:Se.Standard},t()):n?o.createElement(ht.Provider,{value:Se.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case Se.Root:return this._renderAsRootComponent();case Se.Initial:return n?n():null;case Se.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(Se.Root)}}render(){return o.createElement(ht.Consumer,null,e=>this._maybeRender(e))}},Nn=class Hn{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${Hn._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}};Nn._factoryUniquenessCounter=0;let Wt=class{get(e){return e}};Wt.Default=new Wt;var zo=Wt.Default;let Po=class extends o.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(zo):null:(this._idFactory||(this._idFactory=new Nn(r)),t(this._idFactory))}render(){return o.createElement(To,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}},Oo=class Mn extends o.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(Mn.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():o.createElement(Po,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}};Oo.defaultId="wb-id";const ln=m.large_24,Bo={small:{query:"(max-width: 767px)",totalColumns:4,gutterWidth:m.medium_16,marginWidth:m.medium_16},medium:{query:"(min-width: 768px) and (max-width: 1023px)",totalColumns:8,gutterWidth:m.xLarge_32,marginWidth:m.large_24},large:{query:"(min-width: 1024px)",totalColumns:12,gutterWidth:m.xLarge_32,marginWidth:ln,maxWidth:1120+ln*2}},Lo={ssrSize:"large",mediaSpec:Bo},Do=o.createContext(Lo);Do.displayName="MediaLayoutContext";v.StyleSheet.create({grow:{flexGrow:1}});class de extends o.Component{render(){const{size:e,style:t}=this.props;return o.createElement(Fo,{"aria-hidden":"true",style:[No(e),t]})}}const No=s=>({width:s,MsFlexBasis:s,MsFlexPreferredSize:s,WebkitFlexBasis:s,flexBasis:s,flexShrink:0}),Ho=""+new URL("magnifying-glass-IX5mxYeF.svg",import.meta.url).href;function Wn(s){const e=[];if(s)if(Array.isArray(s))for(const t of s)e.push(...Wn(t));else e.push(s);else return e;return e}function An(s){const e=[],t=[];if(!s)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;Wn(s).forEach(l=>{const i=l._definition;if(i!=null)if(n){const c={};for(const[f,h]of Object.entries(i))c[f.replace(/-[a-z]/g,p=>p[1].toUpperCase())]=h;t.push(c)}else e.push(l);else t.push(l)});const r=Object.assign({},...t);if(t.length>0&&!n){const l=v.StyleSheet.create({inlineStyles:r});e.push(l.inlineStyles)}return{style:n?r:{},className:v.css(...e)}}const Mo=["children","style","tag","testId"],Wo=/^h[1-6]$/,sn=v.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}}),D=o.forwardRef(function(e,t){let{children:n,style:r,tag:l="span",testId:i}=e,c=g(e,Mo);const f=Wo.test(l),h=An([sn.text,f&&sn.header,r]),p=c.className?[c.className,h.className].join(" "):h.className;return o.createElement(l,d({},c,{style:h.style,className:p,"data-testid":i,ref:t}),n)}),Ao=["className","style"];function Te(s,e){return o.forwardRef((t,n)=>{const{className:r,style:l}=t,i=g(t,Ao),c=typeof s=="string"?qo[s]:null,{className:f,style:h}=An([c,e,l]);return o.createElement(s,d({},i,{ref:n,className:[f,r].filter(Boolean).join(" "),style:h}))})}const qo=v.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),Vo=["testId","tag"],je=v.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),Uo=Te("div",je.default),Ko=Te("article",je.default),jo=Te("aside",je.default),Xo=Te("nav",je.default),Go=Te("section",je.default),Zo=o.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,l=g(e,Vo),i=d({},l,{"data-testid":n});switch(r){case"article":return o.createElement(Ko,d({},i,{ref:t}));case"aside":return o.createElement(jo,d({},i,{ref:t}));case"nav":return o.createElement(Xo,d({},i,{ref:t}));case"section":return o.createElement(Go,d({},i,{ref:t}));case"div":return o.createElement(Uo,d({},i,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let xe=function(s){return s.Root="root",s.Initial="initial",s.Standard="standard",s}({});const ft=o.createContext(xe.Root);ft.displayName="RenderStateContext";let Yo=class extends o.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?o.createElement(ft.Provider,{value:xe.Standard},t()):n?o.createElement(ft.Provider,{value:xe.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case xe.Root:return this._renderAsRootComponent();case xe.Initial:return n?n():null;case xe.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(xe.Root)}}render(){return o.createElement(ft.Consumer,null,e=>this._maybeRender(e))}},qn=class Vn{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${Vn._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}};qn._factoryUniquenessCounter=0;let At=class{get(e){return e}};At.Default=new At;var Qo=At.Default;let Jo=class extends o.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(Qo):null:(this._idFactory||(this._idFactory=new qn(r)),t(this._idFactory))}render(){return o.createElement(Yo,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}},Un=class Kn extends o.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(Kn.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():o.createElement(Jo,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}};Un.defaultId="wb-id";const Y=400,Le=700,el=900,Tt="@media (max-width: 1023px)",zt="@media (min-width: 1024px)",P={display:"block"},q='Lato, "Noto Sans", sans-serif',an='"Noto Serif", serif',tl="Inconsolata, monospace",T=v.StyleSheet.create({Title:d({},P,{fontFamily:q,fontWeight:el,[zt]:{fontSize:36,lineHeight:"40px"},[Tt]:{fontSize:28,lineHeight:"32px"}}),Tagline:d({},P,{fontFamily:q,fontWeight:Y,fontSize:20,lineHeight:"24px"}),HeadingLarge:d({},P,{fontFamily:q,fontWeight:Le,[zt]:{fontSize:28,lineHeight:"32px"},[Tt]:{fontSize:24,lineHeight:"28px"}}),HeadingMedium:d({},P,{fontFamily:q,fontWeight:Le,[zt]:{fontSize:24,lineHeight:"28px"},[Tt]:{fontSize:22,lineHeight:"26px"}}),HeadingSmall:d({},P,{fontFamily:q,fontWeight:Le,fontSize:20,lineHeight:"24px"}),HeadingXSmall:d({},P,{fontFamily:q,fontWeight:Le,fontSize:12,lineHeight:"16px",letterSpacing:.6,textTransform:"uppercase"}),BodySerifBlock:d({},P,{fontFamily:an,fontWeight:Y,fontSize:22,lineHeight:"28px"}),BodySerif:d({},P,{fontFamily:an,fontWeight:Y,fontSize:18,lineHeight:"22px"}),BodyMonospace:d({},P,{fontFamily:tl,fontWeight:Y,fontSize:17,lineHeight:"22px"}),Body:d({},P,{fontFamily:q,fontWeight:Y,fontSize:16,lineHeight:"22px"}),LabelLarge:d({},P,{fontFamily:q,fontWeight:Le,fontSize:16,lineHeight:"20px"}),LabelMedium:d({},P,{fontFamily:q,fontWeight:Y,fontSize:16,lineHeight:"20px"}),LabelSmall:d({},P,{fontFamily:q,fontWeight:Y,fontSize:14,lineHeight:"18px"}),LabelXSmall:d({},P,{fontFamily:q,fontWeight:Y,fontSize:12,lineHeight:"16px"}),Caption:d({},P,{fontFamily:q,fontWeight:Y,fontSize:14,lineHeight:"20px"}),Footnote:d({},P,{fontFamily:q,fontWeight:Y,fontSize:12,lineHeight:"18px"})}),nl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h1"}=e,i=g(e,nl);return o.createElement(D,d({},i,{tag:l,style:[T.Title,n],ref:t}),r)});const rl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h2"}=e,i=g(e,rl);return o.createElement(D,d({},i,{tag:l,style:[T.HeadingLarge,n],ref:t}),r)});const ol=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h3"}=e,i=g(e,ol);return o.createElement(D,d({},i,{tag:l,style:[T.HeadingMedium,n],ref:t}),r)});const ll=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,ll);return o.createElement(D,d({},i,{tag:l,style:[T.HeadingSmall,n],ref:t}),r)});const sl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,sl);return o.createElement(D,d({},i,{tag:l,style:[T.HeadingXSmall,n],ref:t}),r)});const il=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,il);return o.createElement(D,d({},i,{tag:l,style:[T.BodySerifBlock,n],ref:t}),r)});const al=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,al);return o.createElement(D,d({},i,{tag:l,style:[T.BodySerif,n],ref:t}),r)});const dl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,dl);return o.createElement(D,d({},i,{tag:l,style:[T.BodyMonospace,n],ref:t}),r)});const cl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,cl);return o.createElement(D,d({},i,{tag:l,style:[T.Body,n],ref:t}),r)});const ul=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,ul);return o.createElement(D,d({},i,{tag:l,style:[T.LabelLarge,n],ref:t}),r)});const hl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,hl);return o.createElement(D,d({},i,{tag:l,style:[T.LabelMedium,n],ref:t}),r)});const fl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,fl);return o.createElement(D,d({},i,{tag:l,style:[T.LabelSmall,n],ref:t}),r)});const pl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,pl);return o.createElement(D,d({},i,{tag:l,style:[T.LabelXSmall,n],ref:t}),r)});const ml=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,ml);return o.createElement(D,d({},i,{tag:l,style:[T.Tagline,n],ref:t}),r)});const gl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,gl);return o.createElement(D,d({},i,{tag:l,style:[T.Caption,n],ref:t}),r)});const yl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,yl);return o.createElement(D,d({},i,{tag:l,style:[T.Footnote,n],ref:t}),r)});function jn(s){const e=[];if(s)if(Array.isArray(s))for(const t of s)e.push(...jn(t));else e.push(s);else return e;return e}function Xn(s){const e=[],t=[];if(!s)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;jn(s).forEach(l=>{const i=l._definition;if(i!=null)if(n){const c={};for(const[f,h]of Object.entries(i))c[f.replace(/-[a-z]/g,p=>p[1].toUpperCase())]=h;t.push(c)}else e.push(l);else t.push(l)});const r=Object.assign({},...t);if(t.length>0&&!n){const l=v.StyleSheet.create({inlineStyles:r});e.push(l.inlineStyles)}return{style:n?r:{},className:v.css(...e)}}const bl=["children","style","tag","testId"],Sl=/^h[1-6]$/,dn=v.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}}),N=o.forwardRef(function(e,t){let{children:n,style:r,tag:l="span",testId:i}=e,c=g(e,bl);const f=Sl.test(l),h=Xn([dn.text,f&&dn.header,r]),p=c.className?[c.className,h.className].join(" "):h.className;return o.createElement(l,d({},c,{style:h.style,className:p,"data-testid":i,ref:t}),n)}),xl=["className","style"];function H(s,e){return o.forwardRef((t,n)=>{const{className:r,style:l}=t,i=g(t,xl),c=typeof s=="string"?Cl[s]:null,{className:f,style:h}=Xn([c,e,l]);return o.createElement(s,d({},i,{ref:n,className:[f,r].filter(Boolean).join(" "),style:h}))})}const Cl=v.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),vl=["testId","tag"],Xe=v.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),Il=H("div",Xe.default),wl=H("article",Xe.default),$l=H("aside",Xe.default),El=H("nav",Xe.default),kl=H("section",Xe.default),_e=o.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,l=g(e,vl),i=d({},l,{"data-testid":n});switch(r){case"article":return o.createElement(wl,d({},i,{ref:t}));case"aside":return o.createElement($l,d({},i,{ref:t}));case"nav":return o.createElement(El,d({},i,{ref:t}));case"section":return o.createElement(kl,d({},i,{ref:t}));case"div":return o.createElement(Il,d({},i,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let ie=function(s){return s.Root="root",s.Initial="initial",s.Standard="standard",s}({});const We=o.createContext(ie.Root);We.displayName="RenderStateContext";class Rl extends o.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?o.createElement(We.Provider,{value:ie.Standard},t()):n?o.createElement(We.Provider,{value:ie.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case ie.Root:return this._renderAsRootComponent();case ie.Initial:return n?n():null;case ie.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(ie.Root)}}render(){return o.createElement(We.Consumer,null,e=>this._maybeRender(e))}}class Ge{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${Ge._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}}Ge._factoryUniquenessCounter=0;class qt{get(e){return e}}qt.Default=new qt;var Gn=qt.Default;class Zn extends o.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(Gn):null:(this._idFactory||(this._idFactory=new Ge(r)),t(this._idFactory))}render(){return o.createElement(Rl,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}}class Ze extends o.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(Ze.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():o.createElement(Zn,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}}Ze.defaultId="wb-id";const _l=()=>o.useContext(We),Fl=s=>{const e=_l(),t=o.useRef(null);if(e===ie.Root)throw new Error("Components using useUniqueIdWithMock() should be descendants of ");return e===ie.Initial?Gn:(t.current||(t.current=new Ge(s)),t.current)},Tl=s=>{o.useEffect(s,[])},Q=400,De=700,zl=900,Pt="@media (max-width: 1023px)",Ot="@media (min-width: 1024px)",O={display:"block"},V='Lato, "Noto Sans", sans-serif',cn='"Noto Serif", serif',Pl="Inconsolata, monospace",F=v.StyleSheet.create({Title:d({},O,{fontFamily:V,fontWeight:zl,[Ot]:{fontSize:36,lineHeight:"40px"},[Pt]:{fontSize:28,lineHeight:"32px"}}),Tagline:d({},O,{fontFamily:V,fontWeight:Q,fontSize:20,lineHeight:"24px"}),HeadingLarge:d({},O,{fontFamily:V,fontWeight:De,[Ot]:{fontSize:28,lineHeight:"32px"},[Pt]:{fontSize:24,lineHeight:"28px"}}),HeadingMedium:d({},O,{fontFamily:V,fontWeight:De,[Ot]:{fontSize:24,lineHeight:"28px"},[Pt]:{fontSize:22,lineHeight:"26px"}}),HeadingSmall:d({},O,{fontFamily:V,fontWeight:De,fontSize:20,lineHeight:"24px"}),HeadingXSmall:d({},O,{fontFamily:V,fontWeight:De,fontSize:12,lineHeight:"16px",letterSpacing:.6,textTransform:"uppercase"}),BodySerifBlock:d({},O,{fontFamily:cn,fontWeight:Q,fontSize:22,lineHeight:"28px"}),BodySerif:d({},O,{fontFamily:cn,fontWeight:Q,fontSize:18,lineHeight:"22px"}),BodyMonospace:d({},O,{fontFamily:Pl,fontWeight:Q,fontSize:17,lineHeight:"22px"}),Body:d({},O,{fontFamily:V,fontWeight:Q,fontSize:16,lineHeight:"22px"}),LabelLarge:d({},O,{fontFamily:V,fontWeight:De,fontSize:16,lineHeight:"20px"}),LabelMedium:d({},O,{fontFamily:V,fontWeight:Q,fontSize:16,lineHeight:"20px"}),LabelSmall:d({},O,{fontFamily:V,fontWeight:Q,fontSize:14,lineHeight:"18px"}),LabelXSmall:d({},O,{fontFamily:V,fontWeight:Q,fontSize:12,lineHeight:"16px"}),Caption:d({},O,{fontFamily:V,fontWeight:Q,fontSize:14,lineHeight:"20px"}),Footnote:d({},O,{fontFamily:V,fontWeight:Q,fontSize:12,lineHeight:"18px"})}),Ol=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h1"}=e,i=g(e,Ol);return o.createElement(N,d({},i,{tag:l,style:[F.Title,n],ref:t}),r)});const Bl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h2"}=e,i=g(e,Bl);return o.createElement(N,d({},i,{tag:l,style:[F.HeadingLarge,n],ref:t}),r)});const Ll=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h3"}=e,i=g(e,Ll);return o.createElement(N,d({},i,{tag:l,style:[F.HeadingMedium,n],ref:t}),r)});const Dl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,Dl);return o.createElement(N,d({},i,{tag:l,style:[F.HeadingSmall,n],ref:t}),r)});const Nl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,Nl);return o.createElement(N,d({},i,{tag:l,style:[F.HeadingXSmall,n],ref:t}),r)});const Hl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Hl);return o.createElement(N,d({},i,{tag:l,style:[F.BodySerifBlock,n],ref:t}),r)});const Ml=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Ml);return o.createElement(N,d({},i,{tag:l,style:[F.BodySerif,n],ref:t}),r)});const Wl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Wl);return o.createElement(N,d({},i,{tag:l,style:[F.BodyMonospace,n],ref:t}),r)});const Al=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Al);return o.createElement(N,d({},i,{tag:l,style:[F.Body,n],ref:t}),r)});const ql=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,ql);return o.createElement(N,d({},i,{tag:l,style:[F.LabelLarge,n],ref:t}),r)});const Vl=["style","children","tag"],xt=o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Vl);return o.createElement(N,d({},i,{tag:l,style:[F.LabelMedium,n],ref:t}),r)}),Ul=["style","children","tag"],we=o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Ul);return o.createElement(N,d({},i,{tag:l,style:[F.LabelSmall,n],ref:t}),r)}),Kl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Kl);return o.createElement(N,d({},i,{tag:l,style:[F.LabelXSmall,n],ref:t}),r)});const jl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,jl);return o.createElement(N,d({},i,{tag:l,style:[F.Tagline,n],ref:t}),r)});const Xl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Xl);return o.createElement(N,d({},i,{tag:l,style:[F.Caption,n],ref:t}),r)});const Gl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Gl);return o.createElement(N,d({},i,{tag:l,style:[F.Footnote,n],ref:t}),r)});const Zl=s=>({small:16,medium:24,large:48,xlarge:96})[s],Yl=["color","icon","size","style","testId","className"],Ql=H("span"),Yn=o.forwardRef(function(e,t){const{color:n="currentColor",icon:r,size:l="small",style:i,testId:c,className:f}=e,h=g(e,Yl),p=Zl(l),b=`${f??""}`,x=Jl(n,p);return o.createElement(Ql,d({},h,{className:b,style:[Vt.svg,x.icon,{maskImage:`url(${r})`},i],"data-testid":c,ref:t}))}),un={},Jl=(s,e)=>{const t=`${s}-${e}`;if(Vt[t])return Vt[t];const n={icon:{backgroundColor:s,width:e,height:e}};return un[t]=v.StyleSheet.create(n),un[t]},Vt=v.StyleSheet.create({svg:{display:"inline-block",verticalAlign:"text-bottom",flexShrink:0,flexGrow:0,maskSize:"100%",maskRepeat:"no-repeat",maskPosition:"center"}});Yn.displayName="PhosphorIcon";const es=["checked","disabled","error","groupName","id","testId"];function ts(s){switch(s){case!0:return"true";case!1:return"false";default:return"mixed"}}const{blue:Qn,red:Jn,white:ae,offWhite:ns,offBlack16:rs,offBlack32:os,offBlack50:ls}=a,Ne=m.medium_16,Ut=m.small_12,ss=H("input"),is=o.forwardRef(function(e,t){const{checked:n,disabled:r,error:l,groupName:i,id:c,testId:f}=e,h=g(e,es),p=o.useRef(null);o.useEffect(()=>{p.current!=null&&(p.current.indeterminate=n==null)},[n,p]);const b=()=>{},x=cs(n,l),C=[tt.inputReset,tt.default,!r&&x.default,r&&tt.disabled],I=o.createElement(Yn,{color:r?os:ae,icon:n?Gt:Cr,size:"small",style:[tt.checkboxIcon,{width:Ut,height:Ut}]}),u=ts(n);return o.createElement(o.Fragment,null,o.createElement(ss,d({},h,{ref:y=>{p.current=y,typeof t=="function"?t(y):t!=null&&(t.current=y)},type:"checkbox","aria-checked":u,"aria-invalid":l,checked:n??void 0,disabled:r,id:c,name:i,onChange:b,style:C,"data-testid":f})),n||n==null?I:o.createElement(o.Fragment,null))}),tt=v.StyleSheet.create({inputReset:{appearance:"none",WebkitAppearance:"none",MozAppearance:"none"},default:{height:Ne,width:Ne,minHeight:Ne,minWidth:Ne,margin:0,outline:"none",boxSizing:"border-box",borderStyle:"solid",borderWidth:1,borderRadius:3},disabled:{cursor:"auto",backgroundColor:ns,borderColor:rs,borderWidth:1},checkboxIcon:{position:"absolute",pointerEvents:"none",margin:(Ne-Ut)/2}}),as=ee(a.fadedBlue16,ae),ds=a.activeBlue,pt=ee(a.fadedRed8,ae),er=a.activeRed,hn={default:{faded:as,base:Qn,active:ds},error:{faded:pt,base:Jn,active:er}},nt={},cs=(s,e)=>{const t=`${String(s)}-${String(e)}`;if(nt[t])return nt[t];const n=e?hn.error:hn.default;let r={};return s||s==null?r={default:{backgroundColor:n.base,borderWidth:0,":focus-visible":{boxShadow:`0 0 0 1px ${ae}, 0 0 0 3px ${n.base}`},":hover":{boxShadow:`0 0 0 1px ${ae}, 0 0 0 3px ${n.base}`},":active":{boxShadow:`0 0 0 1px ${ae}, 0 0 0 3px ${n.active}`,background:n.active}}}:r={default:{backgroundColor:e?pt:ae,borderColor:e?Jn:ls,":focus-visible":{backgroundColor:e?pt:ae,borderColor:n.base,borderWidth:2},":hover":{backgroundColor:e?pt:ae,borderColor:n.base,borderWidth:2},":active":{backgroundColor:n.faded,borderColor:e?er:Qn,borderWidth:2}}},nt[t]=v.StyleSheet.create(r),nt[t]},us=["checked","disabled","error","groupName","id","testId"],{blue:tr,red:nr,white:se,offWhite:hs,offBlack16:fs,offBlack32:ps,offBlack50:ms}=a,gs=H("input"),ys=o.forwardRef(function(e,t){const n=()=>{},{checked:r,disabled:l,error:i,groupName:c,id:f,testId:h}=e,p=g(e,us),b=xs(r,i),x=[Bt.inputReset,Bt.default,!l&&b.default,l&&Bt.disabled];return o.createElement(o.Fragment,null,o.createElement(gs,d({},p,{type:"radio","aria-invalid":i,checked:r??void 0,disabled:l,id:f,name:c,onChange:n,style:x,"data-testid":h,ref:t})),l&&r&&o.createElement("span",{style:bs}))}),ce=16,bs={position:"absolute",top:ce/4,left:ce/4,height:ce/2,width:ce/2,borderRadius:"50%",backgroundColor:ps},Bt=v.StyleSheet.create({inputReset:{appearance:"none",WebkitAppearance:"none",MozAppearance:"none"},default:{height:ce,width:ce,minHeight:ce,minWidth:ce,margin:0,outline:"none",boxSizing:"border-box",borderStyle:"solid",borderWidth:1,borderRadius:"50%"},disabled:{cursor:"auto",backgroundColor:hs,borderColor:fs,borderWidth:1}}),Ss=ee(a.fadedBlue16,se),mt=ee(a.fadedRed8,se),fn={default:{faded:Ss,base:tr,active:a.activeBlue},error:{faded:mt,base:nr,active:a.activeRed}},rt={},xs=(s,e)=>{const t=`${String(s)}-${String(e)}`;if(rt[t])return rt[t];const n=e?fn.error:fn.default;let r={};return s?r={default:{backgroundColor:se,borderColor:n.base,borderWidth:ce/4,":focus-visible":{boxShadow:`0 0 0 1px ${se}, 0 0 0 3px ${n.base}`},":hover":{boxShadow:`0 0 0 1px ${se}, 0 0 0 3px ${n.base}`},":active":{boxShadow:`0 0 0 1px ${se}, 0 0 0 3px ${n.active}`,borderColor:n.active}}}:r={default:{backgroundColor:e?mt:se,borderColor:e?nr:ms,":focus-visible":{backgroundColor:e?mt:se,borderColor:n.base,borderWidth:2},":hover":{backgroundColor:e?mt:se,borderColor:n.base,borderWidth:2},":active":{backgroundColor:n.faded,borderColor:e?a.activeRed:tr,borderWidth:2}}},rt[t]=v.StyleSheet.create(r),rt[t]},Cs=["checked","description","disabled","error","id","label","onChange","style","className","variant"],rr=o.forwardRef(function(e,t){const{checked:n,description:r,disabled:l=!1,error:i=!1,id:c,label:f,onChange:h,style:p,className:b,variant:x}=e,C=g(e,Cs),I=()=>{x==="radio"&&n||h(!n)},u=()=>x==="radio"?ys:is,y=w=>o.createElement(xt,{style:[ot.label,l&&ot.disabledLabel]},o.createElement("label",{htmlFor:w},f)),S=w=>o.createElement(we,{style:ot.description,id:w},r),$=u();return o.createElement(Zn,{mockOnFirstRender:!0,scope:"choice"},w=>{const k=c||w.get("main"),E=r?w.get("description"):void 0;return o.createElement(_e,{style:p,className:b},o.createElement(_e,{style:ot.wrapper,tabIndex:-1},o.createElement($,d({},C,{id:k,checked:n,"aria-describedby":E,onClick:I,disabled:l,error:i,ref:t})),o.createElement(de,{size:m.xSmall_8}),f&&y(k)),r&&S(E))})}),ot=v.StyleSheet.create({wrapper:{flexDirection:"row",alignItems:"flex-start",outline:"none"},label:{marginTop:-2},disabledLabel:{color:a.offBlack32},description:{marginLeft:m.medium_16+m.xSmall_8,marginTop:m.xxxSmall_4,color:a.offBlack64}}),vs=o.forwardRef(function(e,t){const{disabled:n=!1,error:r=!1}=e;return o.createElement(rr,d({},e,{variant:"checkbox",disabled:n,error:r,ref:t}))}),Is=["disabled","error"],ws=o.forwardRef(function(e,t){const{disabled:n=!1,error:r=!1}=e,l=g(e,Is);return o.createElement(rr,d({},l,{variant:"radio",disabled:n,error:r,ref:t}))}),$s=["checked","disabled","onChange","value","variant"];o.forwardRef(function(e,t){const{checked:n=!1,disabled:r=!1,onChange:l=()=>{},variant:i}=e,c=g(e,$s),h=(p=>p==="checkbox"?vs:ws)(i);return o.createElement(h,d({},c,{checked:n,disabled:r,onChange:l,ref:t}))});const J=v.StyleSheet.create({fieldset:{border:"none",padding:0,margin:0},legend:{padding:0},description:{marginTop:m.xxxSmall_4,color:a.offBlack64},error:{marginTop:m.xxxSmall_4,color:a.red},defaultLineGap:{marginTop:m.xSmall_8}}),Es=H("fieldset"),ks=H("legend");o.forwardRef(function(e,t){const{children:n,label:r,description:l,errorMessage:i,groupName:c,onChange:f,selectedValues:h,style:p,testId:b}=e,x=(I,u)=>{if(u){const y=h.indexOf(I),S=[...h.slice(0,y),...h.slice(y+1)];f(S)}else f([...h,I])},C=o.Children.toArray(n).filter(Boolean);return o.createElement(Es,{"data-testid":b,style:J.fieldset,ref:t},o.createElement(_e,{style:p},r&&o.createElement(ks,{style:J.legend},o.createElement(xt,null,r)),l&&o.createElement(we,{style:J.description},l),i&&o.createElement(we,{style:J.error},i),(r||l||i)&&o.createElement(de,{size:m.small_12}),C.map((I,u)=>{const{style:y,value:S}=I.props,$=h.includes(S);return o.cloneElement(I,{checked:$,error:!!i,groupName:c,id:`${c}-${S}`,key:S,onChange:()=>x(S,$),style:[u>0&&J.defaultLineGap,y],variant:"checkbox"})})))});const Rs=H("fieldset"),_s=H("legend");o.forwardRef(function(e,t){const{children:n,label:r,description:l,errorMessage:i,groupName:c,onChange:f,selectedValue:h,style:p,testId:b}=e,x=o.Children.toArray(n).filter(Boolean);return o.createElement(Rs,{"data-testid":b,style:J.fieldset,ref:t},o.createElement(_e,{style:p},r&&o.createElement(_s,{style:J.legend},o.createElement(xt,null,r)),l&&o.createElement(we,{style:J.description},l),i&&o.createElement(we,{style:J.error},i),(r||l||i)&&o.createElement(de,{size:m.small_12}),x.map((C,I)=>{const{style:u,value:y}=C.props,S=h===y;return o.cloneElement(C,{checked:S,error:!!i,groupName:c,id:`${c}-${y}`,key:y,onChange:()=>f(y),style:[I>0&&J.defaultLineGap,u],variant:"radio"})})))});const Fs=["id","type","value","name","disabled","onKeyDown","placeholder","style","testId","readOnly","autoFocus","autoComplete","forwardedRef","light","onFocus","onBlur","onValidate","validate","onChange","required"],Ts="This field is required.",zs=H("input");class or extends o.Component{constructor(e){super(e),this.state={error:null},this.maybeValidate=t=>{const{validate:n,onValidate:r,required:l}=this.props;if(n){const i=n(t)||null;this.setState({error:i},()=>{r&&r(i)})}else if(l){const c=t?null:typeof l=="string"?l:Ts;this.setState({error:c},()=>{r&&r(c)})}},this.handleChange=t=>{const{onChange:n}=this.props,r=t.target.value;this.maybeValidate(r),n(r)},this.handleFocus=t=>{const{onFocus:n}=this.props;n&&n(t)},this.handleBlur=t=>{const{onBlur:n}=this.props;n&&n(t)},this.getStyles=()=>{const{disabled:t,light:n}=this.props,{error:r}=this.state,l=[oe.input,F.LabelMedium],i=[oe.default,!t&&oe.defaultFocus,t&&oe.disabled,!!r&&oe.error],c=[oe.light,!t&&oe.lightFocus,t&&oe.lightDisabled,!!r&&oe.lightError];return[...l,...n?c:i]},e.validate&&e.value!==""&&(this.state.error=e.validate(e.value)||null)}componentDidMount(){this.props.value!==""&&this.maybeValidate(this.props.value)}render(){const e=this.props,{id:t,type:n,value:r,name:l,disabled:i,onKeyDown:c,placeholder:f,style:h,testId:p,readOnly:b,autoFocus:x,autoComplete:C,forwardedRef:I}=e,u=g(e,Fs);return o.createElement(Ze,{id:t,scope:"text-field"},y=>o.createElement(zs,d({style:[this.getStyles(),h],id:y,type:n,placeholder:f,value:r,name:l,disabled:i,onChange:this.handleChange,onKeyDown:c,onFocus:this.handleFocus,onBlur:this.handleBlur,"data-testid":p,readOnly:b,autoFocus:x,autoComplete:C,ref:I},u,{"aria-invalid":this.state.error?"true":"false"})))}}or.defaultProps={type:"text",disabled:!1,light:!1};const oe=v.StyleSheet.create({input:{width:"100%",height:40,borderRadius:X.radius.medium_4,boxSizing:"border-box",paddingLeft:m.medium_16,margin:0},default:{background:a.white,border:`1px solid ${a.offBlack50}`,color:a.offBlack,"::placeholder":{color:a.offBlack64}},defaultFocus:{":focus-visible":{borderColor:a.blue,outline:`1px solid ${a.blue}`,outlineOffset:0}},error:{background:a.fadedRed8,border:`1px solid ${a.red}`,color:a.offBlack,"::placeholder":{color:a.offBlack64},":focus-visible":{outlineColor:a.red,borderColor:a.red}},disabled:{background:a.offWhite,border:`1px solid ${a.offBlack16}`,color:a.offBlack64,"::placeholder":{color:a.offBlack64},cursor:"not-allowed",":focus-visible":{outline:"none",boxShadow:`0 0 0 1px ${a.white}, 0 0 0 3px ${a.offBlack32}`}},light:{background:a.white,border:`1px solid ${a.offBlack16}`,color:a.offBlack,"::placeholder":{color:a.offBlack64}},lightFocus:{":focus-visible":{outline:`1px solid ${a.blue}`,outlineOffset:0,borderColor:a.blue,boxShadow:`0px 0px 0px 2px ${a.blue}, 0px 0px 0px 3px ${a.white}`}},lightDisabled:{backgroundColor:"transparent",border:`1px solid ${a.white32}`,color:a.white64,"::placeholder":{color:a.white64},cursor:"not-allowed",":focus-visible":{borderColor:ee(a.white32,a.blue),outline:"none",boxShadow:`0 0 0 1px ${a.offBlack32}, 0 0 0 3px ${a.fadedBlue}`}},lightError:{background:a.fadedRed8,border:`1px solid ${a.red}`,boxShadow:`0px 0px 0px 1px ${a.red}, 0px 0px 0px 2px ${a.white}`,color:a.offBlack,"::placeholder":{color:a.offBlack64},":focus-visible":{outlineColor:a.red,borderColor:a.red,boxShadow:`0px 0px 0px 2px ${a.red}, 0px 0px 0px 3px ${a.white}`}}});var lr=o.forwardRef((s,e)=>o.createElement(or,d({},s,{forwardedRef:e})));const Ps=H("span");class Os extends o.Component{renderLabel(){const{label:e,id:t,required:n,testId:r,light:l}=this.props,i=o.createElement(Ps,{style:l?he.lightRequired:he.required,"aria-hidden":!0}," ","*");return o.createElement(o.Fragment,null,o.createElement(xt,{style:l?he.lightLabel:he.label,tag:"label",htmlFor:t&&`${t}-field`,testId:r&&`${r}-label`},e,n&&i),o.createElement(de,{size:m.xxxSmall_4}))}maybeRenderDescription(){const{description:e,testId:t,light:n}=this.props;return e?o.createElement(o.Fragment,null,o.createElement(we,{style:n?he.lightDescription:he.description,testId:t&&`${t}-description`},e),o.createElement(de,{size:m.xxxSmall_4})):null}maybeRenderError(){const{error:e,id:t,testId:n,light:r}=this.props;return e?o.createElement(o.Fragment,null,o.createElement(de,{size:m.small_12}),o.createElement(we,{style:r?he.lightError:he.error,role:"alert",id:t&&`${t}-error`,testId:n&&`${n}-error`},e)):null}render(){const{field:e,style:t}=this.props;return o.createElement(_e,{style:t},this.renderLabel(),this.maybeRenderDescription(),o.createElement(de,{size:m.xSmall_8}),e,this.maybeRenderError())}}const he=v.StyleSheet.create({label:{color:a.offBlack},lightLabel:{color:a.white},description:{color:a.offBlack64},lightDescription:{color:a.white64},error:{color:a.red},lightError:{color:a.fadedRed},required:{color:a.red},lightRequired:{color:a.fadedRed}}),Bs=["id","type","label","description","value","disabled","required","validate","onChange","onKeyDown","placeholder","light","style","testId","readOnly","autoComplete","forwardedRef","ariaDescribedby","onValidate","onFocus","onBlur"];class sr extends o.Component{constructor(e){super(e),this.handleValidate=t=>{const{onValidate:n}=this.props;this.setState({error:t},()=>{n&&n(t)})},this.handleFocus=t=>{const{onFocus:n}=this.props;this.setState({focused:!0},()=>{n&&n(t)})},this.handleBlur=t=>{const{onBlur:n}=this.props;this.setState({focused:!1},()=>{n&&n(t)})},this.state={error:null,focused:!1}}render(){const e=this.props,{id:t,type:n,label:r,description:l,value:i,disabled:c,required:f,validate:h,onChange:p,onKeyDown:b,placeholder:x,light:C,style:I,testId:u,readOnly:y,autoComplete:S,forwardedRef:$,ariaDescribedby:w}=e,k=g(e,Bs);return o.createElement(Ze,{id:t,scope:"labeled-text-field"},E=>o.createElement(Os,{id:E,testId:u,style:I,light:C,field:o.createElement(lr,d({id:`${E}-field`,"aria-describedby":w||`${E}-error`,"aria-required":f?"true":"false",required:f,testId:u&&`${u}-field`,type:n,value:i,placeholder:x,disabled:c,validate:h,onValidate:this.handleValidate,onChange:p,onKeyDown:b,onFocus:this.handleFocus,onBlur:this.handleBlur,light:C,readOnly:y,autoComplete:S,ref:$},k)),label:r,description:l,required:!!f,error:!this.state.focused&&this.state.error||""}))}}sr.defaultProps={type:"text",disabled:!1,light:!1};o.forwardRef((s,e)=>o.createElement(sr,d({},s,{forwardedRef:e})));const Ls=["onChange","value","placeholder","disabled","id","testId","style","readOnly","autoComplete","name","className","autoFocus","rows","spellCheck","wrap","minLength","maxLength","onClick","onKeyDown","onKeyUp","onFocus","onBlur","validate","onValidate","required","resizeType","light","rootStyle"],Ds="This field is required.",Ns=H("textarea");o.forwardRef(function(e,t){const{onChange:n,value:r,placeholder:l,disabled:i,id:c,testId:f,style:h,readOnly:p,autoComplete:b,name:x,className:C,autoFocus:I,rows:u,spellCheck:y,wrap:S,minLength:$,maxLength:w,onClick:k,onKeyDown:E,onKeyUp:R,onFocus:_,onBlur:j,validate:U,onValidate:te,required:ne,resizeType:Ye,light:It,rootStyle:wt}=e,$t=g(e,Ls),[ze,Pe]=o.useState(null),Oe=Fl("text-area"),Et=c??Oe.get("id"),Qe=re=>{const M=re.target.value;n(M),Je(M)},Je=re=>{if(U){const M=U(re)||null;Pe(M),te&&te(M)}else if(ne){const ge=re?null:typeof ne=="string"?ne:Ds;Pe(ge),te&&te(ge)}};Tl(()=>{r!==""&&Je(r)});const kt=()=>{const re=[le.textarea,F.LabelMedium,Ye&&Hs[Ye]],M=[le.default,!i&&le.defaultFocus,i&&le.disabled,!!ze&&le.error],ge=[le.light,!i&&le.lightFocus,i&&le.lightDisabled,!!ze&&le.lightError];return[...re,...It?ge:M]};return o.createElement(_e,{style:[{width:"100%"},wt]},o.createElement(Ns,d({id:Et,"data-testid":f,ref:t,className:C,style:[kt(),h],value:r,onChange:Qe,placeholder:l,"aria-disabled":i,readOnly:p||i,autoComplete:b,name:x,autoFocus:I,rows:u,spellCheck:y,wrap:S,minLength:$,maxLength:w,onClick:i?void 0:k,onKeyDown:i?void 0:E,onKeyUp:i?void 0:R,onFocus:_,onBlur:j,required:!!ne},$t,{"aria-invalid":!!ze})))});const pn=10,le=v.StyleSheet.create({textarea:{borderRadius:X.radius.medium_4,boxSizing:"border-box",padding:`${pn}px ${m.medium_16}px`,minHeight:`${pn*2+br.lineHeight.medium+2*X.width.hairline}px`},default:{background:a.white,border:`1px solid ${a.offBlack50}`,color:a.offBlack,"::placeholder":{color:a.offBlack64}},defaultFocus:{":focus-visible":{borderColor:a.blue,outline:`1px solid ${a.blue}`,outlineOffset:0}},disabled:{background:a.offWhite,border:`1px solid ${a.offBlack16}`,color:a.offBlack64,"::placeholder":{color:a.offBlack64},cursor:"not-allowed",":focus-visible":{outline:"none",boxShadow:`0 0 0 1px ${a.white}, 0 0 0 3px ${a.offBlack32}`}},error:{background:a.fadedRed8,border:`1px solid ${a.red}`,color:a.offBlack,"::placeholder":{color:a.offBlack64},":focus-visible":{outlineColor:a.red,borderColor:a.red}},light:{background:a.white,border:`1px solid ${a.offBlack16}`,color:a.offBlack,"::placeholder":{color:a.offBlack64}},lightFocus:{":focus-visible":{outline:`1px solid ${a.blue}`,outlineOffset:0,borderColor:a.blue,boxShadow:`0px 0px 0px 2px ${a.blue}, 0px 0px 0px 3px ${a.white}`}},lightDisabled:{backgroundColor:"transparent",border:`1px solid ${a.white32}`,color:a.white64,"::placeholder":{color:a.white64},cursor:"not-allowed",":focus-visible":{borderColor:ee(a.white32,a.blue),outline:"none",boxShadow:`0 0 0 1px ${a.offBlack32}, 0 0 0 3px ${a.fadedBlue}`}},lightError:{background:a.fadedRed8,border:`1px solid ${a.red}`,boxShadow:`0px 0px 0px 1px ${a.red}, 0px 0px 0px 2px ${a.white}`,color:a.offBlack,"::placeholder":{color:a.offBlack64},":focus-visible":{outlineColor:a.red,borderColor:a.red,boxShadow:`0px 0px 0px 2px ${a.red}, 0px 0px 0px 3px ${a.white}`}}}),Hs=v.StyleSheet.create({both:{resize:"both"},none:{resize:"none"},horizontal:{resize:"horizontal"},vertical:{resize:"vertical"}}),Ms=s=>({small:16,medium:24,large:48,xlarge:96})[s],Ws=["color","icon","size","style","testId","className"],As=Te("span"),ir=o.forwardRef(function(e,t){const{color:n="currentColor",icon:r,size:l="small",style:i,testId:c,className:f}=e,h=g(e,Ws),p=Ms(l),b=`${f??""}`,x=qs(n,p);return o.createElement(As,d({},h,{className:b,style:[Kt.svg,x.icon,{maskImage:`url(${r})`},i],"data-testid":c,ref:t}))}),mn={},qs=(s,e)=>{const t=`${s}-${e}`;if(Kt[t])return Kt[t];const n={icon:{backgroundColor:s,width:e,height:e}};return mn[t]=v.StyleSheet.create(n),mn[t]},Kt=v.StyleSheet.create({svg:{display:"inline-block",verticalAlign:"text-bottom",flexShrink:0,flexGrow:0,maskSize:"100%",maskRepeat:"no-repeat",maskPosition:"center"}});ir.displayName="PhosphorIcon";const Vs={clearSearch:"Clear search"},Us=["clearAriaLabel","autoFocus","disabled","light","id","value","placeholder","style","testId","onClick","onChange","onFocus","onBlur"],Ks=o.forwardRef(function(e,t){const{clearAriaLabel:n=Vs.clearSearch,autoFocus:r,disabled:l=!1,light:i=!1,id:c,value:f,placeholder:h,style:p,testId:b,onClick:x,onChange:C,onFocus:I,onBlur:u}=e,y=g(e,Us),S=o.useRef(null),$=()=>{var k;C(""),S==null||(k=S.current)==null||k.focus()},w=()=>f.length?o.createElement(vr,{icon:Ir,kind:"tertiary",onClick:$,style:lt.dismissIcon,"aria-label":n}):null;return o.createElement(Un,{id:c,scope:"search-field"},k=>o.createElement(Zo,{onClick:x,style:[lt.inputContainer,p]},o.createElement(ir,{icon:Ho,size:"medium",color:a.offBlack64,style:lt.searchIcon,"aria-hidden":"true"}),o.createElement(lr,d({id:`${k}-field`,type:"text",autoFocus:r,disabled:l,light:i,onChange:C,onFocus:I,onBlur:u,placeholder:h,ref:E=>{t&&(t.current=E),S.current=E},value:f,style:[lt.inputStyleReset,T.LabelMedium],testId:b},y)),w()))}),lt=v.StyleSheet.create({inputContainer:{boxSizing:"border-box",flexDirection:"row",borderRadius:m.xxxSmall_4,alignItems:"center",height:40},searchIcon:{marginLeft:m.xSmall_8,marginRight:m.xSmall_8,position:"absolute"},dismissIcon:{margin:0,position:"absolute",right:0,":hover":{border:"none"}},inputStyleReset:{display:"flex",flex:1,"::placeholder":{color:a.offBlack64},width:"100%",color:"inherit",paddingLeft:m.large_24+m.medium_16,paddingRight:m.large_24+m.medium_16}});function jt(){return jt=Object.assign||function(s){for(var e=1;e=e?s.call(null):r.id=requestAnimationFrame(n)}var r={id:requestAnimationFrame(n)};return r}var $e=null;function xn(s){if(s===void 0&&(s=!1),$e===null||s){var e=document.createElement("div"),t=e.style;t.width="50px",t.height="50px",t.overflow="scroll",t.direction="rtl";var n=document.createElement("div"),r=n.style;return r.width="100px",r.height="100px",e.appendChild(n),document.body.appendChild(e),e.scrollLeft>0?$e="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?$e="negative":$e="positive-ascending"),document.body.removeChild(e),$e}return $e}var Qs=150,Js=function(e,t){return e};function ei(s){var e,t=s.getItemOffset,n=s.getEstimatedTotalSize,r=s.getItemSize,l=s.getOffsetForIndexAndAlignment,i=s.getStartIndexForOffset,c=s.getStopIndexForStartIndex,f=s.initInstanceProps,h=s.shouldResetStyleCacheOnItemSizeChange,p=s.validateProps;return e=function(b){js(x,b);function x(I){var u;return u=b.call(this,I)||this,u._instanceProps=f(u.props,gn(u)),u._outerRef=void 0,u._resetIsScrollingTimeoutId=null,u.state={instance:gn(u),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof u.props.initialScrollOffset=="number"?u.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},u._callOnItemsRendered=void 0,u._callOnItemsRendered=Lt(function(y,S,$,w){return u.props.onItemsRendered({overscanStartIndex:y,overscanStopIndex:S,visibleStartIndex:$,visibleStopIndex:w})}),u._callOnScroll=void 0,u._callOnScroll=Lt(function(y,S,$){return u.props.onScroll({scrollDirection:y,scrollOffset:S,scrollUpdateWasRequested:$})}),u._getItemStyle=void 0,u._getItemStyle=function(y){var S=u.props,$=S.direction,w=S.itemSize,k=S.layout,E=u._getItemStyleCache(h&&w,h&&k,h&&$),R;if(E.hasOwnProperty(y))R=E[y];else{var _=t(u.props,y,u._instanceProps),j=r(u.props,y,u._instanceProps),U=$==="horizontal"||k==="horizontal",te=$==="rtl",ne=U?_:0;E[y]=R={position:"absolute",left:te?void 0:ne,right:te?ne:void 0,top:U?0:_,height:U?"100%":j,width:U?j:"100%"}}return R},u._getItemStyleCache=void 0,u._getItemStyleCache=Lt(function(y,S,$){return{}}),u._onScrollHorizontal=function(y){var S=y.currentTarget,$=S.clientWidth,w=S.scrollLeft,k=S.scrollWidth;u.setState(function(E){if(E.scrollOffset===w)return null;var R=u.props.direction,_=w;if(R==="rtl")switch(xn()){case"negative":_=-w;break;case"positive-descending":_=k-$-w;break}return _=Math.max(0,Math.min(_,k-$)),{isScrolling:!0,scrollDirection:E.scrollOffset0)for(var M=Je;M<=kt;M++)re.push(o.createElement(y,{data:j,key:te(M,j),index:M,isScrolling:$t?Pe:void 0,style:this._getItemStyle(M)}));var ge=n(this.props,this._instanceProps);return o.createElement(Ye||It||"div",{className:S,onScroll:Et,ref:this._outerRefSetter,style:jt({position:"relative",height:w,width:ze,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:$},wt)},o.createElement(E||R||"div",{children:re,ref:k,style:{height:Oe?"100%":ge,pointerEvents:Pe?"none":void 0,width:Oe?ge:"100%"}}))},C._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var u=this.props.itemCount;if(u>0){var y=this._getRangeToRender(),S=y[0],$=y[1],w=y[2],k=y[3];this._callOnItemsRendered(S,$,w,k)}}if(typeof this.props.onScroll=="function"){var E=this.state,R=E.scrollDirection,_=E.scrollOffset,j=E.scrollUpdateWasRequested;this._callOnScroll(R,_,j)}},C._getRangeToRender=function(){var u=this.props,y=u.itemCount,S=u.overscanCount,$=this.state,w=$.isScrolling,k=$.scrollDirection,E=$.scrollOffset;if(y===0)return[0,0,0,0];var R=i(this.props,E,this._instanceProps),_=c(this.props,R,E,this._instanceProps),j=!w||k==="backward"?Math.max(1,S):1,U=!w||k==="forward"?Math.max(1,S):1;return[Math.max(0,R-j),Math.max(0,Math.min(y-1,_+U)),R,_]},x}(o.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var ti=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},ni=50,Ee=function(e,t,n){var r=e,l=r.itemSize,i=n.itemMetadataMap,c=n.lastMeasuredIndex;if(t>c){var f=0;if(c>=0){var h=i[c];f=h.offset+h.size}for(var p=c+1;p<=t;p++){var b=l(p);i[p]={offset:f,size:b},f+=b}n.lastMeasuredIndex=t}return i[t]},ri=function(e,t,n){var r=t.itemMetadataMap,l=t.lastMeasuredIndex,i=l>0?r[l].offset:0;return i>=n?ar(e,t,l,0,n):oi(e,t,Math.max(0,l),n)},ar=function(e,t,n,r,l){for(;r<=n;){var i=r+Math.floor((n-r)/2),c=Ee(e,i,t).offset;if(c===l)return i;cl&&(n=i-1)}return r>0?r-1:0},oi=function(e,t,n,r){for(var l=e.itemCount,i=1;n=n&&(i=n-1),i>=0){var f=r[i];c=f.offset+f.size}var h=n-i-1,p=h*l;return c+p},li=ei({getItemOffset:function(e,t,n){return Ee(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:Cn,getOffsetForIndexAndAlignment:function(e,t,n,r,l){var i=e.direction,c=e.height,f=e.layout,h=e.width,p=i==="horizontal"||f==="horizontal",b=p?h:c,x=Ee(e,t,l),C=Cn(e,l),I=Math.max(0,Math.min(C-b,x.offset)),u=Math.max(0,x.offset-b+x.size);switch(n==="smart"&&(r>=u-b&&r<=I+b?n="auto":n="center"),n){case"start":return I;case"end":return u;case"center":return Math.round(u+(I-u)/2);case"auto":default:return r>=u&&r<=I?r:r`Select all (${s})`,noneSelected:"0 items",someSelected:s=>s===1?"1 item":`${s} items`,allSelected:"All items"},{blue:si,white:vn,offBlack:ii}=a;class Fe extends o.Component{static isClassOf(e){return e&&e.type&&e.type.__IS_ACTION_ITEM__}render(){const{disabled:e,horizontalRule:t,href:n,target:r,indent:l,label:i,lang:c,leftAccessory:f,rightAccessory:h,onClick:p,role:b,style:x,testId:C}=this.props,I=[He.wrapper,x],u=typeof i=="string"?o.createElement(bt,{lang:c,style:He.label},i):o.cloneElement(i,d({lang:c,style:He.label},i.props));return o.createElement(yo,{disabled:e,horizontalRule:t,rootStyle:I,leftAccessory:f,rightAccessory:h,style:[He.shared,l&&He.indent],role:b,testId:C,title:u,href:n,target:r,onClick:p})}}Fe.defaultProps={disabled:!1,horizontalRule:"none",indent:!1,role:"menuitem"};Fe.__IS_ACTION_ITEM__=!0;const He=v.StyleSheet.create({wrapper:{minHeight:me,touchAction:"manipulation",":focus":{borderRadius:m.xxxSmall_4,outline:`${m.xxxxSmall_2}px solid ${a.blue}`,outlineOffset:-m.xxxxSmall_2},":hover[aria-disabled=false]":{color:vn,background:si},"@media not (hover: hover)":{":hover[aria-disabled=false]":{color:vn,background:ii}},":active[aria-disabled=false]":{color:a.fadedBlue,background:a.activeBlue}},shared:{minHeight:me,height:me},label:{whiteSpace:"nowrap",userSelect:"none"},indent:{paddingLeft:m.medium_16*2}}),ai=function(e){const{selected:t}=e;return o.createElement(St,{icon:Gt,size:"small",style:[In.bounds,!t&&In.hide]})},In=v.StyleSheet.create({bounds:{alignSelf:"center",height:m.medium_16,minHeight:m.medium_16,minWidth:m.medium_16},hide:{visibility:"hidden"}}),{offBlack16:di,offBlack50:ci,offWhite:ui}=a,hi=function(e){const{disabled:t,selected:n}=e;return o.createElement(Ce,{className:"checkbox",style:[st.checkbox,n&&!t&&st.noBorder,t&&st.disabledCheckbox]},n&&o.createElement(St,{icon:Gt,size:"small",className:"check",style:[{width:m.small_12,height:m.small_12,margin:m.xxxxSmall_2},t&&n&&st.disabledCheckFormatting]}))},st=v.StyleSheet.create({checkbox:{alignSelf:"center",minHeight:m.medium_16,minWidth:m.medium_16,height:m.medium_16,borderRadius:3,borderWidth:1,borderStyle:"solid",borderColor:ci},noBorder:{borderWidth:0},disabledCheckbox:{borderColor:di,backgroundColor:ui},disabledCheckFormatting:{position:"absolute",top:-1,left:-1}}),fi=["disabled","label","selected","testId","leftAccessory","horizontalRule","parentComponent","rightAccessory","style","subtitle1","subtitle2","value","onClick","onToggle","variant","role"],pi=yt("li");class ve extends o.Component{constructor(...e){super(...e),this.handleClick=()=>{const{onClick:t,onToggle:n,value:r}=this.props;n(r),t&&t()}}static isClassOf(e){return e&&e.type&&e.type.__IS_OPTION_ITEM__}getCheckComponent(){return this.props.variant==="check"?ai:hi}renderCell(){const e=this.props,{disabled:t,label:n,selected:r,testId:l,leftAccessory:i,horizontalRule:c,parentComponent:f,rightAccessory:h,style:p,subtitle1:b,subtitle2:x,role:C}=e,I=g(e,fi),u=this.getCheckComponent(),y=[fe.item,p];return o.createElement(So,d({disabled:t,horizontalRule:c,rootStyle:f==="listbox"?fe.listboxItem:y,style:fe.itemContainer,"aria-selected":f!=="listbox"&&r?"true":"false",role:f!=="listbox"?C:void 0,testId:l,leftAccessory:o.createElement(o.Fragment,null,i?o.createElement(Ce,{style:{flexDirection:"row"}},o.createElement(u,{disabled:t,selected:r}),o.createElement(de,{size:m.xSmall_8}),i):o.createElement(u,{disabled:t,selected:r})),rightAccessory:h,subtitle1:b?o.createElement(Qt,{className:"subtitle"},b):void 0,title:o.createElement(bt,{style:fe.label},n),subtitle2:x?o.createElement(Qt,{className:"subtitle"},x):void 0,onClick:f!=="listbox"?this.handleClick:void 0},I))}render(){const{disabled:e,focused:t,parentComponent:n,role:r,selected:l}=this.props;return n==="listbox"?o.createElement(pi,{onMouseDown:i=>{i.preventDefault()},onClick:this.handleClick,style:[fe.reset,fe.item,t&&fe.itemFocused,e&&fe.itemDisabled],role:r,"aria-selected":l?"true":"false","aria-disabled":e?"true":"false",id:this.props.id,tabIndex:-1},this.renderCell()):this.renderCell()}}ve.defaultProps={disabled:!1,focused:!1,horizontalRule:"none",onToggle:()=>{},role:"option",selected:!1};ve.__IS_OPTION_ITEM__=!0;const{blue:Dt,white:Me,offBlack:mi}=a,wn={borderRadius:m.xxxSmall_4,outline:`${m.xxxxSmall_2}px solid ${a.blue}`,outlineOffset:-m.xxxxSmall_2},fe=v.StyleSheet.create({reset:{margin:0,padding:0,border:0,background:"none",outline:"none",fontSize:"100%",verticalAlign:"baseline",textAlign:"left",textDecoration:"none",listStyle:"none",cursor:"pointer"},listboxItem:{backgroundColor:"transparent",color:"inherit"},item:{backgroundColor:a.white,minHeight:"unset",":focus":wn,":focus-visible":{overflow:"visible"},":hover[aria-disabled=false]":{color:Me,background:Dt},":active[aria-selected=false]":{},":hover[aria-disabled=true]":{cursor:"not-allowed"},":is([aria-disabled=true])":{color:a.offBlack32,":focus-visible":{outline:"none"}},"@media not (hover: hover)":{":hover[aria-disabled=false]":{color:Me,background:mi}},":active[aria-disabled=false]":{color:a.fadedBlue,background:a.activeBlue},":hover[aria-disabled=false] .checkbox":{background:Me},":hover[aria-disabled=false] .check":{color:Dt},":active[aria-disabled=false] .check":{color:a.activeBlue},":is([aria-selected=true]) .checkbox":{background:Dt},":is([aria-selected=true]) .check":{color:Me},":is([aria-disabled=false]) .subtitle":{color:a.offBlack64},":hover[aria-disabled=false] .subtitle":{color:a.offWhite},":active[aria-disabled=false] .subtitle":{color:ee(a.fadedBlue16,Me)}},itemFocused:wn,itemDisabled:{outlineColor:a.offBlack32},itemContainer:{minHeight:"unset",padding:`${m.xSmall_8+m.xxxxSmall_2}px ${m.xSmall_8}px`,paddingRight:m.medium_16,whiteSpace:"nowrap"},label:{whiteSpace:"nowrap",userSelect:"none",overflow:"hidden",textOverflow:"ellipsis"},hide:{visibility:"hidden"}});class ue extends o.Component{static isClassOf(e){return e&&e.type&&e.type.__IS_SEPARATOR_ITEM__}render(){return o.createElement(Ce,{style:[gi.separator,this.props.style],"aria-hidden":"true"})}}ue.__IS_SEPARATOR_ITEM__=!0;const gi=v.StyleSheet.create({separator:{boxShadow:`0 -1px ${a.offBlack16}`,height:1,minHeight:1,marginTop:m.xxxSmall_4,marginBottom:m.xxxSmall_4}});class Ct extends o.Component{constructor(...e){super(...e),this.getTestIdFromProps=t=>t.testId||t["data-testid"]}renderAnchorChildren(e,t){const{disabled:n,testId:r,text:l,opened:i,"aria-controls":c,"aria-haspopup":f,id:h}=this.props,p=this.props.children(d({},e,{text:l,opened:i})),b=p.props,x=this.getTestIdFromProps(b);return o.cloneElement(p,d({},t,{disabled:n,"aria-controls":c,id:h,"aria-expanded":i?"true":"false","aria-haspopup":f,onClick:b.onClick?C=>{b.onClick(C),t.onClick(C)}:t.onClick,"data-testid":x||r}))}render(){return o.createElement(yr,{onClick:this.props.onClick,disabled:this.props.disabled,tabIndex:0},(e,t)=>this.renderAnchorChildren(e,t))}}Ct.defaultProps={disabled:!1};class yi extends o.Component{render(){const{data:e,index:t,style:n}=this.props,r=e[t];if(ue.isClassOf(r.component))return o.cloneElement(r.component,{style:n});{const{component:l,populatedProps:i,onClick:c,role:f,ref:h}=r;return o.cloneElement(l,d({style:n},i,{key:t,onClick:c,ref:r.focusable&&h,role:f}))}}}function $n(s,e=0){return s.slice(0,hr).reduce((t,n)=>ue.isClassOf(n.component)?t+fr:t+me,e)}class bi extends o.Component{constructor(e){super(e),this.getItemSize=t=>{const n=this.props.data[t];return ue.isClassOf(n.component)?fr:me},this.state={height:$n(e.data),width:e.width}}componentDidMount(){const{schedule:e}=this.props;e.animationFrame(()=>{this.setWidth()})}componentDidUpdate(e){const{data:t,listRef:n}=this.props;e.data.length!==t.length&&(this.setHeight(),n&&n.current&&n.current.resetAfterIndex(1))}setWidth(){const e=Ie.findDOMNode(this),t=e==null?void 0:e.parentElement;if(t){const n=t.getBoundingClientRect().width;this.setState({width:n})}}setHeight(){const e=$n(this.props.data);this.setState({height:e})}renderInitialItems(){const{data:e}=this.props,t=e.map(r=>r.component);return o.Children.toArray(t).filter(Boolean).sort((r,l)=>l.props.label&&r.props.label?l.props.label.length-r.props.label.length:-1).slice(0,hr).map(r=>o.cloneElement(r,{style:{visibility:"hidden"}}))}renderVirtualizedList(e,t){const{data:n,listRef:r}=this.props;return o.createElement(li,{height:t,itemCount:n.length,itemSize:this.getItemSize,itemData:n,style:{overflowX:"hidden"},width:e,overscanCount:5,ref:r},yi)}render(){const{width:e,height:t}=this.state;return e==null?this.renderInitialItems():this.renderVirtualizedList(e,t)}}var Si=kn(bi);function xi({state:s,options:e}){const t=$r(s,e),{y:n}=s.modifiersData.preventOverflow||{x:0,y:0},{height:r}=s.rects.popper,[l]=s.placement.split("-"),c=r-t[l==="top"?"top":"bottom"]-n;s.styles.popper=d({},s.styles.popper,{maxHeight:`${c}px`,"--popper-max-height":`${c}px`})}const Ci={name:"maxHeight",enabled:!0,phase:"main",options:{padding:me},requiresIfExists:["offset","preventOverflow","flip"],fn:xi},vi=[{name:"preventOverflow",options:{rootBoundary:"viewport",altAxis:!0,tether:!1}},Ci],Ii=function({children:e,alignment:t="left",onPopperElement:n,referenceElement:r}){const l=Er(r)||document.querySelector("body");return l?Ie.createPortal(o.createElement(wr,{innerRef:i=>{i&&n&&n(i)},referenceElement:r,strategy:"fixed",placement:t==="left"?"bottom-start":"bottom-end",modifiers:vi},({placement:i,ref:c,style:f,hasPopperEscaped:h,isReferenceHidden:p})=>{const b=!!(h||p);return o.createElement("div",{ref:c,style:f,"data-testid":"dropdown-popper","data-placement":i},e(b))}),l):null};function wi(s){return s.length===1||!/^[A-Z]/i.test(s)?s:""}function $i(s,e){let t;return function(...r){const l=()=>{clearTimeout(t),s(...r)};clearTimeout(t),t=setTimeout(l,e)}}function En(s){return typeof s=="string"}function Ae(s){return En(s.label)?s.label:En(s.labelAsText)?s.labelAsText:""}const Ei=125,ki=yt("span");class vt extends o.Component{static sameItemsFocusable(e,t){if(e.length!==t.length)return!1;for(let n=0;n{const{open:n,onOpenChanged:r}=this.props,l=t.target,i=Ie.findDOMNode(this);n&&i&&!i.contains(l)&&this.popperElement&&!this.popperElement.contains(l)&&r(!1)},this.handleKeyDown=t=>{const{enableTypeAhead:n,onOpenChanged:r,open:l,searchText:i}=this.props,c=t.which||t.keyCode;if(n&&wi(t.key)&&(t.stopPropagation(),this.textSuggestion+=t.key,this.handleKeyDownDebounced(this.textSuggestion)),!l){if(c===ye.down){t.preventDefault(),r(!0);return}return}switch(c){case ye.tab:if(this.isSearchFieldFocused()&&i)return;this.restoreTabOrder(),r(!1);return;case ye.space:if(this.isSearchFieldFocused())return;t.preventDefault();return;case ye.up:t.preventDefault(),this.focusPreviousItem();return;case ye.down:t.preventDefault(),this.focusNextItem();return}},this.handleKeyUp=t=>{const{onOpenChanged:n,open:r}=this.props;switch(t.which||t.keyCode){case ye.space:if(this.isSearchFieldFocused())return;t.preventDefault();return;case ye.escape:r&&(t.stopPropagation(),this.restoreTabOrder(),n(!1));return}},this.handleKeyDownDebounceResult=t=>{const n=this.props.items.filter(r=>r.focusable).findIndex(({component:r})=>{if(ue.isClassOf(r))return!1;if(ve.isClassOf(r)){const l=r.props;return Ae(l).toLowerCase().startsWith(t.toLowerCase())}return!1});if(n>=0){const r=!this.props.open;r&&this.props.onOpenChanged(!0),this.focusedIndex=n,this.scheduleToFocusCurrentItem(l=>{this.props.selectionType==="single"&&r&&l&&(l.click(),this.props.onOpenChanged(!1))})}this.textSuggestion=""},this.handleClickFocus=t=>{this.itemsClicked=!0,this.focusedIndex=t,this.focusedOriginalIndex=this.state.itemRefs[this.focusedIndex].originalIndex},this.handleDropdownMouseUp=t=>{t.nativeEvent.stopImmediatePropagation?t.nativeEvent.stopImmediatePropagation():t.stopPropagation()},this.handleItemClick=(t,n)=>{this.handleClickFocus(t),n.component.props.onClick&&n.component.props.onClick(),n.populatedProps.onClick&&n.populatedProps.onClick()},this.handleSearchTextChanged=t=>{const{onSearchTextChanged:n}=this.props;n&&n(t)},this.resetFocusedIndex(),this.state={prevItems:this.props.items,itemRefs:[],sameItemsFocusable:!1,labels:d({noResults:K.noResults,someResults:K.someSelected},e.labels)},this.virtualizedListRef=o.createRef(),this.handleKeyDownDebounced=$i(this.handleKeyDownDebounceResult,500),this.textSuggestion=""}componentDidMount(){this.updateEventListeners(),this.maybeFocusInitialItem()}componentDidUpdate(e){const{open:t,searchText:n}=this.props;if(e.open!==t)this.updateEventListeners(),this.maybeFocusInitialItem();else if(t){const{itemRefs:r,sameItemsFocusable:l}=this.state;if(l||e.searchText!==n)return;{const i=r.findIndex(c=>c.originalIndex===this.focusedOriginalIndex);i===-1?(this.focusedIndex=0,this.itemsClicked=!1,this.scheduleToFocusCurrentItem()):this.focusedIndex=i}this.props.labels!==e.labels&&this.setState({labels:d({},this.state.labels,this.props.labels)})}}componentWillUnmount(){this.removeEventListeners()}resetFocusedIndex(){const{initialFocusedIndex:e}=this.props;if(typeof e<"u")this.focusedIndex=e;else{if(this.hasSearchField()&&!this.isSearchFieldFocused())return this.focusSearchField();this.focusedIndex=0}}maybeFocusInitialItem(){const{autoFocus:e,open:t}=this.props;e&&(t?(this.resetFocusedIndex(),this.scheduleToFocusCurrentItem()):t||(this.itemsClicked=!1))}updateEventListeners(){this.props.open?this.addEventListeners():this.removeEventListeners()}addEventListeners(){document.addEventListener("mouseup",this.handleInteract),document.addEventListener("touchend",this.handleInteract)}removeEventListeners(){document.removeEventListener("mouseup",this.handleInteract),document.removeEventListener("touchend",this.handleInteract)}scheduleToFocusCurrentItem(e){this.shouldVirtualizeList()?this.props.schedule.animationFrame(()=>{this.focusCurrentItem(e)}):this.focusCurrentItem(e)}focusCurrentItem(e){const t=this.state.itemRefs[this.focusedIndex];if(t){this.virtualizedListRef.current&&this.virtualizedListRef.current.scrollToItem(t.originalIndex);const n=Ie.findDOMNode(t.ref.current);n&&(n.focus(),this.focusedOriginalIndex=t.originalIndex,e&&e(n))}}focusSearchField(){this.searchFieldRef.current&&this.searchFieldRef.current.focus()}hasSearchField(){return!!this.props.isFilterable}isSearchFieldFocused(){return this.hasSearchField()&&document.activeElement===this.searchFieldRef.current}focusPreviousItem(){if(this.focusedIndex===0||this.isSearchFieldFocused()&&!this.props.enableTypeAhead){if(this.hasSearchField()&&!this.isSearchFieldFocused())return this.focusSearchField();this.focusedIndex=this.state.itemRefs.length-1}else this.focusedIndex-=1;this.scheduleToFocusCurrentItem()}focusNextItem(){if(this.focusedIndex===this.state.itemRefs.length-1||this.isSearchFieldFocused()&&!this.props.enableTypeAhead){if(this.hasSearchField()&&!this.isSearchFieldFocused())return this.focusSearchField();this.focusedIndex=0}else this.focusedIndex+=1;this.scheduleToFocusCurrentItem()}restoreTabOrder(){this.props.openerElement&&this.props.openerElement.focus()}getItemRole(){const{role:e}=this.props;switch(e){case"listbox":return"option";case"menu":return"menuitem";default:throw new Error(`Expected "listbox" or "menu" for role, but receieved "${e}" instead.`)}}maybeRenderNoResults(){const{items:e,labels:{noResults:t}}=this.props;return e.length===0?o.createElement(bt,{style:pe.noResult,testId:"dropdown-core-no-results"},t):null}shouldVirtualizeList(){return this.props.items.length>Ei}renderList(){let e=0;const t=this.getItemRole();return this.props.items.map((n,r)=>{if(ue.isClassOf(n.component))return n.component;const{component:l,focusable:i,populatedProps:c}=n;i&&(e+=1);const f=e-1,h=this.state.itemRefs[f]?this.state.itemRefs[f].ref:null;return o.cloneElement(l,d({},c,{key:r,onClick:()=>{this.handleItemClick(f,n)},ref:i?h:null,role:c.role||t}))})}parseVirtualizedItems(){let e=0;const t=this.getItemRole();return this.props.items.map((n,r)=>{const{populatedProps:l}=n;!ue.isClassOf(n.component)&&n.focusable&&(e+=1);const i=e-1;return d({},n,{role:l.role||t,ref:n.focusable&&this.state.itemRefs[i]?this.state.itemRefs[i].ref:null,onClick:()=>{this.handleItemClick(i,n)}})})}renderVirtualizedList(){const e=this.parseVirtualizedItems();return o.createElement(Si,{data:e,listRef:this.virtualizedListRef})}renderSearchField(){const{searchText:e}=this.props,{labels:t}=this.state;return o.createElement(Ks,{clearAriaLabel:t.clearSearch,onChange:this.handleSearchTextChanged,placeholder:t.filter,ref:this.searchFieldRef,style:pe.searchInputStyle,value:e||""})}renderDropdownMenu(e,t){const{"aria-invalid":n,"aria-required":r,dropdownStyle:l,isFilterable:i,light:c,openerElement:f,role:h,id:p}=this.props,b=f&&window.getComputedStyle(f),x=b?b.getPropertyValue("width"):0;return o.createElement(Ce,{onMouseUp:this.handleDropdownMouseUp,style:[pe.dropdown,c&&pe.light,t&&pe.hidden,l],testId:"dropdown-core-container"},i&&this.renderSearchField(),o.createElement(Ce,{id:p,role:h,style:[pe.listboxOrMenu,{minWidth:x}],"aria-invalid":h==="listbox"?n:void 0,"aria-required":h==="listbox"?r:void 0},e),this.maybeRenderNoResults())}renderDropdown(){const{alignment:e,openerElement:t}=this.props,n=this.shouldVirtualizeList()?this.renderVirtualizedList():this.renderList();return o.createElement(Ii,{alignment:e,onPopperElement:r=>{this.popperElement=r},referenceElement:t},r=>this.renderDropdownMenu(n,r))}renderLiveRegion(){const{items:e,open:t}=this.props,{labels:n}=this.state,r=e.length;return o.createElement(ki,{"aria-live":"polite","aria-atomic":"true","aria-relevant":"additions text",style:pe.srOnly,"data-testid":"dropdown-live-region"},t&&n.someResults(r))}render(){const{open:e,opener:t,style:n,className:r,disabled:l}=this.props;return o.createElement(Ce,{onKeyDown:l?void 0:this.handleKeyDown,onKeyUp:l?void 0:this.handleKeyUp,style:[pe.menuWrapper,n],className:r},this.renderLiveRegion(),t,e&&this.renderDropdown())}}vt.defaultProps={alignment:"left",autoFocus:!0,enableTypeAhead:!0,labels:{clearSearch:K.clearSearch,filter:K.filter,noResults:K.noResults,someResults:K.someSelected},light:!1,selectionType:"single"};const pe=v.StyleSheet.create({menuWrapper:{width:"fit-content"},dropdown:{backgroundColor:a.white,borderRadius:4,paddingTop:m.xxxSmall_4,paddingBottom:m.xxxSmall_4,border:`solid 1px ${a.offBlack16}`,boxShadow:`0px 8px 8px 0px ${Sr(a.offBlack,.1)}`,maxHeight:"var(--popper-max-height)"},light:{border:"none"},listboxOrMenu:{overflowY:"auto"},hidden:{pointerEvents:"none",visibility:"hidden"},noResult:{color:a.offBlack64,alignSelf:"center",marginTop:m.xxSmall_6},searchInputStyle:{margin:m.xSmall_8,marginTop:m.xxxSmall_4,minHeight:"auto",position:"sticky"},srOnly:{border:0,clip:"rect(0,0,0,0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}});var Zt=kn(vt);const Ri=["children","disabled","focused","hovered","pressed","waiting","testId","opened","aria-label"],_i=yt("button");class Fi extends o.Component{render(){const e=this.props,{children:t,disabled:n,focused:r,hovered:l,pressed:i,testId:c,opened:f,"aria-label":h}=e,p=g(e,Ri),b=a.blue,x=Ti(b),C=n,I=[Nt.shared,C&&Nt.disabled,x.default,C&&x.disabled,!C&&i&&x.active],u=o.createElement(xr,{style:Nt.text},t);return o.createElement(_i,d({"aria-expanded":f?"true":"false","aria-haspopup":"menu","aria-label":h,disabled:C,style:I,type:"button"},p,{"data-testid":c}),o.createElement(Ce,{style:!C&&(l||r)&&x.focus},u),o.createElement(de,{size:m.xxxSmall_4}),o.createElement(St,{size:"small",color:"currentColor",icon:dr,"aria-hidden":"true"}))}}const Nt=v.StyleSheet.create({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",height:me,border:"none",borderRadius:m.xxxSmall_4,cursor:"pointer",outline:"none",textDecoration:"none",boxSizing:"border-box",touchAction:"manipulation",":focus":{WebkitTapHighlightColor:"rgba(0,0,0,0)"}},disabled:{cursor:"auto"},small:{height:m.xLarge_32},text:{textAlign:"left",display:"inline-block",alignItems:"center",fontWeight:"bold",userSelect:"none",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",pointerEvents:"none"},hiddenText:{visibility:"hidden"},spinner:{position:"absolute"}}),it={},Ti=s=>{const e=s;if(it[e])return it[e];const{offBlack32:t}=a,n=a.activeBlue;let r={};return r={default:{background:"none",color:s},focus:{":after":{content:"''",position:"absolute",height:2,left:0,right:0,bottom:-1,background:"currentColor",borderRadius:2}},active:{color:n},disabled:{color:t,cursor:"default"}},it[e]=v.StyleSheet.create(r),it[e]},zi=["text","opened"];class Pi extends o.Component{constructor(...e){super(...e),this.openerElement=void 0,this.state={opened:!1},this.handleItemSelected=()=>{this.handleOpenChanged(!1),this.openerElement&&this.openerElement.focus()},this.handleOpenChanged=t=>{this.setState({opened:t}),this.props.onToggle&&this.props.onToggle(t)},this.handleOptionSelected=t=>{const{onChange:n,selectedValues:r}=this.props;if(!(!n||!r)){if(r.includes(t)){const l=r.indexOf(t),i=[...r.slice(0,l),...r.slice(l+1)];n(i)}else n([...r,t]);this.handleItemSelected()}},this.handleOpenerRef=t=>{this.openerElement=Ie.findDOMNode(t)},this.handleClick=t=>{this.handleOpenChanged(!this.state.opened)}}static getDerivedStateFromProps(e,t){return{opened:typeof e.opened=="boolean"?e.opened:t.opened}}getMenuItems(){const{children:e,selectedValues:t}=this.props,n=o.Children.toArray(e).filter(Boolean),r=n.some(l=>ve.isClassOf(l));return n.map(l=>{const{value:i,disabled:c}=l.props,f={component:l,focusable:Fe.isClassOf(l)||ve.isClassOf(l)?!c:!1,populatedProps:{}};if(Fe.isClassOf(l))return d({},f,{populatedProps:{indent:r,onClick:this.handleItemSelected}});if(ve.isClassOf(l)){const h=t?t.includes(i):!1;return d({},f,{populatedProps:{onToggle:this.handleOptionSelected,selected:h,variant:"check",role:"menuitemcheckbox","aria-checked":h,"aria-selected":void 0}})}else return f})}renderOpener(e,t){const{disabled:n,menuText:r,opener:l,testId:i,id:c}=this.props;return o.createElement(ke,{id:c,scope:"action-menu-opener"},f=>o.createElement(Ct,{id:f,"aria-controls":t,"aria-haspopup":"menu",onClick:this.handleClick,disabled:e===0||n,text:r,ref:this.handleOpenerRef,testId:l?void 0:i,opened:this.state.opened},l||(h=>{const{opened:p}=h,b=g(h,zi);return o.createElement(Fi,d({},b,{disabled:n,opened:!!p,testId:i}),r)})))}render(){const{alignment:e,dropdownStyle:t,style:n,className:r,dropdownId:l}=this.props,i=this.getMenuItems();return o.createElement(ke,{id:l,scope:"action-menu-dropdown"},c=>o.createElement(Zt,{id:c,role:"menu",style:n,className:r,opener:this.renderOpener(i.length,c),alignment:e,open:this.state.opened,items:i,openerElement:this.openerElement,onOpenChanged:this.handleOpenChanged,dropdownStyle:[Oi.menuTopSpace,t]}))}}Pi.defaultProps={alignment:"left",disabled:!1};const Oi=v.StyleSheet.create({caret:{marginLeft:4},opener:{whiteSpace:"nowrap",userSelect:"none",overflow:"hidden",textOverflow:"ellipsis"},menuTopSpace:{top:-4}}),Bi=["children","disabled","error","id","isPlaceholder","light","open","testId","onOpenChanged"],Li=yt("button");class Yt extends o.Component{constructor(e){super(e),this.handleClick=t=>{const{open:n}=this.props;this.props.onOpenChanged(!n)},this.handleKeyDown=t=>{const n=t.key;(n==="Enter"||n===" ")&&(this.setState({pressed:!0}),t.preventDefault())},this.handleKeyUp=t=>{const n=t.key;(n==="Enter"||n===" ")&&(this.setState({pressed:!1}),this.handleClick(t))},this.state={pressed:!1}}render(){const e=this.props,{children:t,disabled:n,error:r,id:l,isPlaceholder:i,light:c,open:f,testId:h}=e,p=g(e,Bi),b=Di(c,i,r),x=c?n||r?"currentColor":a.white:n?a.offBlack32:a.offBlack64,C=[Ht.shared,b.default,n&&b.disabled,!n&&this.state.pressed&&b.pressed];return o.createElement(Li,d({},p,{"aria-disabled":n,"aria-expanded":f?"true":"false","aria-haspopup":"listbox","data-testid":h,id:l,style:C,type:"button",onClick:n?void 0:this.handleClick,onKeyDown:n?void 0:this.handleKeyDown,onKeyUp:n?void 0:this.handleKeyUp}),o.createElement(bt,{style:Ht.text},t||" "),o.createElement(St,{icon:dr,color:x,size:"small",style:Ht.caret,"aria-hidden":"true"}))}}Yt.defaultProps={disabled:!1,error:!1,light:!1,isPlaceholder:!1};const Ht=v.StyleSheet.create({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"space-between",color:a.offBlack,height:me,paddingLeft:m.medium_16,paddingRight:m.small_12,borderWidth:0,borderRadius:X.radius.medium_4,borderStyle:"solid",outline:"none",textDecoration:"none",boxSizing:"border-box",whiteSpace:"nowrap",touchAction:"manipulation"},text:{marginRight:m.xSmall_8,whiteSpace:"nowrap",userSelect:"none",overflow:"hidden",textOverflow:"ellipsis"},caret:{minWidth:16}}),at=m.medium_16-1,dt=m.small_12-1,ct={},Di=(s,e,t)=>{const n=`${s}-${e}-${t}`;if(ct[n])return ct[n];let r={};if(s){const l={borderColor:t?a.red:a.white,borderWidth:m.xxxxSmall_2,paddingLeft:at,paddingRight:dt},i={paddingLeft:at,paddingRight:dt,borderColor:t?a.red:a.fadedBlue,borderWidth:X.width.thin,color:t?a.offBlack64:e?ee(a.white32,a.blue):a.fadedBlue,backgroundColor:t?a.fadedRed:a.activeBlue};r={default:{background:t?a.fadedRed8:"transparent",color:t?a.offBlack64:e?a.white50:a.white,borderColor:t?a.red:a.white50,borderWidth:X.width.hairline,":hover:not([aria-disabled=true])":l,"@media not (hover: hover)":{":hover:not([aria-disabled=true])":{borderColor:t?a.red:a.white50,borderWidth:X.width.hairline,paddingLeft:m.medium_16,paddingRight:m.small_12}},":focus-visible:not([aria-disabled=true])":l,":active:not([aria-disabled=true])":i},disabled:{background:"transparent",borderColor:ee(a.white32,a.blue),color:ee(a.white32,a.blue),cursor:"not-allowed",":focus-visible":{boxShadow:`0 0 0 1px ${a.offBlack32}, 0 0 0 3px ${a.fadedBlue}`}},pressed:i}}else{const l={borderColor:t?a.red:a.blue,borderWidth:X.width.thin,paddingLeft:at,paddingRight:dt},i={background:t?a.fadedRed:a.fadedBlue,borderColor:t?a.red:a.activeBlue,borderWidth:X.width.thin,paddingLeft:at,paddingRight:dt};r={default:{background:t?a.fadedRed8:a.white,borderColor:t?a.red:a.offBlack50,borderWidth:X.width.hairline,color:e?a.offBlack64:a.offBlack,":hover:not([aria-disabled=true])":l,"@media not (hover: hover)":{":hover:not([aria-disabled=true])":{borderColor:t?a.red:a.offBlack50,borderWidth:X.width.hairline,paddingLeft:m.medium_16,paddingRight:m.small_12}},":focus-visible:not([aria-disabled=true])":l,":active:not([aria-disabled=true])":i},disabled:{background:a.offWhite,borderColor:a.offBlack16,color:a.offBlack64,cursor:"not-allowed",":focus-visible":{boxShadow:`0 0 0 1px ${a.white}, 0 0 0 3px ${a.offBlack32}`}},pressed:i}}return ct[n]=v.StyleSheet.create(r),ct[n]},Ni=["children","error","id","light","opener","placeholder","selectedValue","testId","alignment","autoFocus","dropdownStyle","enableTypeAhead","isFilterable","labels","onChange","onToggle","opened","style","className","aria-invalid","aria-required"];class pr extends o.Component{constructor(e){super(e),this.selectedIndex=void 0,this.handleOpenChanged=t=>{this.setState({open:t,searchText:""}),this.props.onToggle&&this.props.onToggle(t)},this.handleToggle=t=>{t!==this.props.selectedValue&&this.props.onChange(t),this.state.open&&this.state.openerElement&&this.state.openerElement.focus(),this.setState({open:!1}),this.props.onToggle&&this.props.onToggle(!1)},this.mapOptionItemsToDropdownItems=t=>{let n=0;return this.selectedIndex=0,t.map(r=>{const{selectedValue:l}=this.props,{disabled:i,value:c}=r.props,f=l===c;return f&&(this.selectedIndex=n),i||(n+=1),{component:r,focusable:!i,populatedProps:{onToggle:this.handleToggle,selected:f,variant:"check"}}})},this.handleSearchTextChanged=t=>{this.setState({searchText:t})},this.handleOpenerRef=t=>{const n=Ie.findDOMNode(t);this.setState({openerElement:n})},this.handleClick=t=>{this.handleOpenChanged(!this.state.open)},this.selectedIndex=0,this.state={open:!1,searchText:""}}static getDerivedStateFromProps(e,t){return{open:e.disabled?!1:typeof e.opened=="boolean"?e.opened:t.open}}filterChildren(e){const{searchText:t}=this.state,n=t.toLowerCase();return e.filter(({props:r})=>!t||Ae(r).toLowerCase().indexOf(n)>-1)}getMenuItems(e){const{isFilterable:t}=this.props;return this.mapOptionItemsToDropdownItems(t?this.filterChildren(e):e)}renderOpener(e,t){const n=this.props,{children:r,error:l,id:i,light:c,opener:f,placeholder:h,selectedValue:p,testId:b}=n,x=g(n,Ni),I=o.Children.toArray(r).find(S=>S.props.value===p),u=I?Ae(I.props):h;return o.createElement(ke,{id:i,scope:"single-select-opener"},S=>f?o.createElement(Ct,{id:S,"aria-controls":t,"aria-haspopup":"listbox",onClick:this.handleClick,disabled:e,ref:this.handleOpenerRef,text:u,opened:this.state.open},f):o.createElement(Yt,d({},x,{"aria-controls":t,disabled:e,id:S,error:l,isPlaceholder:!I,light:c,onOpenChanged:this.handleOpenChanged,open:this.state.open,ref:this.handleOpenerRef,testId:b}),u))}render(){const{alignment:e,autoFocus:t,children:n,className:r,dropdownStyle:l,enableTypeAhead:i,isFilterable:c,labels:f,light:h,style:p,"aria-invalid":b,"aria-required":x,disabled:C,dropdownId:I}=this.props,{searchText:u}=this.state,y=o.Children.toArray(n).filter(Boolean),S=y.filter(k=>!k.props.disabled).length,$=this.getMenuItems(y),w=S===0||C;return o.createElement(ke,{id:I,scope:"single-select-dropdown"},k=>o.createElement(Zt,{id:k,role:"listbox",selectionType:"single",alignment:e,autoFocus:t,enableTypeAhead:i,dropdownStyle:[c&&ur,cr,l],initialFocusedIndex:this.selectedIndex,items:$,light:h,onOpenChanged:this.handleOpenChanged,open:this.state.open,opener:this.renderOpener(w,k),openerElement:this.state.openerElement,style:p,className:r,isFilterable:c,onSearchTextChanged:c?this.handleSearchTextChanged:void 0,searchText:c?u:"",labels:f,"aria-invalid":b,"aria-required":x,disabled:w}))}}pr.defaultProps={alignment:"left",autoFocus:!0,disabled:!1,enableTypeAhead:!0,error:!1,light:!1,labels:{clearSearch:K.clearSearch,filter:K.filter,noResults:K.noResults,someResults:K.someSelected}};const Hi=["id","light","opener","testId","alignment","dropdownStyle","implicitAllEnabled","isFilterable","labels","onChange","onToggle","opened","selectedValues","shortcuts","style","className","aria-invalid","aria-required"];class mr extends o.Component{constructor(e){super(e),this.labels=void 0,this.handleOpenChanged=t=>{this.setState({open:t,searchText:"",lastSelectedValues:this.props.selectedValues}),this.props.onToggle&&this.props.onToggle(t)},this.handleToggle=t=>{const{onChange:n,selectedValues:r}=this.props;if(r.includes(t)){const l=r.indexOf(t),i=[...r.slice(0,l),...r.slice(l+1)];n(i)}else n([...r,t])},this.handleSelectAll=()=>{const{children:t,onChange:n}=this.props,l=o.Children.toArray(t).filter(i=>!!i&&!i.props.disabled).map(i=>i.props.value);n(l)},this.handleSelectNone=()=>{const{onChange:t}=this.props;t([])},this.mapOptionItemToDropdownItem=t=>{const{selectedValues:n}=this.props,{disabled:r,value:l}=t.props;return{component:t,focusable:!r,populatedProps:{onToggle:this.handleToggle,selected:n.includes(l),variant:"checkbox"}}},this.handleOpenerRef=t=>{const n=Ie.findDOMNode(t);this.setState({openerElement:n})},this.handleSearchTextChanged=t=>{this.setState({searchText:t})},this.handleClick=t=>{this.handleOpenChanged(!this.state.open)},this.state={open:!1,searchText:"",lastSelectedValues:[],labels:d({},K,e.labels)},this.labels=d({},K,e.labels)}static getDerivedStateFromProps(e,t){return{open:e.disabled?!1:typeof e.opened=="boolean"?e.opened:t.open}}componentDidUpdate(e){this.props.labels!==e.labels&&this.setState({labels:d({},this.state.labels,this.props.labels)})}getMenuText(e){const{implicitAllEnabled:t,selectedValues:n}=this.props,{noneSelected:r,someSelected:l,allSelected:i}=this.state.labels,c=e.filter(h=>!h.props.disabled).length,f=t?i:r;switch(n.length){case 0:return f;case 1:const h=e.find(p=>p.props.value===n[0]);if(h){const p=Ae(h==null?void 0:h.props);return p||l(1)}return f;case c:return i;default:return l(n.length)}}getShortcuts(e){const{selectedValues:t,shortcuts:n}=this.props,{selectAllLabel:r,selectNoneLabel:l}=this.state.labels;if(n&&!this.state.searchText){const i=e===t.length,c={component:o.createElement(Fe,{disabled:i,label:r(e),indent:!0,onClick:this.handleSelectAll}),focusable:!i,populatedProps:{}},f=t.length===0,h={component:o.createElement(Fe,{disabled:f,label:l,indent:!0,onClick:this.handleSelectNone}),focusable:!f,populatedProps:{}},p={component:o.createElement(ue,{key:"shortcuts-separator"}),focusable:!1,populatedProps:{}};return[c,h,p]}else return[]}getMenuItems(e){const{isFilterable:t}=this.props;if(!t)return e.map(this.mapOptionItemToDropdownItem);const{searchText:n,lastSelectedValues:r}=this.state,l=n.toLowerCase(),i=e.filter(({props:p})=>!n||Ae(p).toLowerCase().indexOf(l)>-1),c=[],f=[];for(const p of i)r.includes(p.props.value)?c.push(p):f.push(p);const h=c.map(this.mapOptionItemToDropdownItem);return c.length&&f.length&&h.push({component:o.createElement(ue,{key:"selected-separator"}),focusable:!1,populatedProps:{}}),[...h,...f.map(this.mapOptionItemToDropdownItem)]}renderOpener(e,t,n){const r=this.props,{id:l,light:i,opener:c,testId:f}=r,h=g(r,Hi),{noneSelected:p}=this.state.labels,b=this.getMenuText(e);return o.createElement(ke,{id:l,scope:"multi-select-opener"},C=>c?o.createElement(Ct,{id:C,"aria-controls":n,"aria-haspopup":"listbox",onClick:this.handleClick,disabled:t,ref:this.handleOpenerRef,text:b,opened:this.state.open},c):o.createElement(Yt,d({},h,{disabled:t,id:C,"aria-controls":n,isPlaceholder:b===p,light:i,onOpenChanged:this.handleOpenChanged,open:this.state.open,ref:this.handleOpenerRef,testId:f}),b))}render(){const{alignment:e,light:t,style:n,className:r,dropdownStyle:l,children:i,isFilterable:c,"aria-invalid":f,"aria-required":h,disabled:p,dropdownId:b}=this.props,{open:x,searchText:C}=this.state,{clearSearch:I,filter:u,noResults:y,someSelected:S}=this.state.labels,$=o.Children.toArray(i).filter(Boolean),w=$.filter(R=>!R.props.disabled).length,k=this.getMenuItems($),E=w===0||p;return o.createElement(ke,{id:b,scope:"multi-select-dropdown"},R=>o.createElement(Zt,{id:R,role:"listbox",alignment:e,dropdownStyle:[c&&ur,cr,l],isFilterable:c,items:[...this.getShortcuts(w),...k],light:t,onOpenChanged:this.handleOpenChanged,open:x,opener:this.renderOpener($,E,R),openerElement:this.state.openerElement,selectionType:"multi",style:n,className:r,onSearchTextChanged:c?this.handleSearchTextChanged:void 0,searchText:c?C:"",labels:{clearSearch:I,filter:u,noResults:y,someResults:S},"aria-invalid":f,"aria-required":h,disabled:E}))}}mr.defaultProps={alignment:"left",disabled:!1,error:!1,light:!1,shortcuts:!1,selectedValues:[]};v.StyleSheet.create({listbox:{outline:"none"},disabled:{color:a.offBlack64}});const Mi=s=>{const{strings:e}=kr(),t=h=>{const{choices:p,onChange:b}=s;b(p.map(x=>h.includes(x.content)))},n=h=>h.map(({content:p})=>et.jsx(ve,{value:p,label:et.jsx(Rr,{content:p,strings:e,inline:!0})},p)),r=s.choices.filter(h=>h.checked).map(h=>h.content),{opener:l,onToggle:i,disabled:c}=s,f={style:{zIndex:"unset"},children:n(s.choices),opener:l,onToggle:i,disabled:c};return s.multipleSelect?et.jsx(mr,{...f,selectedValues:r,onChange:h=>t(h)}):et.jsx(pr,{...f,selectedValue:r[0],onChange:h=>t([h]),placeholder:s.choices[0].content})};Mi.__docgenInfo={description:"",methods:[],displayName:"AnswerChoices",props:{choices:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ +import{j as et}from"./jsx-runtime-63Ea5SlK.js";import{a as g,_ as d,b as yt,V as Ce,I as ke}from"./index-0DbkllkJ.js";import{r as o}from"./index-6oxdNXpR.js";import{l as v}from"./index-awljIyHI.js";import{C as gr,a as yr}from"./index-i1pBWAmI.js";import{s as m,c as a,m as ee,b as X,a as br,f as Sr}from"./index-deFLJwr4.js";import{a as bt,b as Qt,L as xr}from"./index-18qWGOW7.js";import{P as St}from"./index-469F30Ub.js";import{c as Gt,m as Cr}from"./minus-bold-ONmDo3Ve.js";import{r as Ie}from"./index-9gkyvru-.js";import{I as vr,x as Ir}from"./index-f-3iKkZU.js";import{w as kn}from"./index-7-BESUpx.js";import{P as wr,d as $r}from"./Popper-Y5KDXl-P.js";import{m as Er}from"./index-jxhLXBHb.js";import{u as kr}from"./i18n-context-fsWEgybQ.js";import{R as Rr}from"./renderer-L37a98D_.js";function Rn(s){const e=[];if(s)if(Array.isArray(s))for(const t of s)e.push(...Rn(t));else e.push(s);else return e;return e}function _n(s){const e=[],t=[];if(!s)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;Rn(s).forEach(l=>{const i=l._definition;if(i!=null)if(n){const c={};for(const[f,h]of Object.entries(i))c[f.replace(/-[a-z]/g,p=>p[1].toUpperCase())]=h;t.push(c)}else e.push(l);else t.push(l)});const r=Object.assign({},...t);if(t.length>0&&!n){const l=v.StyleSheet.create({inlineStyles:r});e.push(l.inlineStyles)}return{style:n?r:{},className:v.css(...e)}}const _r=["children","style","tag","testId"],Fr=/^h[1-6]$/,Jt=v.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}}),B=o.forwardRef(function(e,t){let{children:n,style:r,tag:l="span",testId:i}=e,c=g(e,_r);const f=Fr.test(l),h=_n([Jt.text,f&&Jt.header,r]),p=c.className?[c.className,h.className].join(" "):h.className;return o.createElement(l,d({},c,{style:h.style,className:p,"data-testid":i,ref:t}),n)}),Tr=["className","style"];function qe(s,e){return o.forwardRef((t,n)=>{const{className:r,style:l}=t,i=g(t,Tr),c=typeof s=="string"?zr[s]:null,{className:f,style:h}=_n([c,e,l]);return o.createElement(s,d({},i,{ref:n,className:[f,r].filter(Boolean).join(" "),style:h}))})}const zr=v.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),Pr=["testId","tag"],Ve=v.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),Or=qe("div",Ve.default),Br=qe("article",Ve.default),Lr=qe("aside",Ve.default),Dr=qe("nav",Ve.default),Nr=qe("section",Ve.default),Re=o.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,l=g(e,Pr),i=d({},l,{"data-testid":n});switch(r){case"article":return o.createElement(Br,d({},i,{ref:t}));case"aside":return o.createElement(Lr,d({},i,{ref:t}));case"nav":return o.createElement(Dr,d({},i,{ref:t}));case"section":return o.createElement(Nr,d({},i,{ref:t}));case"div":return o.createElement(Or,d({},i,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let be=function(s){return s.Root="root",s.Initial="initial",s.Standard="standard",s}({});const ut=o.createContext(be.Root);ut.displayName="RenderStateContext";let Hr=class extends o.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?o.createElement(ut.Provider,{value:be.Standard},t()):n?o.createElement(ut.Provider,{value:be.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case be.Root:return this._renderAsRootComponent();case be.Initial:return n?n():null;case be.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(be.Root)}}render(){return o.createElement(ut.Consumer,null,e=>this._maybeRender(e))}},Fn=class Tn{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${Tn._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}};Fn._factoryUniquenessCounter=0;let Mt=class{get(e){return e}};Mt.Default=new Mt;var Mr=Mt.Default;let Wr=class extends o.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(Mr):null:(this._idFactory||(this._idFactory=new Fn(r)),t(this._idFactory))}render(){return o.createElement(Hr,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}},Ar=class zn extends o.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(zn.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():o.createElement(Wr,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}};Ar.defaultId="wb-id";const Z=400,Be=700,qr=900,Rt="@media (max-width: 1023px)",_t="@media (min-width: 1024px)",z={display:"block"},A='Lato, "Noto Sans", sans-serif',en='"Noto Serif", serif',Vr="Inconsolata, monospace",L=v.StyleSheet.create({Title:d({},z,{fontFamily:A,fontWeight:qr,[_t]:{fontSize:36,lineHeight:"40px"},[Rt]:{fontSize:28,lineHeight:"32px"}}),Tagline:d({},z,{fontFamily:A,fontWeight:Z,fontSize:20,lineHeight:"24px"}),HeadingLarge:d({},z,{fontFamily:A,fontWeight:Be,[_t]:{fontSize:28,lineHeight:"32px"},[Rt]:{fontSize:24,lineHeight:"28px"}}),HeadingMedium:d({},z,{fontFamily:A,fontWeight:Be,[_t]:{fontSize:24,lineHeight:"28px"},[Rt]:{fontSize:22,lineHeight:"26px"}}),HeadingSmall:d({},z,{fontFamily:A,fontWeight:Be,fontSize:20,lineHeight:"24px"}),HeadingXSmall:d({},z,{fontFamily:A,fontWeight:Be,fontSize:12,lineHeight:"16px",letterSpacing:.6,textTransform:"uppercase"}),BodySerifBlock:d({},z,{fontFamily:en,fontWeight:Z,fontSize:22,lineHeight:"28px"}),BodySerif:d({},z,{fontFamily:en,fontWeight:Z,fontSize:18,lineHeight:"22px"}),BodyMonospace:d({},z,{fontFamily:Vr,fontWeight:Z,fontSize:17,lineHeight:"22px"}),Body:d({},z,{fontFamily:A,fontWeight:Z,fontSize:16,lineHeight:"22px"}),LabelLarge:d({},z,{fontFamily:A,fontWeight:Be,fontSize:16,lineHeight:"20px"}),LabelMedium:d({},z,{fontFamily:A,fontWeight:Z,fontSize:16,lineHeight:"20px"}),LabelSmall:d({},z,{fontFamily:A,fontWeight:Z,fontSize:14,lineHeight:"18px"}),LabelXSmall:d({},z,{fontFamily:A,fontWeight:Z,fontSize:12,lineHeight:"16px"}),Caption:d({},z,{fontFamily:A,fontWeight:Z,fontSize:14,lineHeight:"20px"}),Footnote:d({},z,{fontFamily:A,fontWeight:Z,fontSize:12,lineHeight:"18px"})}),Ur=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h1"}=e,i=g(e,Ur);return o.createElement(B,d({},i,{tag:l,style:[L.Title,n],ref:t}),r)});const Kr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h2"}=e,i=g(e,Kr);return o.createElement(B,d({},i,{tag:l,style:[L.HeadingLarge,n],ref:t}),r)});const jr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h3"}=e,i=g(e,jr);return o.createElement(B,d({},i,{tag:l,style:[L.HeadingMedium,n],ref:t}),r)});const Xr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,Xr);return o.createElement(B,d({},i,{tag:l,style:[L.HeadingSmall,n],ref:t}),r)});const Gr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,Gr);return o.createElement(B,d({},i,{tag:l,style:[L.HeadingXSmall,n],ref:t}),r)});const Zr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Zr);return o.createElement(B,d({},i,{tag:l,style:[L.BodySerifBlock,n],ref:t}),r)});const Yr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Yr);return o.createElement(B,d({},i,{tag:l,style:[L.BodySerif,n],ref:t}),r)});const Qr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Qr);return o.createElement(B,d({},i,{tag:l,style:[L.BodyMonospace,n],ref:t}),r)});const Jr=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Jr);return o.createElement(B,d({},i,{tag:l,style:[L.Body,n],ref:t}),r)});const eo=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,eo);return o.createElement(B,d({},i,{tag:l,style:[L.LabelLarge,n],ref:t}),r)});const to=["style","children","tag"],Pn=o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,to);return o.createElement(B,d({},i,{tag:l,style:[L.LabelMedium,n],ref:t}),r)}),no=["style","children","tag"],ro=o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,no);return o.createElement(B,d({},i,{tag:l,style:[L.LabelSmall,n],ref:t}),r)}),oo=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,oo);return o.createElement(B,d({},i,{tag:l,style:[L.LabelXSmall,n],ref:t}),r)});const lo=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,lo);return o.createElement(B,d({},i,{tag:l,style:[L.Tagline,n],ref:t}),r)});const so=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,so);return o.createElement(B,d({},i,{tag:l,style:[L.Caption,n],ref:t}),r)});const io=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,io);return o.createElement(B,d({},i,{tag:l,style:[L.Footnote,n],ref:t}),r)});const tn=m.large_24,ao={small:{query:"(max-width: 767px)",totalColumns:4,gutterWidth:m.medium_16,marginWidth:m.medium_16},medium:{query:"(min-width: 768px) and (max-width: 1023px)",totalColumns:8,gutterWidth:m.xLarge_32,marginWidth:m.large_24},large:{query:"(min-width: 1024px)",totalColumns:12,gutterWidth:m.xLarge_32,marginWidth:tn,maxWidth:1120+tn*2}},co={ssrSize:"large",mediaSpec:ao},uo=o.createContext(co);uo.displayName="MediaLayoutContext";v.StyleSheet.create({grow:{flexGrow:1}});let gt=class extends o.Component{render(){const{size:e,style:t}=this.props;return o.createElement(Re,{"aria-hidden":"true",style:[ho(e),t]})}};const ho=s=>({width:s,MsFlexBasis:s,MsFlexPreferredSize:s,WebkitFlexBasis:s,flexBasis:s,flexShrink:0}),G={cellMinHeight:m.xxLarge_48,cellPadding:{paddingVertical:m.small_12,paddingHorizontal:m.medium_16},detailCellPadding:{paddingVertical:m.medium_16,paddingHorizontal:m.medium_16},accessoryHorizontalSpacing:m.medium_16},fo=s=>{switch(s){case"inset":return[Ft.horizontalRule,Ft.horizontalRuleInset];case"full-width":return Ft.horizontalRule;case"none":return{}}},Ft=v.StyleSheet.create({horizontalRule:{position:"relative",":after":{width:"100%",content:"''",position:"absolute",bottom:0,right:0,height:m.xxxxSmall_2,boxShadow:`inset 0px -1px 0px ${a.offBlack8}`}},horizontalRuleInset:{":after":{width:`calc(100% - ${G.cellPadding.paddingHorizontal}px)`}}}),po=({leftAccessory:s,leftAccessoryStyle:e,disabled:t})=>s?o.createElement(o.Fragment,null,o.createElement(Re,{style:[W.accessory,t&&W.accessoryDisabled,d({},e)]},s),o.createElement(gt,{size:G.accessoryHorizontalSpacing})):null,mo=({rightAccessory:s,rightAccessoryStyle:e,active:t,disabled:n})=>s?o.createElement(o.Fragment,null,o.createElement(gt,{size:G.accessoryHorizontalSpacing}),o.createElement(Re,{style:[W.accessory,W.accessoryRight,n&&W.accessoryDisabled,d({},e),t&&W.accessoryActive]},s)):null;function nn(s){const{active:e,children:t,disabled:n,horizontalRule:r="inset",contentStyle:l=void 0,leftAccessory:i=void 0,leftAccessoryStyle:c=void 0,rightAccessory:f=void 0,rightAccessoryStyle:h=void 0,style:p,testId:b,innerStyle:x}=s,C=fo(r);return o.createElement(Re,{style:[W.innerWrapper,x,p,C]},o.createElement(po,{leftAccessory:i,leftAccessoryStyle:c,disabled:n}),o.createElement(Re,{style:[W.content,l],testId:b},t),o.createElement(mo,{rightAccessory:f,rightAccessoryStyle:h,active:e,disabled:n}))}const On=s=>{const{active:e,disabled:t,href:n,onClick:r,"aria-label":l,"aria-selected":i,"aria-checked":c,target:f,role:h,rootStyle:p}=s;return r||n?o.createElement(gr,{disabled:t,onClick:r,href:n,hideDefaultFocusRing:!0,"aria-label":l||void 0,"aria-selected":i||void 0,"aria-checked":c,role:h,target:f,style:[W.wrapper,W.clickable,p,e&&W.active,t&&W.disabled],"aria-current":e?"true":void 0},()=>o.createElement(nn,s)):o.createElement(Re,{style:[W.wrapper,p,e&&W.active],"aria-current":e?"true":void 0,role:h},o.createElement(nn,s))},W=v.StyleSheet.create({wrapper:{background:a.white,color:a.offBlack,display:"flex",minHeight:G.cellMinHeight,textAlign:"left",width:"100%"},innerWrapper:{minHeight:G.cellMinHeight,padding:`${G.cellPadding.paddingVertical}px ${G.cellPadding.paddingHorizontal}px`,flexDirection:"row",flex:1,":focus-visible":{padding:`${G.cellPadding.paddingVertical-2}px ${G.cellPadding.paddingHorizontal-2}px`}},content:{alignSelf:"center",flex:1,overflowWrap:"break-word"},accessory:{minWidth:"auto",alignItems:"center",alignSelf:"center"},accessoryRight:{color:a.offBlack64},clickable:{outline:"none",":hover[aria-disabled=true]":{cursor:"not-allowed"},":focus-visible":{borderRadius:m.xxxSmall_4,overflow:"hidden",position:"relative"},":focus-visible:after":{content:"''",position:"absolute",top:0,left:0,zIndex:1,width:`calc(100% - ${m.xxxSmall_4}px)`,height:`calc(100% - ${m.xxxSmall_4}px)`,border:`${m.xxxxSmall_2}px solid ${a.blue}`,borderRadius:m.xxxSmall_4},":hover[aria-disabled=false]":{background:a.offBlack8},":active[aria-disabled=false]":{background:a.offBlack16}},active:{background:a.fadedBlue8,color:a.blue,":hover[aria-disabled=false]":{background:a.fadedBlue16},":active[aria-disabled=false]":{background:a.fadedBlue24}},disabled:{color:a.offBlack32,":focus-visible":{outline:"none"}},accessoryActive:{color:a.blue},accessoryDisabled:{color:a.offBlack,opacity:.32}}),go=["title"],yo=function(e){const{title:t}=e,n=g(e,go);return o.createElement(On,n,typeof t=="string"?o.createElement(Pn,null,t):t)},bo=["title","subtitle1","subtitle2"],rn=({subtitle:s,disabled:e})=>s?typeof s=="string"?o.createElement(ro,{style:!e&&Bn.subtitle},s):s:null,So=function(e){const{title:t,subtitle1:n,subtitle2:r}=e,l=g(e,bo);return o.createElement(On,d({},l,{innerStyle:Bn.innerWrapper}),o.createElement(rn,{subtitle:n,disabled:l.disabled}),n&&o.createElement(gt,{size:m.xxxxSmall_2}),typeof t=="string"?o.createElement(Pn,null,t):t,r&&o.createElement(gt,{size:m.xxxxSmall_2}),o.createElement(rn,{subtitle:r,disabled:l.disabled}))},Bn=v.StyleSheet.create({subtitle:{color:a.offBlack64},innerWrapper:{padding:`${G.detailCellPadding.paddingVertical}px ${G.detailCellPadding.paddingHorizontal}px`}});function Ln(s){const e=[];if(s)if(Array.isArray(s))for(const t of s)e.push(...Ln(t));else e.push(s);else return e;return e}function Dn(s){const e=[],t=[];if(!s)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;Ln(s).forEach(l=>{const i=l._definition;if(i!=null)if(n){const c={};for(const[f,h]of Object.entries(i))c[f.replace(/-[a-z]/g,p=>p[1].toUpperCase())]=h;t.push(c)}else e.push(l);else t.push(l)});const r=Object.assign({},...t);if(t.length>0&&!n){const l=v.StyleSheet.create({inlineStyles:r});e.push(l.inlineStyles)}return{style:n?r:{},className:v.css(...e)}}const xo=["children","style","tag","testId"],Co=/^h[1-6]$/,on=v.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}});o.forwardRef(function(e,t){let{children:n,style:r,tag:l="span",testId:i}=e,c=g(e,xo);const f=Co.test(l),h=Dn([on.text,f&&on.header,r]),p=c.className?[c.className,h.className].join(" "):h.className;return o.createElement(l,d({},c,{style:h.style,className:p,"data-testid":i,ref:t}),n)});const vo=["className","style"];function Ue(s,e){return o.forwardRef((t,n)=>{const{className:r,style:l}=t,i=g(t,vo),c=typeof s=="string"?Io[s]:null,{className:f,style:h}=Dn([c,e,l]);return o.createElement(s,d({},i,{ref:n,className:[f,r].filter(Boolean).join(" "),style:h}))})}const Io=v.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),wo=["testId","tag"],Ke=v.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),$o=Ue("div",Ke.default),Eo=Ue("article",Ke.default),ko=Ue("aside",Ke.default),Ro=Ue("nav",Ke.default),_o=Ue("section",Ke.default),Fo=o.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,l=g(e,wo),i=d({},l,{"data-testid":n});switch(r){case"article":return o.createElement(Eo,d({},i,{ref:t}));case"aside":return o.createElement(ko,d({},i,{ref:t}));case"nav":return o.createElement(Ro,d({},i,{ref:t}));case"section":return o.createElement(_o,d({},i,{ref:t}));case"div":return o.createElement($o,d({},i,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let Se=function(s){return s.Root="root",s.Initial="initial",s.Standard="standard",s}({});const ht=o.createContext(Se.Root);ht.displayName="RenderStateContext";let To=class extends o.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?o.createElement(ht.Provider,{value:Se.Standard},t()):n?o.createElement(ht.Provider,{value:Se.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case Se.Root:return this._renderAsRootComponent();case Se.Initial:return n?n():null;case Se.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(Se.Root)}}render(){return o.createElement(ht.Consumer,null,e=>this._maybeRender(e))}},Nn=class Hn{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${Hn._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}};Nn._factoryUniquenessCounter=0;let Wt=class{get(e){return e}};Wt.Default=new Wt;var zo=Wt.Default;let Po=class extends o.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(zo):null:(this._idFactory||(this._idFactory=new Nn(r)),t(this._idFactory))}render(){return o.createElement(To,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}},Oo=class Mn extends o.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(Mn.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():o.createElement(Po,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}};Oo.defaultId="wb-id";const ln=m.large_24,Bo={small:{query:"(max-width: 767px)",totalColumns:4,gutterWidth:m.medium_16,marginWidth:m.medium_16},medium:{query:"(min-width: 768px) and (max-width: 1023px)",totalColumns:8,gutterWidth:m.xLarge_32,marginWidth:m.large_24},large:{query:"(min-width: 1024px)",totalColumns:12,gutterWidth:m.xLarge_32,marginWidth:ln,maxWidth:1120+ln*2}},Lo={ssrSize:"large",mediaSpec:Bo},Do=o.createContext(Lo);Do.displayName="MediaLayoutContext";v.StyleSheet.create({grow:{flexGrow:1}});class de extends o.Component{render(){const{size:e,style:t}=this.props;return o.createElement(Fo,{"aria-hidden":"true",style:[No(e),t]})}}const No=s=>({width:s,MsFlexBasis:s,MsFlexPreferredSize:s,WebkitFlexBasis:s,flexBasis:s,flexShrink:0}),Ho=""+new URL("magnifying-glass-IX5mxYeF.svg",import.meta.url).href;function Wn(s){const e=[];if(s)if(Array.isArray(s))for(const t of s)e.push(...Wn(t));else e.push(s);else return e;return e}function An(s){const e=[],t=[];if(!s)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;Wn(s).forEach(l=>{const i=l._definition;if(i!=null)if(n){const c={};for(const[f,h]of Object.entries(i))c[f.replace(/-[a-z]/g,p=>p[1].toUpperCase())]=h;t.push(c)}else e.push(l);else t.push(l)});const r=Object.assign({},...t);if(t.length>0&&!n){const l=v.StyleSheet.create({inlineStyles:r});e.push(l.inlineStyles)}return{style:n?r:{},className:v.css(...e)}}const Mo=["children","style","tag","testId"],Wo=/^h[1-6]$/,sn=v.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}}),D=o.forwardRef(function(e,t){let{children:n,style:r,tag:l="span",testId:i}=e,c=g(e,Mo);const f=Wo.test(l),h=An([sn.text,f&&sn.header,r]),p=c.className?[c.className,h.className].join(" "):h.className;return o.createElement(l,d({},c,{style:h.style,className:p,"data-testid":i,ref:t}),n)}),Ao=["className","style"];function Te(s,e){return o.forwardRef((t,n)=>{const{className:r,style:l}=t,i=g(t,Ao),c=typeof s=="string"?qo[s]:null,{className:f,style:h}=An([c,e,l]);return o.createElement(s,d({},i,{ref:n,className:[f,r].filter(Boolean).join(" "),style:h}))})}const qo=v.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),Vo=["testId","tag"],je=v.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),Uo=Te("div",je.default),Ko=Te("article",je.default),jo=Te("aside",je.default),Xo=Te("nav",je.default),Go=Te("section",je.default),Zo=o.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,l=g(e,Vo),i=d({},l,{"data-testid":n});switch(r){case"article":return o.createElement(Ko,d({},i,{ref:t}));case"aside":return o.createElement(jo,d({},i,{ref:t}));case"nav":return o.createElement(Xo,d({},i,{ref:t}));case"section":return o.createElement(Go,d({},i,{ref:t}));case"div":return o.createElement(Uo,d({},i,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let xe=function(s){return s.Root="root",s.Initial="initial",s.Standard="standard",s}({});const ft=o.createContext(xe.Root);ft.displayName="RenderStateContext";let Yo=class extends o.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?o.createElement(ft.Provider,{value:xe.Standard},t()):n?o.createElement(ft.Provider,{value:xe.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case xe.Root:return this._renderAsRootComponent();case xe.Initial:return n?n():null;case xe.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(xe.Root)}}render(){return o.createElement(ft.Consumer,null,e=>this._maybeRender(e))}},qn=class Vn{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${Vn._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}};qn._factoryUniquenessCounter=0;let At=class{get(e){return e}};At.Default=new At;var Qo=At.Default;let Jo=class extends o.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(Qo):null:(this._idFactory||(this._idFactory=new qn(r)),t(this._idFactory))}render(){return o.createElement(Yo,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}},Un=class Kn extends o.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(Kn.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():o.createElement(Jo,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}};Un.defaultId="wb-id";const Y=400,Le=700,el=900,Tt="@media (max-width: 1023px)",zt="@media (min-width: 1024px)",P={display:"block"},q='Lato, "Noto Sans", sans-serif',an='"Noto Serif", serif',tl="Inconsolata, monospace",T=v.StyleSheet.create({Title:d({},P,{fontFamily:q,fontWeight:el,[zt]:{fontSize:36,lineHeight:"40px"},[Tt]:{fontSize:28,lineHeight:"32px"}}),Tagline:d({},P,{fontFamily:q,fontWeight:Y,fontSize:20,lineHeight:"24px"}),HeadingLarge:d({},P,{fontFamily:q,fontWeight:Le,[zt]:{fontSize:28,lineHeight:"32px"},[Tt]:{fontSize:24,lineHeight:"28px"}}),HeadingMedium:d({},P,{fontFamily:q,fontWeight:Le,[zt]:{fontSize:24,lineHeight:"28px"},[Tt]:{fontSize:22,lineHeight:"26px"}}),HeadingSmall:d({},P,{fontFamily:q,fontWeight:Le,fontSize:20,lineHeight:"24px"}),HeadingXSmall:d({},P,{fontFamily:q,fontWeight:Le,fontSize:12,lineHeight:"16px",letterSpacing:.6,textTransform:"uppercase"}),BodySerifBlock:d({},P,{fontFamily:an,fontWeight:Y,fontSize:22,lineHeight:"28px"}),BodySerif:d({},P,{fontFamily:an,fontWeight:Y,fontSize:18,lineHeight:"22px"}),BodyMonospace:d({},P,{fontFamily:tl,fontWeight:Y,fontSize:17,lineHeight:"22px"}),Body:d({},P,{fontFamily:q,fontWeight:Y,fontSize:16,lineHeight:"22px"}),LabelLarge:d({},P,{fontFamily:q,fontWeight:Le,fontSize:16,lineHeight:"20px"}),LabelMedium:d({},P,{fontFamily:q,fontWeight:Y,fontSize:16,lineHeight:"20px"}),LabelSmall:d({},P,{fontFamily:q,fontWeight:Y,fontSize:14,lineHeight:"18px"}),LabelXSmall:d({},P,{fontFamily:q,fontWeight:Y,fontSize:12,lineHeight:"16px"}),Caption:d({},P,{fontFamily:q,fontWeight:Y,fontSize:14,lineHeight:"20px"}),Footnote:d({},P,{fontFamily:q,fontWeight:Y,fontSize:12,lineHeight:"18px"})}),nl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h1"}=e,i=g(e,nl);return o.createElement(D,d({},i,{tag:l,style:[T.Title,n],ref:t}),r)});const rl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h2"}=e,i=g(e,rl);return o.createElement(D,d({},i,{tag:l,style:[T.HeadingLarge,n],ref:t}),r)});const ol=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h3"}=e,i=g(e,ol);return o.createElement(D,d({},i,{tag:l,style:[T.HeadingMedium,n],ref:t}),r)});const ll=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,ll);return o.createElement(D,d({},i,{tag:l,style:[T.HeadingSmall,n],ref:t}),r)});const sl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,sl);return o.createElement(D,d({},i,{tag:l,style:[T.HeadingXSmall,n],ref:t}),r)});const il=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,il);return o.createElement(D,d({},i,{tag:l,style:[T.BodySerifBlock,n],ref:t}),r)});const al=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,al);return o.createElement(D,d({},i,{tag:l,style:[T.BodySerif,n],ref:t}),r)});const dl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,dl);return o.createElement(D,d({},i,{tag:l,style:[T.BodyMonospace,n],ref:t}),r)});const cl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,cl);return o.createElement(D,d({},i,{tag:l,style:[T.Body,n],ref:t}),r)});const ul=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,ul);return o.createElement(D,d({},i,{tag:l,style:[T.LabelLarge,n],ref:t}),r)});const hl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,hl);return o.createElement(D,d({},i,{tag:l,style:[T.LabelMedium,n],ref:t}),r)});const fl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,fl);return o.createElement(D,d({},i,{tag:l,style:[T.LabelSmall,n],ref:t}),r)});const pl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,pl);return o.createElement(D,d({},i,{tag:l,style:[T.LabelXSmall,n],ref:t}),r)});const ml=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,ml);return o.createElement(D,d({},i,{tag:l,style:[T.Tagline,n],ref:t}),r)});const gl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,gl);return o.createElement(D,d({},i,{tag:l,style:[T.Caption,n],ref:t}),r)});const yl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,yl);return o.createElement(D,d({},i,{tag:l,style:[T.Footnote,n],ref:t}),r)});function jn(s){const e=[];if(s)if(Array.isArray(s))for(const t of s)e.push(...jn(t));else e.push(s);else return e;return e}function Xn(s){const e=[],t=[];if(!s)return{style:{},className:""};const n=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;jn(s).forEach(l=>{const i=l._definition;if(i!=null)if(n){const c={};for(const[f,h]of Object.entries(i))c[f.replace(/-[a-z]/g,p=>p[1].toUpperCase())]=h;t.push(c)}else e.push(l);else t.push(l)});const r=Object.assign({},...t);if(t.length>0&&!n){const l=v.StyleSheet.create({inlineStyles:r});e.push(l.inlineStyles)}return{style:n?r:{},className:v.css(...e)}}const bl=["children","style","tag","testId"],Sl=/^h[1-6]$/,dn=v.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}}),N=o.forwardRef(function(e,t){let{children:n,style:r,tag:l="span",testId:i}=e,c=g(e,bl);const f=Sl.test(l),h=Xn([dn.text,f&&dn.header,r]),p=c.className?[c.className,h.className].join(" "):h.className;return o.createElement(l,d({},c,{style:h.style,className:p,"data-testid":i,ref:t}),n)}),xl=["className","style"];function H(s,e){return o.forwardRef((t,n)=>{const{className:r,style:l}=t,i=g(t,xl),c=typeof s=="string"?Cl[s]:null,{className:f,style:h}=Xn([c,e,l]);return o.createElement(s,d({},i,{ref:n,className:[f,r].filter(Boolean).join(" "),style:h}))})}const Cl=v.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),vl=["testId","tag"],Xe=v.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),Il=H("div",Xe.default),wl=H("article",Xe.default),$l=H("aside",Xe.default),El=H("nav",Xe.default),kl=H("section",Xe.default),_e=o.forwardRef(function(e,t){const{testId:n,tag:r="div"}=e,l=g(e,vl),i=d({},l,{"data-testid":n});switch(r){case"article":return o.createElement(wl,d({},i,{ref:t}));case"aside":return o.createElement($l,d({},i,{ref:t}));case"nav":return o.createElement(El,d({},i,{ref:t}));case"section":return o.createElement(kl,d({},i,{ref:t}));case"div":return o.createElement(Il,d({},i,{ref:t}));default:throw Error(`${r} is not an allowed value for the 'tag' prop`)}});let ie=function(s){return s.Root="root",s.Initial="initial",s.Standard="standard",s}({});const We=o.createContext(ie.Root);We.displayName="RenderStateContext";class Rl extends o.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:n}=this.props;return this._isTheRootComponent=!0,e?o.createElement(We.Provider,{value:ie.Standard},t()):n?o.createElement(We.Provider,{value:ie.Initial},n()):null}_maybeRender(e){const{children:t,fallback:n}=this.props;switch(e){case ie.Root:return this._renderAsRootComponent();case ie.Initial:return n?n():null;case ie.Standard:return t()}{var r;return console.log(`We got a render state we don't understand: "${(r=JSON.stringify(e))!=null?r:""}"`),this._maybeRender(ie.Root)}}render(){return o.createElement(We.Consumer,null,e=>this._maybeRender(e))}}class Ge{constructor(e){this._uniqueFactoryName=void 0,this.get=n=>{const r=n.toLowerCase();if(!this._hasValidIdChars(n))throw new Error(`Invalid identifier key: ${n}`);return`${this._uniqueFactoryName}-${r}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${Ge._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}}Ge._factoryUniquenessCounter=0;class qt{get(e){return e}}qt.Default=new qt;var Gn=qt.Default;class Zn extends o.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:n,scope:r}=this.props;return e?n?t(Gn):null:(this._idFactory||(this._idFactory=new Ge(r)),t(this._idFactory))}render(){return o.createElement(Rl,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}}class Ze extends o.Component{renderChildren(e){const{id:t,children:n}=this.props,r=e?e.get(Ze.defaultId):t;if(!r)throw new Error("Did not get an identifier factory nor a id prop");return n(r)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():o.createElement(Zn,{scope:t,mockOnFirstRender:!0},n=>this.renderChildren(n))}}Ze.defaultId="wb-id";const _l=()=>o.useContext(We),Fl=s=>{const e=_l(),t=o.useRef(null);if(e===ie.Root)throw new Error("Components using useUniqueIdWithMock() should be descendants of ");return e===ie.Initial?Gn:(t.current||(t.current=new Ge(s)),t.current)},Tl=s=>{o.useEffect(s,[])},Q=400,De=700,zl=900,Pt="@media (max-width: 1023px)",Ot="@media (min-width: 1024px)",O={display:"block"},V='Lato, "Noto Sans", sans-serif',cn='"Noto Serif", serif',Pl="Inconsolata, monospace",F=v.StyleSheet.create({Title:d({},O,{fontFamily:V,fontWeight:zl,[Ot]:{fontSize:36,lineHeight:"40px"},[Pt]:{fontSize:28,lineHeight:"32px"}}),Tagline:d({},O,{fontFamily:V,fontWeight:Q,fontSize:20,lineHeight:"24px"}),HeadingLarge:d({},O,{fontFamily:V,fontWeight:De,[Ot]:{fontSize:28,lineHeight:"32px"},[Pt]:{fontSize:24,lineHeight:"28px"}}),HeadingMedium:d({},O,{fontFamily:V,fontWeight:De,[Ot]:{fontSize:24,lineHeight:"28px"},[Pt]:{fontSize:22,lineHeight:"26px"}}),HeadingSmall:d({},O,{fontFamily:V,fontWeight:De,fontSize:20,lineHeight:"24px"}),HeadingXSmall:d({},O,{fontFamily:V,fontWeight:De,fontSize:12,lineHeight:"16px",letterSpacing:.6,textTransform:"uppercase"}),BodySerifBlock:d({},O,{fontFamily:cn,fontWeight:Q,fontSize:22,lineHeight:"28px"}),BodySerif:d({},O,{fontFamily:cn,fontWeight:Q,fontSize:18,lineHeight:"22px"}),BodyMonospace:d({},O,{fontFamily:Pl,fontWeight:Q,fontSize:17,lineHeight:"22px"}),Body:d({},O,{fontFamily:V,fontWeight:Q,fontSize:16,lineHeight:"22px"}),LabelLarge:d({},O,{fontFamily:V,fontWeight:De,fontSize:16,lineHeight:"20px"}),LabelMedium:d({},O,{fontFamily:V,fontWeight:Q,fontSize:16,lineHeight:"20px"}),LabelSmall:d({},O,{fontFamily:V,fontWeight:Q,fontSize:14,lineHeight:"18px"}),LabelXSmall:d({},O,{fontFamily:V,fontWeight:Q,fontSize:12,lineHeight:"16px"}),Caption:d({},O,{fontFamily:V,fontWeight:Q,fontSize:14,lineHeight:"20px"}),Footnote:d({},O,{fontFamily:V,fontWeight:Q,fontSize:12,lineHeight:"18px"})}),Ol=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h1"}=e,i=g(e,Ol);return o.createElement(N,d({},i,{tag:l,style:[F.Title,n],ref:t}),r)});const Bl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h2"}=e,i=g(e,Bl);return o.createElement(N,d({},i,{tag:l,style:[F.HeadingLarge,n],ref:t}),r)});const Ll=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h3"}=e,i=g(e,Ll);return o.createElement(N,d({},i,{tag:l,style:[F.HeadingMedium,n],ref:t}),r)});const Dl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,Dl);return o.createElement(N,d({},i,{tag:l,style:[F.HeadingSmall,n],ref:t}),r)});const Nl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="h4"}=e,i=g(e,Nl);return o.createElement(N,d({},i,{tag:l,style:[F.HeadingXSmall,n],ref:t}),r)});const Hl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Hl);return o.createElement(N,d({},i,{tag:l,style:[F.BodySerifBlock,n],ref:t}),r)});const Ml=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Ml);return o.createElement(N,d({},i,{tag:l,style:[F.BodySerif,n],ref:t}),r)});const Wl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Wl);return o.createElement(N,d({},i,{tag:l,style:[F.BodyMonospace,n],ref:t}),r)});const Al=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Al);return o.createElement(N,d({},i,{tag:l,style:[F.Body,n],ref:t}),r)});const ql=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,ql);return o.createElement(N,d({},i,{tag:l,style:[F.LabelLarge,n],ref:t}),r)});const Vl=["style","children","tag"],xt=o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Vl);return o.createElement(N,d({},i,{tag:l,style:[F.LabelMedium,n],ref:t}),r)}),Ul=["style","children","tag"],we=o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Ul);return o.createElement(N,d({},i,{tag:l,style:[F.LabelSmall,n],ref:t}),r)}),Kl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Kl);return o.createElement(N,d({},i,{tag:l,style:[F.LabelXSmall,n],ref:t}),r)});const jl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,jl);return o.createElement(N,d({},i,{tag:l,style:[F.Tagline,n],ref:t}),r)});const Xl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Xl);return o.createElement(N,d({},i,{tag:l,style:[F.Caption,n],ref:t}),r)});const Gl=["style","children","tag"];o.forwardRef(function(e,t){let{style:n,children:r,tag:l="span"}=e,i=g(e,Gl);return o.createElement(N,d({},i,{tag:l,style:[F.Footnote,n],ref:t}),r)});const Zl=s=>({small:16,medium:24,large:48,xlarge:96})[s],Yl=["color","icon","size","style","testId","className"],Ql=H("span"),Yn=o.forwardRef(function(e,t){const{color:n="currentColor",icon:r,size:l="small",style:i,testId:c,className:f}=e,h=g(e,Yl),p=Zl(l),b=`${f??""}`,x=Jl(n,p);return o.createElement(Ql,d({},h,{className:b,style:[Vt.svg,x.icon,{maskImage:`url(${r})`},i],"data-testid":c,ref:t}))}),un={},Jl=(s,e)=>{const t=`${s}-${e}`;if(Vt[t])return Vt[t];const n={icon:{backgroundColor:s,width:e,height:e}};return un[t]=v.StyleSheet.create(n),un[t]},Vt=v.StyleSheet.create({svg:{display:"inline-block",verticalAlign:"text-bottom",flexShrink:0,flexGrow:0,maskSize:"100%",maskRepeat:"no-repeat",maskPosition:"center"}});Yn.displayName="PhosphorIcon";const es=["checked","disabled","error","groupName","id","testId"];function ts(s){switch(s){case!0:return"true";case!1:return"false";default:return"mixed"}}const{blue:Qn,red:Jn,white:ae,offWhite:ns,offBlack16:rs,offBlack32:os,offBlack50:ls}=a,Ne=m.medium_16,Ut=m.small_12,ss=H("input"),is=o.forwardRef(function(e,t){const{checked:n,disabled:r,error:l,groupName:i,id:c,testId:f}=e,h=g(e,es),p=o.useRef(null);o.useEffect(()=>{p.current!=null&&(p.current.indeterminate=n==null)},[n,p]);const b=()=>{},x=cs(n,l),C=[tt.inputReset,tt.default,!r&&x.default,r&&tt.disabled],I=o.createElement(Yn,{color:r?os:ae,icon:n?Gt:Cr,size:"small",style:[tt.checkboxIcon,{width:Ut,height:Ut}]}),u=ts(n);return o.createElement(o.Fragment,null,o.createElement(ss,d({},h,{ref:y=>{p.current=y,typeof t=="function"?t(y):t!=null&&(t.current=y)},type:"checkbox","aria-checked":u,"aria-invalid":l,checked:n??void 0,disabled:r,id:c,name:i,onChange:b,style:C,"data-testid":f})),n||n==null?I:o.createElement(o.Fragment,null))}),tt=v.StyleSheet.create({inputReset:{appearance:"none",WebkitAppearance:"none",MozAppearance:"none"},default:{height:Ne,width:Ne,minHeight:Ne,minWidth:Ne,margin:0,outline:"none",boxSizing:"border-box",borderStyle:"solid",borderWidth:1,borderRadius:3},disabled:{cursor:"auto",backgroundColor:ns,borderColor:rs,borderWidth:1},checkboxIcon:{position:"absolute",pointerEvents:"none",margin:(Ne-Ut)/2}}),as=ee(a.fadedBlue16,ae),ds=a.activeBlue,pt=ee(a.fadedRed8,ae),er=a.activeRed,hn={default:{faded:as,base:Qn,active:ds},error:{faded:pt,base:Jn,active:er}},nt={},cs=(s,e)=>{const t=`${String(s)}-${String(e)}`;if(nt[t])return nt[t];const n=e?hn.error:hn.default;let r={};return s||s==null?r={default:{backgroundColor:n.base,borderWidth:0,":focus-visible":{boxShadow:`0 0 0 1px ${ae}, 0 0 0 3px ${n.base}`},":hover":{boxShadow:`0 0 0 1px ${ae}, 0 0 0 3px ${n.base}`},":active":{boxShadow:`0 0 0 1px ${ae}, 0 0 0 3px ${n.active}`,background:n.active}}}:r={default:{backgroundColor:e?pt:ae,borderColor:e?Jn:ls,":focus-visible":{backgroundColor:e?pt:ae,borderColor:n.base,borderWidth:2},":hover":{backgroundColor:e?pt:ae,borderColor:n.base,borderWidth:2},":active":{backgroundColor:n.faded,borderColor:e?er:Qn,borderWidth:2}}},nt[t]=v.StyleSheet.create(r),nt[t]},us=["checked","disabled","error","groupName","id","testId"],{blue:tr,red:nr,white:se,offWhite:hs,offBlack16:fs,offBlack32:ps,offBlack50:ms}=a,gs=H("input"),ys=o.forwardRef(function(e,t){const n=()=>{},{checked:r,disabled:l,error:i,groupName:c,id:f,testId:h}=e,p=g(e,us),b=xs(r,i),x=[Bt.inputReset,Bt.default,!l&&b.default,l&&Bt.disabled];return o.createElement(o.Fragment,null,o.createElement(gs,d({},p,{type:"radio","aria-invalid":i,checked:r??void 0,disabled:l,id:f,name:c,onChange:n,style:x,"data-testid":h,ref:t})),l&&r&&o.createElement("span",{style:bs}))}),ce=16,bs={position:"absolute",top:ce/4,left:ce/4,height:ce/2,width:ce/2,borderRadius:"50%",backgroundColor:ps},Bt=v.StyleSheet.create({inputReset:{appearance:"none",WebkitAppearance:"none",MozAppearance:"none"},default:{height:ce,width:ce,minHeight:ce,minWidth:ce,margin:0,outline:"none",boxSizing:"border-box",borderStyle:"solid",borderWidth:1,borderRadius:"50%"},disabled:{cursor:"auto",backgroundColor:hs,borderColor:fs,borderWidth:1}}),Ss=ee(a.fadedBlue16,se),mt=ee(a.fadedRed8,se),fn={default:{faded:Ss,base:tr,active:a.activeBlue},error:{faded:mt,base:nr,active:a.activeRed}},rt={},xs=(s,e)=>{const t=`${String(s)}-${String(e)}`;if(rt[t])return rt[t];const n=e?fn.error:fn.default;let r={};return s?r={default:{backgroundColor:se,borderColor:n.base,borderWidth:ce/4,":focus-visible":{boxShadow:`0 0 0 1px ${se}, 0 0 0 3px ${n.base}`},":hover":{boxShadow:`0 0 0 1px ${se}, 0 0 0 3px ${n.base}`},":active":{boxShadow:`0 0 0 1px ${se}, 0 0 0 3px ${n.active}`,borderColor:n.active}}}:r={default:{backgroundColor:e?mt:se,borderColor:e?nr:ms,":focus-visible":{backgroundColor:e?mt:se,borderColor:n.base,borderWidth:2},":hover":{backgroundColor:e?mt:se,borderColor:n.base,borderWidth:2},":active":{backgroundColor:n.faded,borderColor:e?a.activeRed:tr,borderWidth:2}}},rt[t]=v.StyleSheet.create(r),rt[t]},Cs=["checked","description","disabled","error","id","label","onChange","style","className","variant"],rr=o.forwardRef(function(e,t){const{checked:n,description:r,disabled:l=!1,error:i=!1,id:c,label:f,onChange:h,style:p,className:b,variant:x}=e,C=g(e,Cs),I=()=>{x==="radio"&&n||h(!n)},u=()=>x==="radio"?ys:is,y=w=>o.createElement(xt,{style:[ot.label,l&&ot.disabledLabel]},o.createElement("label",{htmlFor:w},f)),S=w=>o.createElement(we,{style:ot.description,id:w},r),$=u();return o.createElement(Zn,{mockOnFirstRender:!0,scope:"choice"},w=>{const k=c||w.get("main"),E=r?w.get("description"):void 0;return o.createElement(_e,{style:p,className:b},o.createElement(_e,{style:ot.wrapper,tabIndex:-1},o.createElement($,d({},C,{id:k,checked:n,"aria-describedby":E,onClick:I,disabled:l,error:i,ref:t})),o.createElement(de,{size:m.xSmall_8}),f&&y(k)),r&&S(E))})}),ot=v.StyleSheet.create({wrapper:{flexDirection:"row",alignItems:"flex-start",outline:"none"},label:{marginTop:-2},disabledLabel:{color:a.offBlack32},description:{marginLeft:m.medium_16+m.xSmall_8,marginTop:m.xxxSmall_4,color:a.offBlack64}}),vs=o.forwardRef(function(e,t){const{disabled:n=!1,error:r=!1}=e;return o.createElement(rr,d({},e,{variant:"checkbox",disabled:n,error:r,ref:t}))}),Is=["disabled","error"],ws=o.forwardRef(function(e,t){const{disabled:n=!1,error:r=!1}=e,l=g(e,Is);return o.createElement(rr,d({},l,{variant:"radio",disabled:n,error:r,ref:t}))}),$s=["checked","disabled","onChange","value","variant"];o.forwardRef(function(e,t){const{checked:n=!1,disabled:r=!1,onChange:l=()=>{},variant:i}=e,c=g(e,$s),h=(p=>p==="checkbox"?vs:ws)(i);return o.createElement(h,d({},c,{checked:n,disabled:r,onChange:l,ref:t}))});const J=v.StyleSheet.create({fieldset:{border:"none",padding:0,margin:0},legend:{padding:0},description:{marginTop:m.xxxSmall_4,color:a.offBlack64},error:{marginTop:m.xxxSmall_4,color:a.red},defaultLineGap:{marginTop:m.xSmall_8}}),Es=H("fieldset"),ks=H("legend");o.forwardRef(function(e,t){const{children:n,label:r,description:l,errorMessage:i,groupName:c,onChange:f,selectedValues:h,style:p,testId:b}=e,x=(I,u)=>{if(u){const y=h.indexOf(I),S=[...h.slice(0,y),...h.slice(y+1)];f(S)}else f([...h,I])},C=o.Children.toArray(n).filter(Boolean);return o.createElement(Es,{"data-testid":b,style:J.fieldset,ref:t},o.createElement(_e,{style:p},r&&o.createElement(ks,{style:J.legend},o.createElement(xt,null,r)),l&&o.createElement(we,{style:J.description},l),i&&o.createElement(we,{style:J.error},i),(r||l||i)&&o.createElement(de,{size:m.small_12}),C.map((I,u)=>{const{style:y,value:S}=I.props,$=h.includes(S);return o.cloneElement(I,{checked:$,error:!!i,groupName:c,id:`${c}-${S}`,key:S,onChange:()=>x(S,$),style:[u>0&&J.defaultLineGap,y],variant:"checkbox"})})))});const Rs=H("fieldset"),_s=H("legend");o.forwardRef(function(e,t){const{children:n,label:r,description:l,errorMessage:i,groupName:c,onChange:f,selectedValue:h,style:p,testId:b}=e,x=o.Children.toArray(n).filter(Boolean);return o.createElement(Rs,{"data-testid":b,style:J.fieldset,ref:t},o.createElement(_e,{style:p},r&&o.createElement(_s,{style:J.legend},o.createElement(xt,null,r)),l&&o.createElement(we,{style:J.description},l),i&&o.createElement(we,{style:J.error},i),(r||l||i)&&o.createElement(de,{size:m.small_12}),x.map((C,I)=>{const{style:u,value:y}=C.props,S=h===y;return o.cloneElement(C,{checked:S,error:!!i,groupName:c,id:`${c}-${y}`,key:y,onChange:()=>f(y),style:[I>0&&J.defaultLineGap,u],variant:"radio"})})))});const Fs=["id","type","value","name","disabled","onKeyDown","placeholder","style","testId","readOnly","autoFocus","autoComplete","forwardedRef","light","onFocus","onBlur","onValidate","validate","onChange","required"],Ts="This field is required.",zs=H("input");class or extends o.Component{constructor(e){super(e),this.state={error:null},this.maybeValidate=t=>{const{validate:n,onValidate:r,required:l}=this.props;if(n){const i=n(t)||null;this.setState({error:i},()=>{r&&r(i)})}else if(l){const c=t?null:typeof l=="string"?l:Ts;this.setState({error:c},()=>{r&&r(c)})}},this.handleChange=t=>{const{onChange:n}=this.props,r=t.target.value;this.maybeValidate(r),n(r)},this.handleFocus=t=>{const{onFocus:n}=this.props;n&&n(t)},this.handleBlur=t=>{const{onBlur:n}=this.props;n&&n(t)},this.getStyles=()=>{const{disabled:t,light:n}=this.props,{error:r}=this.state,l=[oe.input,F.LabelMedium],i=[oe.default,!t&&oe.defaultFocus,t&&oe.disabled,!!r&&oe.error],c=[oe.light,!t&&oe.lightFocus,t&&oe.lightDisabled,!!r&&oe.lightError];return[...l,...n?c:i]},e.validate&&e.value!==""&&(this.state.error=e.validate(e.value)||null)}componentDidMount(){this.props.value!==""&&this.maybeValidate(this.props.value)}render(){const e=this.props,{id:t,type:n,value:r,name:l,disabled:i,onKeyDown:c,placeholder:f,style:h,testId:p,readOnly:b,autoFocus:x,autoComplete:C,forwardedRef:I}=e,u=g(e,Fs);return o.createElement(Ze,{id:t,scope:"text-field"},y=>o.createElement(zs,d({style:[this.getStyles(),h],id:y,type:n,placeholder:f,value:r,name:l,disabled:i,onChange:this.handleChange,onKeyDown:c,onFocus:this.handleFocus,onBlur:this.handleBlur,"data-testid":p,readOnly:b,autoFocus:x,autoComplete:C,ref:I},u,{"aria-invalid":this.state.error?"true":"false"})))}}or.defaultProps={type:"text",disabled:!1,light:!1};const oe=v.StyleSheet.create({input:{width:"100%",height:40,borderRadius:X.radius.medium_4,boxSizing:"border-box",paddingLeft:m.medium_16,margin:0},default:{background:a.white,border:`1px solid ${a.offBlack50}`,color:a.offBlack,"::placeholder":{color:a.offBlack64}},defaultFocus:{":focus-visible":{borderColor:a.blue,outline:`1px solid ${a.blue}`,outlineOffset:0}},error:{background:a.fadedRed8,border:`1px solid ${a.red}`,color:a.offBlack,"::placeholder":{color:a.offBlack64},":focus-visible":{outlineColor:a.red,borderColor:a.red}},disabled:{background:a.offWhite,border:`1px solid ${a.offBlack16}`,color:a.offBlack64,"::placeholder":{color:a.offBlack64},cursor:"not-allowed",":focus-visible":{outline:"none",boxShadow:`0 0 0 1px ${a.white}, 0 0 0 3px ${a.offBlack32}`}},light:{background:a.white,border:`1px solid ${a.offBlack16}`,color:a.offBlack,"::placeholder":{color:a.offBlack64}},lightFocus:{":focus-visible":{outline:`1px solid ${a.blue}`,outlineOffset:0,borderColor:a.blue,boxShadow:`0px 0px 0px 2px ${a.blue}, 0px 0px 0px 3px ${a.white}`}},lightDisabled:{backgroundColor:"transparent",border:`1px solid ${a.white32}`,color:a.white64,"::placeholder":{color:a.white64},cursor:"not-allowed",":focus-visible":{borderColor:ee(a.white32,a.blue),outline:"none",boxShadow:`0 0 0 1px ${a.offBlack32}, 0 0 0 3px ${a.fadedBlue}`}},lightError:{background:a.fadedRed8,border:`1px solid ${a.red}`,boxShadow:`0px 0px 0px 1px ${a.red}, 0px 0px 0px 2px ${a.white}`,color:a.offBlack,"::placeholder":{color:a.offBlack64},":focus-visible":{outlineColor:a.red,borderColor:a.red,boxShadow:`0px 0px 0px 2px ${a.red}, 0px 0px 0px 3px ${a.white}`}}});var lr=o.forwardRef((s,e)=>o.createElement(or,d({},s,{forwardedRef:e})));const Ps=H("span");class Os extends o.Component{renderLabel(){const{label:e,id:t,required:n,testId:r,light:l}=this.props,i=o.createElement(Ps,{style:l?he.lightRequired:he.required,"aria-hidden":!0}," ","*");return o.createElement(o.Fragment,null,o.createElement(xt,{style:l?he.lightLabel:he.label,tag:"label",htmlFor:t&&`${t}-field`,testId:r&&`${r}-label`},e,n&&i),o.createElement(de,{size:m.xxxSmall_4}))}maybeRenderDescription(){const{description:e,testId:t,light:n}=this.props;return e?o.createElement(o.Fragment,null,o.createElement(we,{style:n?he.lightDescription:he.description,testId:t&&`${t}-description`},e),o.createElement(de,{size:m.xxxSmall_4})):null}maybeRenderError(){const{error:e,id:t,testId:n,light:r}=this.props;return e?o.createElement(o.Fragment,null,o.createElement(de,{size:m.small_12}),o.createElement(we,{style:r?he.lightError:he.error,role:"alert",id:t&&`${t}-error`,testId:n&&`${n}-error`},e)):null}render(){const{field:e,style:t}=this.props;return o.createElement(_e,{style:t},this.renderLabel(),this.maybeRenderDescription(),o.createElement(de,{size:m.xSmall_8}),e,this.maybeRenderError())}}const he=v.StyleSheet.create({label:{color:a.offBlack},lightLabel:{color:a.white},description:{color:a.offBlack64},lightDescription:{color:a.white64},error:{color:a.red},lightError:{color:a.fadedRed},required:{color:a.red},lightRequired:{color:a.fadedRed}}),Bs=["id","type","label","description","value","disabled","required","validate","onChange","onKeyDown","placeholder","light","style","testId","readOnly","autoComplete","forwardedRef","ariaDescribedby","onValidate","onFocus","onBlur"];class sr extends o.Component{constructor(e){super(e),this.handleValidate=t=>{const{onValidate:n}=this.props;this.setState({error:t},()=>{n&&n(t)})},this.handleFocus=t=>{const{onFocus:n}=this.props;this.setState({focused:!0},()=>{n&&n(t)})},this.handleBlur=t=>{const{onBlur:n}=this.props;this.setState({focused:!1},()=>{n&&n(t)})},this.state={error:null,focused:!1}}render(){const e=this.props,{id:t,type:n,label:r,description:l,value:i,disabled:c,required:f,validate:h,onChange:p,onKeyDown:b,placeholder:x,light:C,style:I,testId:u,readOnly:y,autoComplete:S,forwardedRef:$,ariaDescribedby:w}=e,k=g(e,Bs);return o.createElement(Ze,{id:t,scope:"labeled-text-field"},E=>o.createElement(Os,{id:E,testId:u,style:I,light:C,field:o.createElement(lr,d({id:`${E}-field`,"aria-describedby":w||`${E}-error`,"aria-required":f?"true":"false",required:f,testId:u&&`${u}-field`,type:n,value:i,placeholder:x,disabled:c,validate:h,onValidate:this.handleValidate,onChange:p,onKeyDown:b,onFocus:this.handleFocus,onBlur:this.handleBlur,light:C,readOnly:y,autoComplete:S,ref:$},k)),label:r,description:l,required:!!f,error:!this.state.focused&&this.state.error||""}))}}sr.defaultProps={type:"text",disabled:!1,light:!1};o.forwardRef((s,e)=>o.createElement(sr,d({},s,{forwardedRef:e})));const Ls=["onChange","value","placeholder","disabled","id","testId","style","readOnly","autoComplete","name","className","autoFocus","rows","spellCheck","wrap","minLength","maxLength","onClick","onKeyDown","onKeyUp","onFocus","onBlur","validate","onValidate","required","resizeType","light","rootStyle"],Ds="This field is required.",Ns=H("textarea");o.forwardRef(function(e,t){const{onChange:n,value:r,placeholder:l,disabled:i,id:c,testId:f,style:h,readOnly:p,autoComplete:b,name:x,className:C,autoFocus:I,rows:u,spellCheck:y,wrap:S,minLength:$,maxLength:w,onClick:k,onKeyDown:E,onKeyUp:R,onFocus:_,onBlur:j,validate:U,onValidate:te,required:ne,resizeType:Ye,light:It,rootStyle:wt}=e,$t=g(e,Ls),[ze,Pe]=o.useState(null),Oe=Fl("text-area"),Et=c??Oe.get("id"),Qe=re=>{const M=re.target.value;n(M),Je(M)},Je=re=>{if(U){const M=U(re)||null;Pe(M),te&&te(M)}else if(ne){const ge=re?null:typeof ne=="string"?ne:Ds;Pe(ge),te&&te(ge)}};Tl(()=>{r!==""&&Je(r)});const kt=()=>{const re=[le.textarea,F.LabelMedium,Ye&&Hs[Ye]],M=[le.default,!i&&le.defaultFocus,i&&le.disabled,!!ze&&le.error],ge=[le.light,!i&&le.lightFocus,i&&le.lightDisabled,!!ze&&le.lightError];return[...re,...It?ge:M]};return o.createElement(_e,{style:[{width:"100%"},wt]},o.createElement(Ns,d({id:Et,"data-testid":f,ref:t,className:C,style:[kt(),h],value:r,onChange:Qe,placeholder:l,"aria-disabled":i,readOnly:p||i,autoComplete:b,name:x,autoFocus:I,rows:u,spellCheck:y,wrap:S,minLength:$,maxLength:w,onClick:i?void 0:k,onKeyDown:i?void 0:E,onKeyUp:i?void 0:R,onFocus:_,onBlur:j,required:!!ne},$t,{"aria-invalid":!!ze})))});const pn=10,le=v.StyleSheet.create({textarea:{borderRadius:X.radius.medium_4,boxSizing:"border-box",padding:`${pn}px ${m.medium_16}px`,minHeight:`${pn*2+br.lineHeight.medium+2*X.width.hairline}px`},default:{background:a.white,border:`1px solid ${a.offBlack50}`,color:a.offBlack,"::placeholder":{color:a.offBlack64}},defaultFocus:{":focus-visible":{borderColor:a.blue,outline:`1px solid ${a.blue}`,outlineOffset:0}},disabled:{background:a.offWhite,border:`1px solid ${a.offBlack16}`,color:a.offBlack64,"::placeholder":{color:a.offBlack64},cursor:"not-allowed",":focus-visible":{outline:"none",boxShadow:`0 0 0 1px ${a.white}, 0 0 0 3px ${a.offBlack32}`}},error:{background:a.fadedRed8,border:`1px solid ${a.red}`,color:a.offBlack,"::placeholder":{color:a.offBlack64},":focus-visible":{outlineColor:a.red,borderColor:a.red}},light:{background:a.white,border:`1px solid ${a.offBlack16}`,color:a.offBlack,"::placeholder":{color:a.offBlack64}},lightFocus:{":focus-visible":{outline:`1px solid ${a.blue}`,outlineOffset:0,borderColor:a.blue,boxShadow:`0px 0px 0px 2px ${a.blue}, 0px 0px 0px 3px ${a.white}`}},lightDisabled:{backgroundColor:"transparent",border:`1px solid ${a.white32}`,color:a.white64,"::placeholder":{color:a.white64},cursor:"not-allowed",":focus-visible":{borderColor:ee(a.white32,a.blue),outline:"none",boxShadow:`0 0 0 1px ${a.offBlack32}, 0 0 0 3px ${a.fadedBlue}`}},lightError:{background:a.fadedRed8,border:`1px solid ${a.red}`,boxShadow:`0px 0px 0px 1px ${a.red}, 0px 0px 0px 2px ${a.white}`,color:a.offBlack,"::placeholder":{color:a.offBlack64},":focus-visible":{outlineColor:a.red,borderColor:a.red,boxShadow:`0px 0px 0px 2px ${a.red}, 0px 0px 0px 3px ${a.white}`}}}),Hs=v.StyleSheet.create({both:{resize:"both"},none:{resize:"none"},horizontal:{resize:"horizontal"},vertical:{resize:"vertical"}}),Ms=s=>({small:16,medium:24,large:48,xlarge:96})[s],Ws=["color","icon","size","style","testId","className"],As=Te("span"),ir=o.forwardRef(function(e,t){const{color:n="currentColor",icon:r,size:l="small",style:i,testId:c,className:f}=e,h=g(e,Ws),p=Ms(l),b=`${f??""}`,x=qs(n,p);return o.createElement(As,d({},h,{className:b,style:[Kt.svg,x.icon,{maskImage:`url(${r})`},i],"data-testid":c,ref:t}))}),mn={},qs=(s,e)=>{const t=`${s}-${e}`;if(Kt[t])return Kt[t];const n={icon:{backgroundColor:s,width:e,height:e}};return mn[t]=v.StyleSheet.create(n),mn[t]},Kt=v.StyleSheet.create({svg:{display:"inline-block",verticalAlign:"text-bottom",flexShrink:0,flexGrow:0,maskSize:"100%",maskRepeat:"no-repeat",maskPosition:"center"}});ir.displayName="PhosphorIcon";const Vs={clearSearch:"Clear search"},Us=["clearAriaLabel","autoFocus","disabled","light","id","value","placeholder","style","testId","onClick","onChange","onFocus","onBlur"],Ks=o.forwardRef(function(e,t){const{clearAriaLabel:n=Vs.clearSearch,autoFocus:r,disabled:l=!1,light:i=!1,id:c,value:f,placeholder:h,style:p,testId:b,onClick:x,onChange:C,onFocus:I,onBlur:u}=e,y=g(e,Us),S=o.useRef(null),$=()=>{var k;C(""),S==null||(k=S.current)==null||k.focus()},w=()=>f.length?o.createElement(vr,{icon:Ir,kind:"tertiary",onClick:$,style:lt.dismissIcon,"aria-label":n}):null;return o.createElement(Un,{id:c,scope:"search-field"},k=>o.createElement(Zo,{onClick:x,style:[lt.inputContainer,p]},o.createElement(ir,{icon:Ho,size:"medium",color:a.offBlack64,style:lt.searchIcon,"aria-hidden":"true"}),o.createElement(lr,d({id:`${k}-field`,type:"text",autoFocus:r,disabled:l,light:i,onChange:C,onFocus:I,onBlur:u,placeholder:h,ref:E=>{t&&(t.current=E),S.current=E},value:f,style:[lt.inputStyleReset,T.LabelMedium],testId:b},y)),w()))}),lt=v.StyleSheet.create({inputContainer:{boxSizing:"border-box",flexDirection:"row",borderRadius:m.xxxSmall_4,alignItems:"center",height:40},searchIcon:{marginLeft:m.xSmall_8,marginRight:m.xSmall_8,position:"absolute"},dismissIcon:{margin:0,position:"absolute",right:0,":hover":{border:"none"}},inputStyleReset:{display:"flex",flex:1,"::placeholder":{color:a.offBlack64},width:"100%",color:"inherit",paddingLeft:m.large_24+m.medium_16,paddingRight:m.large_24+m.medium_16}});function jt(){return jt=Object.assign||function(s){for(var e=1;e=e?s.call(null):r.id=requestAnimationFrame(n)}var r={id:requestAnimationFrame(n)};return r}var $e=null;function xn(s){if(s===void 0&&(s=!1),$e===null||s){var e=document.createElement("div"),t=e.style;t.width="50px",t.height="50px",t.overflow="scroll",t.direction="rtl";var n=document.createElement("div"),r=n.style;return r.width="100px",r.height="100px",e.appendChild(n),document.body.appendChild(e),e.scrollLeft>0?$e="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?$e="negative":$e="positive-ascending"),document.body.removeChild(e),$e}return $e}var Qs=150,Js=function(e,t){return e};function ei(s){var e,t=s.getItemOffset,n=s.getEstimatedTotalSize,r=s.getItemSize,l=s.getOffsetForIndexAndAlignment,i=s.getStartIndexForOffset,c=s.getStopIndexForStartIndex,f=s.initInstanceProps,h=s.shouldResetStyleCacheOnItemSizeChange,p=s.validateProps;return e=function(b){js(x,b);function x(I){var u;return u=b.call(this,I)||this,u._instanceProps=f(u.props,gn(u)),u._outerRef=void 0,u._resetIsScrollingTimeoutId=null,u.state={instance:gn(u),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof u.props.initialScrollOffset=="number"?u.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},u._callOnItemsRendered=void 0,u._callOnItemsRendered=Lt(function(y,S,$,w){return u.props.onItemsRendered({overscanStartIndex:y,overscanStopIndex:S,visibleStartIndex:$,visibleStopIndex:w})}),u._callOnScroll=void 0,u._callOnScroll=Lt(function(y,S,$){return u.props.onScroll({scrollDirection:y,scrollOffset:S,scrollUpdateWasRequested:$})}),u._getItemStyle=void 0,u._getItemStyle=function(y){var S=u.props,$=S.direction,w=S.itemSize,k=S.layout,E=u._getItemStyleCache(h&&w,h&&k,h&&$),R;if(E.hasOwnProperty(y))R=E[y];else{var _=t(u.props,y,u._instanceProps),j=r(u.props,y,u._instanceProps),U=$==="horizontal"||k==="horizontal",te=$==="rtl",ne=U?_:0;E[y]=R={position:"absolute",left:te?void 0:ne,right:te?ne:void 0,top:U?0:_,height:U?"100%":j,width:U?j:"100%"}}return R},u._getItemStyleCache=void 0,u._getItemStyleCache=Lt(function(y,S,$){return{}}),u._onScrollHorizontal=function(y){var S=y.currentTarget,$=S.clientWidth,w=S.scrollLeft,k=S.scrollWidth;u.setState(function(E){if(E.scrollOffset===w)return null;var R=u.props.direction,_=w;if(R==="rtl")switch(xn()){case"negative":_=-w;break;case"positive-descending":_=k-$-w;break}return _=Math.max(0,Math.min(_,k-$)),{isScrolling:!0,scrollDirection:E.scrollOffset0)for(var M=Je;M<=kt;M++)re.push(o.createElement(y,{data:j,key:te(M,j),index:M,isScrolling:$t?Pe:void 0,style:this._getItemStyle(M)}));var ge=n(this.props,this._instanceProps);return o.createElement(Ye||It||"div",{className:S,onScroll:Et,ref:this._outerRefSetter,style:jt({position:"relative",height:w,width:ze,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:$},wt)},o.createElement(E||R||"div",{children:re,ref:k,style:{height:Oe?"100%":ge,pointerEvents:Pe?"none":void 0,width:Oe?ge:"100%"}}))},C._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var u=this.props.itemCount;if(u>0){var y=this._getRangeToRender(),S=y[0],$=y[1],w=y[2],k=y[3];this._callOnItemsRendered(S,$,w,k)}}if(typeof this.props.onScroll=="function"){var E=this.state,R=E.scrollDirection,_=E.scrollOffset,j=E.scrollUpdateWasRequested;this._callOnScroll(R,_,j)}},C._getRangeToRender=function(){var u=this.props,y=u.itemCount,S=u.overscanCount,$=this.state,w=$.isScrolling,k=$.scrollDirection,E=$.scrollOffset;if(y===0)return[0,0,0,0];var R=i(this.props,E,this._instanceProps),_=c(this.props,R,E,this._instanceProps),j=!w||k==="backward"?Math.max(1,S):1,U=!w||k==="forward"?Math.max(1,S):1;return[Math.max(0,R-j),Math.max(0,Math.min(y-1,_+U)),R,_]},x}(o.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var ti=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},ni=50,Ee=function(e,t,n){var r=e,l=r.itemSize,i=n.itemMetadataMap,c=n.lastMeasuredIndex;if(t>c){var f=0;if(c>=0){var h=i[c];f=h.offset+h.size}for(var p=c+1;p<=t;p++){var b=l(p);i[p]={offset:f,size:b},f+=b}n.lastMeasuredIndex=t}return i[t]},ri=function(e,t,n){var r=t.itemMetadataMap,l=t.lastMeasuredIndex,i=l>0?r[l].offset:0;return i>=n?ar(e,t,l,0,n):oi(e,t,Math.max(0,l),n)},ar=function(e,t,n,r,l){for(;r<=n;){var i=r+Math.floor((n-r)/2),c=Ee(e,i,t).offset;if(c===l)return i;cl&&(n=i-1)}return r>0?r-1:0},oi=function(e,t,n,r){for(var l=e.itemCount,i=1;n=n&&(i=n-1),i>=0){var f=r[i];c=f.offset+f.size}var h=n-i-1,p=h*l;return c+p},li=ei({getItemOffset:function(e,t,n){return Ee(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:Cn,getOffsetForIndexAndAlignment:function(e,t,n,r,l){var i=e.direction,c=e.height,f=e.layout,h=e.width,p=i==="horizontal"||f==="horizontal",b=p?h:c,x=Ee(e,t,l),C=Cn(e,l),I=Math.max(0,Math.min(C-b,x.offset)),u=Math.max(0,x.offset-b+x.size);switch(n==="smart"&&(r>=u-b&&r<=I+b?n="auto":n="center"),n){case"start":return I;case"end":return u;case"center":return Math.round(u+(I-u)/2);case"auto":default:return r>=u&&r<=I?r:r`Select all (${s})`,noneSelected:"0 items",someSelected:s=>s===1?"1 item":`${s} items`,allSelected:"All items"},{blue:si,white:vn,offBlack:ii}=a;class Fe extends o.Component{static isClassOf(e){return e&&e.type&&e.type.__IS_ACTION_ITEM__}render(){const{disabled:e,horizontalRule:t,href:n,target:r,indent:l,label:i,lang:c,leftAccessory:f,rightAccessory:h,onClick:p,role:b,style:x,testId:C}=this.props,I=[He.wrapper,x],u=typeof i=="string"?o.createElement(bt,{lang:c,style:He.label},i):o.cloneElement(i,d({lang:c,style:He.label},i.props));return o.createElement(yo,{disabled:e,horizontalRule:t,rootStyle:I,leftAccessory:f,rightAccessory:h,style:[He.shared,l&&He.indent],role:b,testId:C,title:u,href:n,target:r,onClick:p})}}Fe.defaultProps={disabled:!1,horizontalRule:"none",indent:!1,role:"menuitem"};Fe.__IS_ACTION_ITEM__=!0;const He=v.StyleSheet.create({wrapper:{minHeight:me,touchAction:"manipulation",":focus":{borderRadius:m.xxxSmall_4,outline:`${m.xxxxSmall_2}px solid ${a.blue}`,outlineOffset:-m.xxxxSmall_2},":hover[aria-disabled=false]":{color:vn,background:si},"@media not (hover: hover)":{":hover[aria-disabled=false]":{color:vn,background:ii}},":active[aria-disabled=false]":{color:a.fadedBlue,background:a.activeBlue}},shared:{minHeight:me,height:me},label:{whiteSpace:"nowrap",userSelect:"none"},indent:{paddingLeft:m.medium_16*2}}),ai=function(e){const{selected:t}=e;return o.createElement(St,{icon:Gt,size:"small",style:[In.bounds,!t&&In.hide]})},In=v.StyleSheet.create({bounds:{alignSelf:"center",height:m.medium_16,minHeight:m.medium_16,minWidth:m.medium_16},hide:{visibility:"hidden"}}),{offBlack16:di,offBlack50:ci,offWhite:ui}=a,hi=function(e){const{disabled:t,selected:n}=e;return o.createElement(Ce,{className:"checkbox",style:[st.checkbox,n&&!t&&st.noBorder,t&&st.disabledCheckbox]},n&&o.createElement(St,{icon:Gt,size:"small",className:"check",style:[{width:m.small_12,height:m.small_12,margin:m.xxxxSmall_2},t&&n&&st.disabledCheckFormatting]}))},st=v.StyleSheet.create({checkbox:{alignSelf:"center",minHeight:m.medium_16,minWidth:m.medium_16,height:m.medium_16,borderRadius:3,borderWidth:1,borderStyle:"solid",borderColor:ci},noBorder:{borderWidth:0},disabledCheckbox:{borderColor:di,backgroundColor:ui},disabledCheckFormatting:{position:"absolute",top:-1,left:-1}}),fi=["disabled","label","selected","testId","leftAccessory","horizontalRule","parentComponent","rightAccessory","style","subtitle1","subtitle2","value","onClick","onToggle","variant","role"],pi=yt("li");class ve extends o.Component{constructor(...e){super(...e),this.handleClick=()=>{const{onClick:t,onToggle:n,value:r}=this.props;n(r),t&&t()}}static isClassOf(e){return e&&e.type&&e.type.__IS_OPTION_ITEM__}getCheckComponent(){return this.props.variant==="check"?ai:hi}renderCell(){const e=this.props,{disabled:t,label:n,selected:r,testId:l,leftAccessory:i,horizontalRule:c,parentComponent:f,rightAccessory:h,style:p,subtitle1:b,subtitle2:x,role:C}=e,I=g(e,fi),u=this.getCheckComponent(),y=[fe.item,p];return o.createElement(So,d({disabled:t,horizontalRule:c,rootStyle:f==="listbox"?fe.listboxItem:y,style:fe.itemContainer,"aria-selected":f!=="listbox"&&r?"true":"false",role:f!=="listbox"?C:void 0,testId:l,leftAccessory:o.createElement(o.Fragment,null,i?o.createElement(Ce,{style:{flexDirection:"row"}},o.createElement(u,{disabled:t,selected:r}),o.createElement(de,{size:m.xSmall_8}),i):o.createElement(u,{disabled:t,selected:r})),rightAccessory:h,subtitle1:b?o.createElement(Qt,{className:"subtitle"},b):void 0,title:o.createElement(bt,{style:fe.label},n),subtitle2:x?o.createElement(Qt,{className:"subtitle"},x):void 0,onClick:f!=="listbox"?this.handleClick:void 0},I))}render(){const{disabled:e,focused:t,parentComponent:n,role:r,selected:l}=this.props;return n==="listbox"?o.createElement(pi,{onMouseDown:i=>{i.preventDefault()},onClick:this.handleClick,style:[fe.reset,fe.item,t&&fe.itemFocused,e&&fe.itemDisabled],role:r,"aria-selected":l?"true":"false","aria-disabled":e?"true":"false",id:this.props.id,tabIndex:-1},this.renderCell()):this.renderCell()}}ve.defaultProps={disabled:!1,focused:!1,horizontalRule:"none",onToggle:()=>{},role:"option",selected:!1};ve.__IS_OPTION_ITEM__=!0;const{blue:Dt,white:Me,offBlack:mi}=a,wn={borderRadius:m.xxxSmall_4,outline:`${m.xxxxSmall_2}px solid ${a.blue}`,outlineOffset:-m.xxxxSmall_2},fe=v.StyleSheet.create({reset:{margin:0,padding:0,border:0,background:"none",outline:"none",fontSize:"100%",verticalAlign:"baseline",textAlign:"left",textDecoration:"none",listStyle:"none",cursor:"pointer"},listboxItem:{backgroundColor:"transparent",color:"inherit"},item:{backgroundColor:a.white,minHeight:"unset",":focus":wn,":focus-visible":{overflow:"visible"},":hover[aria-disabled=false]":{color:Me,background:Dt},":active[aria-selected=false]":{},":hover[aria-disabled=true]":{cursor:"not-allowed"},":is([aria-disabled=true])":{color:a.offBlack32,":focus-visible":{outline:"none"}},"@media not (hover: hover)":{":hover[aria-disabled=false]":{color:Me,background:mi}},":active[aria-disabled=false]":{color:a.fadedBlue,background:a.activeBlue},":hover[aria-disabled=false] .checkbox":{background:Me},":hover[aria-disabled=false] .check":{color:Dt},":active[aria-disabled=false] .check":{color:a.activeBlue},":is([aria-selected=true]) .checkbox":{background:Dt},":is([aria-selected=true]) .check":{color:Me},":is([aria-disabled=false]) .subtitle":{color:a.offBlack64},":hover[aria-disabled=false] .subtitle":{color:a.offWhite},":active[aria-disabled=false] .subtitle":{color:ee(a.fadedBlue16,Me)}},itemFocused:wn,itemDisabled:{outlineColor:a.offBlack32},itemContainer:{minHeight:"unset",padding:`${m.xSmall_8+m.xxxxSmall_2}px ${m.xSmall_8}px`,paddingRight:m.medium_16,whiteSpace:"nowrap"},label:{whiteSpace:"nowrap",userSelect:"none",overflow:"hidden",textOverflow:"ellipsis"},hide:{visibility:"hidden"}});class ue extends o.Component{static isClassOf(e){return e&&e.type&&e.type.__IS_SEPARATOR_ITEM__}render(){return o.createElement(Ce,{style:[gi.separator,this.props.style],"aria-hidden":"true"})}}ue.__IS_SEPARATOR_ITEM__=!0;const gi=v.StyleSheet.create({separator:{boxShadow:`0 -1px ${a.offBlack16}`,height:1,minHeight:1,marginTop:m.xxxSmall_4,marginBottom:m.xxxSmall_4}});class Ct extends o.Component{constructor(...e){super(...e),this.getTestIdFromProps=t=>t.testId||t["data-testid"]}renderAnchorChildren(e,t){const{disabled:n,testId:r,text:l,opened:i,"aria-controls":c,"aria-haspopup":f,id:h}=this.props,p=this.props.children(d({},e,{text:l,opened:i})),b=p.props,x=this.getTestIdFromProps(b);return o.cloneElement(p,d({},t,{disabled:n,"aria-controls":c,id:h,"aria-expanded":i?"true":"false","aria-haspopup":f,onClick:b.onClick?C=>{b.onClick(C),t.onClick(C)}:t.onClick,"data-testid":x||r}))}render(){return o.createElement(yr,{onClick:this.props.onClick,disabled:this.props.disabled,tabIndex:0},(e,t)=>this.renderAnchorChildren(e,t))}}Ct.defaultProps={disabled:!1};class yi extends o.Component{render(){const{data:e,index:t,style:n}=this.props,r=e[t];if(ue.isClassOf(r.component))return o.cloneElement(r.component,{style:n});{const{component:l,populatedProps:i,onClick:c,role:f,ref:h}=r;return o.cloneElement(l,d({style:n},i,{key:t,onClick:c,ref:r.focusable&&h,role:f}))}}}function $n(s,e=0){return s.slice(0,hr).reduce((t,n)=>ue.isClassOf(n.component)?t+fr:t+me,e)}class bi extends o.Component{constructor(e){super(e),this.getItemSize=t=>{const n=this.props.data[t];return ue.isClassOf(n.component)?fr:me},this.state={height:$n(e.data),width:e.width}}componentDidMount(){const{schedule:e}=this.props;e.animationFrame(()=>{this.setWidth()})}componentDidUpdate(e){const{data:t,listRef:n}=this.props;e.data.length!==t.length&&(this.setHeight(),n&&n.current&&n.current.resetAfterIndex(1))}setWidth(){const e=Ie.findDOMNode(this),t=e==null?void 0:e.parentElement;if(t){const n=t.getBoundingClientRect().width;this.setState({width:n})}}setHeight(){const e=$n(this.props.data);this.setState({height:e})}renderInitialItems(){const{data:e}=this.props,t=e.map(r=>r.component);return o.Children.toArray(t).filter(Boolean).sort((r,l)=>l.props.label&&r.props.label?l.props.label.length-r.props.label.length:-1).slice(0,hr).map(r=>o.cloneElement(r,{style:{visibility:"hidden"}}))}renderVirtualizedList(e,t){const{data:n,listRef:r}=this.props;return o.createElement(li,{height:t,itemCount:n.length,itemSize:this.getItemSize,itemData:n,style:{overflowX:"hidden"},width:e,overscanCount:5,ref:r},yi)}render(){const{width:e,height:t}=this.state;return e==null?this.renderInitialItems():this.renderVirtualizedList(e,t)}}var Si=kn(bi);function xi({state:s,options:e}){const t=$r(s,e),{y:n}=s.modifiersData.preventOverflow||{x:0,y:0},{height:r}=s.rects.popper,[l]=s.placement.split("-"),c=r-t[l==="top"?"top":"bottom"]-n;s.styles.popper=d({},s.styles.popper,{maxHeight:`${c}px`,"--popper-max-height":`${c}px`})}const Ci={name:"maxHeight",enabled:!0,phase:"main",options:{padding:me},requiresIfExists:["offset","preventOverflow","flip"],fn:xi},vi=[{name:"preventOverflow",options:{rootBoundary:"viewport",altAxis:!0,tether:!1}},Ci],Ii=function({children:e,alignment:t="left",onPopperElement:n,referenceElement:r}){const l=Er(r)||document.querySelector("body");return l?Ie.createPortal(o.createElement(wr,{innerRef:i=>{i&&n&&n(i)},referenceElement:r,strategy:"fixed",placement:t==="left"?"bottom-start":"bottom-end",modifiers:vi},({placement:i,ref:c,style:f,hasPopperEscaped:h,isReferenceHidden:p})=>{const b=!!(h||p);return o.createElement("div",{ref:c,style:f,"data-testid":"dropdown-popper","data-placement":i},e(b))}),l):null};function wi(s){return s.length===1||!/^[A-Z]/i.test(s)?s:""}function $i(s,e){let t;return function(...r){const l=()=>{clearTimeout(t),s(...r)};clearTimeout(t),t=setTimeout(l,e)}}function En(s){return typeof s=="string"}function Ae(s){return En(s.label)?s.label:En(s.labelAsText)?s.labelAsText:""}const Ei=125,ki=yt("span");class vt extends o.Component{static sameItemsFocusable(e,t){if(e.length!==t.length)return!1;for(let n=0;n{const{open:n,onOpenChanged:r}=this.props,l=t.target,i=Ie.findDOMNode(this);n&&i&&!i.contains(l)&&this.popperElement&&!this.popperElement.contains(l)&&r(!1)},this.handleKeyDown=t=>{const{enableTypeAhead:n,onOpenChanged:r,open:l,searchText:i}=this.props,c=t.which||t.keyCode;if(n&&wi(t.key)&&(t.stopPropagation(),this.textSuggestion+=t.key,this.handleKeyDownDebounced(this.textSuggestion)),!l){if(c===ye.down){t.preventDefault(),r(!0);return}return}switch(c){case ye.tab:if(this.isSearchFieldFocused()&&i)return;this.restoreTabOrder(),r(!1);return;case ye.space:if(this.isSearchFieldFocused())return;t.preventDefault();return;case ye.up:t.preventDefault(),this.focusPreviousItem();return;case ye.down:t.preventDefault(),this.focusNextItem();return}},this.handleKeyUp=t=>{const{onOpenChanged:n,open:r}=this.props;switch(t.which||t.keyCode){case ye.space:if(this.isSearchFieldFocused())return;t.preventDefault();return;case ye.escape:r&&(t.stopPropagation(),this.restoreTabOrder(),n(!1));return}},this.handleKeyDownDebounceResult=t=>{const n=this.props.items.filter(r=>r.focusable).findIndex(({component:r})=>{if(ue.isClassOf(r))return!1;if(ve.isClassOf(r)){const l=r.props;return Ae(l).toLowerCase().startsWith(t.toLowerCase())}return!1});if(n>=0){const r=!this.props.open;r&&this.props.onOpenChanged(!0),this.focusedIndex=n,this.scheduleToFocusCurrentItem(l=>{this.props.selectionType==="single"&&r&&l&&(l.click(),this.props.onOpenChanged(!1))})}this.textSuggestion=""},this.handleClickFocus=t=>{this.itemsClicked=!0,this.focusedIndex=t,this.focusedOriginalIndex=this.state.itemRefs[this.focusedIndex].originalIndex},this.handleDropdownMouseUp=t=>{t.nativeEvent.stopImmediatePropagation?t.nativeEvent.stopImmediatePropagation():t.stopPropagation()},this.handleItemClick=(t,n)=>{this.handleClickFocus(t),n.component.props.onClick&&n.component.props.onClick(),n.populatedProps.onClick&&n.populatedProps.onClick()},this.handleSearchTextChanged=t=>{const{onSearchTextChanged:n}=this.props;n&&n(t)},this.resetFocusedIndex(),this.state={prevItems:this.props.items,itemRefs:[],sameItemsFocusable:!1,labels:d({noResults:K.noResults,someResults:K.someSelected},e.labels)},this.virtualizedListRef=o.createRef(),this.handleKeyDownDebounced=$i(this.handleKeyDownDebounceResult,500),this.textSuggestion=""}componentDidMount(){this.updateEventListeners(),this.maybeFocusInitialItem()}componentDidUpdate(e){const{open:t,searchText:n}=this.props;if(e.open!==t)this.updateEventListeners(),this.maybeFocusInitialItem();else if(t){const{itemRefs:r,sameItemsFocusable:l}=this.state;if(l||e.searchText!==n)return;{const i=r.findIndex(c=>c.originalIndex===this.focusedOriginalIndex);i===-1?(this.focusedIndex=0,this.itemsClicked=!1,this.scheduleToFocusCurrentItem()):this.focusedIndex=i}this.props.labels!==e.labels&&this.setState({labels:d({},this.state.labels,this.props.labels)})}}componentWillUnmount(){this.removeEventListeners()}resetFocusedIndex(){const{initialFocusedIndex:e}=this.props;if(typeof e<"u")this.focusedIndex=e;else{if(this.hasSearchField()&&!this.isSearchFieldFocused())return this.focusSearchField();this.focusedIndex=0}}maybeFocusInitialItem(){const{autoFocus:e,open:t}=this.props;e&&(t?(this.resetFocusedIndex(),this.scheduleToFocusCurrentItem()):t||(this.itemsClicked=!1))}updateEventListeners(){this.props.open?this.addEventListeners():this.removeEventListeners()}addEventListeners(){document.addEventListener("mouseup",this.handleInteract),document.addEventListener("touchend",this.handleInteract)}removeEventListeners(){document.removeEventListener("mouseup",this.handleInteract),document.removeEventListener("touchend",this.handleInteract)}scheduleToFocusCurrentItem(e){this.shouldVirtualizeList()?this.props.schedule.animationFrame(()=>{this.focusCurrentItem(e)}):this.focusCurrentItem(e)}focusCurrentItem(e){const t=this.state.itemRefs[this.focusedIndex];if(t){this.virtualizedListRef.current&&this.virtualizedListRef.current.scrollToItem(t.originalIndex);const n=Ie.findDOMNode(t.ref.current);n&&(n.focus(),this.focusedOriginalIndex=t.originalIndex,e&&e(n))}}focusSearchField(){this.searchFieldRef.current&&this.searchFieldRef.current.focus()}hasSearchField(){return!!this.props.isFilterable}isSearchFieldFocused(){return this.hasSearchField()&&document.activeElement===this.searchFieldRef.current}focusPreviousItem(){if(this.focusedIndex===0||this.isSearchFieldFocused()&&!this.props.enableTypeAhead){if(this.hasSearchField()&&!this.isSearchFieldFocused())return this.focusSearchField();this.focusedIndex=this.state.itemRefs.length-1}else this.focusedIndex-=1;this.scheduleToFocusCurrentItem()}focusNextItem(){if(this.focusedIndex===this.state.itemRefs.length-1||this.isSearchFieldFocused()&&!this.props.enableTypeAhead){if(this.hasSearchField()&&!this.isSearchFieldFocused())return this.focusSearchField();this.focusedIndex=0}else this.focusedIndex+=1;this.scheduleToFocusCurrentItem()}restoreTabOrder(){this.props.openerElement&&this.props.openerElement.focus()}getItemRole(){const{role:e}=this.props;switch(e){case"listbox":return"option";case"menu":return"menuitem";default:throw new Error(`Expected "listbox" or "menu" for role, but receieved "${e}" instead.`)}}maybeRenderNoResults(){const{items:e,labels:{noResults:t}}=this.props;return e.length===0?o.createElement(bt,{style:pe.noResult,testId:"dropdown-core-no-results"},t):null}shouldVirtualizeList(){return this.props.items.length>Ei}renderList(){let e=0;const t=this.getItemRole();return this.props.items.map((n,r)=>{if(ue.isClassOf(n.component))return n.component;const{component:l,focusable:i,populatedProps:c}=n;i&&(e+=1);const f=e-1,h=this.state.itemRefs[f]?this.state.itemRefs[f].ref:null;return o.cloneElement(l,d({},c,{key:r,onClick:()=>{this.handleItemClick(f,n)},ref:i?h:null,role:c.role||t}))})}parseVirtualizedItems(){let e=0;const t=this.getItemRole();return this.props.items.map((n,r)=>{const{populatedProps:l}=n;!ue.isClassOf(n.component)&&n.focusable&&(e+=1);const i=e-1;return d({},n,{role:l.role||t,ref:n.focusable&&this.state.itemRefs[i]?this.state.itemRefs[i].ref:null,onClick:()=>{this.handleItemClick(i,n)}})})}renderVirtualizedList(){const e=this.parseVirtualizedItems();return o.createElement(Si,{data:e,listRef:this.virtualizedListRef})}renderSearchField(){const{searchText:e}=this.props,{labels:t}=this.state;return o.createElement(Ks,{clearAriaLabel:t.clearSearch,onChange:this.handleSearchTextChanged,placeholder:t.filter,ref:this.searchFieldRef,style:pe.searchInputStyle,value:e||""})}renderDropdownMenu(e,t){const{"aria-invalid":n,"aria-required":r,dropdownStyle:l,isFilterable:i,light:c,openerElement:f,role:h,id:p}=this.props,b=f&&window.getComputedStyle(f),x=b?b.getPropertyValue("width"):0;return o.createElement(Ce,{onMouseUp:this.handleDropdownMouseUp,style:[pe.dropdown,c&&pe.light,t&&pe.hidden,l],testId:"dropdown-core-container"},i&&this.renderSearchField(),o.createElement(Ce,{id:p,role:h,style:[pe.listboxOrMenu,{minWidth:x}],"aria-invalid":h==="listbox"?n:void 0,"aria-required":h==="listbox"?r:void 0},e),this.maybeRenderNoResults())}renderDropdown(){const{alignment:e,openerElement:t}=this.props,n=this.shouldVirtualizeList()?this.renderVirtualizedList():this.renderList();return o.createElement(Ii,{alignment:e,onPopperElement:r=>{this.popperElement=r},referenceElement:t},r=>this.renderDropdownMenu(n,r))}renderLiveRegion(){const{items:e,open:t}=this.props,{labels:n}=this.state,r=e.length;return o.createElement(ki,{"aria-live":"polite","aria-atomic":"true","aria-relevant":"additions text",style:pe.srOnly,"data-testid":"dropdown-live-region"},t&&n.someResults(r))}render(){const{open:e,opener:t,style:n,className:r,disabled:l}=this.props;return o.createElement(Ce,{onKeyDown:l?void 0:this.handleKeyDown,onKeyUp:l?void 0:this.handleKeyUp,style:[pe.menuWrapper,n],className:r},this.renderLiveRegion(),t,e&&this.renderDropdown())}}vt.defaultProps={alignment:"left",autoFocus:!0,enableTypeAhead:!0,labels:{clearSearch:K.clearSearch,filter:K.filter,noResults:K.noResults,someResults:K.someSelected},light:!1,selectionType:"single"};const pe=v.StyleSheet.create({menuWrapper:{width:"fit-content"},dropdown:{backgroundColor:a.white,borderRadius:4,paddingTop:m.xxxSmall_4,paddingBottom:m.xxxSmall_4,border:`solid 1px ${a.offBlack16}`,boxShadow:`0px 8px 8px 0px ${Sr(a.offBlack,.1)}`,maxHeight:"var(--popper-max-height)"},light:{border:"none"},listboxOrMenu:{overflowY:"auto"},hidden:{pointerEvents:"none",visibility:"hidden"},noResult:{color:a.offBlack64,alignSelf:"center",marginTop:m.xxSmall_6},searchInputStyle:{margin:m.xSmall_8,marginTop:m.xxxSmall_4,minHeight:"auto",position:"sticky"},srOnly:{border:0,clip:"rect(0,0,0,0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}});var Zt=kn(vt);const Ri=["children","disabled","focused","hovered","pressed","waiting","testId","opened","aria-label"],_i=yt("button");class Fi extends o.Component{render(){const e=this.props,{children:t,disabled:n,focused:r,hovered:l,pressed:i,testId:c,opened:f,"aria-label":h}=e,p=g(e,Ri),b=a.blue,x=Ti(b),C=n,I=[Nt.shared,C&&Nt.disabled,x.default,C&&x.disabled,!C&&i&&x.active],u=o.createElement(xr,{style:Nt.text},t);return o.createElement(_i,d({"aria-expanded":f?"true":"false","aria-haspopup":"menu","aria-label":h,disabled:C,style:I,type:"button"},p,{"data-testid":c}),o.createElement(Ce,{style:!C&&(l||r)&&x.focus},u),o.createElement(de,{size:m.xxxSmall_4}),o.createElement(St,{size:"small",color:"currentColor",icon:dr,"aria-hidden":"true"}))}}const Nt=v.StyleSheet.create({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",height:me,border:"none",borderRadius:m.xxxSmall_4,cursor:"pointer",outline:"none",textDecoration:"none",boxSizing:"border-box",touchAction:"manipulation",":focus":{WebkitTapHighlightColor:"rgba(0,0,0,0)"}},disabled:{cursor:"auto"},small:{height:m.xLarge_32},text:{textAlign:"left",display:"inline-block",alignItems:"center",fontWeight:"bold",userSelect:"none",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",pointerEvents:"none"},hiddenText:{visibility:"hidden"},spinner:{position:"absolute"}}),it={},Ti=s=>{const e=s;if(it[e])return it[e];const{offBlack32:t}=a,n=a.activeBlue;let r={};return r={default:{background:"none",color:s},focus:{":after":{content:"''",position:"absolute",height:2,left:0,right:0,bottom:-1,background:"currentColor",borderRadius:2}},active:{color:n},disabled:{color:t,cursor:"default"}},it[e]=v.StyleSheet.create(r),it[e]},zi=["text","opened"];class Pi extends o.Component{constructor(...e){super(...e),this.openerElement=void 0,this.state={opened:!1},this.handleItemSelected=()=>{this.handleOpenChanged(!1),this.openerElement&&this.openerElement.focus()},this.handleOpenChanged=t=>{this.setState({opened:t}),this.props.onToggle&&this.props.onToggle(t)},this.handleOptionSelected=t=>{const{onChange:n,selectedValues:r}=this.props;if(!(!n||!r)){if(r.includes(t)){const l=r.indexOf(t),i=[...r.slice(0,l),...r.slice(l+1)];n(i)}else n([...r,t]);this.handleItemSelected()}},this.handleOpenerRef=t=>{this.openerElement=Ie.findDOMNode(t)},this.handleClick=t=>{this.handleOpenChanged(!this.state.opened)}}static getDerivedStateFromProps(e,t){return{opened:typeof e.opened=="boolean"?e.opened:t.opened}}getMenuItems(){const{children:e,selectedValues:t}=this.props,n=o.Children.toArray(e).filter(Boolean),r=n.some(l=>ve.isClassOf(l));return n.map(l=>{const{value:i,disabled:c}=l.props,f={component:l,focusable:Fe.isClassOf(l)||ve.isClassOf(l)?!c:!1,populatedProps:{}};if(Fe.isClassOf(l))return d({},f,{populatedProps:{indent:r,onClick:this.handleItemSelected}});if(ve.isClassOf(l)){const h=t?t.includes(i):!1;return d({},f,{populatedProps:{onToggle:this.handleOptionSelected,selected:h,variant:"check",role:"menuitemcheckbox","aria-checked":h,"aria-selected":void 0}})}else return f})}renderOpener(e,t){const{disabled:n,menuText:r,opener:l,testId:i,id:c}=this.props;return o.createElement(ke,{id:c,scope:"action-menu-opener"},f=>o.createElement(Ct,{id:f,"aria-controls":t,"aria-haspopup":"menu",onClick:this.handleClick,disabled:e===0||n,text:r,ref:this.handleOpenerRef,testId:l?void 0:i,opened:this.state.opened},l||(h=>{const{opened:p}=h,b=g(h,zi);return o.createElement(Fi,d({},b,{disabled:n,opened:!!p,testId:i}),r)})))}render(){const{alignment:e,dropdownStyle:t,style:n,className:r,dropdownId:l}=this.props,i=this.getMenuItems();return o.createElement(ke,{id:l,scope:"action-menu-dropdown"},c=>o.createElement(Zt,{id:c,role:"menu",style:n,className:r,opener:this.renderOpener(i.length,c),alignment:e,open:this.state.opened,items:i,openerElement:this.openerElement,onOpenChanged:this.handleOpenChanged,dropdownStyle:[Oi.menuTopSpace,t]}))}}Pi.defaultProps={alignment:"left",disabled:!1};const Oi=v.StyleSheet.create({caret:{marginLeft:4},opener:{whiteSpace:"nowrap",userSelect:"none",overflow:"hidden",textOverflow:"ellipsis"},menuTopSpace:{top:-4}}),Bi=["children","disabled","error","id","isPlaceholder","light","open","testId","onOpenChanged"],Li=yt("button");class Yt extends o.Component{constructor(e){super(e),this.handleClick=t=>{const{open:n}=this.props;this.props.onOpenChanged(!n)},this.handleKeyDown=t=>{const n=t.key;(n==="Enter"||n===" ")&&(this.setState({pressed:!0}),t.preventDefault())},this.handleKeyUp=t=>{const n=t.key;(n==="Enter"||n===" ")&&(this.setState({pressed:!1}),this.handleClick(t))},this.state={pressed:!1}}render(){const e=this.props,{children:t,disabled:n,error:r,id:l,isPlaceholder:i,light:c,open:f,testId:h}=e,p=g(e,Bi),b=Di(c,i,r),x=c?n||r?"currentColor":a.white:n?a.offBlack32:a.offBlack64,C=[Ht.shared,b.default,n&&b.disabled,!n&&this.state.pressed&&b.pressed];return o.createElement(Li,d({},p,{"aria-disabled":n,"aria-expanded":f?"true":"false","aria-haspopup":"listbox","data-testid":h,id:l,style:C,type:"button",onClick:n?void 0:this.handleClick,onKeyDown:n?void 0:this.handleKeyDown,onKeyUp:n?void 0:this.handleKeyUp}),o.createElement(bt,{style:Ht.text},t||" "),o.createElement(St,{icon:dr,color:x,size:"small",style:Ht.caret,"aria-hidden":"true"}))}}Yt.defaultProps={disabled:!1,error:!1,light:!1,isPlaceholder:!1};const Ht=v.StyleSheet.create({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"space-between",color:a.offBlack,height:me,paddingLeft:m.medium_16,paddingRight:m.small_12,borderWidth:0,borderRadius:X.radius.medium_4,borderStyle:"solid",outline:"none",textDecoration:"none",boxSizing:"border-box",whiteSpace:"nowrap",touchAction:"manipulation"},text:{marginRight:m.xSmall_8,whiteSpace:"nowrap",userSelect:"none",overflow:"hidden",textOverflow:"ellipsis"},caret:{minWidth:16}}),at=m.medium_16-1,dt=m.small_12-1,ct={},Di=(s,e,t)=>{const n=`${s}-${e}-${t}`;if(ct[n])return ct[n];let r={};if(s){const l={borderColor:t?a.red:a.white,borderWidth:m.xxxxSmall_2,paddingLeft:at,paddingRight:dt},i={paddingLeft:at,paddingRight:dt,borderColor:t?a.red:a.fadedBlue,borderWidth:X.width.thin,color:t?a.offBlack64:e?ee(a.white32,a.blue):a.fadedBlue,backgroundColor:t?a.fadedRed:a.activeBlue};r={default:{background:t?a.fadedRed8:"transparent",color:t?a.offBlack64:e?a.white50:a.white,borderColor:t?a.red:a.white50,borderWidth:X.width.hairline,":hover:not([aria-disabled=true])":l,"@media not (hover: hover)":{":hover:not([aria-disabled=true])":{borderColor:t?a.red:a.white50,borderWidth:X.width.hairline,paddingLeft:m.medium_16,paddingRight:m.small_12}},":focus-visible:not([aria-disabled=true])":l,":active:not([aria-disabled=true])":i},disabled:{background:"transparent",borderColor:ee(a.white32,a.blue),color:ee(a.white32,a.blue),cursor:"not-allowed",":focus-visible":{boxShadow:`0 0 0 1px ${a.offBlack32}, 0 0 0 3px ${a.fadedBlue}`}},pressed:i}}else{const l={borderColor:t?a.red:a.blue,borderWidth:X.width.thin,paddingLeft:at,paddingRight:dt},i={background:t?a.fadedRed:a.fadedBlue,borderColor:t?a.red:a.activeBlue,borderWidth:X.width.thin,paddingLeft:at,paddingRight:dt};r={default:{background:t?a.fadedRed8:a.white,borderColor:t?a.red:a.offBlack50,borderWidth:X.width.hairline,color:e?a.offBlack64:a.offBlack,":hover:not([aria-disabled=true])":l,"@media not (hover: hover)":{":hover:not([aria-disabled=true])":{borderColor:t?a.red:a.offBlack50,borderWidth:X.width.hairline,paddingLeft:m.medium_16,paddingRight:m.small_12}},":focus-visible:not([aria-disabled=true])":l,":active:not([aria-disabled=true])":i},disabled:{background:a.offWhite,borderColor:a.offBlack16,color:a.offBlack64,cursor:"not-allowed",":focus-visible":{boxShadow:`0 0 0 1px ${a.white}, 0 0 0 3px ${a.offBlack32}`}},pressed:i}}return ct[n]=v.StyleSheet.create(r),ct[n]},Ni=["children","error","id","light","opener","placeholder","selectedValue","testId","alignment","autoFocus","dropdownStyle","enableTypeAhead","isFilterable","labels","onChange","onToggle","opened","style","className","aria-invalid","aria-required"];class pr extends o.Component{constructor(e){super(e),this.selectedIndex=void 0,this.handleOpenChanged=t=>{this.setState({open:t,searchText:""}),this.props.onToggle&&this.props.onToggle(t)},this.handleToggle=t=>{t!==this.props.selectedValue&&this.props.onChange(t),this.state.open&&this.state.openerElement&&this.state.openerElement.focus(),this.setState({open:!1}),this.props.onToggle&&this.props.onToggle(!1)},this.mapOptionItemsToDropdownItems=t=>{let n=0;return this.selectedIndex=0,t.map(r=>{const{selectedValue:l}=this.props,{disabled:i,value:c}=r.props,f=l===c;return f&&(this.selectedIndex=n),i||(n+=1),{component:r,focusable:!i,populatedProps:{onToggle:this.handleToggle,selected:f,variant:"check"}}})},this.handleSearchTextChanged=t=>{this.setState({searchText:t})},this.handleOpenerRef=t=>{const n=Ie.findDOMNode(t);this.setState({openerElement:n})},this.handleClick=t=>{this.handleOpenChanged(!this.state.open)},this.selectedIndex=0,this.state={open:!1,searchText:""}}static getDerivedStateFromProps(e,t){return{open:e.disabled?!1:typeof e.opened=="boolean"?e.opened:t.open}}filterChildren(e){const{searchText:t}=this.state,n=t.toLowerCase();return e.filter(({props:r})=>!t||Ae(r).toLowerCase().indexOf(n)>-1)}getMenuItems(e){const{isFilterable:t}=this.props;return this.mapOptionItemsToDropdownItems(t?this.filterChildren(e):e)}renderOpener(e,t){const n=this.props,{children:r,error:l,id:i,light:c,opener:f,placeholder:h,selectedValue:p,testId:b}=n,x=g(n,Ni),I=o.Children.toArray(r).find(S=>S.props.value===p),u=I?Ae(I.props):h;return o.createElement(ke,{id:i,scope:"single-select-opener"},S=>f?o.createElement(Ct,{id:S,"aria-controls":t,"aria-haspopup":"listbox",onClick:this.handleClick,disabled:e,ref:this.handleOpenerRef,text:u,opened:this.state.open},f):o.createElement(Yt,d({},x,{"aria-controls":t,disabled:e,id:S,error:l,isPlaceholder:!I,light:c,onOpenChanged:this.handleOpenChanged,open:this.state.open,ref:this.handleOpenerRef,testId:b}),u))}render(){const{alignment:e,autoFocus:t,children:n,className:r,dropdownStyle:l,enableTypeAhead:i,isFilterable:c,labels:f,light:h,style:p,"aria-invalid":b,"aria-required":x,disabled:C,dropdownId:I}=this.props,{searchText:u}=this.state,y=o.Children.toArray(n).filter(Boolean),S=y.filter(k=>!k.props.disabled).length,$=this.getMenuItems(y),w=S===0||C;return o.createElement(ke,{id:I,scope:"single-select-dropdown"},k=>o.createElement(Zt,{id:k,role:"listbox",selectionType:"single",alignment:e,autoFocus:t,enableTypeAhead:i,dropdownStyle:[c&&ur,cr,l],initialFocusedIndex:this.selectedIndex,items:$,light:h,onOpenChanged:this.handleOpenChanged,open:this.state.open,opener:this.renderOpener(w,k),openerElement:this.state.openerElement,style:p,className:r,isFilterable:c,onSearchTextChanged:c?this.handleSearchTextChanged:void 0,searchText:c?u:"",labels:f,"aria-invalid":b,"aria-required":x,disabled:w}))}}pr.defaultProps={alignment:"left",autoFocus:!0,disabled:!1,enableTypeAhead:!0,error:!1,light:!1,labels:{clearSearch:K.clearSearch,filter:K.filter,noResults:K.noResults,someResults:K.someSelected}};const Hi=["id","light","opener","testId","alignment","dropdownStyle","implicitAllEnabled","isFilterable","labels","onChange","onToggle","opened","selectedValues","shortcuts","style","className","aria-invalid","aria-required"];class mr extends o.Component{constructor(e){super(e),this.labels=void 0,this.handleOpenChanged=t=>{this.setState({open:t,searchText:"",lastSelectedValues:this.props.selectedValues}),this.props.onToggle&&this.props.onToggle(t)},this.handleToggle=t=>{const{onChange:n,selectedValues:r}=this.props;if(r.includes(t)){const l=r.indexOf(t),i=[...r.slice(0,l),...r.slice(l+1)];n(i)}else n([...r,t])},this.handleSelectAll=()=>{const{children:t,onChange:n}=this.props,l=o.Children.toArray(t).filter(i=>!!i&&!i.props.disabled).map(i=>i.props.value);n(l)},this.handleSelectNone=()=>{const{onChange:t}=this.props;t([])},this.mapOptionItemToDropdownItem=t=>{const{selectedValues:n}=this.props,{disabled:r,value:l}=t.props;return{component:t,focusable:!r,populatedProps:{onToggle:this.handleToggle,selected:n.includes(l),variant:"checkbox"}}},this.handleOpenerRef=t=>{const n=Ie.findDOMNode(t);this.setState({openerElement:n})},this.handleSearchTextChanged=t=>{this.setState({searchText:t})},this.handleClick=t=>{this.handleOpenChanged(!this.state.open)},this.state={open:!1,searchText:"",lastSelectedValues:[],labels:d({},K,e.labels)},this.labels=d({},K,e.labels)}static getDerivedStateFromProps(e,t){return{open:e.disabled?!1:typeof e.opened=="boolean"?e.opened:t.open}}componentDidUpdate(e){this.props.labels!==e.labels&&this.setState({labels:d({},this.state.labels,this.props.labels)})}getMenuText(e){const{implicitAllEnabled:t,selectedValues:n}=this.props,{noneSelected:r,someSelected:l,allSelected:i}=this.state.labels,c=e.filter(h=>!h.props.disabled).length,f=t?i:r;switch(n.length){case 0:return f;case 1:const h=e.find(p=>p.props.value===n[0]);if(h){const p=Ae(h==null?void 0:h.props);return p||l(1)}return f;case c:return i;default:return l(n.length)}}getShortcuts(e){const{selectedValues:t,shortcuts:n}=this.props,{selectAllLabel:r,selectNoneLabel:l}=this.state.labels;if(n&&!this.state.searchText){const i=e===t.length,c={component:o.createElement(Fe,{disabled:i,label:r(e),indent:!0,onClick:this.handleSelectAll}),focusable:!i,populatedProps:{}},f=t.length===0,h={component:o.createElement(Fe,{disabled:f,label:l,indent:!0,onClick:this.handleSelectNone}),focusable:!f,populatedProps:{}},p={component:o.createElement(ue,{key:"shortcuts-separator"}),focusable:!1,populatedProps:{}};return[c,h,p]}else return[]}getMenuItems(e){const{isFilterable:t}=this.props;if(!t)return e.map(this.mapOptionItemToDropdownItem);const{searchText:n,lastSelectedValues:r}=this.state,l=n.toLowerCase(),i=e.filter(({props:p})=>!n||Ae(p).toLowerCase().indexOf(l)>-1),c=[],f=[];for(const p of i)r.includes(p.props.value)?c.push(p):f.push(p);const h=c.map(this.mapOptionItemToDropdownItem);return c.length&&f.length&&h.push({component:o.createElement(ue,{key:"selected-separator"}),focusable:!1,populatedProps:{}}),[...h,...f.map(this.mapOptionItemToDropdownItem)]}renderOpener(e,t,n){const r=this.props,{id:l,light:i,opener:c,testId:f}=r,h=g(r,Hi),{noneSelected:p}=this.state.labels,b=this.getMenuText(e);return o.createElement(ke,{id:l,scope:"multi-select-opener"},C=>c?o.createElement(Ct,{id:C,"aria-controls":n,"aria-haspopup":"listbox",onClick:this.handleClick,disabled:t,ref:this.handleOpenerRef,text:b,opened:this.state.open},c):o.createElement(Yt,d({},h,{disabled:t,id:C,"aria-controls":n,isPlaceholder:b===p,light:i,onOpenChanged:this.handleOpenChanged,open:this.state.open,ref:this.handleOpenerRef,testId:f}),b))}render(){const{alignment:e,light:t,style:n,className:r,dropdownStyle:l,children:i,isFilterable:c,"aria-invalid":f,"aria-required":h,disabled:p,dropdownId:b}=this.props,{open:x,searchText:C}=this.state,{clearSearch:I,filter:u,noResults:y,someSelected:S}=this.state.labels,$=o.Children.toArray(i).filter(Boolean),w=$.filter(R=>!R.props.disabled).length,k=this.getMenuItems($),E=w===0||p;return o.createElement(ke,{id:b,scope:"multi-select-dropdown"},R=>o.createElement(Zt,{id:R,role:"listbox",alignment:e,dropdownStyle:[c&&ur,cr,l],isFilterable:c,items:[...this.getShortcuts(w),...k],light:t,onOpenChanged:this.handleOpenChanged,open:x,opener:this.renderOpener($,E,R),openerElement:this.state.openerElement,selectionType:"multi",style:n,className:r,onSearchTextChanged:c?this.handleSearchTextChanged:void 0,searchText:c?C:"",labels:{clearSearch:I,filter:u,noResults:y,someResults:S},"aria-invalid":f,"aria-required":h,disabled:E}))}}mr.defaultProps={alignment:"left",disabled:!1,error:!1,light:!1,shortcuts:!1,selectedValues:[]};v.StyleSheet.create({listbox:{outline:"none"},disabled:{color:a.offBlack64}});const Mi=s=>{const{strings:e}=kr(),t=h=>{const{choices:p,onChange:b}=s;b(p.map(x=>h.includes(x.content)))},n=h=>h.map(({content:p})=>et.jsx(ve,{value:p,label:et.jsx(Rr,{content:p,strings:e,inline:!0})},p)),r=s.choices.filter(h=>h.checked).map(h=>h.content),{opener:l,onToggle:i,disabled:c}=s,f={style:{zIndex:"unset"},children:n(s.choices),opener:l,onToggle:i,disabled:c};return s.multipleSelect?et.jsx(mr,{...f,selectedValues:r,onChange:h=>t(h)}):et.jsx(pr,{...f,selectedValue:r[0],onChange:h=>t([h]),placeholder:s.choices[0].content})};Mi.__docgenInfo={description:"",methods:[],displayName:"AnswerChoices",props:{choices:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ // The answer string, can be plain text or a TeX expression. content: string; // Whether the answer is selected. diff --git a/assets/answer-choices-dMU0zCzM.js b/assets/answer-choices-mpHXtu7D.js similarity index 96% rename from assets/answer-choices-dMU0zCzM.js rename to assets/answer-choices-mpHXtu7D.js index 903a26ea7c..b80fa62943 100644 --- a/assets/answer-choices-dMU0zCzM.js +++ b/assets/answer-choices-mpHXtu7D.js @@ -1,3 +1,3 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{b as v}from"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import{c as C}from"./components-ODdjt0Ld.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{l as t}from"./index-awljIyHI.js";import{F as I}from"./form-wrapped-text-field-NbyiOLVb.js";import{r as x}from"./index-6oxdNXpR.js";import{a as S}from"./global-colors-VIVU4Od4.js";const R="javascript:void(0)",y=class y extends x.Component{render(){const{children:a,className:i,highlighted:n,href:c,inlineStyles:j,referrer:d,style:p,target:h,testId:q,element:f,...g}=this.props,[A,w]=c?c.split("#"):[R];let o=A;d&&(o.indexOf("?")>-1?o+="&ref="+d:o+="?ref="+d),w&&(o+="#"+w);const m=[T.link,n&&T.highlighted];Array.isArray(p)?m.push(...p):m.push(p);const k=i?" "+i:"",b=f==="a"?{href:o}:{to:o};let u=g.rel;return h==="_blank"&&!u&&(u="noopener noreferrer"),x.createElement(f,{"data-testid":q,...g,...b,className:t.css(...m)+k,style:j,target:h,rel:u},a)}};y.defaultProps={highlighted:!1,href:R,style:[],element:"a"};let l=y;const T=t.StyleSheet.create({link:{backgroundColor:"transparent",color:"inherit",textDecoration:"none",":hover":{textDecoration:"underline"}},highlighted:{textDecoration:"underline"}});l.__docgenInfo={description:"A wrapper that creates an anchor tag with normalized styles",methods:[],displayName:"Link",props:{element:{required:!1,tsType:{name:"ReactElementType",raw:"React.ElementType"},description:"",defaultValue:{value:'"a"',computed:!1}},highlighted:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},href:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"javascript:void(0)"',computed:!1}},style:{required:!1,tsType:{name:"union",raw:"CSSProperties | Array",elements:[{name:"CSSProperties"},{name:"Array",elements:[{name:"CSSProperties"}],raw:"Array"}]},description:"",defaultValue:{value:"[]",computed:!1}},children:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},className:{required:!1,tsType:{name:"string"},description:""},inlineStyles:{required:!1,tsType:{name:"signature",type:"object",raw:`{ +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{b as v}from"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c as C}from"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{l as t}from"./index-awljIyHI.js";import{F as I}from"./form-wrapped-text-field-NbyiOLVb.js";import{r as x}from"./index-6oxdNXpR.js";import{a as S}from"./global-colors-VIVU4Od4.js";const R="javascript:void(0)",y=class y extends x.Component{render(){const{children:a,className:i,highlighted:n,href:c,inlineStyles:j,referrer:d,style:p,target:h,testId:q,element:f,...g}=this.props,[A,w]=c?c.split("#"):[R];let o=A;d&&(o.indexOf("?")>-1?o+="&ref="+d:o+="?ref="+d),w&&(o+="#"+w);const m=[T.link,n&&T.highlighted];Array.isArray(p)?m.push(...p):m.push(p);const k=i?" "+i:"",b=f==="a"?{href:o}:{to:o};let u=g.rel;return h==="_blank"&&!u&&(u="noopener noreferrer"),x.createElement(f,{"data-testid":q,...g,...b,className:t.css(...m)+k,style:j,target:h,rel:u},a)}};y.defaultProps={highlighted:!1,href:R,style:[],element:"a"};let l=y;const T=t.StyleSheet.create({link:{backgroundColor:"transparent",color:"inherit",textDecoration:"none",":hover":{textDecoration:"underline"}},highlighted:{textDecoration:"underline"}});l.__docgenInfo={description:"A wrapper that creates an anchor tag with normalized styles",methods:[],displayName:"Link",props:{element:{required:!1,tsType:{name:"ReactElementType",raw:"React.ElementType"},description:"",defaultValue:{value:'"a"',computed:!1}},highlighted:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},href:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"javascript:void(0)"',computed:!1}},style:{required:!1,tsType:{name:"union",raw:"CSSProperties | Array",elements:[{name:"CSSProperties"},{name:"Array",elements:[{name:"CSSProperties"}],raw:"Array"}]},description:"",defaultValue:{value:"[]",computed:!1}},children:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},className:{required:!1,tsType:{name:"string"},description:""},inlineStyles:{required:!1,tsType:{name:"signature",type:"object",raw:`{ [key: string]: any; }`,signature:{properties:[{key:{name:"string"},value:{name:"any",required:!0}}]}},description:""},referrer:{required:!1,tsType:{name:"string"},description:""},target:{required:!1,tsType:{name:"string"},description:""},rel:{required:!1,tsType:{name:"string"},description:""},testId:{required:!1,tsType:{name:"string"},description:""},onClick:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.MouseEvent) => unknown",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent"},name:"e"}],return:{name:"unknown"}}},description:""},onMouseOver:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.MouseEvent) => unknown",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent"},name:"e"}],return:{name:"unknown"}}},description:""},onMouseLeave:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.MouseEvent) => unknown",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent"},name:"e"}],return:{name:"unknown"}}},description:""},onMouseEnter:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.MouseEvent) => unknown",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent"},name:"e"}],return:{name:"unknown"}}},description:""},onBlur:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.SyntheticEvent) => unknown",signature:{arguments:[{type:{name:"ReactSyntheticEvent",raw:"React.SyntheticEvent"},name:"e"}],return:{name:"unknown"}}},description:""},onFocus:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.SyntheticEvent) => unknown",signature:{arguments:[{type:{name:"ReactSyntheticEvent",raw:"React.SyntheticEvent"},name:"e"}],return:{name:"unknown"}}},description:""},onKeyDown:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.KeyboardEvent) => unknown",signature:{arguments:[{type:{name:"ReactKeyboardEvent",raw:"React.KeyboardEvent"},name:"e"}],return:{name:"unknown"}}},description:""},"aria-label":{required:!1,tsType:{name:"string"},description:""},"aria-selected":{required:!1,tsType:{name:"boolean"},description:""},"aria-current":{required:!1,tsType:{name:"boolean"},description:""},role:{required:!1,tsType:{name:"literal",value:'"tab"'},description:""},title:{required:!1,tsType:{name:"string"},description:""},id:{required:!1,tsType:{name:"string"},description:""},tabIndex:{required:!1,tsType:{name:"number"},description:""}}};const{Icon:E}=C,M={path:"M11 11V7a1 1 0 0 1 2 0v4h4a1 1 0 0 1 0 2h-4v4a1 1 0 0 1-2 0v-4H7a1 1 0 0 1 0-2h4zm1 13C5.373 24 0 18.627 0 12S5.373 0 12 0s12 5.373 12 12-5.373 12-12 12zm0-2c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z",width:24,height:24},N={path:"M12 24C5.373 24 0 18.627 0 12S5.373 0 12 0s12 5.373 12 12-5.373 12-12 12zm0-2c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10zm-5-9a1 1 0 0 1 0-2h10a1 1 0 0 1 0 2H7z",width:24,height:24},z=()=>e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",children:[e.jsxs("filter",{id:"draggable-grip-shadow",width:"112.5%",height:"116.7%",x:"-6.2%",y:"-8.3%",filterUnits:"objectBoundingBox",children:[e.jsx("feGaussianBlur",{in:"SourceAlpha",stdDeviation:".5",result:"shadowBlurInner"}),e.jsx("feOffset",{in:"shadowBlurInner",dy:"1",result:"shadowOffsetInner"}),e.jsx("feComposite",{in:"shadowOffsetInner",in2:"SourceAlpha",k2:"-1",k3:"1",operator:"arithmetic",result:"shadowInnerInner"}),e.jsx("feColorMatrix",{in:"shadowInnerInner",values:"0 0 0 0 0.129411765 0 0 0 0 0.141176471 0 0 0 0 0.17254902 0 0 0 0.2 0"})]}),e.jsx("path",{d:"M1 4a1 1 0 1 1 0-2h14a1 1 0 0 1 0 2H1zm0 10a1 1 0 0 1 0-2h14a1 1 0 0 1 0 2H1zm0-5a1 1 0 1 1 0-2h14a1 1 0 0 1 0 2H1z",fill:S,filter:"url(#draggable-grip-shadow)"})]}),B=({onClick:r})=>e.jsxs(l,{className:t.css(s.addAnswer,H.addAnswer),onClick:r,children:[e.jsx(E,{icon:M,size:24}),e.jsx("div",{className:t.css(s.spacer)}),"Add an answer choice"]}),D=({answer:r,onChange:a,onRemove:i})=>e.jsxs("li",{className:t.css(s.answer),children:[e.jsx(l,{onClick:i,children:e.jsx(E,{icon:N,size:24,color:"#D92916"})}),e.jsx("div",{className:t.css(s.spacer)}),e.jsx(I,{grow:1,onChange:n=>a(n.target.value),value:r}),e.jsx("div",{className:t.css(s.spacer)}),e.jsx(l,{style:[s.disabled],title:"Answer reordering is not implemented.",children:e.jsx(z,{})})]}),P=({choices:r,onChange:a})=>e.jsxs("div",{children:[e.jsx("div",{className:t.css(s.title),children:"Answer Choices"}),e.jsx("ul",{className:t.css(s.answers),children:r.map((i,n)=>e.jsx(D,{answer:i,onChange:c=>a([...r.slice(0,n),c,...r.slice(n+1)]),onRemove:()=>a([...r.slice(0,n),...r.slice(n+1)])},n))}),e.jsx(B,{onClick:()=>a([...r,""])})]}),s=t.StyleSheet.create({title:{...v,marginBottom:6,color:S},answers:{marginTop:12,marginBottom:12},answer:{display:"flex",flexDirection:"row",alignItems:"center",":not(:first-child)":{marginTop:12}},addAnswer:{...v,display:"flex",flexDirection:"row",alignItems:"center",color:"#1865f2"},spacer:{width:16},disabled:{cursor:"not-allowed"}}),H=t.StyleSheet.create({addAnswer:{":link":{color:"#1865f2"}}});P.__docgenInfo={description:"The list of choices, handles adding, removing and reording of answers.",methods:[],displayName:"AnswerChoices",props:{choices:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(choices: ReadonlyArray) => void",signature:{arguments:[{type:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},name:"choices"}],return:{name:"void"}}},description:""}}};export{P as A}; diff --git a/assets/answer-choices.stories-RzMHcXTB.js b/assets/answer-choices.stories-1tLchOs7.js similarity index 93% rename from assets/answer-choices.stories-RzMHcXTB.js rename to assets/answer-choices.stories-1tLchOs7.js index 1e05ba6dfe..f5d1175727 100644 --- a/assets/answer-choices.stories-RzMHcXTB.js +++ b/assets/answer-choices.stories-1tLchOs7.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-63Ea5SlK.js";import{L as k}from"./index-18qWGOW7.js";import{r as a}from"./index-6oxdNXpR.js";import{A as C}from"./answer-choices-lVeJkx-U.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-i1pBWAmI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-deFLJwr4.js";import"./index-469F30Ub.js";import"./minus-bold-ONmDo3Ve.js";import"./index-9gkyvru-.js";import"./index-f-3iKkZU.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-jxhLXBHb.js";import"./i18n-context-fsWEgybQ.js";import"./renderer-1DxKQj1_.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";const he={title:"Perseus/Widgets/Label Image/Answer Choices"},_=[{content:"Lamborghini",checked:!1},{content:"BMW",checked:!1},{content:"Volkswagen",checked:!1},{content:"Fiat",checked:!1},{content:"$\\displaystyle f(x)=\\frac{1}{x}$",checked:!1},{content:"Porsche",checked:!1},{content:"Ferrari",checked:!1}],h=({multipleSelect:s=!1})=>{const[i,u]=a.useState([..._]),[g,f]=a.useState(!1),S=e=>{u([...i.map((x,j)=>({...x,checked:e[j]}))])};return t.jsxs(t.Fragment,{children:[t.jsx(C,{choices:i,multipleSelect:s,onChange:e=>S(e),opener:()=>t.jsx("button",{children:g?"Close":"Open"}),onToggle:e=>f(e),disabled:!1}),t.jsx(t.Fragment,{children:i.filter(({checked:e})=>e).map(({content:e})=>t.jsx(k,{children:e},e))})]})},r=s=>t.jsx(h,{}),o=s=>t.jsx(h,{multipleSelect:!0});r.__docgenInfo={description:"",methods:[],displayName:"SingleSelect"};o.__docgenInfo={description:"",methods:[],displayName:"MultipleSelect"};var c,m,p;r.parameters={...r.parameters,docs:{...(c=r.parameters)==null?void 0:c.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as t}from"./jsx-runtime-63Ea5SlK.js";import{L as k}from"./index-18qWGOW7.js";import{r as a}from"./index-6oxdNXpR.js";import{A as C}from"./answer-choices-iyIz6W_C.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-i1pBWAmI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-deFLJwr4.js";import"./index-469F30Ub.js";import"./minus-bold-ONmDo3Ve.js";import"./index-9gkyvru-.js";import"./index-f-3iKkZU.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-jxhLXBHb.js";import"./i18n-context-fsWEgybQ.js";import"./renderer-L37a98D_.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";const he={title:"Perseus/Widgets/Label Image/Answer Choices"},_=[{content:"Lamborghini",checked:!1},{content:"BMW",checked:!1},{content:"Volkswagen",checked:!1},{content:"Fiat",checked:!1},{content:"$\\displaystyle f(x)=\\frac{1}{x}$",checked:!1},{content:"Porsche",checked:!1},{content:"Ferrari",checked:!1}],h=({multipleSelect:s=!1})=>{const[i,u]=a.useState([..._]),[g,f]=a.useState(!1),S=e=>{u([...i.map((x,j)=>({...x,checked:e[j]}))])};return t.jsxs(t.Fragment,{children:[t.jsx(C,{choices:i,multipleSelect:s,onChange:e=>S(e),opener:()=>t.jsx("button",{children:g?"Close":"Open"}),onToggle:e=>f(e),disabled:!1}),t.jsx(t.Fragment,{children:i.filter(({checked:e})=>e).map(({content:e})=>t.jsx(k,{children:e},e))})]})},r=s=>t.jsx(h,{}),o=s=>t.jsx(h,{multipleSelect:!0});r.__docgenInfo={description:"",methods:[],displayName:"SingleSelect"};o.__docgenInfo={description:"",methods:[],displayName:"MultipleSelect"};var c,m,p;r.parameters={...r.parameters,docs:{...(c=r.parameters)==null?void 0:c.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(p=(m=r.parameters)==null?void 0:m.docs)==null?void 0:p.source}}};var n,l,d;o.parameters={...o.parameters,docs:{...(n=o.parameters)==null?void 0:n.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/answer-choices.stories-n5jRb_FG.js b/assets/answer-choices.stories-xvppGvOE.js similarity index 83% rename from assets/answer-choices.stories-n5jRb_FG.js rename to assets/answer-choices.stories-xvppGvOE.js index 51f399a874..26fb1a9f08 100644 --- a/assets/answer-choices.stories-n5jRb_FG.js +++ b/assets/answer-choices.stories-xvppGvOE.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-63Ea5SlK.js";import{a as C}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{l as I}from"./index-awljIyHI.js";import{r as y}from"./index-6oxdNXpR.js";import{A as E}from"./answer-choices-dMU0zCzM.js";import"./v4-yQnnJER4.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";const ht={title:"PerseusEditor/Widgets/Label Image/Answer Choices"},S=I.StyleSheet.create({wrapper:{width:338}}),s=t=>o.jsx("div",{className:I.css(S.wrapper),children:o.jsx(E,{...t,onChange:(...r)=>{C("onChange")(...r),t.onChange(...r)}})});class v extends y.Component{constructor(){super(...arguments),this.state={choices:[]}}render(){const{choices:r}=this.state;return o.jsx(s,{choices:r,onChange:m=>this.setState({choices:m})})}}const i=t=>{const r={choices:[],onChange:(...m)=>{}};return o.jsx(s,{...r})},e=t=>{const r={choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],onChange:(...m)=>{}};return o.jsx(s,{...r})},p=t=>o.jsx(v,{});i.__docgenInfo={description:"",methods:[],displayName:"EmptyNonInteractive"};e.__docgenInfo={description:"",methods:[],displayName:"FilledNonInteractive"};p.__docgenInfo={description:"",methods:[],displayName:"Interactive"};var a,n,c;i.parameters={...i.parameters,docs:{...(a=i.parameters)==null?void 0:a.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as o}from"./jsx-runtime-63Ea5SlK.js";import{a as C}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{l as I}from"./index-awljIyHI.js";import{r as y}from"./index-6oxdNXpR.js";import{A as E}from"./answer-choices-mpHXtu7D.js";import"./v4-yQnnJER4.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";const ht={title:"PerseusEditor/Widgets/Label Image/Answer Choices"},S=I.StyleSheet.create({wrapper:{width:338}}),s=t=>o.jsx("div",{className:I.css(S.wrapper),children:o.jsx(E,{...t,onChange:(...r)=>{C("onChange")(...r),t.onChange(...r)}})});class v extends y.Component{constructor(){super(...arguments),this.state={choices:[]}}render(){const{choices:r}=this.state;return o.jsx(s,{choices:r,onChange:m=>this.setState({choices:m})})}}const i=t=>{const r={choices:[],onChange:(...m)=>{}};return o.jsx(s,{...r})},e=t=>{const r={choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],onChange:(...m)=>{}};return o.jsx(s,{...r})},p=t=>o.jsx(v,{});i.__docgenInfo={description:"",methods:[],displayName:"EmptyNonInteractive"};e.__docgenInfo={description:"",methods:[],displayName:"FilledNonInteractive"};p.__docgenInfo={description:"",methods:[],displayName:"Interactive"};var a,n,c;i.parameters={...i.parameters,docs:{...(a=i.parameters)==null?void 0:a.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const props = { choices: [], onChange: (...args) => {} diff --git a/assets/answer-pill-cmLXoo3T.js b/assets/answer-pill-Rz7_ywTY.js similarity index 98% rename from assets/answer-pill-cmLXoo3T.js rename to assets/answer-pill-Rz7_ywTY.js index 691b173d12..dca77f7229 100644 --- a/assets/answer-pill-cmLXoo3T.js +++ b/assets/answer-pill-Rz7_ywTY.js @@ -1 +1 @@ -import{j as k}from"./jsx-runtime-63Ea5SlK.js";import{V as R,u as I}from"./index-0DbkllkJ.js";import{r as d}from"./index-6oxdNXpR.js";import{l as C}from"./index-awljIyHI.js";import{C as E}from"./index-i1pBWAmI.js";import{s as l,c as n,m as P}from"./index-deFLJwr4.js";import{c as T,B as j,b as O}from"./index-18qWGOW7.js";import{c as B}from"./index-Dfd6auV6.js";import{P as L}from"./Popper-Y5KDXl-P.js";import{u as q}from"./i18n-context-fsWEgybQ.js";import{R as $}from"./renderer-1DxKQj1_.js";function w(){return w=Object.assign?Object.assign.bind():function(a){for(var e=1;e=0)&&(t[o]=a[o]);return t}const A=["id","children","kind","size","role","onClick","style","testId","tabIndex"],_=a=>{const{children:e,size:t}=a;return typeof e!="string"?e:t==="small"?d.createElement(T,null,a.children):t==="large"?d.createElement(j,null,e):d.createElement(O,null,e)},M=d.forwardRef(function(e,t){const{id:r,children:o,kind:i="neutral",size:s="medium",role:p,onClick:c,style:u,testId:f,tabIndex:S}=e,g=z(e,A);let m;switch(s){case"small":m=h.wrapperSmall;break;case"large":m=h.wrapperLarge;break;default:m=h.wrapperMedium}const x=W(!!c,i),b=[h.wrapper,x.pill,m];return c?d.createElement(E,w({id:r,role:p,onClick:c,style:[b,x.clickableWrapper,u],testId:f,ref:t,tabIndex:S},g),()=>d.createElement(_,{size:s},o)):d.createElement(R,w({id:r,role:p,style:[b,u],testId:f,ref:t},g),d.createElement(_,{size:s},o))}),h=C.StyleSheet.create({wrapper:{display:"inline-flex",width:"fit-content"},wrapperSmall:{paddingLeft:l.xSmall_8,paddingRight:l.xSmall_8,borderRadius:l.xxSmall_6,height:20},wrapperMedium:{paddingLeft:l.xSmall_8,paddingRight:l.xSmall_8,borderRadius:l.xxSmall_6,height:l.large_24},wrapperLarge:{paddingLeft:l.small_12,paddingRight:l.small_12,paddingTop:l.xxSmall_6,paddingBottom:l.xxSmall_6,borderRadius:l.large_24,height:l.xLarge_32}}),y={},W=(a,e)=>{const t=`${e}-${a.toString()}`;if(y[t])return y[t];let r;switch(e){case"accent":r=n.blue;break;case"info":r=n.fadedBlue16;break;case"success":r=n.fadedGreen16;break;case"warning":r=n.fadedGold16;break;case"critical":r=n.fadedRed16;break;case"transparent":r="transparent";break;case"neutral":default:r=n.offBlack8}const o=e==="neutral"||e==="transparent"?n.offBlack16:P(n.offBlack32,r),i=e==="accent"?n.white:n.offBlack,s=e==="critical"?n.red:n.blue,p=e==="critical"?n.activeRed:n.activeBlue,c=e==="transparent"?`1px solid ${n.offBlack16}`:"none",u={pill:{backgroundColor:r,outline:c,color:i,alignItems:"center",justifyContent:"center"},clickableWrapper:{outline:c,":hover":{outline:`2px solid ${s}`,outlineOffset:l.xxxxSmall_2},":active":{backgroundColor:o,outline:`2px solid ${p}`,outlineOffset:l.xxxxSmall_2},":focus-visible":{outline:`2px solid ${s}`,outlineOffset:l.xxxxSmall_2}}};return y[t]=C.StyleSheet.create(u),y[t]},F={boxShadow:`0 8px 8px ${B.offBlack64}`,zIndex:1e3},G=a=>{const{selectedAnswers:e,showCorrectness:t,markerRef:r,side:o,onClick:i,style:s,focused:p,hovered:c}=a,u=I(),{strings:f}=q(),S=e.length>1?f.answers({num:e.length}):e[0],g=t==="correct",m=t==="incorrect";return k.jsx(L,{placement:o,referenceElement:r,modifiers:[{name:"preventOverflow",options:{rootBoundary:"viewport"}}],children:({ref:x,style:b})=>k.jsx(M,{size:"large",kind:"accent",id:u.get("perseus-label-image-widget-answer-pill"),onClick:g?void 0:i,ref:x,style:[s,b,v.pill,g&&v.correct,m&&v.incorrect,(p||c)&&F],children:k.jsx($,{content:S,strings:f,inline:!0})})})},v=C.StyleSheet.create({correct:{backgroundColor:"#00880b"},incorrect:{backgroundColor:B.offBlack64},pill:{height:"auto"}});G.__docgenInfo={description:"",methods:[],displayName:"AnswerPill",props:{selectedAnswers:{required:!0,tsType:{name:"unknown"},description:""},showCorrectness:{required:!1,tsType:{name:"union",raw:'"correct" | "incorrect"',elements:[{name:"literal",value:'"correct"'},{name:"literal",value:'"incorrect"'}]},description:""},markerRef:{required:!1,tsType:{name:"HTMLElement"},description:""},side:{required:!0,tsType:{name:"union",raw:'"top" | "bottom" | "left" | "right"',elements:[{name:"literal",value:'"top"'},{name:"literal",value:'"bottom"'},{name:"literal",value:'"left"'},{name:"literal",value:'"right"'}]},description:""},style:{required:!1,tsType:{name:"CSSProperties"},description:""},hovered:{required:!1,tsType:{name:"boolean"},description:""},focused:{required:!1,tsType:{name:"boolean"},description:""},onClick:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""}}};export{G as A}; +import{j as k}from"./jsx-runtime-63Ea5SlK.js";import{V as R,u as I}from"./index-0DbkllkJ.js";import{r as d}from"./index-6oxdNXpR.js";import{l as C}from"./index-awljIyHI.js";import{C as E}from"./index-i1pBWAmI.js";import{s as l,c as n,m as P}from"./index-deFLJwr4.js";import{c as T,B as j,b as O}from"./index-18qWGOW7.js";import{c as B}from"./index-Dfd6auV6.js";import{P as L}from"./Popper-Y5KDXl-P.js";import{u as q}from"./i18n-context-fsWEgybQ.js";import{R as $}from"./renderer-L37a98D_.js";function w(){return w=Object.assign?Object.assign.bind():function(a){for(var e=1;e=0)&&(t[o]=a[o]);return t}const A=["id","children","kind","size","role","onClick","style","testId","tabIndex"],_=a=>{const{children:e,size:t}=a;return typeof e!="string"?e:t==="small"?d.createElement(T,null,a.children):t==="large"?d.createElement(j,null,e):d.createElement(O,null,e)},M=d.forwardRef(function(e,t){const{id:r,children:o,kind:i="neutral",size:s="medium",role:p,onClick:c,style:u,testId:f,tabIndex:S}=e,g=z(e,A);let m;switch(s){case"small":m=h.wrapperSmall;break;case"large":m=h.wrapperLarge;break;default:m=h.wrapperMedium}const x=W(!!c,i),b=[h.wrapper,x.pill,m];return c?d.createElement(E,w({id:r,role:p,onClick:c,style:[b,x.clickableWrapper,u],testId:f,ref:t,tabIndex:S},g),()=>d.createElement(_,{size:s},o)):d.createElement(R,w({id:r,role:p,style:[b,u],testId:f,ref:t},g),d.createElement(_,{size:s},o))}),h=C.StyleSheet.create({wrapper:{display:"inline-flex",width:"fit-content"},wrapperSmall:{paddingLeft:l.xSmall_8,paddingRight:l.xSmall_8,borderRadius:l.xxSmall_6,height:20},wrapperMedium:{paddingLeft:l.xSmall_8,paddingRight:l.xSmall_8,borderRadius:l.xxSmall_6,height:l.large_24},wrapperLarge:{paddingLeft:l.small_12,paddingRight:l.small_12,paddingTop:l.xxSmall_6,paddingBottom:l.xxSmall_6,borderRadius:l.large_24,height:l.xLarge_32}}),y={},W=(a,e)=>{const t=`${e}-${a.toString()}`;if(y[t])return y[t];let r;switch(e){case"accent":r=n.blue;break;case"info":r=n.fadedBlue16;break;case"success":r=n.fadedGreen16;break;case"warning":r=n.fadedGold16;break;case"critical":r=n.fadedRed16;break;case"transparent":r="transparent";break;case"neutral":default:r=n.offBlack8}const o=e==="neutral"||e==="transparent"?n.offBlack16:P(n.offBlack32,r),i=e==="accent"?n.white:n.offBlack,s=e==="critical"?n.red:n.blue,p=e==="critical"?n.activeRed:n.activeBlue,c=e==="transparent"?`1px solid ${n.offBlack16}`:"none",u={pill:{backgroundColor:r,outline:c,color:i,alignItems:"center",justifyContent:"center"},clickableWrapper:{outline:c,":hover":{outline:`2px solid ${s}`,outlineOffset:l.xxxxSmall_2},":active":{backgroundColor:o,outline:`2px solid ${p}`,outlineOffset:l.xxxxSmall_2},":focus-visible":{outline:`2px solid ${s}`,outlineOffset:l.xxxxSmall_2}}};return y[t]=C.StyleSheet.create(u),y[t]},F={boxShadow:`0 8px 8px ${B.offBlack64}`,zIndex:1e3},G=a=>{const{selectedAnswers:e,showCorrectness:t,markerRef:r,side:o,onClick:i,style:s,focused:p,hovered:c}=a,u=I(),{strings:f}=q(),S=e.length>1?f.answers({num:e.length}):e[0],g=t==="correct",m=t==="incorrect";return k.jsx(L,{placement:o,referenceElement:r,modifiers:[{name:"preventOverflow",options:{rootBoundary:"viewport"}}],children:({ref:x,style:b})=>k.jsx(M,{size:"large",kind:"accent",id:u.get("perseus-label-image-widget-answer-pill"),onClick:g?void 0:i,ref:x,style:[s,b,v.pill,g&&v.correct,m&&v.incorrect,(p||c)&&F],children:k.jsx($,{content:S,strings:f,inline:!0})})})},v=C.StyleSheet.create({correct:{backgroundColor:"#00880b"},incorrect:{backgroundColor:B.offBlack64},pill:{height:"auto"}});G.__docgenInfo={description:"",methods:[],displayName:"AnswerPill",props:{selectedAnswers:{required:!0,tsType:{name:"unknown"},description:""},showCorrectness:{required:!1,tsType:{name:"union",raw:'"correct" | "incorrect"',elements:[{name:"literal",value:'"correct"'},{name:"literal",value:'"incorrect"'}]},description:""},markerRef:{required:!1,tsType:{name:"HTMLElement"},description:""},side:{required:!0,tsType:{name:"union",raw:'"top" | "bottom" | "left" | "right"',elements:[{name:"literal",value:'"top"'},{name:"literal",value:'"bottom"'},{name:"literal",value:'"left"'},{name:"literal",value:'"right"'}]},description:""},style:{required:!1,tsType:{name:"CSSProperties"},description:""},hovered:{required:!1,tsType:{name:"boolean"},description:""},focused:{required:!1,tsType:{name:"boolean"},description:""},onClick:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""}}};export{G as A}; diff --git a/assets/answer-pill.stories-ZAAxHCoP.js b/assets/answer-pill.stories-Ro0UeCVJ.js similarity index 92% rename from assets/answer-pill.stories-ZAAxHCoP.js rename to assets/answer-pill.stories-Ro0UeCVJ.js index 11a992927a..43d722e053 100644 --- a/assets/answer-pill.stories-ZAAxHCoP.js +++ b/assets/answer-pill.stories-Ro0UeCVJ.js @@ -1,4 +1,4 @@ -import{j as C}from"./jsx-runtime-63Ea5SlK.js";import{A as t}from"./answer-pill-cmLXoo3T.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./index-i1pBWAmI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-Dfd6auV6.js";import"./Popper-Y5KDXl-P.js";import"./index-9gkyvru-.js";import"./i18n-context-fsWEgybQ.js";import"./renderer-1DxKQj1_.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";const tr={title:"Perseus/Widgets/Label Image/Answer Pill",component:t,render:k=>C.jsx(t,{...k}),argTypes:{showCorrectness:{options:["not answered","correct","incorrect"],control:{type:"radio"}}}},r={args:{id:"1",selectedAnswers:["Answer Pill"],markerRef:null,side:"top",onClick:()=>{}}},e={args:{id:"1",selectedAnswers:["Answer 1","Answer 2"],markerRef:null,side:"top",onClick:()=>{}}},s={args:{id:"1",selectedAnswers:["Right Answer"],showCorrectness:"correct",markerRef:null,side:"top",onClick:()=>{}}},o={args:{id:"1",selectedAnswers:["Wrong Answer"],showCorrectness:"incorrect",markerRef:null,side:"top",onClick:()=>{}}};var n,i,p;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:`{ +import{j as C}from"./jsx-runtime-63Ea5SlK.js";import{A as t}from"./answer-pill-Rz7_ywTY.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./index-i1pBWAmI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-Dfd6auV6.js";import"./Popper-Y5KDXl-P.js";import"./index-9gkyvru-.js";import"./i18n-context-fsWEgybQ.js";import"./renderer-L37a98D_.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";const tr={title:"Perseus/Widgets/Label Image/Answer Pill",component:t,render:k=>C.jsx(t,{...k}),argTypes:{showCorrectness:{options:["not answered","correct","incorrect"],control:{type:"radio"}}}},r={args:{id:"1",selectedAnswers:["Answer Pill"],markerRef:null,side:"top",onClick:()=>{}}},e={args:{id:"1",selectedAnswers:["Answer 1","Answer 2"],markerRef:null,side:"top",onClick:()=>{}}},s={args:{id:"1",selectedAnswers:["Right Answer"],showCorrectness:"correct",markerRef:null,side:"top",onClick:()=>{}}},o={args:{id:"1",selectedAnswers:["Wrong Answer"],showCorrectness:"incorrect",markerRef:null,side:"top",onClick:()=>{}}};var n,i,p;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:`{ args: { id: "1", selectedAnswers: ["Answer Pill"], diff --git a/assets/article-editor-orbYQOKG.js b/assets/article-editor-4hdZsISp.js similarity index 99% rename from assets/article-editor-orbYQOKG.js rename to assets/article-editor-4hdZsISp.js index c16be5fcb5..79f2514fe1 100644 --- a/assets/article-editor-orbYQOKG.js +++ b/assets/article-editor-4hdZsISp.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-mU-6RWLp.js";import{_ as i}from"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import{P as d,E as y}from"./perseus-error-l3K_anoI.js";import"./dependencies-CP7Uh8Kq.js";import{A as m}from"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import{c}from"./components-ODdjt0Ld.js";import{i as b}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{r as v}from"./index-6oxdNXpR.js";import{D as w}from"./device-framer-MUDr0WgQ.js";import{I as f,J as k}from"./register-all-widgets-and-editors-for-testing-HGbBhRa9.js";import{S as s}from"./section-control-button-qbKF8qYC.js";import{E as q}from"./editor-Mb85oHy5.js";import{i as h,a as R,b as T}from"./icon-paths-EoBkHOLI.js";const{HUD:A,InlineIcon:j}=c,l=class l extends v.Component{constructor(){super(...arguments),this.state={highlightLint:!0},this._handleJsonChange=t=>{this.props.onChange({json:t})},this._handleEditorChange=(t,e)=>{const n=i.clone(this._sections());n[t]=i.extend({},n[t],e),this.props.onChange({json:n})}}componentDidMount(){this._updatePreviewFrames()}componentDidUpdate(){this._updatePreviewFrames()}_updatePreviewFrames(){this.props.mode==="preview"?this.refs["frame-all"].sendNewData({type:"article-all",data:this._sections().map((t,e)=>this._apiOptionsForSection(t,e))}):this.props.mode==="edit"&&this._sections().forEach((t,e)=>{this.refs["frame-"+e].sendNewData({type:"article",data:this._apiOptionsForSection(t,e)})})}_apiOptionsForSection(t,e){const n=this.refs[`editor${e}`];return{apiOptions:{...m.defaults,...this.props.apiOptions,showAlignmentOptions:!0,isArticle:!0},json:t,useNewStyles:this.props.useNewStyles,linterContext:{contentType:"article",highlightLint:this.state.highlightLint,paths:this.props.contentPaths},legacyPerseusLint:n?n.getSaveWarnings():[]}}_sections(){return Array.isArray(this.props.json)?this.props.json:[this.props.json]}_renderEditor(){const{imageUploader:t,sectionImageUploadGenerator:e}=this.props,n={...m.defaults,...this.props.apiOptions,showAlignmentOptions:!0,isArticle:!0},u=this._sections();return r.jsxs("div",{className:"perseus-editor-table",children:[u.map((g,a)=>[r.jsxs("div",{className:"perseus-editor-row",children:[r.jsxs("div",{className:"perseus-editor-left-cell",children:[r.jsxs("div",{className:"pod-title",children:["Section ",a+1,r.jsxs("div",{style:{display:"inline-block",float:"right"},children:[e(a),r.jsx(s,{icon:h,onClick:()=>{this._handleAddSectionAfter(a)},title:"Add a new section after this one"}),a+1{this._handleMoveSectionLater(a)},title:"Move this section down"}),a>0&&r.jsx(s,{icon:T,onClick:()=>{this._handleMoveSectionEarlier(a)},title:"Move this section up"}),r.jsx(s,{icon:b,onClick:()=>{const p="Are you sure you want to delete section "+(a+1)+"?";confirm(p)&&this._handleRemoveSection(a)},title:"Delete this section"})]})]}),r.jsx(q,{...g,apiOptions:n,imageUploader:t,onChange:i.partial(this._handleEditorChange,a),placeholder:"Type your section text here...",ref:"editor"+a})]}),r.jsx("div",{className:"editor-preview",children:this._renderIframePreview(a,!0)})]},a)]),this._renderAddSection(),this._renderLinterHUD()]})}_renderAddSection(){return r.jsx("div",{className:"perseus-editor-row",children:r.jsx("div",{className:"perseus-editor-left-cell",children:r.jsxs("a",{href:"#",className:"simple-button orange",onClick:()=>{this._handleAddSectionAfter(this._sections().length-1)},children:[r.jsx(j,{...h})," Add a section"]})})})}_renderLinterHUD(){return r.jsx(A,{message:"Style warnings",enabled:this.state.highlightLint,onClick:()=>{this.setState({highlightLint:!this.state.highlightLint})}})}_renderIframePreview(t,e){const n=this.props.screen==="phone"||this.props.screen==="tablet";return r.jsx(w,{deviceType:this.props.screen,nochrome:e,children:r.jsx(f,{ref:"frame-"+t,datasetKey:"mobile",datasetValue:n,seamless:e,url:this.props.previewURL},this.props.screen)})}_renderPreviewMode(){return r.jsx("div",{className:"standalone-preview",children:this._renderIframePreview("all",!1)})}_handleMoveSectionEarlier(t){if(t===0)return;const e=i.clone(this._sections()),n=e[t];e.splice(t,1),e.splice(t-1,0,n),this.props.onChange({json:e})}_handleMoveSectionLater(t){const e=i.clone(this._sections());if(t+1===e.length)return;const n=e[t];e.splice(t,1),e.splice(t+1,0,n),this.props.onChange({json:e})}_handleAddSectionAfter(t){const e=i.clone(this.serialize()),n=t>=0?{widgets:e[t].widgets}:{};e.splice(t+1,0,n),this.props.onChange({json:e})}_handleRemoveSection(t){const e=i.clone(this._sections());e.splice(t,1),this.props.onChange({json:e})}serialize(){if(this.props.mode==="edit")return this._sections().map((t,e)=>this.refs["editor"+e].serialize());if(this.props.mode==="preview"||this.props.mode==="json")return this.props.json;throw new d("Could not serialize; mode "+this.props.mode+" not found",y.Internal)}getSaveWarnings(){if(this.props.mode!=="edit")throw new d("Can only get save warnings in edit mode.",y.NotAllowed);return this._sections().map((t,e)=>this.refs["editor"+e].getSaveWarnings())}render(){return r.jsxs("div",{className:"framework-perseus perseus-article-editor",children:[this.props.mode==="edit"&&this._renderEditor(),this.props.mode==="preview"&&this._renderPreviewMode(),this.props.mode==="json"&&r.jsxs("div",{className:"json-editor",children:[r.jsx("div",{className:"json-editor-warning",children:r.jsx("span",{children:"Warning: Editing in this mode can lead to broken articles!"})}),r.jsx(k,{multiLine:!0,onChange:this._handleJsonChange,value:this.props.json})]})]})}};l.defaultProps={contentPaths:[],json:[{}],mode:"edit",screen:"desktop",sectionImageUploadGenerator:()=>r.jsx("span",{}),useNewStyles:!1};let o=l;o.__docgenInfo={description:"",methods:[{name:"_updatePreviewFrames",docblock:null,modifiers:[],params:[],returns:null},{name:"_apiOptionsForSection",docblock:null,modifiers:[],params:[{name:"section",optional:!1,type:{name:"signature",type:"object",raw:`{ +import{j as r}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-HEYBK15c.js";import{_ as i}from"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import{P as d,E as y}from"./perseus-error-l3K_anoI.js";import"./dependencies-CP7Uh8Kq.js";import{A as m}from"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c}from"./components-ODdjt0Ld.js";import{i as b}from"./icon-paths-5JCXzGsq.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{r as v}from"./index-6oxdNXpR.js";import{D as w}from"./device-framer-MUDr0WgQ.js";import{I as f,J as k}from"./register-all-widgets-and-editors-for-testing-mH_Pw9e8.js";import{S as s}from"./section-control-button-XMME9ave.js";import{E as q}from"./editor-Gp3Qu6_d.js";import{i as h,a as R,b as T}from"./icon-paths-EoBkHOLI.js";const{HUD:A,InlineIcon:j}=c,l=class l extends v.Component{constructor(){super(...arguments),this.state={highlightLint:!0},this._handleJsonChange=t=>{this.props.onChange({json:t})},this._handleEditorChange=(t,e)=>{const n=i.clone(this._sections());n[t]=i.extend({},n[t],e),this.props.onChange({json:n})}}componentDidMount(){this._updatePreviewFrames()}componentDidUpdate(){this._updatePreviewFrames()}_updatePreviewFrames(){this.props.mode==="preview"?this.refs["frame-all"].sendNewData({type:"article-all",data:this._sections().map((t,e)=>this._apiOptionsForSection(t,e))}):this.props.mode==="edit"&&this._sections().forEach((t,e)=>{this.refs["frame-"+e].sendNewData({type:"article",data:this._apiOptionsForSection(t,e)})})}_apiOptionsForSection(t,e){const n=this.refs[`editor${e}`];return{apiOptions:{...m.defaults,...this.props.apiOptions,showAlignmentOptions:!0,isArticle:!0},json:t,useNewStyles:this.props.useNewStyles,linterContext:{contentType:"article",highlightLint:this.state.highlightLint,paths:this.props.contentPaths},legacyPerseusLint:n?n.getSaveWarnings():[]}}_sections(){return Array.isArray(this.props.json)?this.props.json:[this.props.json]}_renderEditor(){const{imageUploader:t,sectionImageUploadGenerator:e}=this.props,n={...m.defaults,...this.props.apiOptions,showAlignmentOptions:!0,isArticle:!0},u=this._sections();return r.jsxs("div",{className:"perseus-editor-table",children:[u.map((g,a)=>[r.jsxs("div",{className:"perseus-editor-row",children:[r.jsxs("div",{className:"perseus-editor-left-cell",children:[r.jsxs("div",{className:"pod-title",children:["Section ",a+1,r.jsxs("div",{style:{display:"inline-block",float:"right"},children:[e(a),r.jsx(s,{icon:h,onClick:()=>{this._handleAddSectionAfter(a)},title:"Add a new section after this one"}),a+1{this._handleMoveSectionLater(a)},title:"Move this section down"}),a>0&&r.jsx(s,{icon:T,onClick:()=>{this._handleMoveSectionEarlier(a)},title:"Move this section up"}),r.jsx(s,{icon:b,onClick:()=>{const p="Are you sure you want to delete section "+(a+1)+"?";confirm(p)&&this._handleRemoveSection(a)},title:"Delete this section"})]})]}),r.jsx(q,{...g,apiOptions:n,imageUploader:t,onChange:i.partial(this._handleEditorChange,a),placeholder:"Type your section text here...",ref:"editor"+a})]}),r.jsx("div",{className:"editor-preview",children:this._renderIframePreview(a,!0)})]},a)]),this._renderAddSection(),this._renderLinterHUD()]})}_renderAddSection(){return r.jsx("div",{className:"perseus-editor-row",children:r.jsx("div",{className:"perseus-editor-left-cell",children:r.jsxs("a",{href:"#",className:"simple-button orange",onClick:()=>{this._handleAddSectionAfter(this._sections().length-1)},children:[r.jsx(j,{...h})," Add a section"]})})})}_renderLinterHUD(){return r.jsx(A,{message:"Style warnings",enabled:this.state.highlightLint,onClick:()=>{this.setState({highlightLint:!this.state.highlightLint})}})}_renderIframePreview(t,e){const n=this.props.screen==="phone"||this.props.screen==="tablet";return r.jsx(w,{deviceType:this.props.screen,nochrome:e,children:r.jsx(f,{ref:"frame-"+t,datasetKey:"mobile",datasetValue:n,seamless:e,url:this.props.previewURL},this.props.screen)})}_renderPreviewMode(){return r.jsx("div",{className:"standalone-preview",children:this._renderIframePreview("all",!1)})}_handleMoveSectionEarlier(t){if(t===0)return;const e=i.clone(this._sections()),n=e[t];e.splice(t,1),e.splice(t-1,0,n),this.props.onChange({json:e})}_handleMoveSectionLater(t){const e=i.clone(this._sections());if(t+1===e.length)return;const n=e[t];e.splice(t,1),e.splice(t+1,0,n),this.props.onChange({json:e})}_handleAddSectionAfter(t){const e=i.clone(this.serialize()),n=t>=0?{widgets:e[t].widgets}:{};e.splice(t+1,0,n),this.props.onChange({json:e})}_handleRemoveSection(t){const e=i.clone(this._sections());e.splice(t,1),this.props.onChange({json:e})}serialize(){if(this.props.mode==="edit")return this._sections().map((t,e)=>this.refs["editor"+e].serialize());if(this.props.mode==="preview"||this.props.mode==="json")return this.props.json;throw new d("Could not serialize; mode "+this.props.mode+" not found",y.Internal)}getSaveWarnings(){if(this.props.mode!=="edit")throw new d("Can only get save warnings in edit mode.",y.NotAllowed);return this._sections().map((t,e)=>this.refs["editor"+e].getSaveWarnings())}render(){return r.jsxs("div",{className:"framework-perseus perseus-article-editor",children:[this.props.mode==="edit"&&this._renderEditor(),this.props.mode==="preview"&&this._renderPreviewMode(),this.props.mode==="json"&&r.jsxs("div",{className:"json-editor",children:[r.jsx("div",{className:"json-editor-warning",children:r.jsx("span",{children:"Warning: Editing in this mode can lead to broken articles!"})}),r.jsx(k,{multiLine:!0,onChange:this._handleJsonChange,value:this.props.json})]})]})}};l.defaultProps={contentPaths:[],json:[{}],mode:"edit",screen:"desktop",sectionImageUploadGenerator:()=>r.jsx("span",{}),useNewStyles:!1};let o=l;o.__docgenInfo={description:"",methods:[{name:"_updatePreviewFrames",docblock:null,modifiers:[],params:[],returns:null},{name:"_apiOptionsForSection",docblock:null,modifiers:[],params:[{name:"section",optional:!1,type:{name:"signature",type:"object",raw:`{ content?: string; widgets?: any; images?: any; diff --git a/assets/article-editor.stories--sedAQAw.js b/assets/article-editor.stories-U-66FcoM.js similarity index 59% rename from assets/article-editor.stories--sedAQAw.js rename to assets/article-editor.stories-U-66FcoM.js index 4eddfab4fa..b66adc5138 100644 --- a/assets/article-editor.stories--sedAQAw.js +++ b/assets/article-editor.stories-U-66FcoM.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import{A as d}from"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{r as i}from"./index-6oxdNXpR.js";import{A as u}from"./article-editor-orbYQOKG.js";import{r as f}from"./register-all-widgets-and-editors-for-testing-HGbBhRa9.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-18qWGOW7.js";import"./index-dnMhQZ-1.js";import"./perseus-error-l3K_anoI.js";import"./index-Dfd6auV6.js";import"./input-with-examples-YO5BCgg1.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./icon-paths-5JCXzGsq.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./Popper-Y5KDXl-P.js";import"./answer-choices-lVeJkx-U.js";import"./index-469F30Ub.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./asset-context-H6Iqp7Gi.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./fixed-to-responsive-for_tVF1.js";import"./video-transcript-link-_gpkjmR8.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-qMhJW4bS.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./choice-none-above-dRu7sfJj.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./components-ODdjt0Ld.js";import"./device-framer-MUDr0WgQ.js";import"./constants-p_UgHLsb.js";import"./section-control-button-qbKF8qYC.js";import"./index-wzSCRJFK.js";import"./editor-Mb85oHy5.js";import"./icon-paths-EoBkHOLI.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";import"./graph-settings-XR_siz2q.js";import"./index-0C4KXdeC.js";import"./categorizer-editor-d30-cizN.js";import"./editor-jsonify-g-bIiSIM.js";import"./blur-input-6j4bgLwx.js";import"./definition-editor-_ZvvsZ3f.js";import"./dropdown-editor-ueJJ3t0p.js";import"./explanation-editor-mExrX7IC.js";import"./expression-editor-2aE8aBV7.js";import"./image-editor-npChmNVJ.js";import"./input-number-editor-97qMf_gS.js";import"./interaction-editor-2twq2tps.js";import"./interactive-graph-editor-V9iZpszK.js";import"./heading-1izW0-GJ.js";import"./interactive-graph-settings-fIfU8SU6.js";import"./locked-figures-section-9mKuroas.js";import"./locked-ellipse-settings-_hRNhR9E.js";import"./locked-figure-aria-wRg9cB39.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-lVE0HwhW.js";import"./color-select-4NqU465A.js";import"./util-x8Ikjhfh.js";import"./line-stroke-select-Kn8DFI_S.js";import"./locked-function-settings--UMM0ipk.js";import"./line-swatch-qqHDCIz5.js";import"./locked-line-settings-0UTK3Vo6.js";import"./locked-point-settings-HQeaTYKF.js";import"./labeled-switch-7da7Bmzh.js";import"./locked-polygon-settings-1jqOktRr.js";import"./locked-vector-settings-1A9eQa19.js";import"./label-image-editor-1k_zX52x.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-dMU0zCzM.js";import"./behavior-kOGaXMua.js";import"./question-markers-VcHdxP49.js";import"./marker-qF2kRuTF.js";import"./select-image--icrHv9d.js";import"./matcher-editor-rnK8ooee.js";import"./number-line-editor-KKCgA0P-.js";import"./numeric-input-editor-sonkoQhn.js";import"./phet-simulation-editor-33ykehAu.js";import"./python-program-editor-0ms7DDAR.js";import"./editor-k9_TKmQw.js";import"./sorter-editor-MkK3kay8.js";f();const oo={title:"PerseusEditor/ArticleEditor"},r=()=>{const[s,n]=i.useState(),o=i.useRef();function a(c){n(c.json)}function l(){console.log(o.current.serialize())}return t.jsxs(t.Fragment,{children:[t.jsx("button",{onClick:l,children:"Serialize"}),t.jsx("hr",{}),t.jsx(u,{apiOptions:d.defaults,imageUploader:()=>{},json:s,onChange:a,previewURL:"/perseus/frame",ref:o})]})};r.__docgenInfo={description:"",methods:[],displayName:"Base"};var p,m,e;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`(): React.ReactElement => { +import{j as t}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import{A as d}from"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{r as i}from"./index-6oxdNXpR.js";import{A as u}from"./article-editor-4hdZsISp.js";import{r as f}from"./register-all-widgets-and-editors-for-testing-mH_Pw9e8.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-18qWGOW7.js";import"./index-dnMhQZ-1.js";import"./perseus-error-l3K_anoI.js";import"./index-Dfd6auV6.js";import"./input-with-examples-PaWkADGr.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./icon-paths-5JCXzGsq.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./Popper-Y5KDXl-P.js";import"./answer-choices-iyIz6W_C.js";import"./index-469F30Ub.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./asset-context-H6Iqp7Gi.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./fixed-to-responsive-for_tVF1.js";import"./video-transcript-link-_gpkjmR8.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-qMhJW4bS.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./choice-none-above-vDwffTnk.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./components-ODdjt0Ld.js";import"./device-framer-MUDr0WgQ.js";import"./constants-p_UgHLsb.js";import"./section-control-button-XMME9ave.js";import"./index-wzSCRJFK.js";import"./editor-Gp3Qu6_d.js";import"./icon-paths-EoBkHOLI.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";import"./graph-settings-Pvhg8t7C.js";import"./index-k-0mNqHS.js";import"./categorizer-editor-Ux-cs6do.js";import"./editor-jsonify-mta12v4L.js";import"./blur-input-6j4bgLwx.js";import"./definition-editor-j1sWsdkj.js";import"./dropdown-editor-BFRSuUKm.js";import"./explanation-editor-dSBU1vwr.js";import"./expression-editor-UY7aPIQ1.js";import"./image-editor-vZOaSvdJ.js";import"./input-number-editor-Zo4idrK9.js";import"./interaction-editor-vi9RcfEM.js";import"./interactive-graph-editor-QsKBcTl_.js";import"./heading-1izW0-GJ.js";import"./interactive-graph-settings-o74Mjg6d.js";import"./locked-figures-section-w9TBjDc-.js";import"./locked-ellipse-settings-Y_UkseIl.js";import"./locked-figure-aria-1k3pfy3U.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-CnylHQl6.js";import"./color-select-javI8CkK.js";import"./util-ZotWJxjO.js";import"./line-stroke-select-H15MLZYg.js";import"./locked-function-settings-FK0x4ZxG.js";import"./line-swatch-9TD4hiwz.js";import"./locked-line-settings-JSySSneX.js";import"./locked-point-settings-q-YHpFjG.js";import"./labeled-switch-_gGF8eh_.js";import"./locked-polygon-settings-U6JpAVC_.js";import"./locked-vector-settings-UVt2s9by.js";import"./label-image-editor-p_uxNi67.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-mpHXtu7D.js";import"./behavior-XUZDhvN-.js";import"./question-markers-vke3EOoD.js";import"./marker-l6CMdFr_.js";import"./select-image-ajCB5YeG.js";import"./matcher-editor-S8mz5e0T.js";import"./number-line-editor-eS_UHnpw.js";import"./numeric-input-editor-SLlVbwKu.js";import"./phet-simulation-editor-O5PngvYE.js";import"./python-program-editor-2M-li2KT.js";import"./editor-l5TJAcwO.js";import"./sorter-editor-AVkKlgrO.js";f();const oo={title:"PerseusEditor/ArticleEditor"},r=()=>{const[s,n]=i.useState(),o=i.useRef();function a(c){n(c.json)}function l(){console.log(o.current.serialize())}return t.jsxs(t.Fragment,{children:[t.jsx("button",{onClick:l,children:"Serialize"}),t.jsx("hr",{}),t.jsx(u,{apiOptions:d.defaults,imageUploader:()=>{},json:s,onChange:a,previewURL:"/perseus/frame",ref:o})]})};r.__docgenInfo={description:"",methods:[],displayName:"Base"};var p,m,e;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`(): React.ReactElement => { const [state, setState] = useState(); const articleEditorRef = useRef(); function handleChange(value) { diff --git a/assets/article-renderer-mU-6RWLp.js b/assets/article-renderer-HEYBK15c.js similarity index 99% rename from assets/article-renderer-mU-6RWLp.js rename to assets/article-renderer-HEYBK15c.js index c7d9614c29..f4ebc53201 100644 --- a/assets/article-renderer-mU-6RWLp.js +++ b/assets/article-renderer-HEYBK15c.js @@ -1,4 +1,4 @@ -import{j as l}from"./jsx-runtime-63Ea5SlK.js";import{p as gr,g as Nr,K as Me,U as z,e as Bn,D as Ko,h as Wa,t as Jo,c as Xo}from"./util-AYeX86gl.js";import{M as Yo}from"./prop-types-d_cUcR3L.js";import"./key-translator-hixns6dh.js";import"./mobile-keypad-Muuas9zV.js";import"./button-assets-ozecF1qE.js";import{K as Qo}from"./enums-x5qaTru7.js";import{l as B,S as $,R as D,P as Ca,D as Zo,m as Kn,t as el,J as rl,p as tl}from"./renderer-1DxKQj1_.js";import{V as S,U as Fi,c as nl,d as al,b as Ui,u as Si,_ as Xt}from"./index-0DbkllkJ.js";import{T as Jn}from"./index-BIPwuHvF.js";import{b as Ia,L as il,a as Mi}from"./index-18qWGOW7.js";import{l as x}from"./index-awljIyHI.js";import{c as Re}from"./index-dnMhQZ-1.js";import{r as v,R as Di}from"./index-6oxdNXpR.js";import{F as V,r as wr}from"./index-9gkyvru-.js";import{_ as g,$ as _}from"./jquery-yG1GhClm.js";import{P,u as Er}from"./i18n-context-fsWEgybQ.js";import{a as Pt,M as sl}from"./math-input-ILg8RrvB.js";import{u as Xn,g as ke,D as ol}from"./dependencies-CP7Uh8Kq.js";import"./version-akiLXZts.js";import{P as Ne,E as ve}from"./perseus-error-l3K_anoI.js";import{P as ll}from"./index-k-0mNqHS.js";import{A as me,C as Le}from"./perseus-api-1-ethIrW.js";import{L as Yn,a as K,r as ul,K as j,s as za,b as xr,I,S as Lr,W as jr,c as dl,d as $t,f as er,v as rr,p as yl,g as ml,h as Vi,i as rt,j as tt,k as Hi,e as gl,n as Q,q as Dt,t as Na,u as Oe,w as Ea,x as hl,y as La,z as pl,G as qr,A as _a,C as cl,B as Qn}from"./svg-image-7aOK05RI.js";import{s as tr,c as H,f as bl}from"./index-Dfd6auV6.js";import{I as Gi}from"./input-with-examples-YO5BCgg1.js";import{S as _r}from"./simple-keypad-input-7tb5_po1.js";import{B as vl}from"./base-radio-9_hKye4B.js";import{I as nr}from"./inline-icon-6fh0Wu1y.js";import{d as wl,e as fl,f as kl,g as ql,h as Tl,j as Al}from"./icon-paths-5JCXzGsq.js";import{m as Yt}from"./media-queries-gbofTbz-.js";import{s as Pa}from"./shared-4TdECMLk.js";import{u as Rl,n as De,s as ze,g as nt,v as Bi,e as Ol,i as Ki}from"./constants-iPV6vHZm.js";import{g as Ge,B as xl,a as jl}from"./phet-simulation-_7qOO4_B.js";import{C as Zn}from"./index-CyYhwSUV.js";import{P as Wl,a as Cl}from"./index-zFNZn_u0.js";import{O as $a,S as Il,A as zl}from"./answer-choices-lVeJkx-U.js";import{B as de}from"./choice-Xr-SKHrB.js";import{B as Nl}from"./button-group-G5CZaedn.js";import{c as ea}from"./asset-context-H6Iqp7Gi.js";import{c as Fr,g as El}from"./_commonjsHelpers-4gQjN7DL.js";import{G as Ll}from"./graph-QfZUzUyx.js";import{w as _e}from"./index-J2t_5nK1.js";import{v as R,C as _l,E as Pl,P as at,a as it,L as Fa,b as Qt,T as $l,u as Fl,c as Ji,d as Ul,M as Ua}from"./index-smZ6iCr_.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./multi-button-group-QUVHbBcE.js";import{N as Xi}from"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import{T as Sl}from"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import{i as re}from"./tiny-invariant-bHgPayXn.js";import{m as Ml,c as Dl,u as Vl,a as Hl,T as Gl}from"./index-f-3iKkZU.js";import{c as U,s as Je,b as Bl}from"./index-deFLJwr4.js";import{M as Kl}from"./marker-0QGNq-GT.js";import{S as Zt}from"./sortable-k81KAG9U.js";import{F as Jl}from"./fixed-to-responsive-for_tVF1.js";import{V as Xl}from"./video-transcript-link-_gpkjmR8.js";const Yl=["PLUS","MINUS","NEGATIVE","TIMES","DIVIDE","DECIMAL","PERIOD","PERCENT","CDOT","EQUAL","NEQ","GT","LT","GEQ","LEQ","FRAC_INCLUSIVE","FRAC_EXCLUSIVE","FRAC","EXP","EXP_2","EXP_3","SQRT","CUBE_ROOT","RADICAL","LEFT_PAREN","RIGHT_PAREN","LN","LOG","LOG_N","SIN","COS","TAN","PI","THETA","UP","RIGHT","DOWN","LEFT","BACKSPACE","DISMISS","JUMP_OUT_PARENTHESES","JUMP_OUT_EXPONENT","JUMP_OUT_BASE","JUMP_INTO_NUMERATOR","JUMP_OUT_NUMERATOR","JUMP_OUT_DENOMINATOR","NUM_0","NUM_1","NUM_2","NUM_3","NUM_4","NUM_5","NUM_6","NUM_7","NUM_8","NUM_9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Ql=["key","ref","containerSizeClass","widgetId","onChange","problemNum","apiOptions","widgetIsOpen","questionCompleted","findWidgets","onRemove","id","onBlur","onFocus","trackInteraction","keypadElement"],Zl=`Usage: +import{j as l}from"./jsx-runtime-63Ea5SlK.js";import{p as gr,g as Nr,K as Me,U as z,e as Bn,D as Ko,h as Wa,t as Jo,c as Xo}from"./util-AYeX86gl.js";import{M as Yo}from"./prop-types-d_cUcR3L.js";import"./key-translator-hixns6dh.js";import"./mobile-keypad-Muuas9zV.js";import"./button-assets-ozecF1qE.js";import{K as Qo}from"./enums-x5qaTru7.js";import{l as B,S as $,R as D,P as Ca,D as Zo,m as Kn,t as el,J as rl,p as tl}from"./renderer-L37a98D_.js";import{V as S,U as Fi,c as nl,d as al,b as Ui,u as Si,_ as Xt}from"./index-0DbkllkJ.js";import{T as Jn}from"./index-BIPwuHvF.js";import{b as Ia,L as il,a as Mi}from"./index-18qWGOW7.js";import{l as x}from"./index-awljIyHI.js";import{c as Re}from"./index-dnMhQZ-1.js";import{r as v,R as Di}from"./index-6oxdNXpR.js";import{F as V,r as wr}from"./index-9gkyvru-.js";import{_ as g,$ as _}from"./jquery-yG1GhClm.js";import{P,u as Er}from"./i18n-context-fsWEgybQ.js";import{a as Pt,M as sl}from"./math-input-ILg8RrvB.js";import{u as Xn,g as ke,D as ol}from"./dependencies-CP7Uh8Kq.js";import"./version-akiLXZts.js";import{P as Ne,E as ve}from"./perseus-error-l3K_anoI.js";import{P as ll}from"./index-0C4KXdeC.js";import{A as me,C as Le}from"./perseus-api-1-ethIrW.js";import{L as Yn,a as K,r as ul,K as j,s as za,b as xr,I,S as Lr,W as jr,c as dl,d as $t,f as er,v as rr,p as yl,g as ml,h as Vi,i as rt,j as tt,k as Hi,e as gl,n as Q,q as Dt,t as Na,u as Oe,w as Ea,x as hl,y as La,z as pl,G as qr,A as _a,C as cl,B as Qn}from"./svg-image-7aOK05RI.js";import{s as tr,c as H,f as bl}from"./index-Dfd6auV6.js";import{I as Gi}from"./input-with-examples-PaWkADGr.js";import{S as _r}from"./simple-keypad-input-7tb5_po1.js";import{B as vl}from"./base-radio-kypcKNEK.js";import{I as nr}from"./inline-icon-6fh0Wu1y.js";import{d as wl,e as fl,f as kl,g as ql,h as Tl,j as Al}from"./icon-paths-5JCXzGsq.js";import{m as Yt}from"./media-queries-gbofTbz-.js";import{s as Pa}from"./shared-4TdECMLk.js";import{u as Rl,n as De,s as ze,g as nt,v as Bi,e as Ol,i as Ki}from"./constants-iPV6vHZm.js";import{g as Ge,B as xl,a as jl}from"./phet-simulation-_7qOO4_B.js";import{C as Zn}from"./index-CyYhwSUV.js";import{P as Wl,a as Cl}from"./index-zFNZn_u0.js";import{O as $a,S as Il,A as zl}from"./answer-choices-iyIz6W_C.js";import{B as de}from"./choice-Xr-SKHrB.js";import{B as Nl}from"./button-group-G5CZaedn.js";import{c as ea}from"./asset-context-H6Iqp7Gi.js";import{c as Fr,g as El}from"./_commonjsHelpers-4gQjN7DL.js";import{G as Ll}from"./graph-QfZUzUyx.js";import{w as _e}from"./index-J2t_5nK1.js";import{v as R,C as _l,E as Pl,P as at,a as it,L as Fa,b as Qt,T as $l,u as Fl,c as Ji,d as Ul,M as Ua}from"./index-smZ6iCr_.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./multi-button-group-QUVHbBcE.js";import{N as Xi}from"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import{T as Sl}from"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import{i as re}from"./tiny-invariant-bHgPayXn.js";import{m as Ml,c as Dl,u as Vl,a as Hl,T as Gl}from"./index-f-3iKkZU.js";import{c as U,s as Je,b as Bl}from"./index-deFLJwr4.js";import{M as Kl}from"./marker-ecL5IfPZ.js";import{S as Zt}from"./sortable-SI3cD6Pj.js";import{F as Jl}from"./fixed-to-responsive-for_tVF1.js";import{V as Xl}from"./video-transcript-link-_gpkjmR8.js";const Yl=["PLUS","MINUS","NEGATIVE","TIMES","DIVIDE","DECIMAL","PERIOD","PERCENT","CDOT","EQUAL","NEQ","GT","LT","GEQ","LEQ","FRAC_INCLUSIVE","FRAC_EXCLUSIVE","FRAC","EXP","EXP_2","EXP_3","SQRT","CUBE_ROOT","RADICAL","LEFT_PAREN","RIGHT_PAREN","LN","LOG","LOG_N","SIN","COS","TAN","PI","THETA","UP","RIGHT","DOWN","LEFT","BACKSPACE","DISMISS","JUMP_OUT_PARENTHESES","JUMP_OUT_EXPONENT","JUMP_OUT_BASE","JUMP_INTO_NUMERATOR","JUMP_OUT_NUMERATOR","JUMP_OUT_DENOMINATOR","NUM_0","NUM_1","NUM_2","NUM_3","NUM_4","NUM_5","NUM_6","NUM_7","NUM_8","NUM_9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Ql=["key","ref","containerSizeClass","widgetId","onChange","problemNum","apiOptions","widgetIsOpen","questionCompleted","findWidgets","onRemove","id","onBlur","onFocus","trackInteraction","keypadElement"],Zl=`Usage: this.change({propName: 5}, callback); this.change("propName", 5, callback); this.change("propName")`,Yi=function(r,e,t){const n=g.omit(r.props,Ql),a=g.extend(n,e);r.props.onChange(a,t)},Qi=function(r,e,t,n){if(t===void 0)return g.partial(Qi,r,e);const a={};a[e]=t,Yi(r,a,n)},ee=function(r,e,t){if(g.isObject(r)&&t===void 0)return t=e,Yi(this,r,t);if(typeof r=="string")return Qi(this,r,e,t);throw new Ne("Invalid types sent to this.change(): "+g.toArray(arguments).join()+` @@ -2045,22 +2045,34 @@ rationale or partial correctness.`},{key:"onFocus",value:{name:"signature",type: */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -3512,14 +3524,15 @@ rationale or partial correctness.`},{key:"onFocus",value:{name:"signature",type: major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one @@ -10215,22 +10228,34 @@ rationale or partial correctness.`},{key:"onFocus",value:{name:"signature",type: */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -11682,14 +11707,15 @@ rationale or partial correctness.`},{key:"onFocus",value:{name:"signature",type: major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one @@ -18467,22 +18493,34 @@ rationale or partial correctness.`},{key:"onFocus",value:{name:"signature",type: */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -19934,14 +19972,15 @@ rationale or partial correctness.`},{key:"onFocus",value:{name:"signature",type: major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one @@ -29932,22 +29971,34 @@ rationale or partial correctness.`},{key:"onFocus",value:{name:"signature",type: */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -31399,14 +31450,15 @@ rationale or partial correctness.`},{key:"onFocus",value:{name:"signature",type: major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one @@ -38002,22 +38054,34 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature // NOTE: perseus-format.js says this is required even though it isn't necessary. key?: string; }`,signature:{properties:[{key:"value",value:{name:"string",required:!0}},{key:"form",value:{name:"boolean",required:!0}},{key:"simplify",value:{name:"boolean",required:!0}},{key:"considered",value:{name:"unknown[number]",raw:"(typeof PerseusExpressionAnswerFormConsidered)[number]",required:!0}},{key:"key",value:{name:"string",required:!1}}]}}],raw:"ReadonlyArray",required:!0}},{key:"functions",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!0}}]}},{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -39469,14 +39533,15 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ // Translatable Text; A title to be displayed for the group. title: string; // Not used in Perseus (but is set in (en, pt) production data) @@ -39496,22 +39561,34 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature [key: string]: PerseusImageDetail; }; }`,signature:{properties:[{key:"title",value:{name:"string",required:!0}},{key:"hasHint",value:{name:"union",raw:"boolean | null | undefined",elements:[{name:"boolean"},{name:"null"},{name:"undefined"}],required:!1}},{key:"hint",value:{name:"union",raw:"PerseusRenderer | null | undefined",elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -40963,14 +41040,15 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"null"},{name:"undefined"}],required:!1}},{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"null"},{name:"undefined"}],required:!1}},{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -42452,22 +42530,34 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature [key: string]: PerseusImageDetail; }; }`,signature:{properties:[{key:"title",value:{name:"string",required:!0}},{key:"hasHint",value:{name:"union",raw:"boolean | null | undefined",elements:[{name:"boolean"},{name:"null"},{name:"undefined"}],required:!1}},{key:"hint",value:{name:"union",raw:"PerseusRenderer | null | undefined",elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -43919,14 +44009,15 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"null"},{name:"undefined"}],required:!1}},{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"null"},{name:"undefined"}],required:!1}},{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -45850,22 +45941,34 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature // Use the "horizontal" layout for short text and small images. The "vertical" layout is best for longer text (e.g. proofs). layout: "horizontal" | "vertical"; }`,signature:{properties:[{key:"options",value:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -47317,30 +47420,43 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}}],raw:"ReadonlyArray",required:!0}},{key:"correctOptions",value:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}}],raw:"ReadonlyArray",required:!0}},{key:"correctOptions",value:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -48792,30 +48908,43 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}}],raw:"ReadonlyArray",required:!0}},{key:"otherOptions",value:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}}],raw:"ReadonlyArray",required:!0}},{key:"otherOptions",value:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -50267,14 +50396,15 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}}],raw:"ReadonlyArray",required:!0}},{key:"height",value:{name:"union",raw:'"normal" | "auto"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"auto"'}],required:!0}},{key:"layout",value:{name:"union",raw:'"horizontal" | "vertical"',elements:[{name:"literal",value:'"horizontal"'},{name:"literal",value:'"vertical"'}],required:!0}}]}},{name:"intersection",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}}],raw:"ReadonlyArray",required:!0}},{key:"height",value:{name:"union",raw:'"normal" | "auto"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"auto"'}],required:!0}},{key:"layout",value:{name:"union",raw:'"horizontal" | "vertical"',elements:[{name:"literal",value:'"horizontal"'},{name:"literal",value:'"vertical"'}],required:!0}}]}},{name:"intersection",raw:`{ // The Y values that represent the correct answer expected correct: ReadonlyArray; } & PerseusPlotterValidationData`,elements:[{name:"signature",type:"object",raw:`{ @@ -51823,22 +51953,34 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -53290,14 +53432,15 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one @@ -59963,22 +60106,34 @@ rationale or partial correctness.`},{key:"onFocus",value:{name:"signature",type: */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -61430,14 +61585,15 @@ rationale or partial correctness.`},{key:"onFocus",value:{name:"signature",type: major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one @@ -71017,22 +71173,34 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature // NOTE: perseus-format.js says this is required even though it isn't necessary. key?: string; }`,signature:{properties:[{key:"value",value:{name:"string",required:!0}},{key:"form",value:{name:"boolean",required:!0}},{key:"simplify",value:{name:"boolean",required:!0}},{key:"considered",value:{name:"unknown[number]",raw:"(typeof PerseusExpressionAnswerFormConsidered)[number]",required:!0}},{key:"key",value:{name:"string",required:!1}}]}}],raw:"ReadonlyArray",required:!0}},{key:"functions",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!0}}]}},{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -72484,14 +72652,15 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ // Translatable Text; A title to be displayed for the group. title: string; // Not used in Perseus (but is set in (en, pt) production data) @@ -72511,22 +72680,34 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature [key: string]: PerseusImageDetail; }; }`,signature:{properties:[{key:"title",value:{name:"string",required:!0}},{key:"hasHint",value:{name:"union",raw:"boolean | null | undefined",elements:[{name:"boolean"},{name:"null"},{name:"undefined"}],required:!1}},{key:"hint",value:{name:"union",raw:"PerseusRenderer | null | undefined",elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -73978,14 +74159,15 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"null"},{name:"undefined"}],required:!1}},{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"null"},{name:"undefined"}],required:!1}},{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -75467,22 +75649,34 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature [key: string]: PerseusImageDetail; }; }`,signature:{properties:[{key:"title",value:{name:"string",required:!0}},{key:"hasHint",value:{name:"union",raw:"boolean | null | undefined",elements:[{name:"boolean"},{name:"null"},{name:"undefined"}],required:!1}},{key:"hint",value:{name:"union",raw:"PerseusRenderer | null | undefined",elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -76934,14 +77128,15 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"null"},{name:"undefined"}],required:!1}},{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"null"},{name:"undefined"}],required:!1}},{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -78865,22 +79060,34 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature // Use the "horizontal" layout for short text and small images. The "vertical" layout is best for longer text (e.g. proofs). layout: "horizontal" | "vertical"; }`,signature:{properties:[{key:"options",value:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -80332,30 +80539,43 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}}],raw:"ReadonlyArray",required:!0}},{key:"correctOptions",value:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}}],raw:"ReadonlyArray",required:!0}},{key:"correctOptions",value:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -81807,30 +82027,43 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}}],raw:"ReadonlyArray",required:!0}},{key:"otherOptions",value:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}}],raw:"ReadonlyArray",required:!0}},{key:"otherOptions",value:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -83282,14 +83515,15 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}}],raw:"ReadonlyArray",required:!0}},{key:"height",value:{name:"union",raw:'"normal" | "auto"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"auto"'}],required:!0}},{key:"layout",value:{name:"union",raw:'"horizontal" | "vertical"',elements:[{name:"literal",value:'"horizontal"'},{name:"literal",value:'"vertical"'}],required:!0}}]}},{name:"intersection",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}}],raw:"ReadonlyArray",required:!0}},{key:"height",value:{name:"union",raw:'"normal" | "auto"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"auto"'}],required:!0}},{key:"layout",value:{name:"union",raw:'"horizontal" | "vertical"',elements:[{name:"literal",value:'"horizontal"'},{name:"literal",value:'"vertical"'}],required:!0}}]}},{name:"intersection",raw:`{ // The Y values that represent the correct answer expected correct: ReadonlyArray; } & PerseusPlotterValidationData`,elements:[{name:"signature",type:"object",raw:`{ @@ -84838,22 +85072,34 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -86305,14 +86551,15 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one @@ -92906,22 +93153,34 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature // NOTE: perseus-format.js says this is required even though it isn't necessary. key?: string; }`,signature:{properties:[{key:"value",value:{name:"string",required:!0}},{key:"form",value:{name:"boolean",required:!0}},{key:"simplify",value:{name:"boolean",required:!0}},{key:"considered",value:{name:"unknown[number]",raw:"(typeof PerseusExpressionAnswerFormConsidered)[number]",required:!0}},{key:"key",value:{name:"string",required:!1}}]}}],raw:"ReadonlyArray",required:!0}},{key:"functions",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!0}}]}},{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -94373,14 +94632,15 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ // Translatable Text; A title to be displayed for the group. title: string; // Not used in Perseus (but is set in (en, pt) production data) @@ -94400,22 +94660,34 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature [key: string]: PerseusImageDetail; }; }`,signature:{properties:[{key:"title",value:{name:"string",required:!0}},{key:"hasHint",value:{name:"union",raw:"boolean | null | undefined",elements:[{name:"boolean"},{name:"null"},{name:"undefined"}],required:!1}},{key:"hint",value:{name:"union",raw:"PerseusRenderer | null | undefined",elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -95867,14 +96139,15 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"null"},{name:"undefined"}],required:!1}},{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"null"},{name:"undefined"}],required:!1}},{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -97356,22 +97629,34 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature [key: string]: PerseusImageDetail; }; }`,signature:{properties:[{key:"title",value:{name:"string",required:!0}},{key:"hasHint",value:{name:"union",raw:"boolean | null | undefined",elements:[{name:"boolean"},{name:"null"},{name:"undefined"}],required:!1}},{key:"hint",value:{name:"union",raw:"PerseusRenderer | null | undefined",elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -98823,14 +99108,15 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"null"},{name:"undefined"}],required:!1}},{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"null"},{name:"undefined"}],required:!1}},{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -100754,22 +101040,34 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature // Use the "horizontal" layout for short text and small images. The "vertical" layout is best for longer text (e.g. proofs). layout: "horizontal" | "vertical"; }`,signature:{properties:[{key:"options",value:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -102221,30 +102519,43 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}}],raw:"ReadonlyArray",required:!0}},{key:"correctOptions",value:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}}],raw:"ReadonlyArray",required:!0}},{key:"correctOptions",value:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -103696,30 +104007,43 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}}],raw:"ReadonlyArray",required:!0}},{key:"otherOptions",value:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}}],raw:"ReadonlyArray",required:!0}},{key:"otherOptions",value:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -105171,14 +105495,15 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}}],raw:"ReadonlyArray",required:!0}},{key:"height",value:{name:"union",raw:'"normal" | "auto"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"auto"'}],required:!0}},{key:"layout",value:{name:"union",raw:'"horizontal" | "vertical"',elements:[{name:"literal",value:'"horizontal"'},{name:"literal",value:'"vertical"'}],required:!0}}]}},{name:"intersection",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}}],raw:"ReadonlyArray",required:!0}},{key:"height",value:{name:"union",raw:'"normal" | "auto"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"auto"'}],required:!0}},{key:"layout",value:{name:"union",raw:'"horizontal" | "vertical"',elements:[{name:"literal",value:'"horizontal"'},{name:"literal",value:'"vertical"'}],required:!0}}]}},{name:"intersection",raw:`{ // The Y values that represent the correct answer expected correct: ReadonlyArray; } & PerseusPlotterValidationData`,elements:[{name:"signature",type:"object",raw:`{ @@ -106727,22 +107052,34 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -108194,14 +108531,15 @@ rationale or partial correctness.`},onFocus:{required:!0,tsType:{name:"signature major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one diff --git a/assets/article-renderer.stories-_fNspNtB.js b/assets/article-renderer.stories-8h3ta99e.js similarity index 89% rename from assets/article-renderer.stories-_fNspNtB.js rename to assets/article-renderer.stories-8h3ta99e.js index 5b3b43c5fc..d6547d14d6 100644 --- a/assets/article-renderer.stories-_fNspNtB.js +++ b/assets/article-renderer.stories-8h3ta99e.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{a as K}from"./mobile-keypad-Muuas9zV.js";import{a as b}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{s as p}from"./test-dependencies-8Mfke9yn.js";import{s as k,m as M,p as W,a as T,b as D}from"./article-renderer.testdata-spwNviYy.js";import{A as m}from"./article-renderer-mU-6RWLp.js";import{T as _}from"./test-keypad-context-wrapper-qNJz2rBH.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./v4-yQnnJER4.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";import"./renderer-1DxKQj1_.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./invariant-bu5zBsRS.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./key-translator-hixns6dh.js";import"./prop-types-d_cUcR3L.js";import"./enums-x5qaTru7.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";const Er={title:"Perseus/Renderers/Article Renderer",argTypes:{useNewStyles:{control:"boolean"}}},t=e=>r.jsx(m,{json:k,dependencies:p,useNewStyles:e.useNewStyles}),o=e=>r.jsx(m,{json:M,dependencies:p,useNewStyles:e.useNewStyles}),i=({useNewStyles:e})=>r.jsx(m,{json:W,dependencies:p,useNewStyles:e}),s=({useNewStyles:e})=>r.jsx(_,{children:r.jsx(K.Consumer,{children:({keypadElement:a,setRenderer:c})=>r.jsx(m,{ref:d=>{c(d)},json:T,dependencies:p,useNewStyles:e,apiOptions:{isMobile:!0,customKeypad:!0,onFocusChange:b("onFocusChange")},keypadElement:a})})}),n=({useNewStyles:e})=>r.jsx(_,{children:r.jsx(K.Consumer,{children:({keypadElement:a,setRenderer:c})=>r.jsx(m,{ref:d=>{c(d)},json:D,dependencies:p,useNewStyles:e,apiOptions:{isMobile:!0,customKeypad:!0},keypadElement:a})})});t.__docgenInfo={description:"",methods:[],displayName:"ASingleSectionArticle"};o.__docgenInfo={description:"",methods:[],displayName:"BMultiSectionArticle"};i.__docgenInfo={description:"",methods:[],displayName:"PassageArticle"};s.__docgenInfo={description:"",methods:[],displayName:"ExpressionArticle"};n.__docgenInfo={description:"",methods:[],displayName:"MultiSectionedExpressionArticle"};var l,u,y;t.parameters={...t.parameters,docs:{...(l=t.parameters)==null?void 0:l.docs,source:{originalSource:`(args: { +import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{a as K}from"./mobile-keypad-Muuas9zV.js";import{a as b}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{s as p}from"./test-dependencies-1Svp3QCw.js";import{s as k,m as M,p as W,a as T,b as D}from"./article-renderer.testdata-spwNviYy.js";import{A as m}from"./article-renderer-HEYBK15c.js";import{T as _}from"./test-keypad-context-wrapper-qNJz2rBH.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./v4-yQnnJER4.js";import"./register-all-widgets-for-testing-vNa20up7.js";import"./renderer-L37a98D_.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./invariant-bu5zBsRS.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./key-translator-hixns6dh.js";import"./prop-types-d_cUcR3L.js";import"./enums-x5qaTru7.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";const Er={title:"Perseus/Renderers/Article Renderer",argTypes:{useNewStyles:{control:"boolean"}}},t=e=>r.jsx(m,{json:k,dependencies:p,useNewStyles:e.useNewStyles}),o=e=>r.jsx(m,{json:M,dependencies:p,useNewStyles:e.useNewStyles}),i=({useNewStyles:e})=>r.jsx(m,{json:W,dependencies:p,useNewStyles:e}),s=({useNewStyles:e})=>r.jsx(_,{children:r.jsx(K.Consumer,{children:({keypadElement:a,setRenderer:c})=>r.jsx(m,{ref:d=>{c(d)},json:T,dependencies:p,useNewStyles:e,apiOptions:{isMobile:!0,customKeypad:!0,onFocusChange:b("onFocusChange")},keypadElement:a})})}),n=({useNewStyles:e})=>r.jsx(_,{children:r.jsx(K.Consumer,{children:({keypadElement:a,setRenderer:c})=>r.jsx(m,{ref:d=>{c(d)},json:D,dependencies:p,useNewStyles:e,apiOptions:{isMobile:!0,customKeypad:!0},keypadElement:a})})});t.__docgenInfo={description:"",methods:[],displayName:"ASingleSectionArticle"};o.__docgenInfo={description:"",methods:[],displayName:"BMultiSectionArticle"};i.__docgenInfo={description:"",methods:[],displayName:"PassageArticle"};s.__docgenInfo={description:"",methods:[],displayName:"ExpressionArticle"};n.__docgenInfo={description:"",methods:[],displayName:"MultiSectionedExpressionArticle"};var l,u,y;t.parameters={...t.parameters,docs:{...(l=t.parameters)==null?void 0:l.docs,source:{originalSource:`(args: { useNewStyles; }): React.ReactElement => { return ; diff --git a/assets/base-radio-9_hKye4B.js b/assets/base-radio-kypcKNEK.js similarity index 99% rename from assets/base-radio-9_hKye4B.js rename to assets/base-radio-kypcKNEK.js index 194fa3a3fb..0d6c2c4b0a 100644 --- a/assets/base-radio-9_hKye4B.js +++ b/assets/base-radio-kypcKNEK.js @@ -1,4 +1,4 @@ -import{j as h}from"./jsx-runtime-63Ea5SlK.js";import{l as b}from"./index-awljIyHI.js";import{c as j}from"./index-dnMhQZ-1.js";import{r as q}from"./index-6oxdNXpR.js";import{F}from"./index-9gkyvru-.js";import{_ as J}from"./jquery-yG1GhClm.js";import{u as X}from"./i18n-context-fsWEgybQ.js";import{C as T}from"./perseus-api-1-ethIrW.js";import{h as Z,r as W,n as I,s as U}from"./constants-iPV6vHZm.js";import{m as N}from"./media-queries-gbofTbz-.js";import{s as ee}from"./shared-4TdECMLk.js";import{U as re}from"./util-AYeX86gl.js";import{C as te}from"./choice-Xr-SKHrB.js";import{C as ne}from"./choice-none-above-dRu7sfJj.js";typeof HTMLElement<"u"&&!HTMLElement.prototype.scrollTo&&(HTMLElement.prototype.scrollTo=function(e,a){this.scrollLeft=e,this.scrollTop=a});const M=(e,a)=>{typeof e.scrollTo=="function"?e.scrollTo(0,a):"scrollTop"in e&&(e.scrollTop=a)},ae=(e,a,i=0,t)=>{const o=e===window?window.pageYOffset:e.scrollTop,u=a,p=u-o,d=17,f=i/d;let c=0;const R=setInterval(function(){if(ce===document.body||e==null?window:e.scrollHeight>e.clientHeight?e:S(e.parentElement),ie=750,se=(e,a)=>{setTimeout(()=>{const i=S(e),t=e.getBoundingClientRect(),o=i===window?{top:0,bottom:window.innerHeight}:i.getBoundingClientRect();let u=0;const p=i===window?window.scrollY:i.scrollTop;if(t.bottom>o.bottom){let d=t.bottom-o.bottom;t.top+d{if(e.canScrollPage&&c&&a&&!k.current){const r=t.findIndex(n=>n.checked);if(r>=0){const n=O.current[r],l=F.findDOMNode(n.current);l&&se(l)}}k.current=a},[e,t,c,a]);function C(r,n){let y;n.checked&&!u?y=t.map(g=>!1):y=t.map(g=>g.checked);const l=t.map(g=>g.crossedOut);y[r]=n.checked,l[r]=n.crossedOut,R({checked:y,crossedOut:l})}v==null||v(r=>{const n=O.current[r||0],l=F.findDOMNode(n.current);if(l)l.focus();else return!1;return!0});const x=e.isMobile,D=t[0].highlighted,H=t[t.length-1].highlighted,V=j("perseus-widget-radio",!o&&"perseus-rendered-radio",b.css(s.radio,s.responsiveRadioContainer,D&&x&&s.radioContainerFirstHighlighted,H&&x&&s.radioContainerLastHighlighted)),G=j("instructions",b.css(s.instructions,x&&s.instructionsMobile)),z=le(u,d,f,A),K=b.css(s.responsiveFieldset),B=h.jsxs("fieldset",{className:`perseus-widget-radio-fieldset ${K}`,children:[h.jsx("legend",{className:"perseus-sr-only",children:z}),h.jsx("div",{className:G,"aria-hidden":"true",children:z}),h.jsx("ul",{className:V,style:{listStyle:"none"},children:t.map((r,n)=>{let y=te;const l=q.createRef();O.current[n]=l;const g={apiOptions:e,multipleSelect:u,checked:r.checked,crossedOut:r.crossedOut,previouslyAnswered:r.previouslyAnswered,reviewMode:i,correct:r.correct,rationale:r.rationale,content:r.content,disabled:e.readOnly||r.disabled,showCorrectness:i||!!r.showCorrectness,showRationale:r.hasRationale&&(i||r.showRationale),pos:n,onChange:m=>{o||C(n,m)}};r.isNoneOfTheAbove&&(y=ne,J.extend(g,{showContent:r.revealNoneOfTheAbove}));const E=t[n+1],Y=!!E&&E.highlighted,L=m=>b.css(ee.aboveScratchpad,s.item,s.responsiveItem,m&&s.selectedItem,m&&r.highlighted&&s.aboveBackdrop,m&&r.highlighted&&e.isMobile&&s.aboveBackdropMobile,Y&&e.isMobile&&s.nextHighlighted);L(!0);let _;i&&a&&(_=a.choices[n].correct?T.CORRECT:T.INCORRECT);const Q=j(L(r.checked),T.RADIO.OPTION,r.checked&&T.RADIO.SELECTED,_);let P=null,$;return o&&($=m=>{let w=m.target;for(;w&&w!==P;){if(w.getAttribute("data-is-radio-icon")){C(n,{checked:!r.checked,crossedOut:r.crossedOut});return}w=w.parentNode}}),h.jsx("li",{ref:m=>P=m,className:Q,onClick:$,onTouchStart:p?void 0:oe,children:h.jsx(y,{...g,ref:l})},n)})})]});return h.jsx("div",{className:b.css(s.responsiveContainer),children:B})},s=b.StyleSheet.create({instructions:{display:"block",color:Z,fontSize:14,lineHeight:1.25,fontFamily:"inherit",fontStyle:"normal",fontWeight:"bold",marginBottom:16},instructionsMobile:{fontSize:18,[N.smOrSmaller]:{fontSize:16},[N.xl]:{fontSize:20}},radio:{padding:0},responsiveRadioContainer:{borderBottom:`1px solid ${W}`,borderTop:`1px solid ${W}`,width:"auto",[N.smOrSmaller]:{marginLeft:I,marginRight:I}},radioContainerFirstHighlighted:{borderTop:"1px solid rgba(0, 0, 0, 0)"},radioContainerLastHighlighted:{borderBottom:"1px solid rgba(0, 0, 0, 0)"},item:{marginLeft:20},responsiveItem:{marginLeft:0,padding:0,":not(:last-child)":{borderBottom:`1px solid ${W}`}},selectedItem:{background:"white"},aboveBackdrop:{position:"relative",zIndex:1062},aboveBackdropMobile:{boxShadow:"0 0 4px 0 rgba(0, 0, 0, 0.2),0 0 2px 0 rgba(0, 0, 0, 0.1)",":not(:last-child)":{borderBottom:"1px solid rgba(0, 0, 0, 0)"}},nextHighlighted:{":not(:last-child)":{borderBottom:"1px solid rgba(0, 0, 0, 0)"}},responsiveContainer:{overflow:"auto",marginLeft:I,paddingLeft:U},responsiveFieldset:{paddingRight:U,minWidth:"auto"}});ue.__docgenInfo={description:"",methods:[],displayName:"BaseRadio",props:{apiOptions:{required:!0,tsType:{name:"Readonly",elements:[{name:"signature",type:"object",raw:`{ +import{j as h}from"./jsx-runtime-63Ea5SlK.js";import{l as b}from"./index-awljIyHI.js";import{c as j}from"./index-dnMhQZ-1.js";import{r as q}from"./index-6oxdNXpR.js";import{F}from"./index-9gkyvru-.js";import{_ as J}from"./jquery-yG1GhClm.js";import{u as X}from"./i18n-context-fsWEgybQ.js";import{C as T}from"./perseus-api-1-ethIrW.js";import{h as Z,r as W,n as I,s as U}from"./constants-iPV6vHZm.js";import{m as N}from"./media-queries-gbofTbz-.js";import{s as ee}from"./shared-4TdECMLk.js";import{U as re}from"./util-AYeX86gl.js";import{C as te}from"./choice-Xr-SKHrB.js";import{C as ne}from"./choice-none-above-vDwffTnk.js";typeof HTMLElement<"u"&&!HTMLElement.prototype.scrollTo&&(HTMLElement.prototype.scrollTo=function(e,a){this.scrollLeft=e,this.scrollTop=a});const M=(e,a)=>{typeof e.scrollTo=="function"?e.scrollTo(0,a):"scrollTop"in e&&(e.scrollTop=a)},ae=(e,a,i=0,t)=>{const o=e===window?window.pageYOffset:e.scrollTop,u=a,p=u-o,d=17,f=i/d;let c=0;const R=setInterval(function(){if(ce===document.body||e==null?window:e.scrollHeight>e.clientHeight?e:S(e.parentElement),ie=750,se=(e,a)=>{setTimeout(()=>{const i=S(e),t=e.getBoundingClientRect(),o=i===window?{top:0,bottom:window.innerHeight}:i.getBoundingClientRect();let u=0;const p=i===window?window.scrollY:i.scrollTop;if(t.bottom>o.bottom){let d=t.bottom-o.bottom;t.top+d{if(e.canScrollPage&&c&&a&&!k.current){const r=t.findIndex(n=>n.checked);if(r>=0){const n=O.current[r],l=F.findDOMNode(n.current);l&&se(l)}}k.current=a},[e,t,c,a]);function C(r,n){let y;n.checked&&!u?y=t.map(g=>!1):y=t.map(g=>g.checked);const l=t.map(g=>g.crossedOut);y[r]=n.checked,l[r]=n.crossedOut,R({checked:y,crossedOut:l})}v==null||v(r=>{const n=O.current[r||0],l=F.findDOMNode(n.current);if(l)l.focus();else return!1;return!0});const x=e.isMobile,D=t[0].highlighted,H=t[t.length-1].highlighted,V=j("perseus-widget-radio",!o&&"perseus-rendered-radio",b.css(s.radio,s.responsiveRadioContainer,D&&x&&s.radioContainerFirstHighlighted,H&&x&&s.radioContainerLastHighlighted)),G=j("instructions",b.css(s.instructions,x&&s.instructionsMobile)),z=le(u,d,f,A),K=b.css(s.responsiveFieldset),B=h.jsxs("fieldset",{className:`perseus-widget-radio-fieldset ${K}`,children:[h.jsx("legend",{className:"perseus-sr-only",children:z}),h.jsx("div",{className:G,"aria-hidden":"true",children:z}),h.jsx("ul",{className:V,style:{listStyle:"none"},children:t.map((r,n)=>{let y=te;const l=q.createRef();O.current[n]=l;const g={apiOptions:e,multipleSelect:u,checked:r.checked,crossedOut:r.crossedOut,previouslyAnswered:r.previouslyAnswered,reviewMode:i,correct:r.correct,rationale:r.rationale,content:r.content,disabled:e.readOnly||r.disabled,showCorrectness:i||!!r.showCorrectness,showRationale:r.hasRationale&&(i||r.showRationale),pos:n,onChange:m=>{o||C(n,m)}};r.isNoneOfTheAbove&&(y=ne,J.extend(g,{showContent:r.revealNoneOfTheAbove}));const E=t[n+1],Y=!!E&&E.highlighted,L=m=>b.css(ee.aboveScratchpad,s.item,s.responsiveItem,m&&s.selectedItem,m&&r.highlighted&&s.aboveBackdrop,m&&r.highlighted&&e.isMobile&&s.aboveBackdropMobile,Y&&e.isMobile&&s.nextHighlighted);L(!0);let _;i&&a&&(_=a.choices[n].correct?T.CORRECT:T.INCORRECT);const Q=j(L(r.checked),T.RADIO.OPTION,r.checked&&T.RADIO.SELECTED,_);let P=null,$;return o&&($=m=>{let w=m.target;for(;w&&w!==P;){if(w.getAttribute("data-is-radio-icon")){C(n,{checked:!r.checked,crossedOut:r.crossedOut});return}w=w.parentNode}}),h.jsx("li",{ref:m=>P=m,className:Q,onClick:$,onTouchStart:p?void 0:oe,children:h.jsx(y,{...g,ref:l})},n)})})]});return h.jsx("div",{className:b.css(s.responsiveContainer),children:B})},s=b.StyleSheet.create({instructions:{display:"block",color:Z,fontSize:14,lineHeight:1.25,fontFamily:"inherit",fontStyle:"normal",fontWeight:"bold",marginBottom:16},instructionsMobile:{fontSize:18,[N.smOrSmaller]:{fontSize:16},[N.xl]:{fontSize:20}},radio:{padding:0},responsiveRadioContainer:{borderBottom:`1px solid ${W}`,borderTop:`1px solid ${W}`,width:"auto",[N.smOrSmaller]:{marginLeft:I,marginRight:I}},radioContainerFirstHighlighted:{borderTop:"1px solid rgba(0, 0, 0, 0)"},radioContainerLastHighlighted:{borderBottom:"1px solid rgba(0, 0, 0, 0)"},item:{marginLeft:20},responsiveItem:{marginLeft:0,padding:0,":not(:last-child)":{borderBottom:`1px solid ${W}`}},selectedItem:{background:"white"},aboveBackdrop:{position:"relative",zIndex:1062},aboveBackdropMobile:{boxShadow:"0 0 4px 0 rgba(0, 0, 0, 0.2),0 0 2px 0 rgba(0, 0, 0, 0.1)",":not(:last-child)":{borderBottom:"1px solid rgba(0, 0, 0, 0)"}},nextHighlighted:{":not(:last-child)":{borderBottom:"1px solid rgba(0, 0, 0, 0)"}},responsiveContainer:{overflow:"auto",marginLeft:I,paddingLeft:U},responsiveFieldset:{paddingRight:U,minWidth:"auto"}});ue.__docgenInfo={description:"",methods:[],displayName:"BaseRadio",props:{apiOptions:{required:!0,tsType:{name:"Readonly",elements:[{name:"signature",type:"object",raw:`{ isArticle?: boolean; onFocusChange?: ( newFocusPath: FocusPath, diff --git a/assets/base-radio.stories-ihPjXaaJ.js b/assets/base-radio.stories-vnJJMfsV.js similarity index 97% rename from assets/base-radio.stories-ihPjXaaJ.js rename to assets/base-radio.stories-vnJJMfsV.js index 843f48d6dd..7b6ece5a86 100644 --- a/assets/base-radio.stories-ihPjXaaJ.js +++ b/assets/base-radio.stories-vnJJMfsV.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-63Ea5SlK.js";import{a as U}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{B as n}from"./base-radio-9_hKye4B.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./index-awljIyHI.js";import"./index-dnMhQZ-1.js";import"./index-9gkyvru-.js";import"./jquery-yG1GhClm.js";import"./i18n-context-fsWEgybQ.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./constants-iPV6vHZm.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./renderer-1DxKQj1_.js";import"./index-J2t_5nK1.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";function r(t){return{...{checked:!1,crossedOut:!1,content:"",rationale:"",hasRationale:!1,showRationale:!1,showCorrectness:!1,correct:!1,isNoneOfTheAbove:!1,highlighted:!1,previouslyAnswered:!1,revealNoneOfTheAbove:!1,disabled:!1},...t}}const Ge={title:"Perseus/Widgets/Radio/Base Radio",args:{multipleSelect:!1,editMode:!1,countChoices:!1}},s={apiOptions:{},reviewMode:!1,choices:[r({content:"Content 1"}),r({content:"Content 2"}),r({content:"Content 3",correct:!0}),r({isNoneOfTheAbove:!0})],deselectEnabled:!1,editMode:!1,labelWrap:!1,countChoices:!1,numCorrect:1,multipleSelect:!1,onChange:U("changed"),isLastUsedWidget:!1},a=t=>{const e={...s,...t};return o.jsx(n,{...e})},l=t=>{const e={...s,multipleSelect:!1};return o.jsx(n,{...e})},p=t=>{const e={...s,multipleSelect:!0};return o.jsx(n,{...e})},u=t=>{const e={...s,multipleSelect:!0,numCorrect:2,countChoices:!0};return o.jsx(n,{...e})},d=t=>{const e=Array(4).fill(null).map((g,c)=>r({content:`Choice ${c+1}`}));e[1].checked=!0;const i={...s,multipleSelect:!1,choices:e};return o.jsx(n,{...i})},m=t=>{const e=Array(4).fill(null).map((g,c)=>r({content:`Choice ${c+1}`}));e[1].checked=!0,e[2].checked=!0;const i={...s,multipleSelect:!0,choices:e};return o.jsx(n,{...i})},h=t=>{const e=Array(4).fill(null).map((g,c)=>r({content:`Choice ${c+1}`,rationale:"This is a neat rationale",hasRationale:!0,showRationale:!0,correct:!1,showCorrectness:!0}));e[1].checked=!0,e[2].correct=!0;const i={...s,multipleSelect:!1,choices:e};return o.jsx(n,{...i})},S=t=>{const e=Array(4).fill(null).map((g,c)=>r({content:`Choice ${c+1}`,rationale:"This is a neat rationale",hasRationale:!0,showRationale:!0,correct:!1,showCorrectness:!0}));e[1].checked=!0,e[2].checked=!0,e[2].correct=!0,e[3].correct=!0;const i={...s,multipleSelect:!0,numCorrect:2,choices:e};return o.jsx(n,{...i})};a.__docgenInfo={description:"",methods:[],displayName:"Interactive",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};l.__docgenInfo={description:"",methods:[],displayName:"SingleSelectWithNothingSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};p.__docgenInfo={description:"",methods:[],displayName:"MultipleSelectWithNothingSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};u.__docgenInfo={description:"",methods:[],displayName:"MultipleSelectWithCountChoicesLabel",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};d.__docgenInfo={description:"",methods:[],displayName:"SingleSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};m.__docgenInfo={description:"",methods:[],displayName:"MultipleSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};h.__docgenInfo={description:"",methods:[],displayName:"SingleKitchenSink",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};S.__docgenInfo={description:"",methods:[],displayName:"MultipleKitchenSink",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};var f,y,C;a.parameters={...a.parameters,docs:{...(f=a.parameters)==null?void 0:f.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as o}from"./jsx-runtime-63Ea5SlK.js";import{a as U}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{B as n}from"./base-radio-kypcKNEK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./index-awljIyHI.js";import"./index-dnMhQZ-1.js";import"./index-9gkyvru-.js";import"./jquery-yG1GhClm.js";import"./i18n-context-fsWEgybQ.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./constants-iPV6vHZm.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./renderer-L37a98D_.js";import"./index-J2t_5nK1.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";function r(t){return{...{checked:!1,crossedOut:!1,content:"",rationale:"",hasRationale:!1,showRationale:!1,showCorrectness:!1,correct:!1,isNoneOfTheAbove:!1,highlighted:!1,previouslyAnswered:!1,revealNoneOfTheAbove:!1,disabled:!1},...t}}const Ge={title:"Perseus/Widgets/Radio/Base Radio",args:{multipleSelect:!1,editMode:!1,countChoices:!1}},s={apiOptions:{},reviewMode:!1,choices:[r({content:"Content 1"}),r({content:"Content 2"}),r({content:"Content 3",correct:!0}),r({isNoneOfTheAbove:!0})],deselectEnabled:!1,editMode:!1,labelWrap:!1,countChoices:!1,numCorrect:1,multipleSelect:!1,onChange:U("changed"),isLastUsedWidget:!1},a=t=>{const e={...s,...t};return o.jsx(n,{...e})},l=t=>{const e={...s,multipleSelect:!1};return o.jsx(n,{...e})},p=t=>{const e={...s,multipleSelect:!0};return o.jsx(n,{...e})},u=t=>{const e={...s,multipleSelect:!0,numCorrect:2,countChoices:!0};return o.jsx(n,{...e})},d=t=>{const e=Array(4).fill(null).map((g,c)=>r({content:`Choice ${c+1}`}));e[1].checked=!0;const i={...s,multipleSelect:!1,choices:e};return o.jsx(n,{...i})},m=t=>{const e=Array(4).fill(null).map((g,c)=>r({content:`Choice ${c+1}`}));e[1].checked=!0,e[2].checked=!0;const i={...s,multipleSelect:!0,choices:e};return o.jsx(n,{...i})},h=t=>{const e=Array(4).fill(null).map((g,c)=>r({content:`Choice ${c+1}`,rationale:"This is a neat rationale",hasRationale:!0,showRationale:!0,correct:!1,showCorrectness:!0}));e[1].checked=!0,e[2].correct=!0;const i={...s,multipleSelect:!1,choices:e};return o.jsx(n,{...i})},S=t=>{const e=Array(4).fill(null).map((g,c)=>r({content:`Choice ${c+1}`,rationale:"This is a neat rationale",hasRationale:!0,showRationale:!0,correct:!1,showCorrectness:!0}));e[1].checked=!0,e[2].checked=!0,e[2].correct=!0,e[3].correct=!0;const i={...s,multipleSelect:!0,numCorrect:2,choices:e};return o.jsx(n,{...i})};a.__docgenInfo={description:"",methods:[],displayName:"Interactive",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};l.__docgenInfo={description:"",methods:[],displayName:"SingleSelectWithNothingSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};p.__docgenInfo={description:"",methods:[],displayName:"MultipleSelectWithNothingSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};u.__docgenInfo={description:"",methods:[],displayName:"MultipleSelectWithCountChoicesLabel",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};d.__docgenInfo={description:"",methods:[],displayName:"SingleSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};m.__docgenInfo={description:"",methods:[],displayName:"MultipleSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};h.__docgenInfo={description:"",methods:[],displayName:"SingleKitchenSink",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};S.__docgenInfo={description:"",methods:[],displayName:"MultipleKitchenSink",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};var f,y,C;a.parameters={...a.parameters,docs:{...(f=a.parameters)==null?void 0:f.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const overwrittenProps = { ...defaultProps, ...args diff --git a/assets/behavior-kOGaXMua.js b/assets/behavior-XUZDhvN-.js similarity index 97% rename from assets/behavior-kOGaXMua.js rename to assets/behavior-XUZDhvN-.js index 1532bb081a..d2d98b3bb7 100644 --- a/assets/behavior-kOGaXMua.js +++ b/assets/behavior-XUZDhvN-.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{b as j}from"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{l as t}from"./index-awljIyHI.js";import{c as h}from"./index-deFLJwr4.js";import{r as w}from"./index-6oxdNXpR.js";import{b as q,g as N,a as k}from"./global-colors-VIVU4Od4.js";const g=class g extends w.Component{constructor(n){super(n),this.handleClick=r=>{this.props.disabled||(this.props.shouldUpdate()&&(this.waitingForClick=!1),this.props.onClick&&!this.props.disabled&&this.props.onClick(r))},this.handleMouseEnter=()=>{!this.props.disabled&&this.props.shouldUpdate()&&!this.waitingForClick&&this.setState({hovered:!0})},this.handleMouseLeave=()=>{!this.props.disabled&&this.props.shouldUpdate()&&!this.waitingForClick&&this.setState({hovered:!1})},this.handleTouchStart=()=>{!this.props.disabled&&this.props.shouldUpdate()&&this.setState({hovered:!0})},this.handleTouchEnd=()=>{!this.props.disabled&&this.props.shouldUpdate()&&(this.setState({hovered:!1}),this.waitingForClick=!0)},this.handleMouseDown=()=>{!this.props.disabled&&this.props.shouldUpdate()&&(this.setState({focused:!1}),this.focusFlag=!0)},this.handleBlur=()=>{!this.props.disabled&&this.props.shouldUpdate()&&this.setState({focused:!1})},this.handleFocus=()=>{!this.props.disabled&&this.props.shouldUpdate()&&(this.focusFlag?this.focusFlag=!1:this.setState({focused:!0}))},this.state={focused:!1,hovered:n.startHovered}}render(){const n={onBlur:this.handleBlur,onClick:this.handleClick,onFocus:this.handleFocus,onMouseDown:this.handleMouseDown,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},{children:r}=this.props;return(r==null?void 0:r(this.state,n))||null}};g.defaultProps={startHovered:!1,shouldUpdate:()=>!0};let p=g;p.__docgenInfo={description:"",methods:[{name:"handleClick",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactMouseEvent",raw:"React.MouseEvent",alias:"React.MouseEvent"}}],returns:null},{name:"handleMouseEnter",docblock:null,modifiers:[],params:[],returns:null},{name:"handleMouseLeave",docblock:null,modifiers:[],params:[],returns:null},{name:"handleTouchStart",docblock:null,modifiers:[],params:[],returns:null},{name:"handleTouchEnd",docblock:null,modifiers:[],params:[],returns:null},{name:"handleMouseDown",docblock:null,modifiers:[],params:[],returns:null},{name:"handleBlur",docblock:null,modifiers:[],params:[],returns:null},{name:"handleFocus",docblock:null,modifiers:[],params:[],returns:null}],displayName:"HoverBehavior",props:{children:{required:!1,tsType:{name:"signature",type:"function",raw:"(state: State, handlers: Handlers) => React.ReactElement",signature:{arguments:[{type:{name:"signature",type:"object",raw:`{ +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{b as j}from"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{l as t}from"./index-awljIyHI.js";import{c as h}from"./index-deFLJwr4.js";import{r as w}from"./index-6oxdNXpR.js";import{b as q,g as N,a as k}from"./global-colors-VIVU4Od4.js";const g=class g extends w.Component{constructor(n){super(n),this.handleClick=r=>{this.props.disabled||(this.props.shouldUpdate()&&(this.waitingForClick=!1),this.props.onClick&&!this.props.disabled&&this.props.onClick(r))},this.handleMouseEnter=()=>{!this.props.disabled&&this.props.shouldUpdate()&&!this.waitingForClick&&this.setState({hovered:!0})},this.handleMouseLeave=()=>{!this.props.disabled&&this.props.shouldUpdate()&&!this.waitingForClick&&this.setState({hovered:!1})},this.handleTouchStart=()=>{!this.props.disabled&&this.props.shouldUpdate()&&this.setState({hovered:!0})},this.handleTouchEnd=()=>{!this.props.disabled&&this.props.shouldUpdate()&&(this.setState({hovered:!1}),this.waitingForClick=!0)},this.handleMouseDown=()=>{!this.props.disabled&&this.props.shouldUpdate()&&(this.setState({focused:!1}),this.focusFlag=!0)},this.handleBlur=()=>{!this.props.disabled&&this.props.shouldUpdate()&&this.setState({focused:!1})},this.handleFocus=()=>{!this.props.disabled&&this.props.shouldUpdate()&&(this.focusFlag?this.focusFlag=!1:this.setState({focused:!0}))},this.state={focused:!1,hovered:n.startHovered}}render(){const n={onBlur:this.handleBlur,onClick:this.handleClick,onFocus:this.handleFocus,onMouseDown:this.handleMouseDown,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},{children:r}=this.props;return(r==null?void 0:r(this.state,n))||null}};g.defaultProps={startHovered:!1,shouldUpdate:()=>!0};let p=g;p.__docgenInfo={description:"",methods:[{name:"handleClick",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactMouseEvent",raw:"React.MouseEvent",alias:"React.MouseEvent"}}],returns:null},{name:"handleMouseEnter",docblock:null,modifiers:[],params:[],returns:null},{name:"handleMouseLeave",docblock:null,modifiers:[],params:[],returns:null},{name:"handleTouchStart",docblock:null,modifiers:[],params:[],returns:null},{name:"handleTouchEnd",docblock:null,modifiers:[],params:[],returns:null},{name:"handleMouseDown",docblock:null,modifiers:[],params:[],returns:null},{name:"handleBlur",docblock:null,modifiers:[],params:[],returns:null},{name:"handleFocus",docblock:null,modifiers:[],params:[],returns:null}],displayName:"HoverBehavior",props:{children:{required:!1,tsType:{name:"signature",type:"function",raw:"(state: State, handlers: Handlers) => React.ReactElement",signature:{arguments:[{type:{name:"signature",type:"object",raw:`{ focused: boolean; hovered: boolean; }`,signature:{properties:[{key:"focused",value:{name:"boolean",required:!0}},{key:"hovered",value:{name:"boolean",required:!0}}]}},name:"state"},{type:{name:"signature",type:"object",raw:`{ diff --git a/assets/behavior.stories-3HNm0LRG.js b/assets/behavior.stories-VkoXd2M3.js similarity index 82% rename from assets/behavior.stories-3HNm0LRG.js rename to assets/behavior.stories-VkoXd2M3.js index 3286a560bc..b0cece2dcd 100644 --- a/assets/behavior.stories-3HNm0LRG.js +++ b/assets/behavior.stories-VkoXd2M3.js @@ -1,4 +1,4 @@ -import{j as n}from"./jsx-runtime-63Ea5SlK.js";import{a}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{r as c}from"./index-6oxdNXpR.js";import{B as l}from"./behavior-kOGaXMua.js";import"./v4-yQnnJER4.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./global-colors-VIVU4Od4.js";const rr={title:"PerseusEditor/Widgets/Label Image/Behavior"},t=u=>{const[r,e]=c.useState({multipleAnswers:!1,hideChoicesFromInstructions:!1}),s={multipleAnswers:r.multipleAnswers,hideChoicesFromInstructions:r.hideChoicesFromInstructions,onChange:o=>{a("onChange")(o),e({...r,...o})}};return n.jsx(l,{preferredPopoverDirection:"NONE",...s})};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,m,p;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as n}from"./jsx-runtime-63Ea5SlK.js";import{a}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{r as c}from"./index-6oxdNXpR.js";import{B as l}from"./behavior-XUZDhvN-.js";import"./v4-yQnnJER4.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./global-colors-VIVU4Od4.js";const rr={title:"PerseusEditor/Widgets/Label Image/Behavior"},t=u=>{const[r,e]=c.useState({multipleAnswers:!1,hideChoicesFromInstructions:!1}),s={multipleAnswers:r.multipleAnswers,hideChoicesFromInstructions:r.hideChoicesFromInstructions,onChange:o=>{a("onChange")(o),e({...r,...o})}};return n.jsx(l,{preferredPopoverDirection:"NONE",...s})};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,m,p;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const [state, setState] = React.useState({ multipleAnswers: false, hideChoicesFromInstructions: false diff --git a/assets/categorizer-editor-d30-cizN.js b/assets/categorizer-editor-Ux-cs6do.js similarity index 87% rename from assets/categorizer-editor-d30-cizN.js rename to assets/categorizer-editor-Ux-cs6do.js index ce9c19cb1a..10aec90dcf 100644 --- a/assets/categorizer-editor-d30-cizN.js +++ b/assets/categorizer-editor-Ux-cs6do.js @@ -1 +1 @@ -import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{C as o,c as n,p as l}from"./article-renderer-mU-6RWLp.js";import{_ as m}from"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import{A as p}from"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import{c as u}from"./components-ODdjt0Ld.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{E as d}from"./editor-jsonify-g-bIiSIM.js";import{C as c}from"./index-V5gl6frG.js";import{P as r}from"./index-0C4KXdeC.js";import{r as f}from"./index-6oxdNXpR.js";const{TextListEditor:t}=u,h=o.widget,s=class s extends f.Component{constructor(){super(...arguments),this.change=(...e)=>n.apply(this,e),this.serialize=()=>d.serialize.call(this)}render(){return a.jsxs("div",{children:[a.jsx("div",{className:"perseus-widget-row",children:a.jsx(c,{label:"Randomize item order",checked:this.props.randomizeItems,onChange:e=>{this.props.onChange({randomizeItems:e})}})}),"Categories:",a.jsx(t,{options:this.props.categories,onChange:e=>{this.change("categories",e)},layout:"horizontal"}),"Items:",a.jsx(t,{options:this.props.items,onChange:e=>{this.change({items:e,values:m.first(this.props.values,e.length)})},layout:"vertical"}),a.jsx(h,{apiOptions:this.props.apiOptions,items:this.props.items,categories:this.props.categories,values:this.props.values,onChange:e=>{this.props.onChange(e)},trackInteraction:function(){}})]})}};s.propTypes={...l,apiOptions:p.propTypes,items:r.arrayOf(r.string),categories:r.arrayOf(r.string),values:r.arrayOf(r.number),randomizeItems:r.bool},s.widgetName="categorizer",s.defaultProps={items:[],categories:[],values:[],randomizeItems:!1};let i=s;i.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"CategorizerEditor",props:{items:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},categories:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},values:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},randomizeItems:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},apiOptions:{description:"",type:{name:"shape",value:{isArticle:{name:"bool",required:!0},onFocusChange:{name:"func",required:!0},GroupMetadataEditor:{name:"func",required:!0},showAlignmentOptions:{name:"bool",required:!0},readOnly:{name:"bool",required:!0},answerableCallback:{name:"func",required:!1},getAnotherHint:{name:"func",required:!1},interactionCallback:{name:"func",required:!1},groupAnnotator:{name:"func",required:!0},imagePlaceholder:{name:"node",required:!1},widgetPlaceholder:{name:"node",required:!1},baseElements:{name:"shape",value:{Link:{name:"func",required:!1}},required:!1},imagePreloader:{name:"func",required:!1},trackInteraction:{name:"func",required:!1},customKeypad:{name:"bool",required:!1},nativeKeypadProxy:{name:"func",required:!1},isMobile:{name:"bool",required:!1},setDrawingAreaAvailable:{name:"func",required:!1},hintProgressColor:{name:"string",required:!1},canScrollPage:{name:"bool",required:!1},crossOutEnabled:{name:"bool",required:!1},editorChangeDelay:{name:"number",required:!1}}},required:!0}},composes:["@khanacademy/perseus"]};export{i as C}; +import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{C as o,c as n,p as l}from"./article-renderer-HEYBK15c.js";import{_ as m}from"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import{A as p}from"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c as u}from"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{E as d}from"./editor-jsonify-mta12v4L.js";import{C as c}from"./index-V5gl6frG.js";import{P as r}from"./index-k-0mNqHS.js";import{r as f}from"./index-6oxdNXpR.js";const{TextListEditor:t}=u,h=o.widget,s=class s extends f.Component{constructor(){super(...arguments),this.change=(...e)=>n.apply(this,e),this.serialize=()=>d.serialize.call(this)}render(){return a.jsxs("div",{children:[a.jsx("div",{className:"perseus-widget-row",children:a.jsx(c,{label:"Randomize item order",checked:this.props.randomizeItems,onChange:e=>{this.props.onChange({randomizeItems:e})}})}),"Categories:",a.jsx(t,{options:this.props.categories,onChange:e=>{this.change("categories",e)},layout:"horizontal"}),"Items:",a.jsx(t,{options:this.props.items,onChange:e=>{this.change({items:e,values:m.first(this.props.values,e.length)})},layout:"vertical"}),a.jsx(h,{apiOptions:this.props.apiOptions,items:this.props.items,categories:this.props.categories,values:this.props.values,onChange:e=>{this.props.onChange(e)},trackInteraction:function(){}})]})}};s.propTypes={...l,apiOptions:p.propTypes,items:r.arrayOf(r.string),categories:r.arrayOf(r.string),values:r.arrayOf(r.number),randomizeItems:r.bool},s.widgetName="categorizer",s.defaultProps={items:[],categories:[],values:[],randomizeItems:!1};let i=s;i.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"CategorizerEditor",props:{items:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},categories:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},values:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},randomizeItems:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},apiOptions:{description:"",type:{name:"shape",value:{isArticle:{name:"bool",required:!0},onFocusChange:{name:"func",required:!0},GroupMetadataEditor:{name:"func",required:!0},showAlignmentOptions:{name:"bool",required:!0},readOnly:{name:"bool",required:!0},answerableCallback:{name:"func",required:!1},getAnotherHint:{name:"func",required:!1},interactionCallback:{name:"func",required:!1},groupAnnotator:{name:"func",required:!0},imagePlaceholder:{name:"node",required:!1},widgetPlaceholder:{name:"node",required:!1},baseElements:{name:"shape",value:{Link:{name:"func",required:!1}},required:!1},imagePreloader:{name:"func",required:!1},trackInteraction:{name:"func",required:!1},customKeypad:{name:"bool",required:!1},nativeKeypadProxy:{name:"func",required:!1},isMobile:{name:"bool",required:!1},setDrawingAreaAvailable:{name:"func",required:!1},hintProgressColor:{name:"string",required:!1},canScrollPage:{name:"bool",required:!1},crossOutEnabled:{name:"bool",required:!1},editorChangeDelay:{name:"number",required:!1}}},required:!0}},composes:["@khanacademy/perseus"]};export{i as C}; diff --git a/assets/categorizer-editor.stories-DsW9Q3l4.js b/assets/categorizer-editor.stories-WC0B5CXh.js similarity index 78% rename from assets/categorizer-editor.stories-DsW9Q3l4.js rename to assets/categorizer-editor.stories-WC0B5CXh.js index 82caed2a3d..ef05d788b5 100644 --- a/assets/categorizer-editor.stories-DsW9Q3l4.js +++ b/assets/categorizer-editor.stories-WC0B5CXh.js @@ -1,3 +1,3 @@ -import{j as p}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import{A as m}from"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{a as e}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{C as a}from"./categorizer-editor-d30-cizN.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-18qWGOW7.js";import"./index-dnMhQZ-1.js";import"./perseus-error-l3K_anoI.js";import"./index-Dfd6auV6.js";import"./input-with-examples-YO5BCgg1.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./icon-paths-5JCXzGsq.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./Popper-Y5KDXl-P.js";import"./answer-choices-lVeJkx-U.js";import"./index-469F30Ub.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./asset-context-H6Iqp7Gi.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./fixed-to-responsive-for_tVF1.js";import"./video-transcript-link-_gpkjmR8.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-qMhJW4bS.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./choice-none-above-dRu7sfJj.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./v4-yQnnJER4.js";import"./components-ODdjt0Ld.js";import"./editor-jsonify-g-bIiSIM.js";import"./index-0C4KXdeC.js";const $r={title:"PerseusEditor/Widgets/Categorizer Editor"},r=s=>p.jsx(a,{onChange:e("onChange"),apiOptions:m.defaults});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as p}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import{A as m}from"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{a as e}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{C as a}from"./categorizer-editor-Ux-cs6do.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-18qWGOW7.js";import"./index-dnMhQZ-1.js";import"./perseus-error-l3K_anoI.js";import"./index-Dfd6auV6.js";import"./input-with-examples-PaWkADGr.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./icon-paths-5JCXzGsq.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./Popper-Y5KDXl-P.js";import"./answer-choices-iyIz6W_C.js";import"./index-469F30Ub.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./asset-context-H6Iqp7Gi.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./fixed-to-responsive-for_tVF1.js";import"./video-transcript-link-_gpkjmR8.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-qMhJW4bS.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./choice-none-above-vDwffTnk.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./v4-yQnnJER4.js";import"./components-ODdjt0Ld.js";import"./editor-jsonify-mta12v4L.js";import"./index-k-0mNqHS.js";const $r={title:"PerseusEditor/Widgets/Categorizer Editor"},r=s=>p.jsx(a,{onChange:e("onChange"),apiOptions:m.defaults});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(o=r.parameters)==null?void 0:o.docs)==null?void 0:i.source}}};const rt=["Default"];export{r as Default,rt as __namedExportsOrder,$r as default}; diff --git a/assets/categorizer.stories-rqy8ljbb.js b/assets/categorizer.stories-EYuc1OZz.js similarity index 81% rename from assets/categorizer.stories-rqy8ljbb.js rename to assets/categorizer.stories-EYuc1OZz.js index 93eefb1cee..8a2e176023 100644 --- a/assets/categorizer.stories-rqy8ljbb.js +++ b/assets/categorizer.stories-EYuc1OZz.js @@ -1,4 +1,4 @@ -import{j as p}from"./jsx-runtime-63Ea5SlK.js";import{R as e}from"./renderer-with-debug-ui-75hBDQJk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const m={content:`**Classify each graph according to the kind of relationship it suggests.** +import{j as p}from"./jsx-runtime-63Ea5SlK.js";import{R as e}from"./renderer-with-debug-ui-Jq91P-PK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const m={content:`**Classify each graph according to the kind of relationship it suggests.** $\\qquad\\qquad\\quad\\text{Graph 1}\\qquad\\qquad\\quad\\qquad\\qquad\\quad\\text{Graph 2}$ diff --git a/assets/choice-none-above-dRu7sfJj.js b/assets/choice-none-above-vDwffTnk.js similarity index 87% rename from assets/choice-none-above-dRu7sfJj.js rename to assets/choice-none-above-vDwffTnk.js index 5945295c0b..4624460120 100644 --- a/assets/choice-none-above-dRu7sfJj.js +++ b/assets/choice-none-above-vDwffTnk.js @@ -1 +1 @@ -import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{r as f}from"./index-6oxdNXpR.js";import{u as i}from"./i18n-context-fsWEgybQ.js";import{R as m}from"./renderer-1DxKQj1_.js";import{C as a}from"./choice-Xr-SKHrB.js";const p=function({content:o,forwardedRef:e,showContent:s=!0,...t}){const{strings:n}=i(),c={...t,content:s?o:r.jsx(m,{content:n.noneOfTheAbove,strings:n},"noneOfTheAboveRenderer")};return r.jsx(a,{...c,ref:e})},j=f.forwardRef((o,e)=>r.jsx(p,{...o,forwardedRef:e}));export{j as C}; +import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{r as f}from"./index-6oxdNXpR.js";import{u as i}from"./i18n-context-fsWEgybQ.js";import{R as m}from"./renderer-L37a98D_.js";import{C as a}from"./choice-Xr-SKHrB.js";const p=function({content:o,forwardedRef:e,showContent:s=!0,...t}){const{strings:n}=i(),c={...t,content:s?o:r.jsx(m,{content:n.noneOfTheAbove,strings:n},"noneOfTheAboveRenderer")};return r.jsx(a,{...c,ref:e})},j=f.forwardRef((o,e)=>r.jsx(p,{...o,forwardedRef:e}));export{j as C}; diff --git a/assets/choice-none-above.stories-mRzVUM01.js b/assets/choice-none-above.stories-EKVo8qGD.js similarity index 93% rename from assets/choice-none-above.stories-mRzVUM01.js rename to assets/choice-none-above.stories-EKVo8qGD.js index bc1b73bf9e..aa8d6b3389 100644 --- a/assets/choice-none-above.stories-mRzVUM01.js +++ b/assets/choice-none-above.stories-EKVo8qGD.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{a as s}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{C as a}from"./choice-none-above-dRu7sfJj.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./i18n-context-fsWEgybQ.js";import"./renderer-1DxKQj1_.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./index-9gkyvru-.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./index-awljIyHI.js";import"./index-0DbkllkJ.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./choice-Xr-SKHrB.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./icon-7RFbyLiL.js";import"./media-queries-gbofTbz-.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";const lo={title:"Perseus/Widgets/Radio/Choice None of the Above",args:{showContent:!1,content:"This is a possible choice"}},n={checked:!1,rationale:"This is a good rational",correct:!0,disabled:!1,pos:0,reviewMode:!1,showRationale:!1,showCorrectness:!1,multipleSelect:!1,crossedOut:!1,previouslyAnswered:!1,apiOptions:{},onChange:s("changed")},o=i=>{const p={...n,...i};return m.jsx(a,{...p})};o.__docgenInfo={description:"",methods:[],displayName:"Example",props:{content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},showContent:{required:!1,tsType:{name:"boolean"},description:""}}};var t,r,e;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{a as s}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{C as a}from"./choice-none-above-vDwffTnk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./i18n-context-fsWEgybQ.js";import"./renderer-L37a98D_.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./index-9gkyvru-.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./index-awljIyHI.js";import"./index-0DbkllkJ.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./choice-Xr-SKHrB.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./icon-7RFbyLiL.js";import"./media-queries-gbofTbz-.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";const lo={title:"Perseus/Widgets/Radio/Choice None of the Above",args:{showContent:!1,content:"This is a possible choice"}},n={checked:!1,rationale:"This is a good rational",correct:!0,disabled:!1,pos:0,reviewMode:!1,showRationale:!1,showCorrectness:!1,multipleSelect:!1,crossedOut:!1,previouslyAnswered:!1,apiOptions:{},onChange:s("changed")},o=i=>{const p={...n,...i};return m.jsx(a,{...p})};o.__docgenInfo={description:"",methods:[],displayName:"Example",props:{content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},showContent:{required:!1,tsType:{name:"boolean"},description:""}}};var t,r,e;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const combineProps = { ...ChoiceDefaults, ...args diff --git a/assets/choice.stories-4KrIkHMw.js b/assets/choice.stories-4KrIkHMw.js index b14b81da13..cebaae0199 100644 --- a/assets/choice.stories-4KrIkHMw.js +++ b/assets/choice.stories-4KrIkHMw.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{a as f}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{C as t}from"./choice-Xr-SKHrB.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";const i={checked:!1,rationale:"This is a good rationale",content:"This is a possible choice",correct:!0,disabled:!1,pos:0,reviewMode:!1,showRationale:!1,showCorrectness:!1,multipleSelect:!1,crossedOut:!1,previouslyAnswered:!1,onChange:f("changed")},de={title:"Perseus/Widgets/Radio/Choice",args:i},o=a=>e.jsx(t,{...a}),n=a=>{const r={...i,checked:!0,showCorrectness:!0},d={...r,correct:!0,content:"This choice is correct"},u={...r,correct:!1,content:"This choice is incorrect"};return e.jsxs(e.Fragment,{children:[e.jsx(t,{...d}),e.jsx(t,{...u})]})},s=a=>{const r={...i,showCorrectness:!0,reviewMode:!0,multipleSelect:!0};return e.jsxs(e.Fragment,{children:[e.jsx(t,{...r,correct:!0,checked:!0,content:"This choice was correct and checked"}),e.jsx(t,{...r,correct:!0,content:"This choice was also correct and not checked"}),e.jsx(t,{...r,correct:!1,checked:!0,content:"This choice was incorrect and checked"}),e.jsx(t,{...r,correct:!1,content:"This choice was also incorrect and not checked"})]})},c=a=>{const r={...i,checked:!0,showCorrectness:!0,showRationale:!0,reviewMode:!0},d={...r,correct:!0,content:"This choice is correct",rationale:"It was correct because of the way it is"},u={...r,correct:!1,content:"This choice is incorrect",rationale:"It was incorrect because of the way it is"};return e.jsxs(e.Fragment,{children:[e.jsx(t,{...d}),e.jsx(t,{...u})]})};o.__docgenInfo={description:"",methods:[],displayName:"Interactive",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};n.__docgenInfo={description:"",methods:[],displayName:"Checked",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};s.__docgenInfo={description:"",methods:[],displayName:"ReviewMode",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};c.__docgenInfo={description:"",methods:[],displayName:"Rationale",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};var p,l,m;o.parameters={...o.parameters,docs:{...(p=o.parameters)==null?void 0:p.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{a as f}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{C as t}from"./choice-Xr-SKHrB.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";const i={checked:!1,rationale:"This is a good rationale",content:"This is a possible choice",correct:!0,disabled:!1,pos:0,reviewMode:!1,showRationale:!1,showCorrectness:!1,multipleSelect:!1,crossedOut:!1,previouslyAnswered:!1,onChange:f("changed")},de={title:"Perseus/Widgets/Radio/Choice",args:i},o=a=>e.jsx(t,{...a}),n=a=>{const r={...i,checked:!0,showCorrectness:!0},d={...r,correct:!0,content:"This choice is correct"},u={...r,correct:!1,content:"This choice is incorrect"};return e.jsxs(e.Fragment,{children:[e.jsx(t,{...d}),e.jsx(t,{...u})]})},s=a=>{const r={...i,showCorrectness:!0,reviewMode:!0,multipleSelect:!0};return e.jsxs(e.Fragment,{children:[e.jsx(t,{...r,correct:!0,checked:!0,content:"This choice was correct and checked"}),e.jsx(t,{...r,correct:!0,content:"This choice was also correct and not checked"}),e.jsx(t,{...r,correct:!1,checked:!0,content:"This choice was incorrect and checked"}),e.jsx(t,{...r,correct:!1,content:"This choice was also incorrect and not checked"})]})},c=a=>{const r={...i,checked:!0,showCorrectness:!0,showRationale:!0,reviewMode:!0},d={...r,correct:!0,content:"This choice is correct",rationale:"It was correct because of the way it is"},u={...r,correct:!1,content:"This choice is incorrect",rationale:"It was incorrect because of the way it is"};return e.jsxs(e.Fragment,{children:[e.jsx(t,{...d}),e.jsx(t,{...u})]})};o.__docgenInfo={description:"",methods:[],displayName:"Interactive",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};n.__docgenInfo={description:"",methods:[],displayName:"Checked",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};s.__docgenInfo={description:"",methods:[],displayName:"ReviewMode",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};c.__docgenInfo={description:"",methods:[],displayName:"Rationale",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};var p,l,m;o.parameters={...o.parameters,docs:{...(p=o.parameters)==null?void 0:p.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(m=(l=o.parameters)==null?void 0:l.docs)==null?void 0:m.source}}};var h,y,b;n.parameters={...n.parameters,docs:{...(h=n.parameters)==null?void 0:h.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const sharedProps = { diff --git a/assets/color-select-4NqU465A.js b/assets/color-select-javI8CkK.js similarity index 76% rename from assets/color-select-4NqU465A.js rename to assets/color-select-javI8CkK.js index f9bc66a4dd..6258b7dd1f 100644 --- a/assets/color-select-4NqU465A.js +++ b/assets/color-select-javI8CkK.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{l}from"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{V as n}from"./index-0DbkllkJ.js";import{S as a,O as c}from"./answer-choices-lVeJkx-U.js";import{S as u}from"./index-nqMmpXbO.js";import{s as d}from"./index-deFLJwr4.js";import{a as y}from"./index-18qWGOW7.js";import{l as f}from"./index-awljIyHI.js";import{C as g}from"./util-x8Ikjhfh.js";const x=Object.keys(l),o=i=>{const{selectedValue:s,style:m,onChange:p}=i;return e.jsx(n,{style:[t.row,m],children:e.jsxs(y,{tag:"label",style:t.row,children:["color",e.jsx(u,{size:d.xxSmall_6}),e.jsx(a,{selectedValue:s,onChange:p,placeholder:"",children:x.map(r=>e.jsx(c,{value:r,label:r,leftAccessory:e.jsx(g,{color:r,decorative:!0})},r))})]})})},t=f.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center",minWidth:"auto"}}),N=o;o.__docgenInfo={description:"",methods:[],displayName:"ColorSelect",props:{selectedValue:{required:!0,tsType:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},description:""},style:{required:!1,tsType:{name:"StyleType"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValue: string) => void",signature:{arguments:[{type:{name:"string"},name:"newValue"}],return:{name:"void"}}},description:""}}};export{N as C}; +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{l}from"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{V as n}from"./index-0DbkllkJ.js";import{S as a,O as c}from"./answer-choices-iyIz6W_C.js";import{S as u}from"./index-nqMmpXbO.js";import{s as d}from"./index-deFLJwr4.js";import{a as y}from"./index-18qWGOW7.js";import{l as f}from"./index-awljIyHI.js";import{C as g}from"./util-ZotWJxjO.js";const x=Object.keys(l),o=i=>{const{selectedValue:s,style:m,onChange:p}=i;return e.jsx(n,{style:[t.row,m],children:e.jsxs(y,{tag:"label",style:t.row,children:["color",e.jsx(u,{size:d.xxSmall_6}),e.jsx(a,{selectedValue:s,onChange:p,placeholder:"",children:x.map(r=>e.jsx(c,{value:r,label:r,leftAccessory:e.jsx(g,{color:r,decorative:!0})},r))})]})})},t=f.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center",minWidth:"auto"}}),N=o;o.__docgenInfo={description:"",methods:[],displayName:"ColorSelect",props:{selectedValue:{required:!0,tsType:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},description:""},style:{required:!1,tsType:{name:"StyleType"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValue: string) => void",signature:{arguments:[{type:{name:"string"},name:"newValue"}],return:{name:"void"}}},description:""}}};export{N as C}; diff --git a/assets/color-select.stories-x-6zmK3s.js b/assets/color-select.stories-N9ZPo6Xv.js similarity index 79% rename from assets/color-select.stories-x-6zmK3s.js rename to assets/color-select.stories-N9ZPo6Xv.js index a530f9204f..4fcab6c7f5 100644 --- a/assets/color-select.stories-x-6zmK3s.js +++ b/assets/color-select.stories-N9ZPo6Xv.js @@ -1,4 +1,4 @@ -import{j as l}from"./jsx-runtime-63Ea5SlK.js";import{r as f}from"./index-6oxdNXpR.js";import{C as t}from"./color-select-4NqU465A.js";import{g as S}from"./util-x8Ikjhfh.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";const pr={title:"PerseusEditor/Components/Color Select",component:t},o=e=>l.jsx(t,{...e}),c=S("point").color;o.args={id:"color-select",selectedValue:c,onChange:()=>{}};const r={render:function(){const[d,u]=f.useState(c),C=g=>{u(g)};return l.jsx(t,{selectedValue:d,onChange:C})}};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var m,p,i;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as l}from"./jsx-runtime-63Ea5SlK.js";import{r as f}from"./index-6oxdNXpR.js";import{C as t}from"./color-select-javI8CkK.js";import{g as S}from"./util-ZotWJxjO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";const pr={title:"PerseusEditor/Components/Color Select",component:t},o=e=>l.jsx(t,{...e}),c=S("point").color;o.args={id:"color-select",selectedValue:c,onChange:()=>{}};const r={render:function(){const[d,u]=f.useState(c),C=g=>{u(g)};return l.jsx(t,{selectedValue:d,onChange:C})}};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var m,p,i;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(i=(p=o.parameters)==null?void 0:p.docs)==null?void 0:i.source}}};var s,n,a;r.parameters={...r.parameters,docs:{...(s=r.parameters)==null?void 0:s.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/color-swatch.stories-xFVVW1kt.js b/assets/color-swatch.stories-MYv-ZEpI.js similarity index 76% rename from assets/color-swatch.stories-xFVVW1kt.js rename to assets/color-swatch.stories-MYv-ZEpI.js index c03ae8f691..ab757f343c 100644 --- a/assets/color-swatch.stories-xFVVW1kt.js +++ b/assets/color-swatch.stories-MYv-ZEpI.js @@ -1,3 +1,3 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{C as p,g as s}from"./util-x8Ikjhfh.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";const Vo={title:"PerseusEditor/Components/Color Swatch",component:p},o=i=>e.jsx(p,{...i});o.args={color:s("point").color,filled:!0};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var r,t,m;o.parameters={...o.parameters,docs:{...(r=o.parameters)==null?void 0:r.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{C as p,g as s}from"./util-ZotWJxjO.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";const Vo={title:"PerseusEditor/Components/Color Swatch",component:p},o=i=>e.jsx(p,{...i});o.args={color:s("point").color,filled:!0};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var r,t,m;o.parameters={...o.parameters,docs:{...(r=o.parameters)==null?void 0:r.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(m=(t=o.parameters)==null?void 0:t.docs)==null?void 0:m.source}}};const Wo=["Default"];export{o as Default,Wo as __namedExportsOrder,Vo as default}; diff --git a/assets/content-preview.stories-SCc4vI8q.js b/assets/content-preview.stories-7f09zHGu.js similarity index 98% rename from assets/content-preview.stories-SCc4vI8q.js rename to assets/content-preview.stories-7f09zHGu.js index b087578257..4f83d12488 100644 --- a/assets/content-preview.stories-SCc4vI8q.js +++ b/assets/content-preview.stories-7f09zHGu.js @@ -1,20 +1,32 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import{R as W}from"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-k-0mNqHS.js";import{u as I,a as z,m as E}from"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{V as o}from"./index-0DbkllkJ.js";import{s as f}from"./index-deFLJwr4.js";import{r as C}from"./index-6oxdNXpR.js";import{c as N}from"./article-renderer.testdata-spwNviYy.js";import{b as L}from"./radio.testdata-sITJ8lxE.js";import{D as _}from"./device-framer-MUDr0WgQ.js";import{V as P}from"./viewport-resizer-N8YtwzDx.js";import{S as $,a as F,M as U}from"./mobile-keypad-Muuas9zV.js";import"./prop-types-d_cUcR3L.js";import"./key-translator-hixns6dh.js";import"./button-assets-ozecF1qE.js";import{l as M}from"./index-awljIyHI.js";import{l as D}from"./constants-p_UgHLsb.js";/* empty css */import"./enums-x5qaTru7.js";import"./index-18qWGOW7.js";import"./index-dnMhQZ-1.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-9gkyvru-.js";import"./perseus-error-l3K_anoI.js";import"./index-Dfd6auV6.js";import"./input-with-examples-YO5BCgg1.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./icon-paths-5JCXzGsq.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-CyYhwSUV.js";import"./react-router-dom-VIBHfbW6.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./answer-choices-lVeJkx-U.js";import"./index-469F30Ub.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./asset-context-H6Iqp7Gi.js";import"./index-J2t_5nK1.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./fixed-to-responsive-for_tVF1.js";import"./video-transcript-link-_gpkjmR8.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-qMhJW4bS.js";import"./invariant-bu5zBsRS.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./choice-none-above-dRu7sfJj.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./components-ODdjt0Ld.js";import"./icon-paths-EoBkHOLI.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";function l({question:r,apiOptions:t,seamless:s,linterContext:k,legacyPerseusLint:q,previewDevice:T}){const R=I(),u=T!=="desktop",A=u?"perseus-mobile":"";return e.jsx(o,{className:`framework-perseus ${A}`,style:[d.container,s?void 0:d.gutter],children:e.jsx($,{children:e.jsx(F.Consumer,{children:({setKeypadActive:O,keypadElement:x,setKeypadElement:j})=>e.jsxs(e.Fragment,{children:[e.jsx(W,{strings:R.strings,apiOptions:{...t,isMobile:u},keypadElement:x,linterContext:k,legacyPerseusLint:q,...r}),e.jsx(U,{onAnalyticsEvent:()=>Promise.resolve(),onDismiss:()=>O(!1),onElementMounted:j})]})})})})}const d=M.StyleSheet.create({container:{padding:f.xxxSmall_4,containerType:"inline-size",containerName:"perseus-root"},gutter:{marginRight:D}});l.__docgenInfo={description:"The `ContentPreview` component provides a simple preview system for Perseus\nContent. Due to how Persus styles are built, the preview styling matches the\ncurrent device based on the viewport width (using `@media` queries for\n`min-width` and `max-width`).\n\nThe preview will render the mobile variant (styling and layout) when the\n`previewDevice` is phone or tablet. Note that the styling cannot be matched\n100% due to the above `@media` query limitation.",methods:[],displayName:"ContentPreview",props:{question:{required:!1,tsType:{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import{R as W}from"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-0C4KXdeC.js";import{u as I,a as z,m as E}from"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{V as o}from"./index-0DbkllkJ.js";import{s as f}from"./index-deFLJwr4.js";import{r as N}from"./index-6oxdNXpR.js";import{c as C}from"./article-renderer.testdata-spwNviYy.js";import{b as L}from"./radio.testdata-sITJ8lxE.js";import{D as _}from"./device-framer-MUDr0WgQ.js";import{V as P}from"./viewport-resizer-mN7DSD_Q.js";import{S as $,a as F,M as U}from"./mobile-keypad-Muuas9zV.js";import"./prop-types-d_cUcR3L.js";import"./key-translator-hixns6dh.js";import"./button-assets-ozecF1qE.js";import{l as M}from"./index-awljIyHI.js";import{l as D}from"./constants-p_UgHLsb.js";/* empty css */import"./enums-x5qaTru7.js";import"./index-18qWGOW7.js";import"./index-dnMhQZ-1.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-9gkyvru-.js";import"./perseus-error-l3K_anoI.js";import"./index-Dfd6auV6.js";import"./input-with-examples-PaWkADGr.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./icon-paths-5JCXzGsq.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-CyYhwSUV.js";import"./react-router-dom-VIBHfbW6.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./answer-choices-iyIz6W_C.js";import"./index-469F30Ub.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./asset-context-H6Iqp7Gi.js";import"./index-J2t_5nK1.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./fixed-to-responsive-for_tVF1.js";import"./video-transcript-link-_gpkjmR8.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-qMhJW4bS.js";import"./invariant-bu5zBsRS.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./choice-none-above-vDwffTnk.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./components-ODdjt0Ld.js";import"./icon-paths-EoBkHOLI.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";function l({question:r,apiOptions:t,seamless:s,linterContext:k,legacyPerseusLint:q,previewDevice:T}){const R=I(),u=T!=="desktop",A=u?"perseus-mobile":"";return e.jsx(o,{className:`framework-perseus ${A}`,style:[d.container,s?void 0:d.gutter],children:e.jsx($,{children:e.jsx(F.Consumer,{children:({setKeypadActive:O,keypadElement:x,setKeypadElement:j})=>e.jsxs(e.Fragment,{children:[e.jsx(W,{strings:R.strings,apiOptions:{...t,isMobile:u},keypadElement:x,linterContext:k,legacyPerseusLint:q,...r}),e.jsx(U,{onAnalyticsEvent:()=>Promise.resolve(),onDismiss:()=>O(!1),onElementMounted:j})]})})})})}const d=M.StyleSheet.create({container:{padding:f.xxxSmall_4,containerType:"inline-size",containerName:"perseus-root"},gutter:{marginRight:D}});l.__docgenInfo={description:"The `ContentPreview` component provides a simple preview system for Perseus\nContent. Due to how Persus styles are built, the preview styling matches the\ncurrent device based on the viewport width (using `@media` queries for\n`min-width` and `max-width`).\n\nThe preview will render the mobile variant (styling and layout) when the\n`previewDevice` is phone or tablet. Note that the styling cannot be matched\n100% due to the above `@media` query limitation.",methods:[],displayName:"ContentPreview",props:{question:{required:!1,tsType:{name:"signature",type:"object",raw:`{ + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -1466,14 +1478,15 @@ import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-mU-6RWLp major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},description:""},apiOptions:{required:!1,tsType:{name:"Readonly",elements:[{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},description:""},apiOptions:{required:!1,tsType:{name:"Readonly",elements:[{name:"signature",type:"object",raw:`{ isArticle?: boolean; onFocusChange?: ( newFocusPath: FocusPath, @@ -3309,7 +3322,7 @@ the available choices.`}]}}],raw:`Readonly<{ paths: ReadonlyArray; stack: ReadonlyArray; // additional properties can be added to the context by widgets -}`,signature:{properties:[{key:"contentType",value:{name:"string",required:!0}},{key:"highlightLint",value:{name:"boolean",required:!0}},{key:"paths",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!0}},{key:"stack",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!0}}]}},description:""},legacyPerseusLint:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:""},previewDevice:{required:!0,tsType:{name:"union",raw:'"phone" | "tablet" | "desktop"',elements:[{name:"literal",value:'"phone"'},{name:"literal",value:'"tablet"'},{name:"literal",value:'"desktop"'}]},description:""}}};const S=r=>{const[t,s]=C.useState("phone");return e.jsxs(o,{children:[e.jsx(P,{deviceType:t,onViewportSizeChanged:s}),e.jsx(_,{nochrome:!1,deviceType:t,children:e.jsx(l,{...r})})]})},_r={title:"PerseusEditor/Content Preview",component:l,decorators:[r=>e.jsx(o,{style:{margin:f.xxSmall_6},children:e.jsx(z,{strings:E,locale:"en",children:e.jsx(r,{})})})],render:r=>e.jsx(S,{...r})},n={args:{question:L}},a={args:{question:N}},i={args:{linterContext:{contentType:"exercise",highlightLint:!0,stack:[],paths:[]},question:{content:`# H1s bad +}`,signature:{properties:[{key:"contentType",value:{name:"string",required:!0}},{key:"highlightLint",value:{name:"boolean",required:!0}},{key:"paths",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!0}},{key:"stack",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!0}}]}},description:""},legacyPerseusLint:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:""},previewDevice:{required:!0,tsType:{name:"union",raw:'"phone" | "tablet" | "desktop"',elements:[{name:"literal",value:'"phone"'},{name:"literal",value:'"tablet"'},{name:"literal",value:'"desktop"'}]},description:""}}};const S=r=>{const[t,s]=N.useState("phone");return e.jsxs(o,{children:[e.jsx(P,{deviceType:t,onViewportSizeChanged:s}),e.jsx(_,{nochrome:!1,deviceType:t,children:e.jsx(l,{...r})})]})},_r={title:"PerseusEditor/Content Preview",component:l,decorators:[r=>e.jsx(o,{style:{margin:f.xxSmall_6},children:e.jsx(z,{strings:E,locale:"en",children:e.jsx(r,{})})})],render:r=>e.jsx(S,{...r})},n={args:{question:L}},a={args:{question:C}},i={args:{linterContext:{contentType:"exercise",highlightLint:!0,stack:[],paths:[]},question:{content:`# H1s bad Here is some unclosed math: $1+1=3 diff --git a/assets/cs-program.stories-7U4pLff7.js b/assets/cs-program.stories-NRY7IRjl.js similarity index 77% rename from assets/cs-program.stories-7U4pLff7.js rename to assets/cs-program.stories-NRY7IRjl.js index b80b79dbc4..5679ef2db9 100644 --- a/assets/cs-program.stories-7U4pLff7.js +++ b/assets/cs-program.stories-NRY7IRjl.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{R as p}from"./renderer-with-debug-ui-75hBDQJk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const e={content:`[[☃ cs-program 1]] +import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{R as p}from"./renderer-with-debug-ui-Jq91P-PK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const e={content:`[[☃ cs-program 1]] `,images:{},widgets:{"cs-program 1":{graded:!0,version:{major:0,minor:0},static:!1,type:"cs-program",options:{settings:[{name:"",value:""},{name:"",value:""}],height:540,width:640,programID:"6293105639817216",static:!1,showButtons:!1,showEditor:!1},alignment:"block"}}},Vr={title:"Perseus/Widgets/CS Program"},r=s=>m.jsx(p,{question:e});r.__docgenInfo={description:"",methods:[],displayName:"Question1"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/definition-editor-_ZvvsZ3f.js b/assets/definition-editor-j1sWsdkj.js similarity index 81% rename from assets/definition-editor-_ZvvsZ3f.js rename to assets/definition-editor-j1sWsdkj.js index 0494cf3d85..13369cf738 100644 --- a/assets/definition-editor-_ZvvsZ3f.js +++ b/assets/definition-editor-j1sWsdkj.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{c as n,p}from"./article-renderer-mU-6RWLp.js";import{_ as a}from"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import{c as m}from"./components-ODdjt0Ld.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{E as l}from"./editor-jsonify-g-bIiSIM.js";import{P as o}from"./index-0C4KXdeC.js";import{r as d}from"./index-6oxdNXpR.js";import{E as c}from"./editor-Mb85oHy5.js";const{TextInput:u}=m,t=class t extends d.Component{constructor(){super(...arguments),this.change=(...i)=>n.apply(this,i),this.serialize=()=>l.serialize.call(this)}render(){return e.jsxs("div",{className:"perseus-widget-definition-editor",children:[e.jsx("a",{href:"https://docs.google.com/document/d/1udaPef4imOfTMhmLDlWq4SM0mxL0r3YHFZE-5J1uGfo",target:"_blank",children:"Definition style guide"}),e.jsx("div",{className:"perseus-widget-row",children:e.jsxs("label",{children:["Word to be defined:"," ",e.jsx(u,{value:this.props.togglePrompt,onChange:this.change("togglePrompt"),placeholder:"define me"})]})}),e.jsx("div",{className:"perseus-widget-row",children:e.jsx(c,{apiOptions:this.props.apiOptions,content:this.props.definition,widgetEnabled:!1,placeholder:"definition goes here",onChange:i=>{const r={};a.has(i,"content")&&(r.definition=i.content),this.change(r)}})})]})}};t.propTypes={...p,togglePrompt:o.string,definition:o.string,apiOptions:o.any},t.widgetName="definition",t.defaultProps={togglePrompt:"",definition:""};let s=t;s.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"DefinitionEditor",props:{togglePrompt:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},definition:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},apiOptions:{description:"",type:{name:"any"},required:!1}},composes:["@khanacademy/perseus"]};export{s as D}; +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{c as n,p}from"./article-renderer-HEYBK15c.js";import{_ as a}from"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c as m}from"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{E as l}from"./editor-jsonify-mta12v4L.js";import{P as o}from"./index-k-0mNqHS.js";import{r as d}from"./index-6oxdNXpR.js";import{E as c}from"./editor-Gp3Qu6_d.js";const{TextInput:u}=m,t=class t extends d.Component{constructor(){super(...arguments),this.change=(...i)=>n.apply(this,i),this.serialize=()=>l.serialize.call(this)}render(){return e.jsxs("div",{className:"perseus-widget-definition-editor",children:[e.jsx("a",{href:"https://docs.google.com/document/d/1udaPef4imOfTMhmLDlWq4SM0mxL0r3YHFZE-5J1uGfo",target:"_blank",children:"Definition style guide"}),e.jsx("div",{className:"perseus-widget-row",children:e.jsxs("label",{children:["Word to be defined:"," ",e.jsx(u,{value:this.props.togglePrompt,onChange:this.change("togglePrompt"),placeholder:"define me"})]})}),e.jsx("div",{className:"perseus-widget-row",children:e.jsx(c,{apiOptions:this.props.apiOptions,content:this.props.definition,widgetEnabled:!1,placeholder:"definition goes here",onChange:i=>{const r={};a.has(i,"content")&&(r.definition=i.content),this.change(r)}})})]})}};t.propTypes={...p,togglePrompt:o.string,definition:o.string,apiOptions:o.any},t.widgetName="definition",t.defaultProps={togglePrompt:"",definition:""};let s=t;s.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"DefinitionEditor",props:{togglePrompt:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},definition:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},apiOptions:{description:"",type:{name:"any"},required:!1}},composes:["@khanacademy/perseus"]};export{s as D}; diff --git a/assets/definition-editor.stories-tMtydvHM.js b/assets/definition-editor.stories-Ogpo4rLz.js similarity index 72% rename from assets/definition-editor.stories-tMtydvHM.js rename to assets/definition-editor.stories-Ogpo4rLz.js index c044943a19..7e8e72a99e 100644 --- a/assets/definition-editor.stories-tMtydvHM.js +++ b/assets/definition-editor.stories-Ogpo4rLz.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{a as p}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{D as e}from"./definition-editor-_ZvvsZ3f.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./editor-jsonify-g-bIiSIM.js";import"./index-0C4KXdeC.js";import"./editor-Mb85oHy5.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-qbKF8qYC.js";import"./index-wzSCRJFK.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";const mo={title:"PerseusEditor/Widgets/Definition Editor"},t=n=>m.jsx(e,{onChange:p("onChange")});t.__docgenInfo={description:"",methods:[],displayName:"Default"};var o,r,i;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{a as p}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{D as e}from"./definition-editor-j1sWsdkj.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./editor-jsonify-mta12v4L.js";import"./index-k-0mNqHS.js";import"./editor-Gp3Qu6_d.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-XMME9ave.js";import"./index-wzSCRJFK.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";const mo={title:"PerseusEditor/Widgets/Definition Editor"},t=n=>m.jsx(e,{onChange:p("onChange")});t.__docgenInfo={description:"",methods:[],displayName:"Default"};var o,r,i;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(r=t.parameters)==null?void 0:r.docs)==null?void 0:i.source}}};const po=["Default"];export{t as Default,po as __namedExportsOrder,mo as default}; diff --git a/assets/definition.stories-oavcFu1X.js b/assets/definition.stories-bNFFwy0T.js similarity index 87% rename from assets/definition.stories-oavcFu1X.js rename to assets/definition.stories-bNFFwy0T.js index 2e3d0fd4e6..dc946712ce 100644 --- a/assets/definition.stories-oavcFu1X.js +++ b/assets/definition.stories-bNFFwy0T.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-63Ea5SlK.js";import{R as f}from"./renderer-with-debug-ui-75hBDQJk.js";import{s as h}from"./test-dependencies-8Mfke9yn.js";import{A as g}from"./article-renderer-mU-6RWLp.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./side-by-side-MBJuyilC.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-item-CWRjfKXr.js";import"./renderer-1DxKQj1_.js";import"./index-J2t_5nK1.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./hints-renderer-alc4yvsU.js";import"./shared-4TdECMLk.js";import"./base-radio-9_hKye4B.js";import"./choice-none-above-dRu7sfJj.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./hud-ifw9Ofbw.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./enums-x5qaTru7.js";import"./input-with-examples-YO5BCgg1.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./answer-choices-lVeJkx-U.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";const pt={title:"Perseus/Widgets/Definition"},w={content:`Read the excerpt and answer the question below. +import{j as o}from"./jsx-runtime-63Ea5SlK.js";import{R as f}from"./renderer-with-debug-ui-Jq91P-PK.js";import{s as h}from"./test-dependencies-1Svp3QCw.js";import{A as g}from"./article-renderer-HEYBK15c.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./side-by-side-MBJuyilC.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-item-C-BdPaPl.js";import"./renderer-L37a98D_.js";import"./index-J2t_5nK1.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./hints-renderer-zzse9ai2.js";import"./shared-4TdECMLk.js";import"./base-radio-kypcKNEK.js";import"./choice-none-above-vDwffTnk.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./hud-ifw9Ofbw.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./register-all-widgets-for-testing-vNa20up7.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./enums-x5qaTru7.js";import"./input-with-examples-PaWkADGr.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./answer-choices-iyIz6W_C.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";const pt={title:"Perseus/Widgets/Definition"},w={content:`Read the excerpt and answer the question below. The Governor and Council of the Massachusetts had much conference many days; and at last . . . . concluded a peace and friendship with [[☃ definition 1]], upon these conditions.`,images:{},widgets:{"definition 1":{graded:!0,version:{major:0,minor:0},static:!1,type:"definition",options:{definition:"A Native American people in Connecticut; white settlers in New England, the Pequots, and their respective allies were at war from 1636-1638.",togglePrompt:"the Pequots",static:!1},alignment:"default"}}},y={content:`Read the excerpt and answer the question below. diff --git a/assets/deprecated-standin.stories-r3V8iN5_.js b/assets/deprecated-standin.stories-HSliRaD0.js similarity index 78% rename from assets/deprecated-standin.stories-r3V8iN5_.js rename to assets/deprecated-standin.stories-HSliRaD0.js index 77989a46c2..456062df28 100644 --- a/assets/deprecated-standin.stories-r3V8iN5_.js +++ b/assets/deprecated-standin.stories-HSliRaD0.js @@ -1,4 +1,4 @@ -import{j as p}from"./jsx-runtime-63Ea5SlK.js";import{R as m}from"./renderer-with-debug-ui-75hBDQJk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const Kt={title:"Perseus/Widgets/Deprecated Standin"},e={content:`$\\overleftrightarrow{MN}$ is the perpendicular bisector of segment $\\overline{JL}$. +import{j as p}from"./jsx-runtime-63Ea5SlK.js";import{R as m}from"./renderer-with-debug-ui-Jq91P-PK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const Kt={title:"Perseus/Widgets/Deprecated Standin"},e={content:`$\\overleftrightarrow{MN}$ is the perpendicular bisector of segment $\\overline{JL}$. **Perform a reflection that proves $M$ must be equidistant from $J$ and $L$ and select the option which explains the proof.** The statement must be true for any point $M$ which lies on the perpendicular bisector. diff --git a/assets/dropdown-editor-ueJJ3t0p.js b/assets/dropdown-editor-BFRSuUKm.js similarity index 92% rename from assets/dropdown-editor-ueJJ3t0p.js rename to assets/dropdown-editor-BFRSuUKm.js index d025587281..163e80215f 100644 --- a/assets/dropdown-editor-ueJJ3t0p.js +++ b/assets/dropdown-editor-BFRSuUKm.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-mU-6RWLp.js";import{_ as i}from"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import{c as m}from"./components-ODdjt0Ld.js";import{i as u}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{E as f}from"./editor-jsonify-g-bIiSIM.js";import{T as h}from"./index-V5gl6frG.js";import{L as b,a as t}from"./index-18qWGOW7.js";import{P as l}from"./index-0C4KXdeC.js";import{r as g}from"./index-6oxdNXpR.js";import{F as x}from"./index-9gkyvru-.js";import{i as C}from"./icon-paths-EoBkHOLI.js";const{InfoTip:c,InlineIcon:d}=m,r=class r extends g.Component{constructor(){super(...arguments),this.onVisibleLabelChange=s=>{this.props.onChange({visibleLabel:s})},this.onAriaLabelChange=s=>{this.props.onChange({ariaLabel:s})},this.onPlaceholderChange=s=>{this.props.onChange({placeholder:s})},this.onCorrectChange=s=>{const n=i.map(this.props.choices,function(o,a){return i.extend({},o,{correct:a===s})});this.props.onChange({choices:n})},this.onContentChange=(s,n)=>{const o=this.props.choices.slice(),a=i.clone(o[s]);a.content=n.target.value,o[s]=a,this.props.onChange({choices:o})},this.addChoice=s=>{s.preventDefault();const n=this.props.choices,o={content:"",correct:!1};this.props.onChange({choices:n.concat([o])},this.focus.bind(this,n.length))},this.removeChoice=(s,n)=>{n.preventDefault();const o=i(this.props.choices).clone();o.splice(s,1),this.props.onChange({choices:o})},this.focus=s=>(x.findDOMNode(this.refs["editor"+s]).focus(),!0),this.serialize=()=>f.serialize.call(this)}render(){const s=i.uniqueId("perseus_dropdown_");return e.jsxs("div",{className:"perseus-widget-dropdown",children:[e.jsxs("div",{className:"dropdown-info",children:[e.jsx(b,{children:"Dropdown"}),e.jsx(c,{children:e.jsxs("p",{children:["The drop down is useful for making inequalities in a custom format. We normally use the symbols ","<",","," ",">",', ≤, ≥ (in that order) which you can copy into the choices. When possible, use the "multiple choice" answer type instead.']})})]}),e.jsxs("div",{className:"dropdown-field",children:[e.jsxs(t,{children:["Visible label",e.jsx(h,{value:this.props.visibleLabel,onChange:this.onVisibleLabelChange})]}),e.jsx(c,{children:e.jsx("p",{children:"Optional visible label"})})]}),e.jsxs("div",{className:"dropdown-field",children:[e.jsxs(t,{children:["Aria label",e.jsx(h,{value:this.props.ariaLabel,onChange:this.onAriaLabelChange,type:"text"})]}),e.jsx(c,{children:e.jsxs("p",{children:["Label text that's read by screen readers. Highly recommend adding a label here to ensure your exercise is accessible. For more information on writing accessible labels, please see"," ",e.jsx("a",{href:"https://www.w3.org/WAI/tips/designing/#ensure-that-form-elements-include-clearly-associated-labels",target:"_blank",children:"this article."})," ",'If left blank, the value will default to "Select an answer".']})})]}),e.jsxs("div",{className:"dropdown-field",children:[e.jsxs(t,{children:["Placeholder",e.jsx(h,{value:this.props.placeholder,onChange:this.onPlaceholderChange,placeholder:"Placeholder value"})]}),e.jsx(c,{children:e.jsx("p",{children:"This value will appear as the drop down default. It should give the user some indication of the values available in the drop down itself, e.g., Yes/No/Maybe."})})]}),e.jsx("div",{className:"clearfix"}),e.jsx(t,{children:"Choices"}),e.jsx("ul",{className:"dropdown-choices",children:this.props.choices.map(function(n,o){const a=n.correct?"correct":"incorrect";return e.jsx("li",{children:e.jsxs("div",{children:[e.jsx("input",{ref:"radio"+o,type:"radio",name:s,checked:n.correct?"checked":"",onChange:this.onCorrectChange.bind(this,o),value:o}),e.jsx("input",{type:"text",ref:"editor"+o,onChange:this.onContentChange.bind(this,o),className:a,value:n.content}),e.jsx("a",{href:"#",className:"simple-button orange","aria-label":"Delete choice",onClick:this.removeChoice.bind(this,o),children:e.jsx("span",{className:"remove-choice",children:e.jsx(d,{...u})})})]})},""+o)},this)}),e.jsx("div",{className:"add-choice-container",children:e.jsxs("a",{href:"#",className:"simple-button orange",onClick:this.addChoice,children:[e.jsx(d,{...C})," Add a choice"," "]})})]})}};r.propTypes={choices:l.arrayOf(l.shape({content:l.string,correct:l.bool})),placeholder:l.string},r.widgetName="dropdown",r.defaultProps={placeholder:"",choices:[{content:"",correct:!1}]};let p=r;p.__docgenInfo={description:"",methods:[{name:"onVisibleLabelChange",docblock:null,modifiers:[],params:[{name:"visibleLabel",optional:!1,type:null}],returns:null},{name:"onAriaLabelChange",docblock:null,modifiers:[],params:[{name:"ariaLabel",optional:!1,type:null}],returns:null},{name:"onPlaceholderChange",docblock:null,modifiers:[],params:[{name:"placeholder",optional:!1,type:null}],returns:null},{name:"onCorrectChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"onContentChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"addChoice",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"removeChoice",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"DropdownEditor",props:{placeholder:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},choices:{defaultValue:{value:`[ +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-HEYBK15c.js";import{_ as i}from"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c as m}from"./components-ODdjt0Ld.js";import{i as u}from"./icon-paths-5JCXzGsq.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{E as f}from"./editor-jsonify-mta12v4L.js";import{T as h}from"./index-V5gl6frG.js";import{L as b,a as t}from"./index-18qWGOW7.js";import{P as l}from"./index-k-0mNqHS.js";import{r as g}from"./index-6oxdNXpR.js";import{F as x}from"./index-9gkyvru-.js";import{i as C}from"./icon-paths-EoBkHOLI.js";const{InfoTip:c,InlineIcon:d}=m,r=class r extends g.Component{constructor(){super(...arguments),this.onVisibleLabelChange=s=>{this.props.onChange({visibleLabel:s})},this.onAriaLabelChange=s=>{this.props.onChange({ariaLabel:s})},this.onPlaceholderChange=s=>{this.props.onChange({placeholder:s})},this.onCorrectChange=s=>{const n=i.map(this.props.choices,function(o,a){return i.extend({},o,{correct:a===s})});this.props.onChange({choices:n})},this.onContentChange=(s,n)=>{const o=this.props.choices.slice(),a=i.clone(o[s]);a.content=n.target.value,o[s]=a,this.props.onChange({choices:o})},this.addChoice=s=>{s.preventDefault();const n=this.props.choices,o={content:"",correct:!1};this.props.onChange({choices:n.concat([o])},this.focus.bind(this,n.length))},this.removeChoice=(s,n)=>{n.preventDefault();const o=i(this.props.choices).clone();o.splice(s,1),this.props.onChange({choices:o})},this.focus=s=>(x.findDOMNode(this.refs["editor"+s]).focus(),!0),this.serialize=()=>f.serialize.call(this)}render(){const s=i.uniqueId("perseus_dropdown_");return e.jsxs("div",{className:"perseus-widget-dropdown",children:[e.jsxs("div",{className:"dropdown-info",children:[e.jsx(b,{children:"Dropdown"}),e.jsx(c,{children:e.jsxs("p",{children:["The drop down is useful for making inequalities in a custom format. We normally use the symbols ","<",","," ",">",', ≤, ≥ (in that order) which you can copy into the choices. When possible, use the "multiple choice" answer type instead.']})})]}),e.jsxs("div",{className:"dropdown-field",children:[e.jsxs(t,{children:["Visible label",e.jsx(h,{value:this.props.visibleLabel,onChange:this.onVisibleLabelChange})]}),e.jsx(c,{children:e.jsx("p",{children:"Optional visible label"})})]}),e.jsxs("div",{className:"dropdown-field",children:[e.jsxs(t,{children:["Aria label",e.jsx(h,{value:this.props.ariaLabel,onChange:this.onAriaLabelChange,type:"text"})]}),e.jsx(c,{children:e.jsxs("p",{children:["Label text that's read by screen readers. Highly recommend adding a label here to ensure your exercise is accessible. For more information on writing accessible labels, please see"," ",e.jsx("a",{href:"https://www.w3.org/WAI/tips/designing/#ensure-that-form-elements-include-clearly-associated-labels",target:"_blank",children:"this article."})," ",'If left blank, the value will default to "Select an answer".']})})]}),e.jsxs("div",{className:"dropdown-field",children:[e.jsxs(t,{children:["Placeholder",e.jsx(h,{value:this.props.placeholder,onChange:this.onPlaceholderChange,placeholder:"Placeholder value"})]}),e.jsx(c,{children:e.jsx("p",{children:"This value will appear as the drop down default. It should give the user some indication of the values available in the drop down itself, e.g., Yes/No/Maybe."})})]}),e.jsx("div",{className:"clearfix"}),e.jsx(t,{children:"Choices"}),e.jsx("ul",{className:"dropdown-choices",children:this.props.choices.map(function(n,o){const a=n.correct?"correct":"incorrect";return e.jsx("li",{children:e.jsxs("div",{children:[e.jsx("input",{ref:"radio"+o,type:"radio",name:s,checked:n.correct?"checked":"",onChange:this.onCorrectChange.bind(this,o),value:o}),e.jsx("input",{type:"text",ref:"editor"+o,onChange:this.onContentChange.bind(this,o),className:a,value:n.content}),e.jsx("a",{href:"#",className:"simple-button orange","aria-label":"Delete choice",onClick:this.removeChoice.bind(this,o),children:e.jsx("span",{className:"remove-choice",children:e.jsx(d,{...u})})})]})},""+o)},this)}),e.jsx("div",{className:"add-choice-container",children:e.jsxs("a",{href:"#",className:"simple-button orange",onClick:this.addChoice,children:[e.jsx(d,{...C})," Add a choice"," "]})})]})}};r.propTypes={choices:l.arrayOf(l.shape({content:l.string,correct:l.bool})),placeholder:l.string},r.widgetName="dropdown",r.defaultProps={placeholder:"",choices:[{content:"",correct:!1}]};let p=r;p.__docgenInfo={description:"",methods:[{name:"onVisibleLabelChange",docblock:null,modifiers:[],params:[{name:"visibleLabel",optional:!1,type:null}],returns:null},{name:"onAriaLabelChange",docblock:null,modifiers:[],params:[{name:"ariaLabel",optional:!1,type:null}],returns:null},{name:"onPlaceholderChange",docblock:null,modifiers:[],params:[{name:"placeholder",optional:!1,type:null}],returns:null},{name:"onCorrectChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"onContentChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"addChoice",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"removeChoice",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"DropdownEditor",props:{placeholder:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},choices:{defaultValue:{value:`[ { content: "", correct: false, diff --git a/assets/dropdown-editor.stories-tWYKsbJs.js b/assets/dropdown-editor.stories-0hVRWfRR.js similarity index 77% rename from assets/dropdown-editor.stories-tWYKsbJs.js rename to assets/dropdown-editor.stories-0hVRWfRR.js index 5b18a292de..cb7bb66b95 100644 --- a/assets/dropdown-editor.stories-tWYKsbJs.js +++ b/assets/dropdown-editor.stories-0hVRWfRR.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-63Ea5SlK.js";import{a as p}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{D as e}from"./dropdown-editor-ueJJ3t0p.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./editor-jsonify-g-bIiSIM.js";import"./index-0C4KXdeC.js";import"./icon-paths-EoBkHOLI.js";const $r={title:"PerseusEditor/Widgets/Dropdown Editor"},r=s=>o.jsx("div",{className:"framework-perseus",children:o.jsx(e,{onChange:p("onChange")})});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,i,m;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as o}from"./jsx-runtime-63Ea5SlK.js";import{a as p}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{D as e}from"./dropdown-editor-BFRSuUKm.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./editor-jsonify-mta12v4L.js";import"./index-k-0mNqHS.js";import"./icon-paths-EoBkHOLI.js";const $r={title:"PerseusEditor/Widgets/Dropdown Editor"},r=s=>o.jsx("div",{className:"framework-perseus",children:o.jsx(e,{onChange:p("onChange")})});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,i,m;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return
; diff --git a/assets/dropdown.stories-1C9X676h.js b/assets/dropdown.stories-ORRIppn4.js similarity index 86% rename from assets/dropdown.stories-1C9X676h.js rename to assets/dropdown.stories-ORRIppn4.js index 8f395b48d6..e6588b0e2c 100644 --- a/assets/dropdown.stories-1C9X676h.js +++ b/assets/dropdown.stories-ORRIppn4.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{R as i}from"./renderer-with-debug-ui-75hBDQJk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const h={content:"The total number of boxes the forklift can carry is [[☃ dropdown 1]] $60$.",images:{},widgets:{"dropdown 1":{type:"dropdown",alignment:"default",static:!1,graded:!0,options:{static:!1,placeholder:"greater/less than or equal to",choices:[{content:"greater than or equal to",correct:!1},{content:"less than or equal to",correct:!0}]},version:{major:0,minor:0}}}},g={content:"[[☃ dropdown 1]]",images:{},widgets:{"dropdown 1":{type:"dropdown",alignment:"default",static:!1,graded:!0,options:{static:!1,placeholder:"Choose an answer",choices:[{content:"True",correct:!0},{content:"False",correct:!1}],visibleLabel:"Test label",ariaLabel:"Test ARIA label"},version:{major:0,minor:0}},"dropdown 2":{type:"dropdown",alignment:"default",static:!1,graded:!0,options:{static:!1,placeholder:"",choices:[{content:"True",correct:!0},{content:"False",correct:!1}],visibleLabel:"Test label",ariaLabel:"Test ARIA label"},version:{major:0,minor:0}}}},w={content:`The dropdown widget is often used inline. This is how it would look in an article with the new visible label: +import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{R as i}from"./renderer-with-debug-ui-Jq91P-PK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const h={content:"The total number of boxes the forklift can carry is [[☃ dropdown 1]] $60$.",images:{},widgets:{"dropdown 1":{type:"dropdown",alignment:"default",static:!1,graded:!0,options:{static:!1,placeholder:"greater/less than or equal to",choices:[{content:"greater than or equal to",correct:!1},{content:"less than or equal to",correct:!0}]},version:{major:0,minor:0}}}},g={content:"[[☃ dropdown 1]]",images:{},widgets:{"dropdown 1":{type:"dropdown",alignment:"default",static:!1,graded:!0,options:{static:!1,placeholder:"Choose an answer",choices:[{content:"True",correct:!0},{content:"False",correct:!1}],visibleLabel:"Test label",ariaLabel:"Test ARIA label"},version:{major:0,minor:0}},"dropdown 2":{type:"dropdown",alignment:"default",static:!1,graded:!0,options:{static:!1,placeholder:"",choices:[{content:"True",correct:!0},{content:"False",correct:!1}],visibleLabel:"Test label",ariaLabel:"Test ARIA label"},version:{major:0,minor:0}}}},w={content:`The dropdown widget is often used inline. This is how it would look in an article with the new visible label: Lorem ipsum odor amet, consectetuer adipiscing elit. Mus curae sollicitudin penatibus, mattis suscipit habitant tincidunt mauris. Vitae curae dolor gravida vehicula adipiscing vulputate penatibus. [[☃ dropdown 1]] Ultricies mollis taciti vel, penatibus dapibus interdum pharetra. Ultricies sollicitudin facilisi vehicula dapibus ligula maecenas libero ligula. Lobortis luctus accumsan rhoncus posuere sapien mi habitant fusce. Per ultrices ac mus ligula habitant pulvinar aliquam dui lacus. diff --git a/assets/editor-Mb85oHy5.js b/assets/editor-Gp3Qu6_d.js similarity index 99% rename from assets/editor-Mb85oHy5.js rename to assets/editor-Gp3Qu6_d.js index 5b9aeac21a..df27618613 100644 --- a/assets/editor-Mb85oHy5.js +++ b/assets/editor-Gp3Qu6_d.js @@ -1,4 +1,4 @@ -import{j as U}from"./jsx-runtime-63Ea5SlK.js";import{S as ws,d as ks}from"./article-renderer-mU-6RWLp.js";import{_ as K,$ as qs}from"./jquery-yG1GhClm.js";import{U as Ue}from"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import{e as Br,g as Ts,b as As,u as Rs,f as xs,h as Ra,i as Os,j as Ws,P as $r,k as js}from"./renderer-1DxKQj1_.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./base-radio-9_hKye4B.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import{L as zs}from"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./dependencies-CP7Uh8Kq.js";import"./version-akiLXZts.js";import{P as Cs,E as Es}from"./perseus-error-l3K_anoI.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{c as Is,g as Ns}from"./_commonjsHelpers-4gQjN7DL.js";import{r as dt}from"./index-6oxdNXpR.js";import{c as _s}from"./components-ODdjt0Ld.js";import{c as Ls,i as Ss}from"./icon-paths-5JCXzGsq.js";import{u as Ps}from"./index-0DbkllkJ.js";import{S as Fs}from"./index-nqMmpXbO.js";import{s as Ms}from"./index-deFLJwr4.js";import{g as Ds}from"./icon-paths-EoBkHOLI.js";import{S as $s}from"./section-control-button-qbKF8qYC.js";import{T as Us}from"./tex-error-view-oha0Bum8.js";var Wa={exports:{}};(function(u,d){(function(q,x){u.exports=x()})(typeof self<"u"?self:Is,function(){return function(c){var q={};function x(O){if(q[O])return q[O].exports;var N=q[O]={i:O,l:!1,exports:{}};return c[O].call(N.exports,N,N.exports,x),N.l=!0,N.exports}return x.m=c,x.c=q,x.d=function(O,N,P){x.o(O,N)||Object.defineProperty(O,N,{enumerable:!0,get:P})},x.r=function(O){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(O,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(O,"__esModule",{value:!0})},x.t=function(O,N){if(N&1&&(O=x(O)),N&8||N&4&&typeof O=="object"&&O&&O.__esModule)return O;var P=Object.create(null);if(x.r(P),Object.defineProperty(P,"default",{enumerable:!0,value:O}),N&2&&typeof O!="string")for(var R in O)x.d(P,R,(function(ae){return O[ae]}).bind(null,R));return P},x.n=function(O){var N=O&&O.__esModule?function(){return O.default}:function(){return O};return x.d(N,"a",N),N},x.o=function(O,N){return Object.prototype.hasOwnProperty.call(O,N)},x.p="",x(x.s=1)}([function(c,q,x){},function(c,q,x){x.r(q),x(0);var O=function(){function o(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}return o.range=function(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new o(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc},o}(),N=function(){function o(t,r){this.text=void 0,this.loc=void 0,this.text=t,this.loc=r}var e=o.prototype;return e.range=function(r,n){return new o(n,O.range(this,r))},o}(),P=function o(e,t){this.position=void 0;var r="KaTeX parse error: "+e,n,i=t&&t.loc;if(i&&i.start<=i.end){var l=i.lexer.input;n=i.start;var m=i.end;n===l.length?r+=" at end of input: ":r+=" at position "+(n+1)+": ";var h=l.slice(n,m).replace(/[^]/g,"$&̲"),p;n>15?p="…"+l.slice(n-15,n):p=l.slice(0,n);var f;m+15":">","<":"<",'"':""","'":"'"},Te=/[&><"']/g;function je(o){return String(o).replace(Te,function(e){return Y[e]})}var Q=function o(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?o(e.body[0]):e:e.type==="font"?o(e.body):e},ce=function(e){var t=Q(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},ee=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},Ae=function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return t!=null?t[1]:"_relative"},_={contains:ae,deflt:de,escape:je,hyphenate:ne,getBaseElem:Q,isCharacterBox:ce,protocolFromUrl:Ae},Ke=function(){function o(t){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,t=t||{},this.displayMode=_.deflt(t.displayMode,!1),this.output=_.deflt(t.output,"htmlAndMathml"),this.leqno=_.deflt(t.leqno,!1),this.fleqn=_.deflt(t.fleqn,!1),this.throwOnError=_.deflt(t.throwOnError,!0),this.errorColor=_.deflt(t.errorColor,"#cc0000"),this.macros=t.macros||{},this.minRuleThickness=Math.max(0,_.deflt(t.minRuleThickness,0)),this.colorIsTextColor=_.deflt(t.colorIsTextColor,!1),this.strict=_.deflt(t.strict,"warn"),this.trust=_.deflt(t.trust,!1),this.maxSize=Math.max(0,_.deflt(t.maxSize,1/0)),this.maxExpand=Math.max(0,_.deflt(t.maxExpand,1e3))}var e=o.prototype;return e.reportNonstrict=function(r,n,i){var l=this.strict;if(typeof l=="function"&&(l=l(r,n,i)),!(!l||l==="ignore")){if(l===!0||l==="error")throw new R("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+r+"]"),i);l==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+r+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+l+"': "+n+" ["+r+"]"))}},e.useStrictBehavior=function(r,n,i){var l=this.strict;if(typeof l=="function")try{l=l(r,n,i)}catch{l="error"}return!l||l==="ignore"?!1:l===!0||l==="error"?!0:l==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+r+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+l+"': "+n+" ["+r+"]")),!1)},e.isTrusted=function(r){r.url&&!r.protocol&&(r.protocol=_.protocolFromUrl(r.url));var n=typeof this.trust=="function"?this.trust(r):this.trust;return!!n},o}(),Ee=function(){function o(t,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=r,this.cramped=n}var e=o.prototype;return e.sup=function(){return $e[Ia[this.id]]},e.sub=function(){return $e[Na[this.id]]},e.fracNum=function(){return $e[_a[this.id]]},e.fracDen=function(){return $e[La[this.id]]},e.cramp=function(){return $e[Sa[this.id]]},e.text=function(){return $e[Pa[this.id]]},e.isTight=function(){return this.size>=2},o}(),rr=0,Ct=1,yt=2,Be=3,kt=4,Ne=5,mt=6,Re=7,$e=[new Ee(rr,0,!1),new Ee(Ct,0,!0),new Ee(yt,1,!1),new Ee(Be,1,!0),new Ee(kt,2,!1),new Ee(Ne,2,!0),new Ee(mt,3,!1),new Ee(Re,3,!0)],Ia=[kt,Ne,kt,Ne,mt,Re,mt,Re],Na=[Ne,Ne,Ne,Ne,Re,Re,Re,Re],_a=[yt,Be,kt,Ne,mt,Re,mt,Re],La=[Be,Be,Ne,Ne,Re,Re,Re,Re],Sa=[Ct,Ct,Be,Be,Ne,Ne,Re,Re],Pa=[rr,Ct,yt,Be,yt,Be,yt,Be],D={DISPLAY:$e[rr],TEXT:$e[yt],SCRIPT:$e[kt],SCRIPTSCRIPT:$e[mt]},nr=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Fa(o){for(var e=0;e=n[0]&&o<=n[1])return t.name}return null}var qt=[];nr.forEach(function(o){return o.blocks.forEach(function(e){return qt.push.apply(qt,e)})});function Kr(o){for(var e=0;e=qt[e]&&o<=qt[e+1])return!0;return!1}var ht=80,Ma=function(e,t){return"M95,"+(622+e+t)+` +import{j as U}from"./jsx-runtime-63Ea5SlK.js";import{S as ws,d as ks}from"./article-renderer-HEYBK15c.js";import{_ as K,$ as qs}from"./jquery-yG1GhClm.js";import{U as Ue}from"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import{e as Br,g as Ts,b as As,u as Rs,f as xs,h as Ra,i as Os,j as Ws,P as $r,k as js}from"./renderer-L37a98D_.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./base-radio-kypcKNEK.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import{L as zs}from"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./dependencies-CP7Uh8Kq.js";import"./version-akiLXZts.js";import{P as Cs,E as Es}from"./perseus-error-l3K_anoI.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{c as Is,g as Ns}from"./_commonjsHelpers-4gQjN7DL.js";import{r as dt}from"./index-6oxdNXpR.js";import{c as _s}from"./components-ODdjt0Ld.js";import{c as Ls,i as Ss}from"./icon-paths-5JCXzGsq.js";import{u as Ps}from"./index-0DbkllkJ.js";import{S as Fs}from"./index-nqMmpXbO.js";import{s as Ms}from"./index-deFLJwr4.js";import{g as Ds}from"./icon-paths-EoBkHOLI.js";import{S as $s}from"./section-control-button-XMME9ave.js";import{T as Us}from"./tex-error-view-oha0Bum8.js";var Wa={exports:{}};(function(u,d){(function(q,x){u.exports=x()})(typeof self<"u"?self:Is,function(){return function(c){var q={};function x(O){if(q[O])return q[O].exports;var N=q[O]={i:O,l:!1,exports:{}};return c[O].call(N.exports,N,N.exports,x),N.l=!0,N.exports}return x.m=c,x.c=q,x.d=function(O,N,P){x.o(O,N)||Object.defineProperty(O,N,{enumerable:!0,get:P})},x.r=function(O){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(O,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(O,"__esModule",{value:!0})},x.t=function(O,N){if(N&1&&(O=x(O)),N&8||N&4&&typeof O=="object"&&O&&O.__esModule)return O;var P=Object.create(null);if(x.r(P),Object.defineProperty(P,"default",{enumerable:!0,value:O}),N&2&&typeof O!="string")for(var R in O)x.d(P,R,(function(ae){return O[ae]}).bind(null,R));return P},x.n=function(O){var N=O&&O.__esModule?function(){return O.default}:function(){return O};return x.d(N,"a",N),N},x.o=function(O,N){return Object.prototype.hasOwnProperty.call(O,N)},x.p="",x(x.s=1)}([function(c,q,x){},function(c,q,x){x.r(q),x(0);var O=function(){function o(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}return o.range=function(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new o(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc},o}(),N=function(){function o(t,r){this.text=void 0,this.loc=void 0,this.text=t,this.loc=r}var e=o.prototype;return e.range=function(r,n){return new o(n,O.range(this,r))},o}(),P=function o(e,t){this.position=void 0;var r="KaTeX parse error: "+e,n,i=t&&t.loc;if(i&&i.start<=i.end){var l=i.lexer.input;n=i.start;var m=i.end;n===l.length?r+=" at end of input: ":r+=" at position "+(n+1)+": ";var h=l.slice(n,m).replace(/[^]/g,"$&̲"),p;n>15?p="…"+l.slice(n-15,n):p=l.slice(0,n);var f;m+15":">","<":"<",'"':""","'":"'"},Te=/[&><"']/g;function je(o){return String(o).replace(Te,function(e){return Y[e]})}var Q=function o(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?o(e.body[0]):e:e.type==="font"?o(e.body):e},ce=function(e){var t=Q(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},ee=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},Ae=function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return t!=null?t[1]:"_relative"},_={contains:ae,deflt:de,escape:je,hyphenate:ne,getBaseElem:Q,isCharacterBox:ce,protocolFromUrl:Ae},Ke=function(){function o(t){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,t=t||{},this.displayMode=_.deflt(t.displayMode,!1),this.output=_.deflt(t.output,"htmlAndMathml"),this.leqno=_.deflt(t.leqno,!1),this.fleqn=_.deflt(t.fleqn,!1),this.throwOnError=_.deflt(t.throwOnError,!0),this.errorColor=_.deflt(t.errorColor,"#cc0000"),this.macros=t.macros||{},this.minRuleThickness=Math.max(0,_.deflt(t.minRuleThickness,0)),this.colorIsTextColor=_.deflt(t.colorIsTextColor,!1),this.strict=_.deflt(t.strict,"warn"),this.trust=_.deflt(t.trust,!1),this.maxSize=Math.max(0,_.deflt(t.maxSize,1/0)),this.maxExpand=Math.max(0,_.deflt(t.maxExpand,1e3))}var e=o.prototype;return e.reportNonstrict=function(r,n,i){var l=this.strict;if(typeof l=="function"&&(l=l(r,n,i)),!(!l||l==="ignore")){if(l===!0||l==="error")throw new R("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+r+"]"),i);l==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+r+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+l+"': "+n+" ["+r+"]"))}},e.useStrictBehavior=function(r,n,i){var l=this.strict;if(typeof l=="function")try{l=l(r,n,i)}catch{l="error"}return!l||l==="ignore"?!1:l===!0||l==="error"?!0:l==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+r+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+l+"': "+n+" ["+r+"]")),!1)},e.isTrusted=function(r){r.url&&!r.protocol&&(r.protocol=_.protocolFromUrl(r.url));var n=typeof this.trust=="function"?this.trust(r):this.trust;return!!n},o}(),Ee=function(){function o(t,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=r,this.cramped=n}var e=o.prototype;return e.sup=function(){return $e[Ia[this.id]]},e.sub=function(){return $e[Na[this.id]]},e.fracNum=function(){return $e[_a[this.id]]},e.fracDen=function(){return $e[La[this.id]]},e.cramp=function(){return $e[Sa[this.id]]},e.text=function(){return $e[Pa[this.id]]},e.isTight=function(){return this.size>=2},o}(),rr=0,Ct=1,yt=2,Be=3,kt=4,Ne=5,mt=6,Re=7,$e=[new Ee(rr,0,!1),new Ee(Ct,0,!0),new Ee(yt,1,!1),new Ee(Be,1,!0),new Ee(kt,2,!1),new Ee(Ne,2,!0),new Ee(mt,3,!1),new Ee(Re,3,!0)],Ia=[kt,Ne,kt,Ne,mt,Re,mt,Re],Na=[Ne,Ne,Ne,Ne,Re,Re,Re,Re],_a=[yt,Be,kt,Ne,mt,Re,mt,Re],La=[Be,Be,Ne,Ne,Re,Re,Re,Re],Sa=[Ct,Ct,Be,Be,Ne,Ne,Re,Re],Pa=[rr,Ct,yt,Be,yt,Be,yt,Be],D={DISPLAY:$e[rr],TEXT:$e[yt],SCRIPT:$e[kt],SCRIPTSCRIPT:$e[mt]},nr=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Fa(o){for(var e=0;e=n[0]&&o<=n[1])return t.name}return null}var qt=[];nr.forEach(function(o){return o.blocks.forEach(function(e){return qt.push.apply(qt,e)})});function Kr(o){for(var e=0;e=qt[e]&&o<=qt[e+1])return!0;return!1}var ht=80,Ma=function(e,t){return"M95,"+(622+e+t)+` c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 @@ -11597,22 +11597,34 @@ those sizes to this.props.images using props.onChange.`,modifiers:[],params:[{na */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -13064,14 +13076,15 @@ those sizes to this.props.images using props.onChange.`,modifiers:[],params:[{na major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one diff --git a/assets/editor-jsonify-g-bIiSIM.js b/assets/editor-jsonify-mta12v4L.js similarity index 61% rename from assets/editor-jsonify-g-bIiSIM.js rename to assets/editor-jsonify-mta12v4L.js index 47abb95eae..0e4585782d 100644 --- a/assets/editor-jsonify-g-bIiSIM.js +++ b/assets/editor-jsonify-mta12v4L.js @@ -1 +1 @@ -import{_ as o}from"./jquery-yG1GhClm.js";import{d as i}from"./article-renderer-mU-6RWLp.js";const s={serialize:function(){return o.omit(this.props,i)}};export{s as E}; +import{_ as o}from"./jquery-yG1GhClm.js";import{d as i}from"./article-renderer-HEYBK15c.js";const s={serialize:function(){return o.omit(this.props,i)}};export{s as E}; diff --git a/assets/editor-k9_TKmQw.js b/assets/editor-l5TJAcwO.js similarity index 94% rename from assets/editor-k9_TKmQw.js rename to assets/editor-l5TJAcwO.js index dbda47e7b3..ad72003d8b 100644 --- a/assets/editor-k9_TKmQw.js +++ b/assets/editor-l5TJAcwO.js @@ -1 +1 @@ -import{j as n}from"./jsx-runtime-63Ea5SlK.js";import{c as y,p as v}from"./article-renderer-mU-6RWLp.js";import{_ as r}from"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import{A as b}from"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import{B as q}from"./base-radio-9_hKye4B.js";import{c as x}from"./components-ODdjt0Ld.js";import{i as O}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{C as c}from"./index-V5gl6frG.js";import{P as t}from"./index-0C4KXdeC.js";import{r as g}from"./index-6oxdNXpR.js";import{E as f}from"./editor-Mb85oHy5.js";import{i as C}from"./icon-paths-EoBkHOLI.js";const{InlineIcon:p}=x,d=class d extends g.Component{render(){const e=this.props.choice.correct?"correct":"incorrect";let s="Type a choice here...";this.props.choice.isNoneOfTheAbove&&(s=this.props.choice.correct?"Type the answer to reveal to the user...":"None of the above");const o=n.jsx(f,{ref:"content-editor",apiOptions:this.props.apiOptions,content:this.props.choice.content||"",widgetEnabled:!1,placeholder:s,disabled:this.props.choice.isNoneOfTheAbove&&!this.props.choice.correct,onChange:this.props.onContentChange}),i=n.jsx(f,{ref:"clue-editor",apiOptions:this.props.apiOptions,content:this.props.choice.clue||"",widgetEnabled:!1,placeholder:`Why is this choice ${e}?`,onChange:this.props.onClueChange}),l=n.jsx("a",{className:"simple-button orange delete-choice",href:"#",onClick:m=>{m.stopPropagation(),m.preventDefault(),this.props.onDelete()},title:"Remove this choice",children:n.jsx(p,{...O})});return n.jsxs("div",{className:"choice-clue-editors",children:[n.jsx("div",{className:`choice-editor ${e}`,children:o}),n.jsx("div",{className:"clue-editor",children:i}),this.props.showDelete&&l]})}};d.propTypes={apiOptions:b.propTypes,choice:t.object,showDelete:t.bool,onClueChange:t.func,onContentChange:t.func,onDelete:t.func};let h=d;const a=class a extends g.Component{constructor(){super(...arguments),this.change=(...e)=>y.apply(this,e),this.onMultipleSelectChange=e=>{e=e.multipleSelect;const s=r.reduce(this.props.choices,function(o,i){return i.correct?o+1:o},0);if(!e&&s>1){const o=r.map(this.props.choices,function(i){return r.defaults({correct:!1},i)});this.props.onChange({multipleSelect:e,choices:o})}else this.props.onChange({multipleSelect:e})},this.onCountChoicesChange=e=>{e=e.countChoices,this.props.onChange({countChoices:e})},this.onChange=({checked:e})=>{const s=r.map(this.props.choices,(o,i)=>r.extend({},o,{correct:e[i],content:o.isNoneOfTheAbove&&!e[i]?"":o.content}));this.props.onChange({choices:s})},this.onContentChange=(e,s)=>{const o=this.props.choices.slice();o[e]=r.extend({},o[e],{content:s}),this.props.onChange({choices:o})},this.onClueChange=(e,s)=>{const o=this.props.choices.slice();o[e]=r.extend({},o[e],{clue:s}),s===""&&delete o[e].clue,this.props.onChange({choices:o})},this.onDelete=e=>{const s=this.props.choices.slice(),o=s[e];s.splice(e,1),this.props.onChange({choices:s,hasNoneOfTheAbove:this.props.hasNoneOfTheAbove&&!o.isNoneOfTheAbove})},this.addChoice=(e,s)=>{s.preventDefault();const o=this.props.choices.slice(),i={isNoneOfTheAbove:e},l=o.length-(this.props.hasNoneOfTheAbove?1:0);o.splice(l,0,i),this.props.onChange({choices:o,hasNoneOfTheAbove:e||this.props.hasNoneOfTheAbove},()=>{this.refs[`choice-editor${l}`].refs["content-editor"].focus()})},this.setDisplayCount=e=>{this.props.onChange({displayCount:e})},this.focus=()=>(this.refs["choice-editor0"].refs["content-editor"].focus(),!0),this.getSaveWarnings=()=>r.some(r.pluck(this.props.choices,"correct"))?[]:["No choice is marked as correct."],this.serialize=()=>r.pick(this.props,"choices","randomize","multipleSelect","countChoices","displayCount","hasNoneOfTheAbove","deselectEnabled")}render(){const e=r.reduce(this.props.choices,function(s,o){return o.correct?s+1:s},0);return n.jsxs("div",{children:[n.jsxs("div",{className:"perseus-widget-row",children:[n.jsx("a",{href:"https://docs.google.com/document/d/1frZf7yrWVWb1n4tVjqlzqVUiv1pn4cZXbxgP62-JDBY/edit#heading=h.8ng1isya19nu",target:"_blank",children:"Multiple choice style guide"}),n.jsx("br",{}),n.jsx("div",{className:"perseus-widget-left-col",children:n.jsx(c,{label:"Multiple selections",checked:this.props.multipleSelect,onChange:s=>{this.onMultipleSelectChange({multipleSelect:s})}})}),n.jsx("div",{className:"perseus-widget-right-col",children:n.jsx(c,{label:"Randomize order",checked:this.props.randomize,onChange:s=>{this.props.onChange({randomize:s})}})}),this.props.multipleSelect&&n.jsx("div",{className:"perseus-widget-left-col",children:n.jsx(c,{label:"Specify number correct",checked:this.props.countChoices,onChange:s=>{this.onCountChoicesChange({countChoices:s})}})})]}),n.jsx(q,{multipleSelect:this.props.multipleSelect,countChoices:this.props.countChoices,numCorrect:e,editMode:!0,labelWrap:!1,apiOptions:this.props.apiOptions,reviewMode:!1,choices:this.props.choices.map((s,o)=>({content:n.jsx(h,{ref:`choice-editor${o}`,apiOptions:this.props.apiOptions,choice:s,onContentChange:i=>{"content"in i&&this.onContentChange(o,i.content)},onClueChange:i=>{"content"in i&&this.onClueChange(o,i.content)},onDelete:()=>this.onDelete(o),showDelete:this.props.choices.length>=2}),isNoneOfTheAbove:s.isNoneOfTheAbove,checked:s.correct}),this),onChange:this.onChange}),n.jsxs("div",{className:"add-choice-container",children:[n.jsxs("a",{className:"simple-button orange",href:"#",onClick:this.addChoice.bind(this,!1),children:[n.jsx(p,{...C})," Add a choice"," "]}),!this.props.hasNoneOfTheAbove&&n.jsxs("a",{className:"simple-button",href:"#",onClick:this.addChoice.bind(this,!0),children:[n.jsx(p,{...C})," None of the above"," "]})]})]})}};a.propTypes={...v,apiOptions:b.propTypes,choices:t.arrayOf(t.shape({content:t.string,clue:t.string,correct:t.bool})),displayCount:t.number,randomize:t.bool,hasNoneOfTheAbove:t.bool,multipleSelect:t.bool,countChoices:t.bool,deselectEnabled:t.bool,static:t.bool},a.widgetName="radio",a.defaultProps={choices:[{},{},{},{}],displayCount:null,randomize:!1,hasNoneOfTheAbove:!1,multipleSelect:!1,countChoices:!1,deselectEnabled:!1};let u=a;u.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"onMultipleSelectChange",docblock:null,modifiers:[],params:[{name:"allowMultiple",optional:!1,type:null}],returns:null},{name:"onCountChoicesChange",docblock:null,modifiers:[],params:[{name:"count",optional:!1,type:null}],returns:null},{name:"onChange",docblock:null,modifiers:[],params:[{name:"{checked}",optional:!1,type:null}],returns:null},{name:"onContentChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"newContent",optional:!1,type:null}],returns:null},{name:"onClueChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"newClue",optional:!1,type:null}],returns:null},{name:"onDelete",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"addChoice",docblock:null,modifiers:[],params:[{name:"noneOfTheAbove",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"setDisplayCount",docblock:null,modifiers:[],params:[{name:"num",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"RadioEditor",props:{choices:{defaultValue:{value:"[{}, {}, {}, {}]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"shape",value:{content:{name:"string",required:!1},clue:{name:"string",required:!1},correct:{name:"bool",required:!1}}}},required:!1},displayCount:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},randomize:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},hasNoneOfTheAbove:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},multipleSelect:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},countChoices:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},deselectEnabled:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},apiOptions:{description:"",type:{name:"shape",value:{isArticle:{name:"bool",required:!0},onFocusChange:{name:"func",required:!0},GroupMetadataEditor:{name:"func",required:!0},showAlignmentOptions:{name:"bool",required:!0},readOnly:{name:"bool",required:!0},answerableCallback:{name:"func",required:!1},getAnotherHint:{name:"func",required:!1},interactionCallback:{name:"func",required:!1},groupAnnotator:{name:"func",required:!0},imagePlaceholder:{name:"node",required:!1},widgetPlaceholder:{name:"node",required:!1},baseElements:{name:"shape",value:{Link:{name:"func",required:!1}},required:!1},imagePreloader:{name:"func",required:!1},trackInteraction:{name:"func",required:!1},customKeypad:{name:"bool",required:!1},nativeKeypadProxy:{name:"func",required:!1},isMobile:{name:"bool",required:!1},setDrawingAreaAvailable:{name:"func",required:!1},hintProgressColor:{name:"string",required:!1},canScrollPage:{name:"bool",required:!1},crossOutEnabled:{name:"bool",required:!1},editorChangeDelay:{name:"number",required:!1}}},required:!0},static:{description:"",type:{name:"bool"},required:!1}},composes:["@khanacademy/perseus"]};export{u as R}; +import{j as n}from"./jsx-runtime-63Ea5SlK.js";import{c as y,p as v}from"./article-renderer-HEYBK15c.js";import{_ as r}from"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import{A as b}from"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import{B as q}from"./base-radio-kypcKNEK.js";import{c as x}from"./components-ODdjt0Ld.js";import{i as O}from"./icon-paths-5JCXzGsq.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{C as c}from"./index-V5gl6frG.js";import{P as t}from"./index-k-0mNqHS.js";import{r as g}from"./index-6oxdNXpR.js";import{E as f}from"./editor-Gp3Qu6_d.js";import{i as C}from"./icon-paths-EoBkHOLI.js";const{InlineIcon:p}=x,d=class d extends g.Component{render(){const e=this.props.choice.correct?"correct":"incorrect";let s="Type a choice here...";this.props.choice.isNoneOfTheAbove&&(s=this.props.choice.correct?"Type the answer to reveal to the user...":"None of the above");const o=n.jsx(f,{ref:"content-editor",apiOptions:this.props.apiOptions,content:this.props.choice.content||"",widgetEnabled:!1,placeholder:s,disabled:this.props.choice.isNoneOfTheAbove&&!this.props.choice.correct,onChange:this.props.onContentChange}),i=n.jsx(f,{ref:"clue-editor",apiOptions:this.props.apiOptions,content:this.props.choice.clue||"",widgetEnabled:!1,placeholder:`Why is this choice ${e}?`,onChange:this.props.onClueChange}),l=n.jsx("a",{className:"simple-button orange delete-choice",href:"#",onClick:m=>{m.stopPropagation(),m.preventDefault(),this.props.onDelete()},title:"Remove this choice",children:n.jsx(p,{...O})});return n.jsxs("div",{className:"choice-clue-editors",children:[n.jsx("div",{className:`choice-editor ${e}`,children:o}),n.jsx("div",{className:"clue-editor",children:i}),this.props.showDelete&&l]})}};d.propTypes={apiOptions:b.propTypes,choice:t.object,showDelete:t.bool,onClueChange:t.func,onContentChange:t.func,onDelete:t.func};let h=d;const a=class a extends g.Component{constructor(){super(...arguments),this.change=(...e)=>y.apply(this,e),this.onMultipleSelectChange=e=>{e=e.multipleSelect;const s=r.reduce(this.props.choices,function(o,i){return i.correct?o+1:o},0);if(!e&&s>1){const o=r.map(this.props.choices,function(i){return r.defaults({correct:!1},i)});this.props.onChange({multipleSelect:e,choices:o})}else this.props.onChange({multipleSelect:e})},this.onCountChoicesChange=e=>{e=e.countChoices,this.props.onChange({countChoices:e})},this.onChange=({checked:e})=>{const s=r.map(this.props.choices,(o,i)=>r.extend({},o,{correct:e[i],content:o.isNoneOfTheAbove&&!e[i]?"":o.content}));this.props.onChange({choices:s})},this.onContentChange=(e,s)=>{const o=this.props.choices.slice();o[e]=r.extend({},o[e],{content:s}),this.props.onChange({choices:o})},this.onClueChange=(e,s)=>{const o=this.props.choices.slice();o[e]=r.extend({},o[e],{clue:s}),s===""&&delete o[e].clue,this.props.onChange({choices:o})},this.onDelete=e=>{const s=this.props.choices.slice(),o=s[e];s.splice(e,1),this.props.onChange({choices:s,hasNoneOfTheAbove:this.props.hasNoneOfTheAbove&&!o.isNoneOfTheAbove})},this.addChoice=(e,s)=>{s.preventDefault();const o=this.props.choices.slice(),i={isNoneOfTheAbove:e},l=o.length-(this.props.hasNoneOfTheAbove?1:0);o.splice(l,0,i),this.props.onChange({choices:o,hasNoneOfTheAbove:e||this.props.hasNoneOfTheAbove},()=>{this.refs[`choice-editor${l}`].refs["content-editor"].focus()})},this.setDisplayCount=e=>{this.props.onChange({displayCount:e})},this.focus=()=>(this.refs["choice-editor0"].refs["content-editor"].focus(),!0),this.getSaveWarnings=()=>r.some(r.pluck(this.props.choices,"correct"))?[]:["No choice is marked as correct."],this.serialize=()=>r.pick(this.props,"choices","randomize","multipleSelect","countChoices","displayCount","hasNoneOfTheAbove","deselectEnabled")}render(){const e=r.reduce(this.props.choices,function(s,o){return o.correct?s+1:s},0);return n.jsxs("div",{children:[n.jsxs("div",{className:"perseus-widget-row",children:[n.jsx("a",{href:"https://docs.google.com/document/d/1frZf7yrWVWb1n4tVjqlzqVUiv1pn4cZXbxgP62-JDBY/edit#heading=h.8ng1isya19nu",target:"_blank",children:"Multiple choice style guide"}),n.jsx("br",{}),n.jsx("div",{className:"perseus-widget-left-col",children:n.jsx(c,{label:"Multiple selections",checked:this.props.multipleSelect,onChange:s=>{this.onMultipleSelectChange({multipleSelect:s})}})}),n.jsx("div",{className:"perseus-widget-right-col",children:n.jsx(c,{label:"Randomize order",checked:this.props.randomize,onChange:s=>{this.props.onChange({randomize:s})}})}),this.props.multipleSelect&&n.jsx("div",{className:"perseus-widget-left-col",children:n.jsx(c,{label:"Specify number correct",checked:this.props.countChoices,onChange:s=>{this.onCountChoicesChange({countChoices:s})}})})]}),n.jsx(q,{multipleSelect:this.props.multipleSelect,countChoices:this.props.countChoices,numCorrect:e,editMode:!0,labelWrap:!1,apiOptions:this.props.apiOptions,reviewMode:!1,choices:this.props.choices.map((s,o)=>({content:n.jsx(h,{ref:`choice-editor${o}`,apiOptions:this.props.apiOptions,choice:s,onContentChange:i=>{"content"in i&&this.onContentChange(o,i.content)},onClueChange:i=>{"content"in i&&this.onClueChange(o,i.content)},onDelete:()=>this.onDelete(o),showDelete:this.props.choices.length>=2}),isNoneOfTheAbove:s.isNoneOfTheAbove,checked:s.correct}),this),onChange:this.onChange}),n.jsxs("div",{className:"add-choice-container",children:[n.jsxs("a",{className:"simple-button orange",href:"#",onClick:this.addChoice.bind(this,!1),children:[n.jsx(p,{...C})," Add a choice"," "]}),!this.props.hasNoneOfTheAbove&&n.jsxs("a",{className:"simple-button",href:"#",onClick:this.addChoice.bind(this,!0),children:[n.jsx(p,{...C})," None of the above"," "]})]})]})}};a.propTypes={...v,apiOptions:b.propTypes,choices:t.arrayOf(t.shape({content:t.string,clue:t.string,correct:t.bool})),displayCount:t.number,randomize:t.bool,hasNoneOfTheAbove:t.bool,multipleSelect:t.bool,countChoices:t.bool,deselectEnabled:t.bool,static:t.bool},a.widgetName="radio",a.defaultProps={choices:[{},{},{},{}],displayCount:null,randomize:!1,hasNoneOfTheAbove:!1,multipleSelect:!1,countChoices:!1,deselectEnabled:!1};let u=a;u.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"onMultipleSelectChange",docblock:null,modifiers:[],params:[{name:"allowMultiple",optional:!1,type:null}],returns:null},{name:"onCountChoicesChange",docblock:null,modifiers:[],params:[{name:"count",optional:!1,type:null}],returns:null},{name:"onChange",docblock:null,modifiers:[],params:[{name:"{checked}",optional:!1,type:null}],returns:null},{name:"onContentChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"newContent",optional:!1,type:null}],returns:null},{name:"onClueChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"newClue",optional:!1,type:null}],returns:null},{name:"onDelete",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"addChoice",docblock:null,modifiers:[],params:[{name:"noneOfTheAbove",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"setDisplayCount",docblock:null,modifiers:[],params:[{name:"num",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"RadioEditor",props:{choices:{defaultValue:{value:"[{}, {}, {}, {}]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"shape",value:{content:{name:"string",required:!1},clue:{name:"string",required:!1},correct:{name:"bool",required:!1}}}},required:!1},displayCount:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},randomize:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},hasNoneOfTheAbove:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},multipleSelect:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},countChoices:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},deselectEnabled:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},apiOptions:{description:"",type:{name:"shape",value:{isArticle:{name:"bool",required:!0},onFocusChange:{name:"func",required:!0},GroupMetadataEditor:{name:"func",required:!0},showAlignmentOptions:{name:"bool",required:!0},readOnly:{name:"bool",required:!0},answerableCallback:{name:"func",required:!1},getAnotherHint:{name:"func",required:!1},interactionCallback:{name:"func",required:!1},groupAnnotator:{name:"func",required:!0},imagePlaceholder:{name:"node",required:!1},widgetPlaceholder:{name:"node",required:!1},baseElements:{name:"shape",value:{Link:{name:"func",required:!1}},required:!1},imagePreloader:{name:"func",required:!1},trackInteraction:{name:"func",required:!1},customKeypad:{name:"bool",required:!1},nativeKeypadProxy:{name:"func",required:!1},isMobile:{name:"bool",required:!1},setDrawingAreaAvailable:{name:"func",required:!1},hintProgressColor:{name:"string",required:!1},canScrollPage:{name:"bool",required:!1},crossOutEnabled:{name:"bool",required:!1},editorChangeDelay:{name:"number",required:!1}}},required:!0},static:{description:"",type:{name:"bool"},required:!1}},composes:["@khanacademy/perseus"]};export{u as R}; diff --git a/assets/editor-page-efCZNuFo.js b/assets/editor-page-rccauWVG.js similarity index 98% rename from assets/editor-page-efCZNuFo.js rename to assets/editor-page-rccauWVG.js index a95a511717..8daad6035b 100644 --- a/assets/editor-page-efCZNuFo.js +++ b/assets/editor-page-rccauWVG.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-mU-6RWLp.js";import{_ as s}from"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import{A as T,C as R}from"./perseus-api-1-ethIrW.js";import{c as A}from"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import{c as w}from"./components-ODdjt0Ld.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{r as o}from"./index-6oxdNXpR.js";import{I as f,J as O}from"./register-all-widgets-and-editors-for-testing-HGbBhRa9.js";import{V as j}from"./viewport-resizer-N8YtwzDx.js";import{i as W}from"./icon-paths-5JCXzGsq.js";import{D as k}from"./device-framer-MUDr0WgQ.js";import{E as q}from"./editor-Mb85oHy5.js";import{a as x,b as z,i as C}from"./icon-paths-EoBkHOLI.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import{I}from"./item-extras-editor-jXytEuhg.js";const{InfoTip:N,InlineIcon:u}=w,p=class p extends o.Component{constructor(){super(...arguments),this.editor=o.createRef(),this.handleChange=e=>{this.props.onChange({replace:e.target.checked})},this.focus=()=>{var e;(e=this.editor.current)==null||e.focus()},this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=e=>{var r;return(r=this.editor.current)==null?void 0:r.serialize(e)}}render(){return t.jsxs("div",{className:"perseus-hint-editor "+this.props.className,children:[this.props.showTitle&&t.jsx("div",{className:"pod-title",children:"Hint"}),t.jsx(q,{ref:this.editor,apiOptions:this.props.apiOptions,widgets:this.props.widgets||void 0,content:this.props.content||void 0,images:this.props.images,replace:this.props.replace,placeholder:"Type your hint here...",imageUploader:this.props.imageUploader,onChange:this.props.onChange},this.props.itemId),t.jsxs("div",{className:"hint-controls-container clearfix",children:[this.props.showMoveButtons&&t.jsxs("span",{className:"reorder-hints",children:[t.jsx("button",{type:"button",className:this.props.isLast?"hidden":"",onClick:s.partial(this.props.onMove,1),children:t.jsx(u,{...x})})," ",t.jsx("button",{type:"button",className:this.props.isFirst?"hidden":"",onClick:s.partial(this.props.onMove,-1),children:t.jsx(u,{...z})})," ",this.props.isLast&&t.jsx(N,{children:t.jsx("p",{children:"The last hint is automatically bolded."})})]}),t.jsx("input",{type:"checkbox",checked:this.props.replace,onChange:this.handleChange}),"Replace previous hint",this.props.showRemoveButton&&t.jsxs("button",{type:"button",className:"remove-hint simple-button orange",onClick:this.props.onRemove,children:[t.jsx(u,{...W}),"Remove this hint"," "]})]})]})}};p.defaultProps={className:"",content:"",replace:!1,showMoveButtons:!0,showTitle:!0,showRemoveButton:!0};let l=p;const c=class c extends o.Component{constructor(){super(...arguments),this.editor=o.createRef(),this.frame=o.createRef(),this.updatePreview=()=>{var r;const e=this.props.isLast&&!/\*\*/.test(this.props.hint.content);(r=this.frame.current)==null||r.sendNewData({type:"hint",data:{hint:this.props.hint,bold:e,pos:this.props.pos,apiOptions:this.props.apiOptions,linterContext:{contentType:"hint",highlightLint:this.props.highlightLint,paths:this.props.contentPaths}}})},this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=e=>{var r;return(r=this.editor.current)==null?void 0:r.serialize(e)},this.focus=()=>{var e;(e=this.editor.current)==null||e.focus()}}componentDidMount(){this.updatePreview()}componentDidUpdate(){this.updatePreview()}render(){const e=this.props.deviceType==="phone"||this.props.deviceType==="tablet";return t.jsxs("div",{className:"perseus-combined-hint-editor perseus-editor-row",children:[t.jsx("div",{className:"perseus-editor-left-cell",children:t.jsx(l,{ref:this.editor,itemId:this.props.itemId,isFirst:this.props.isFirst,isLast:this.props.isLast,widgets:this.props.hint.widgets,content:this.props.hint.content,images:this.props.hint.images,replace:this.props.hint.replace,imageUploader:this.props.imageUploader,onChange:this.props.onChange,onRemove:this.props.onRemove,onMove:this.props.onMove,apiOptions:this.props.apiOptions})}),t.jsx("div",{className:"perseus-editor-right-cell",children:t.jsx(k,{deviceType:this.props.deviceType,nochrome:!0,children:t.jsx(f,{ref:this.frame,datasetKey:"mobile",datasetValue:e,seamless:!0,url:this.props.previewURL})})})]})}};c.defaultProps={highlightLint:!1};let g=c;const m=class m extends o.Component{constructor(){super(...arguments),this.handleHintChange=(e,r,n,a)=>{const i=[...this.props.hints];i[e]=s.extend({},this.serializeHint(e,{keepDeletedWidgets:!0}),r),this.props.onChange({hints:i},n,a)},this.handleHintRemove=e=>{if(!confirm("Are you sure you want to delete this hint?"))return;const r=[...this.props.hints];r.splice(e,1),this.props.onChange({hints:r})},this.handleHintMove=(e,r)=>{const n=[...this.props.hints],a=n.splice(e,1)[0];n.splice(e+r,0,a),this.props.onChange({hints:n},()=>{this.refs["hintEditor"+(e+r)].focus()})},this.addHint=()=>{const e=this.props.hints.concat([{content:"",images:{},widgets:{}}]);this.props.onChange({hints:e},()=>{const r=e.length-1;this.refs["hintEditor"+r].focus()})},this.getSaveWarnings=()=>s.chain(this.props.hints).map((e,r)=>s.map(this.refs["hintEditor"+r].getSaveWarnings(),n=>"Hint "+(r+1)+": "+n)).flatten(!0).value(),this.serialize=e=>this.props.hints.map((r,n)=>this.serializeHint(n,e)),this.serializeHint=(e,r)=>this.refs["hintEditor"+e].serialize(r)}render(){const{itemId:e,hints:r}=this.props,n=s.map(r,function(a,i){return t.jsx(g,{ref:"hintEditor"+i,isFirst:i===0,isLast:i+1===r.length,itemId:e,hint:a,pos:i,imageUploader:this.props.imageUploader,onChange:this.handleHintChange.bind(this,i),onRemove:this.handleHintRemove.bind(this,i),onMove:this.handleHintMove.bind(this,i),deviceType:this.props.deviceType,apiOptions:this.props.apiOptions,highlightLint:this.props.highlightLint,previewURL:this.props.previewURL,contentPaths:[]},"hintEditor"+i)},this);return t.jsxs("div",{className:"perseus-hints-editor perseus-editor-table",children:[n,t.jsx("div",{className:"perseus-editor-row",children:t.jsx("div",{className:"add-hint-container perseus-editor-left-cell",children:t.jsxs("button",{type:"button",className:"add-hint simple-button orange",onClick:this.addHint,children:[t.jsx(u,{...C})," Add a hint"]})})})]})}};m.HintEditor=l,m.defaultProps={onChange:()=>{},hints:[],highlightLint:!1};let d=m;l.__docgenInfo={description:"",methods:[{name:"handleChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactChangeEvent",raw:"React.ChangeEvent",elements:[{name:"HTMLInputElement"}],alias:"React.ChangeEvent"}}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[{name:"options",optional:!1,type:{name:"any"}}],returns:null}],displayName:"HintEditor",props:{itemId:{required:!1,tsType:{name:"string"},description:""},apiOptions:{required:!1,tsType:{name:"Readonly",elements:[{name:"signature",type:"object",raw:`{ +import{j as t}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-HEYBK15c.js";import{_ as s}from"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import{A as T,C as R}from"./perseus-api-1-ethIrW.js";import{c as A}from"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c as w}from"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{r as o}from"./index-6oxdNXpR.js";import{I as f,J as O}from"./register-all-widgets-and-editors-for-testing-mH_Pw9e8.js";import{V as j}from"./viewport-resizer-mN7DSD_Q.js";import{i as W}from"./icon-paths-5JCXzGsq.js";import{D as k}from"./device-framer-MUDr0WgQ.js";import{E as q}from"./editor-Gp3Qu6_d.js";import{a as x,b as z,i as C}from"./icon-paths-EoBkHOLI.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import{I}from"./item-extras-editor-z7TuJtsi.js";const{InfoTip:N,InlineIcon:u}=w,p=class p extends o.Component{constructor(){super(...arguments),this.editor=o.createRef(),this.handleChange=e=>{this.props.onChange({replace:e.target.checked})},this.focus=()=>{var e;(e=this.editor.current)==null||e.focus()},this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=e=>{var r;return(r=this.editor.current)==null?void 0:r.serialize(e)}}render(){return t.jsxs("div",{className:"perseus-hint-editor "+this.props.className,children:[this.props.showTitle&&t.jsx("div",{className:"pod-title",children:"Hint"}),t.jsx(q,{ref:this.editor,apiOptions:this.props.apiOptions,widgets:this.props.widgets||void 0,content:this.props.content||void 0,images:this.props.images,replace:this.props.replace,placeholder:"Type your hint here...",imageUploader:this.props.imageUploader,onChange:this.props.onChange},this.props.itemId),t.jsxs("div",{className:"hint-controls-container clearfix",children:[this.props.showMoveButtons&&t.jsxs("span",{className:"reorder-hints",children:[t.jsx("button",{type:"button",className:this.props.isLast?"hidden":"",onClick:s.partial(this.props.onMove,1),children:t.jsx(u,{...x})})," ",t.jsx("button",{type:"button",className:this.props.isFirst?"hidden":"",onClick:s.partial(this.props.onMove,-1),children:t.jsx(u,{...z})})," ",this.props.isLast&&t.jsx(N,{children:t.jsx("p",{children:"The last hint is automatically bolded."})})]}),t.jsx("input",{type:"checkbox",checked:this.props.replace,onChange:this.handleChange}),"Replace previous hint",this.props.showRemoveButton&&t.jsxs("button",{type:"button",className:"remove-hint simple-button orange",onClick:this.props.onRemove,children:[t.jsx(u,{...W}),"Remove this hint"," "]})]})]})}};p.defaultProps={className:"",content:"",replace:!1,showMoveButtons:!0,showTitle:!0,showRemoveButton:!0};let l=p;const c=class c extends o.Component{constructor(){super(...arguments),this.editor=o.createRef(),this.frame=o.createRef(),this.updatePreview=()=>{var r;const e=this.props.isLast&&!/\*\*/.test(this.props.hint.content);(r=this.frame.current)==null||r.sendNewData({type:"hint",data:{hint:this.props.hint,bold:e,pos:this.props.pos,apiOptions:this.props.apiOptions,linterContext:{contentType:"hint",highlightLint:this.props.highlightLint,paths:this.props.contentPaths}}})},this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=e=>{var r;return(r=this.editor.current)==null?void 0:r.serialize(e)},this.focus=()=>{var e;(e=this.editor.current)==null||e.focus()}}componentDidMount(){this.updatePreview()}componentDidUpdate(){this.updatePreview()}render(){const e=this.props.deviceType==="phone"||this.props.deviceType==="tablet";return t.jsxs("div",{className:"perseus-combined-hint-editor perseus-editor-row",children:[t.jsx("div",{className:"perseus-editor-left-cell",children:t.jsx(l,{ref:this.editor,itemId:this.props.itemId,isFirst:this.props.isFirst,isLast:this.props.isLast,widgets:this.props.hint.widgets,content:this.props.hint.content,images:this.props.hint.images,replace:this.props.hint.replace,imageUploader:this.props.imageUploader,onChange:this.props.onChange,onRemove:this.props.onRemove,onMove:this.props.onMove,apiOptions:this.props.apiOptions})}),t.jsx("div",{className:"perseus-editor-right-cell",children:t.jsx(k,{deviceType:this.props.deviceType,nochrome:!0,children:t.jsx(f,{ref:this.frame,datasetKey:"mobile",datasetValue:e,seamless:!0,url:this.props.previewURL})})})]})}};c.defaultProps={highlightLint:!1};let g=c;const m=class m extends o.Component{constructor(){super(...arguments),this.handleHintChange=(e,r,n,a)=>{const i=[...this.props.hints];i[e]=s.extend({},this.serializeHint(e,{keepDeletedWidgets:!0}),r),this.props.onChange({hints:i},n,a)},this.handleHintRemove=e=>{if(!confirm("Are you sure you want to delete this hint?"))return;const r=[...this.props.hints];r.splice(e,1),this.props.onChange({hints:r})},this.handleHintMove=(e,r)=>{const n=[...this.props.hints],a=n.splice(e,1)[0];n.splice(e+r,0,a),this.props.onChange({hints:n},()=>{this.refs["hintEditor"+(e+r)].focus()})},this.addHint=()=>{const e=this.props.hints.concat([{content:"",images:{},widgets:{}}]);this.props.onChange({hints:e},()=>{const r=e.length-1;this.refs["hintEditor"+r].focus()})},this.getSaveWarnings=()=>s.chain(this.props.hints).map((e,r)=>s.map(this.refs["hintEditor"+r].getSaveWarnings(),n=>"Hint "+(r+1)+": "+n)).flatten(!0).value(),this.serialize=e=>this.props.hints.map((r,n)=>this.serializeHint(n,e)),this.serializeHint=(e,r)=>this.refs["hintEditor"+e].serialize(r)}render(){const{itemId:e,hints:r}=this.props,n=s.map(r,function(a,i){return t.jsx(g,{ref:"hintEditor"+i,isFirst:i===0,isLast:i+1===r.length,itemId:e,hint:a,pos:i,imageUploader:this.props.imageUploader,onChange:this.handleHintChange.bind(this,i),onRemove:this.handleHintRemove.bind(this,i),onMove:this.handleHintMove.bind(this,i),deviceType:this.props.deviceType,apiOptions:this.props.apiOptions,highlightLint:this.props.highlightLint,previewURL:this.props.previewURL,contentPaths:[]},"hintEditor"+i)},this);return t.jsxs("div",{className:"perseus-hints-editor perseus-editor-table",children:[n,t.jsx("div",{className:"perseus-editor-row",children:t.jsx("div",{className:"add-hint-container perseus-editor-left-cell",children:t.jsxs("button",{type:"button",className:"add-hint simple-button orange",onClick:this.addHint,children:[t.jsx(u,{...C})," Add a hint"]})})})]})}};m.HintEditor=l,m.defaultProps={onChange:()=>{},hints:[],highlightLint:!1};let d=m;l.__docgenInfo={description:"",methods:[{name:"handleChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactChangeEvent",raw:"React.ChangeEvent",elements:[{name:"HTMLInputElement"}],alias:"React.ChangeEvent"}}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[{name:"options",optional:!1,type:{name:"any"}}],returns:null}],displayName:"HintEditor",props:{itemId:{required:!1,tsType:{name:"string"},description:""},apiOptions:{required:!1,tsType:{name:"Readonly",elements:[{name:"signature",type:"object",raw:`{ isArticle?: boolean; onFocusChange?: ( newFocusPath: FocusPath, @@ -3352,22 +3352,34 @@ the available choices.`}]}}],raw:`Readonly<{ */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -4819,14 +4831,15 @@ the available choices.`}]}}],raw:`Readonly<{ major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one @@ -11307,22 +11320,34 @@ the available choices.`}]}}],raw:`Readonly<{ */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -12774,14 +12799,15 @@ the available choices.`}]}}],raw:`Readonly<{ major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one @@ -12852,22 +12878,34 @@ the available choices.`}]}}],raw:`Readonly<{ */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -14319,14 +14357,15 @@ the available choices.`}]}}],raw:`Readonly<{ major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one @@ -20795,22 +20834,34 @@ the available choices.`}]}}],raw:`Readonly<{ */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -22262,14 +22313,15 @@ the available choices.`}]}}],raw:`Readonly<{ major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one @@ -22340,22 +22392,34 @@ the available choices.`}]}}],raw:`Readonly<{ */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -23807,14 +23871,15 @@ the available choices.`}]}}],raw:`Readonly<{ major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one @@ -30276,22 +30341,34 @@ the available choices.`}]}}],raw:`Readonly<{ file: File, callback: (url: string) => unknown, ) => unknown`,signature:{arguments:[{type:{name:"File"},name:"file"},{type:{name:"signature",type:"function",raw:"(url: string) => unknown",signature:{arguments:[{type:{name:"string"},name:"url"}],return:{name:"unknown"}}},name:"callback"}],return:{name:"unknown"}}},description:""},wasAnswered:{required:!1,tsType:{name:"boolean"},description:""},question:{required:!1,tsType:{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -31743,14 +31820,15 @@ the available choices.`}]}}],raw:`Readonly<{ major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},description:"",defaultValue:{value:"{}",computed:!1}},answerArea:{required:!1,tsType:{name:"any"},description:"",defaultValue:{value:"{}",computed:!1}},previewURL:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:`( +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},description:"",defaultValue:{value:"{}",computed:!1}},answerArea:{required:!1,tsType:{name:"any"},description:"",defaultValue:{value:"{}",computed:!1}},previewURL:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:`( arg1: { hints?: ReadonlyArray; replace?: boolean; @@ -31814,22 +31892,34 @@ the available choices.`}]}}],raw:`Readonly<{ */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -33281,14 +33371,15 @@ the available choices.`}]}}],raw:`Readonly<{ major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one @@ -39812,22 +39903,34 @@ the available choices.`}]}}],raw:`Readonly<{ */ answer: any; }`,signature:{properties:[{key:"question",value:{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -41279,14 +41382,15 @@ the available choices.`}]}}],raw:`Readonly<{ major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]},required:!0}},{key:"hints",value:{name:"ReadonlyArray",elements:[{name:"intersection",raw:`PerseusRenderer & { +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]},required:!0}},{key:"hints",value:{name:"ReadonlyArray",elements:[{name:"intersection",raw:`PerseusRenderer & { /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one @@ -41294,22 +41398,34 @@ the available choices.`}]}}],raw:`Readonly<{ */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -42761,14 +42877,15 @@ the available choices.`}]}}],raw:`Readonly<{ major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]},required:!0},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]},required:!0},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one @@ -42793,22 +42910,34 @@ the available choices.`}]}}],raw:`Readonly<{ */ answer: any; }`,signature:{properties:[{key:"question",value:{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -44260,14 +44389,15 @@ the available choices.`}]}}],raw:`Readonly<{ major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]},required:!0}},{key:"hints",value:{name:"ReadonlyArray",elements:[{name:"intersection",raw:`PerseusRenderer & { +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]},required:!0}},{key:"hints",value:{name:"ReadonlyArray",elements:[{name:"intersection",raw:`PerseusRenderer & { /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one @@ -44275,22 +44405,34 @@ the available choices.`}]}}],raw:`Readonly<{ */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -45742,14 +45884,15 @@ the available choices.`}]}}],raw:`Readonly<{ major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]},required:!0},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]},required:!0},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one @@ -47595,22 +47738,34 @@ the available choices.`}]}}],raw:`Readonly<{ */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -49062,14 +49217,15 @@ the available choices.`}]}}],raw:`Readonly<{ major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one @@ -49146,22 +49302,34 @@ the available choices.`}]}}],raw:`Readonly<{ */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -50613,14 +50781,15 @@ the available choices.`}]}}],raw:`Readonly<{ major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one diff --git a/assets/editor-page-with-storybook-preview-22ofiVWH.js b/assets/editor-page-with-storybook-preview-51pCZMkq.js similarity index 98% rename from assets/editor-page-with-storybook-preview-22ofiVWH.js rename to assets/editor-page-with-storybook-preview-51pCZMkq.js index 44b68e308c..32e3adeb7d 100644 --- a/assets/editor-page-with-storybook-preview-22ofiVWH.js +++ b/assets/editor-page-with-storybook-preview-51pCZMkq.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import{R as g}from"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-k-0mNqHS.js";import{m as h}from"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{B as R}from"./choice-Xr-SKHrB.js";import{V as o}from"./index-0DbkllkJ.js";import{I as A}from"./locked-label-settings-lVE0HwhW.js";import{S as O}from"./index-nqMmpXbO.js";import{c as p,s as t}from"./index-deFLJwr4.js";import{L as j}from"./index-18qWGOW7.js";import{x as W}from"./index-f-3iKkZU.js";import{a as x}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{l as z}from"./index-awljIyHI.js";import{r as n}from"./index-6oxdNXpR.js";import{E as I}from"./editor-page-efCZNuFo.js";import{f as E}from"./flags-for-api-options-vLhDDii2.js";const N=x("onChange");function C(l){const[c,b]=n.useState("phone"),[v,w]=n.useState(!1),[f,k]=n.useState(),[d,q]=n.useState(l.question),[i,T]=n.useState(l.hints),[s,y]=n.useState(!0),u=l.apiOptions??{isMobile:!1,flags:E};return r.jsxs(o,{children:[r.jsx(I,{apiOptions:u,previewDevice:c,onPreviewDeviceChange:e=>b(e),developerMode:!0,jsonMode:v,answerArea:f,question:d,hints:i,frameSource:"about:blank",previewURL:"about:blank",itemId:"1",onChange:e=>{N(e),"jsonMode"in e&&w(e.jsonMode),"answerArea"in e&&k(e.answerArea),"question"in e&&q(e.question),"hints"in e&&T(e.hints)}}),!s&&r.jsx(R,{onClick:()=>y(!s),style:a.openPanelButton,children:"Open preview (storybook only)"}),s&&r.jsxs(o,{style:a.panel,children:[r.jsx(A,{icon:W,onClick:()=>y(!s),style:a.closeButton}),r.jsx(o,{style:a.panelInner,children:r.jsx(g,{strings:h,apiOptions:u,...d})}),i==null?void 0:i.map((e,m)=>r.jsxs(o,{style:a.panelInner,children:[r.jsx(O,{size:t.medium_16}),r.jsx(j,{children:`Hint ${m+1}`}),r.jsx(g,{strings:h,apiOptions:u,...e})]},m))]})]})}const a=z.StyleSheet.create({panel:{position:"fixed",right:0,minWidth:500,height:"90vh",overflow:"auto",flex:"none",backgroundColor:p.fadedBlue16,padding:t.medium_16,borderRadius:t.small_12,alignItems:"end"},panelInner:{flex:"none",backgroundColor:p.white,borderRadius:t.xSmall_8,marginTop:t.medium_16,width:"100%",padding:t.xSmall_8},closeButton:{margin:0},openPanelButton:{position:"fixed",right:t.medium_16,bottom:t.xxxLarge_64}});C.__docgenInfo={description:"",methods:[],displayName:"EditorPageWithStorybookPreview",props:{apiOptions:{required:!1,tsType:{name:"Readonly",elements:[{name:"signature",type:"object",raw:`{ +import{j as r}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import{R as g}from"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-0C4KXdeC.js";import{m as h}from"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{B as R}from"./choice-Xr-SKHrB.js";import{V as o}from"./index-0DbkllkJ.js";import{I as A}from"./locked-label-settings-CnylHQl6.js";import{S as O}from"./index-nqMmpXbO.js";import{c as p,s as t}from"./index-deFLJwr4.js";import{L as j}from"./index-18qWGOW7.js";import{x as W}from"./index-f-3iKkZU.js";import{a as x}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{l as z}from"./index-awljIyHI.js";import{r as n}from"./index-6oxdNXpR.js";import{E as I}from"./editor-page-rccauWVG.js";import{f as N}from"./flags-for-api-options-1Jz-ky5t.js";const E=x("onChange");function C(l){const[c,b]=n.useState("phone"),[v,w]=n.useState(!1),[f,k]=n.useState(),[d,q]=n.useState(l.question),[i,T]=n.useState(l.hints),[s,y]=n.useState(!0),u=l.apiOptions??{isMobile:!1,flags:N};return r.jsxs(o,{children:[r.jsx(I,{apiOptions:u,previewDevice:c,onPreviewDeviceChange:e=>b(e),developerMode:!0,jsonMode:v,answerArea:f,question:d,hints:i,frameSource:"about:blank",previewURL:"about:blank",itemId:"1",onChange:e=>{E(e),"jsonMode"in e&&w(e.jsonMode),"answerArea"in e&&k(e.answerArea),"question"in e&&q(e.question),"hints"in e&&T(e.hints)}}),!s&&r.jsx(R,{onClick:()=>y(!s),style:a.openPanelButton,children:"Open preview (storybook only)"}),s&&r.jsxs(o,{style:a.panel,children:[r.jsx(A,{icon:W,onClick:()=>y(!s),style:a.closeButton}),r.jsx(o,{style:a.panelInner,children:r.jsx(g,{strings:h,apiOptions:u,...d})}),i==null?void 0:i.map((e,m)=>r.jsxs(o,{style:a.panelInner,children:[r.jsx(O,{size:t.medium_16}),r.jsx(j,{children:`Hint ${m+1}`}),r.jsx(g,{strings:h,apiOptions:u,...e})]},m))]})]})}const a=z.StyleSheet.create({panel:{position:"fixed",right:0,minWidth:500,height:"90vh",overflow:"auto",flex:"none",backgroundColor:p.fadedBlue16,padding:t.medium_16,borderRadius:t.small_12,alignItems:"end"},panelInner:{flex:"none",backgroundColor:p.white,borderRadius:t.xSmall_8,marginTop:t.medium_16,width:"100%",padding:t.xSmall_8},closeButton:{margin:0},openPanelButton:{position:"fixed",right:t.medium_16,bottom:t.xxxLarge_64}});C.__docgenInfo={description:"",methods:[],displayName:"EditorPageWithStorybookPreview",props:{apiOptions:{required:!1,tsType:{name:"Readonly",elements:[{name:"signature",type:"object",raw:`{ isArticle?: boolean; onFocusChange?: ( newFocusPath: FocusPath, @@ -1829,22 +1829,34 @@ the available choices.`}]}}],raw:`Readonly<{ */ onWidgetStartProps?: (widgets: PerseusWidgetsMap) => void; }>`},description:""},question:{required:!1,tsType:{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -3296,14 +3308,15 @@ the available choices.`}]}}],raw:`Readonly<{ major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},description:""},hints:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"intersection",raw:`PerseusRenderer & { +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},description:""},hints:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"intersection",raw:`PerseusRenderer & { /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one @@ -3311,22 +3324,34 @@ the available choices.`}]}}],raw:`Readonly<{ */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -4778,14 +4803,15 @@ the available choices.`}]}}],raw:`Readonly<{ major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one diff --git a/assets/editor-page.stories-1law3Fmm.js b/assets/editor-page.stories-1law3Fmm.js deleted file mode 100644 index 34684ca765..0000000000 --- a/assets/editor-page.stories-1law3Fmm.js +++ /dev/null @@ -1,3 +0,0 @@ -import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{r as p}from"./register-all-widgets-and-editors-for-testing-HGbBhRa9.js";import{E as e}from"./editor-page-with-storybook-preview-22ofiVWH.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./graph-settings-XR_siz2q.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";import"./categorizer-editor-d30-cizN.js";import"./editor-jsonify-g-bIiSIM.js";import"./blur-input-6j4bgLwx.js";import"./definition-editor-_ZvvsZ3f.js";import"./editor-Mb85oHy5.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-qbKF8qYC.js";import"./index-wzSCRJFK.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";import"./dropdown-editor-ueJJ3t0p.js";import"./explanation-editor-mExrX7IC.js";import"./expression-editor-2aE8aBV7.js";import"./image-editor-npChmNVJ.js";import"./input-number-editor-97qMf_gS.js";import"./interaction-editor-2twq2tps.js";import"./interactive-graph-editor-V9iZpszK.js";import"./heading-1izW0-GJ.js";import"./interactive-graph-settings-fIfU8SU6.js";import"./locked-figures-section-9mKuroas.js";import"./locked-ellipse-settings-_hRNhR9E.js";import"./locked-figure-aria-wRg9cB39.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-lVE0HwhW.js";import"./color-select-4NqU465A.js";import"./util-x8Ikjhfh.js";import"./line-stroke-select-Kn8DFI_S.js";import"./locked-function-settings--UMM0ipk.js";import"./line-swatch-qqHDCIz5.js";import"./locked-line-settings-0UTK3Vo6.js";import"./locked-point-settings-HQeaTYKF.js";import"./labeled-switch-7da7Bmzh.js";import"./locked-polygon-settings-1jqOktRr.js";import"./locked-vector-settings-1A9eQa19.js";import"./label-image-editor-1k_zX52x.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-dMU0zCzM.js";import"./behavior-kOGaXMua.js";import"./question-markers-VcHdxP49.js";import"./marker-qF2kRuTF.js";import"./select-image--icrHv9d.js";import"./matcher-editor-rnK8ooee.js";import"./number-line-editor-KKCgA0P-.js";import"./numeric-input-editor-sonkoQhn.js";import"./phet-simulation-editor-33ykehAu.js";import"./python-program-editor-0ms7DDAR.js";import"./editor-k9_TKmQw.js";import"./sorter-editor-MkK3kay8.js";import"./chunk-D5ZWXAHU-vR62DWf0.js";import"./v4-yQnnJER4.js";import"./editor-page-efCZNuFo.js";import"./viewport-resizer-N8YtwzDx.js";import"./constants-p_UgHLsb.js";import"./device-framer-MUDr0WgQ.js";import"./item-extras-editor-jXytEuhg.js";import"./flags-for-api-options-vLhDDii2.js";p();const ot={title:"PerseusEditor/EditorPage"},r=()=>m.jsx(e,{});r.__docgenInfo={description:"",methods:[],displayName:"Demo"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(): React.ReactElement => { - return ; -}`,...(i=(t=r.parameters)==null?void 0:t.docs)==null?void 0:i.source}}};const tt=["Demo"];export{r as Demo,tt as __namedExportsOrder,ot as default}; diff --git a/assets/editor-page.stories-_TdrWFgr.js b/assets/editor-page.stories-_TdrWFgr.js new file mode 100644 index 0000000000..b255456abe --- /dev/null +++ b/assets/editor-page.stories-_TdrWFgr.js @@ -0,0 +1,3 @@ +import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{r as p}from"./register-all-widgets-and-editors-for-testing-mH_Pw9e8.js";import{E as e}from"./editor-page-with-storybook-preview-51pCZMkq.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./graph-settings-Pvhg8t7C.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./index-k-0mNqHS.js";import"./categorizer-editor-Ux-cs6do.js";import"./editor-jsonify-mta12v4L.js";import"./blur-input-6j4bgLwx.js";import"./definition-editor-j1sWsdkj.js";import"./editor-Gp3Qu6_d.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-XMME9ave.js";import"./index-wzSCRJFK.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";import"./dropdown-editor-BFRSuUKm.js";import"./explanation-editor-dSBU1vwr.js";import"./expression-editor-UY7aPIQ1.js";import"./image-editor-vZOaSvdJ.js";import"./input-number-editor-Zo4idrK9.js";import"./interaction-editor-vi9RcfEM.js";import"./interactive-graph-editor-QsKBcTl_.js";import"./heading-1izW0-GJ.js";import"./interactive-graph-settings-o74Mjg6d.js";import"./locked-figures-section-w9TBjDc-.js";import"./locked-ellipse-settings-Y_UkseIl.js";import"./locked-figure-aria-1k3pfy3U.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-CnylHQl6.js";import"./color-select-javI8CkK.js";import"./util-ZotWJxjO.js";import"./line-stroke-select-H15MLZYg.js";import"./locked-function-settings-FK0x4ZxG.js";import"./line-swatch-9TD4hiwz.js";import"./locked-line-settings-JSySSneX.js";import"./locked-point-settings-q-YHpFjG.js";import"./labeled-switch-_gGF8eh_.js";import"./locked-polygon-settings-U6JpAVC_.js";import"./locked-vector-settings-UVt2s9by.js";import"./label-image-editor-p_uxNi67.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-mpHXtu7D.js";import"./behavior-XUZDhvN-.js";import"./question-markers-vke3EOoD.js";import"./marker-l6CMdFr_.js";import"./select-image-ajCB5YeG.js";import"./matcher-editor-S8mz5e0T.js";import"./number-line-editor-eS_UHnpw.js";import"./numeric-input-editor-SLlVbwKu.js";import"./phet-simulation-editor-O5PngvYE.js";import"./python-program-editor-2M-li2KT.js";import"./editor-l5TJAcwO.js";import"./sorter-editor-AVkKlgrO.js";import"./chunk-D5ZWXAHU-vR62DWf0.js";import"./v4-yQnnJER4.js";import"./editor-page-rccauWVG.js";import"./viewport-resizer-mN7DSD_Q.js";import"./constants-p_UgHLsb.js";import"./device-framer-MUDr0WgQ.js";import"./item-extras-editor-z7TuJtsi.js";import"./flags-for-api-options-1Jz-ky5t.js";p();const ot={title:"PerseusEditor/EditorPage"},r=()=>m.jsx(e,{});r.__docgenInfo={description:"",methods:[],displayName:"Demo"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(): React.ReactElement => { + return ; +}`,...(i=(t=r.parameters)==null?void 0:t.docs)==null?void 0:i.source}}};const tt=["Demo"];export{r as Demo,tt as __namedExportsOrder,ot as default}; diff --git a/assets/editor.stories-xi8Dh1kH.js b/assets/editor.stories-8RNl2rlX.js similarity index 70% rename from assets/editor.stories-xi8Dh1kH.js rename to assets/editor.stories-8RNl2rlX.js index 7c7852def2..3effd2a130 100644 --- a/assets/editor.stories-xi8Dh1kH.js +++ b/assets/editor.stories-8RNl2rlX.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{V as R}from"./index-0DbkllkJ.js";import{a as x}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{r as e}from"./index-6oxdNXpR.js";import"./index-g-xpLRq1.js";import{S as O}from"./side-by-side-MBJuyilC.js";import{r as C}from"./register-all-widgets-and-editors-for-testing-HGbBhRa9.js";import{a as u}from"./flags-for-api-options-vLhDDii2.js";import{E as f}from"./editor-Mb85oHy5.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./version-akiLXZts.js";import"./article-editor-orbYQOKG.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./device-framer-MUDr0WgQ.js";import"./constants-p_UgHLsb.js";import"./section-control-button-qbKF8qYC.js";import"./index-wzSCRJFK.js";import"./icon-paths-EoBkHOLI.js";import"./viewport-resizer-N8YtwzDx.js";import"./index-0C4KXdeC.js";import"./structured-item-diff-6NTcZ_YG.js";import"./text-diff-hxgOd6zs.js";import"./tags-diff-KJiz71cu.js";import"./editor-page-efCZNuFo.js";import"./item-extras-editor-jXytEuhg.js";import"./multi-items-SEqLFgxB.js";/* empty css */import"./graph-settings-XR_siz2q.js";import"./categorizer-editor-d30-cizN.js";import"./editor-jsonify-g-bIiSIM.js";import"./blur-input-6j4bgLwx.js";import"./definition-editor-_ZvvsZ3f.js";import"./dropdown-editor-ueJJ3t0p.js";import"./explanation-editor-mExrX7IC.js";import"./expression-editor-2aE8aBV7.js";import"./image-editor-npChmNVJ.js";import"./input-number-editor-97qMf_gS.js";import"./interaction-editor-2twq2tps.js";import"./interactive-graph-editor-V9iZpszK.js";import"./heading-1izW0-GJ.js";import"./toggleable-caret-YFS5vs4O.js";import"./interactive-graph-settings-fIfU8SU6.js";import"./locked-figures-section-9mKuroas.js";import"./locked-ellipse-settings-_hRNhR9E.js";import"./locked-figure-aria-wRg9cB39.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-lVE0HwhW.js";import"./color-select-4NqU465A.js";import"./util-x8Ikjhfh.js";import"./line-stroke-select-Kn8DFI_S.js";import"./locked-function-settings--UMM0ipk.js";import"./line-swatch-qqHDCIz5.js";import"./locked-line-settings-0UTK3Vo6.js";import"./locked-point-settings-HQeaTYKF.js";import"./labeled-switch-7da7Bmzh.js";import"./locked-polygon-settings-1jqOktRr.js";import"./locked-vector-settings-1A9eQa19.js";import"./label-image-editor-1k_zX52x.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-dMU0zCzM.js";import"./behavior-kOGaXMua.js";import"./question-markers-VcHdxP49.js";import"./marker-qF2kRuTF.js";import"./select-image--icrHv9d.js";import"./matcher-editor-rnK8ooee.js";import"./number-line-editor-KKCgA0P-.js";import"./numeric-input-editor-sonkoQhn.js";import"./phet-simulation-editor-33ykehAu.js";import"./python-program-editor-0ms7DDAR.js";import"./editor-k9_TKmQw.js";import"./sorter-editor-MkK3kay8.js";import"./tex-error-view-oha0Bum8.js";const s={content:`A sequence is defined recursively as follows: +import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{V as R}from"./index-0DbkllkJ.js";import{a as x}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{r as e}from"./index-6oxdNXpR.js";import"./index-JuByCDUQ.js";import{S as O}from"./side-by-side-MBJuyilC.js";import{r as C}from"./register-all-widgets-and-editors-for-testing-mH_Pw9e8.js";import{a as u}from"./flags-for-api-options-1Jz-ky5t.js";import{E as f}from"./editor-Gp3Qu6_d.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./version-akiLXZts.js";import"./article-editor-4hdZsISp.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./device-framer-MUDr0WgQ.js";import"./constants-p_UgHLsb.js";import"./section-control-button-XMME9ave.js";import"./index-wzSCRJFK.js";import"./icon-paths-EoBkHOLI.js";import"./viewport-resizer-mN7DSD_Q.js";import"./index-k-0mNqHS.js";import"./structured-item-diff-OBWOWslJ.js";import"./text-diff-2EvPqq-b.js";import"./tags-diff-wQ4taY12.js";import"./editor-page-rccauWVG.js";import"./item-extras-editor-z7TuJtsi.js";import"./multi-items-TymZv1Bp.js";/* empty css */import"./graph-settings-Pvhg8t7C.js";import"./categorizer-editor-Ux-cs6do.js";import"./editor-jsonify-mta12v4L.js";import"./blur-input-6j4bgLwx.js";import"./definition-editor-j1sWsdkj.js";import"./dropdown-editor-BFRSuUKm.js";import"./explanation-editor-dSBU1vwr.js";import"./expression-editor-UY7aPIQ1.js";import"./image-editor-vZOaSvdJ.js";import"./input-number-editor-Zo4idrK9.js";import"./interaction-editor-vi9RcfEM.js";import"./interactive-graph-editor-QsKBcTl_.js";import"./heading-1izW0-GJ.js";import"./toggleable-caret-YFS5vs4O.js";import"./interactive-graph-settings-o74Mjg6d.js";import"./locked-figures-section-w9TBjDc-.js";import"./locked-ellipse-settings-Y_UkseIl.js";import"./locked-figure-aria-1k3pfy3U.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-CnylHQl6.js";import"./color-select-javI8CkK.js";import"./util-ZotWJxjO.js";import"./line-stroke-select-H15MLZYg.js";import"./locked-function-settings-FK0x4ZxG.js";import"./line-swatch-9TD4hiwz.js";import"./locked-line-settings-JSySSneX.js";import"./locked-point-settings-q-YHpFjG.js";import"./labeled-switch-_gGF8eh_.js";import"./locked-polygon-settings-U6JpAVC_.js";import"./locked-vector-settings-UVt2s9by.js";import"./label-image-editor-p_uxNi67.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-mpHXtu7D.js";import"./behavior-XUZDhvN-.js";import"./question-markers-vke3EOoD.js";import"./marker-l6CMdFr_.js";import"./select-image-ajCB5YeG.js";import"./matcher-editor-S8mz5e0T.js";import"./number-line-editor-eS_UHnpw.js";import"./numeric-input-editor-SLlVbwKu.js";import"./phet-simulation-editor-O5PngvYE.js";import"./python-program-editor-2M-li2KT.js";import"./editor-l5TJAcwO.js";import"./sorter-editor-AVkKlgrO.js";import"./tex-error-view-oha0Bum8.js";const s={content:`A sequence is defined recursively as follows: $\\qquad\\displaystyle{{a}_{n}}=-\\frac{1}{a_{n-1}-1} diff --git a/assets/entry-preview-uYEG461u.js b/assets/entry-preview-biHFzYXk.js similarity index 99% rename from assets/entry-preview-uYEG461u.js rename to assets/entry-preview-biHFzYXk.js index 99869a10d7..46b791acf7 100644 --- a/assets/entry-preview-uYEG461u.js +++ b/assets/entry-preview-biHFzYXk.js @@ -1,4 +1,4 @@ -import{_ as tr}from"./iframe-7Gh6p0LC.js";import{_ as sr,a as nr,b as L}from"./chunk-XP5HYGXS-fUC2V6Et.js";import{r as Y,R as re}from"./index-6oxdNXpR.js";import{r as ar}from"./index-9gkyvru-.js";import"../sb-preview/runtime.js";import"./_commonjsHelpers-4gQjN7DL.js";var b={};/** +import{_ as tr}from"./iframe-8qXcTeqo.js";import{_ as sr,a as nr,b as L}from"./chunk-XP5HYGXS-fUC2V6Et.js";import{r as Y,R as re}from"./index-6oxdNXpR.js";import{r as ar}from"./index-9gkyvru-.js";import"../sb-preview/runtime.js";import"./_commonjsHelpers-4gQjN7DL.js";var b={};/** * @license React * react-dom-test-utils.production.min.js * diff --git a/assets/explanation-editor-mExrX7IC.js b/assets/explanation-editor-dSBU1vwr.js similarity index 84% rename from assets/explanation-editor-mExrX7IC.js rename to assets/explanation-editor-dSBU1vwr.js index 53048bcf23..b057374919 100644 --- a/assets/explanation-editor-mExrX7IC.js +++ b/assets/explanation-editor-dSBU1vwr.js @@ -1,3 +1,3 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{c as p,p as l}from"./article-renderer-mU-6RWLp.js";import{_ as r}from"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import{c as m}from"./components-ODdjt0Ld.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{E as d}from"./editor-jsonify-g-bIiSIM.js";import{P as s}from"./index-0C4KXdeC.js";import{r as c}from"./index-6oxdNXpR.js";import{E as h}from"./editor-Mb85oHy5.js";const{TextInput:n}=m,u={showPrompt:"Explain",hidePrompt:"Hide explanation",explanation:`explanation goes here +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{c as p,p as l}from"./article-renderer-HEYBK15c.js";import{_ as r}from"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c as m}from"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{E as d}from"./editor-jsonify-mta12v4L.js";import{P as s}from"./index-k-0mNqHS.js";import{r as c}from"./index-6oxdNXpR.js";import{E as h}from"./editor-Gp3Qu6_d.js";const{TextInput:n}=m,u={showPrompt:"Explain",hidePrompt:"Hide explanation",explanation:`explanation goes here more explanation`,widgets:{}},i=class i extends c.Component{constructor(){super(...arguments),this.state={},this.change=(...t)=>p.apply(this,t),this.serialize=()=>d.serialize.call(this)}render(){return e.jsxs("div",{className:"perseus-widget-explanation-editor",children:[e.jsx("div",{className:"perseus-widget-row",children:e.jsxs("label",{children:["Prompt to show explanation:"," ",e.jsx(n,{value:this.props.showPrompt,onChange:this.change("showPrompt")})]})}),e.jsx("div",{className:"perseus-widget-row",children:e.jsxs("label",{children:["Prompt to hide explanation:"," ",e.jsx(n,{value:this.props.hidePrompt,onChange:this.change("hidePrompt")})]})}),e.jsx("div",{className:"perseus-widget-row",children:e.jsx(h,{apiOptions:this.props.apiOptions,content:this.props.explanation,widgets:this.props.widgets,widgetEnabled:!0,immutableWidgets:!1,onChange:t=>{const o={};r.has(t,"content")&&(o.explanation=t.content),r.has(t,"widgets")&&(o.widgets=t.widgets),this.change(o)}})})]})}};i.propTypes={...l,showPrompt:s.string,hidePrompt:s.string,explanation:s.string,widgets:s.object,apiOptions:s.any},i.widgetName="explanation",i.defaultProps=u;let a=i;a.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"ExplanationEditor",props:{showPrompt:{defaultValue:{value:'"Explain"',computed:!1},description:"",type:{name:"string"},required:!1},hidePrompt:{defaultValue:{value:'"Hide explanation"',computed:!1},description:"",type:{name:"string"},required:!1},explanation:{defaultValue:{value:'"explanation goes here\\n\\nmore explanation"',computed:!1},description:"",type:{name:"string"},required:!1},widgets:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},apiOptions:{description:"",type:{name:"any"},required:!1}},composes:["@khanacademy/perseus"]};export{a as E}; diff --git a/assets/explanation-editor.stories-tYLxtPBK.js b/assets/explanation-editor.stories-g8qha3ii.js similarity index 72% rename from assets/explanation-editor.stories-tYLxtPBK.js rename to assets/explanation-editor.stories-g8qha3ii.js index 3cc7c5bc10..431ffb593c 100644 --- a/assets/explanation-editor.stories-tYLxtPBK.js +++ b/assets/explanation-editor.stories-g8qha3ii.js @@ -1,3 +1,3 @@ -import{j as p}from"./jsx-runtime-63Ea5SlK.js";import{a as m}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{E as a}from"./explanation-editor-mExrX7IC.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./editor-jsonify-g-bIiSIM.js";import"./index-0C4KXdeC.js";import"./editor-Mb85oHy5.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-qbKF8qYC.js";import"./index-wzSCRJFK.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";const po={title:"PerseusEditor/Widgets/Explanation Editor"},t=e=>p.jsx(a,{onChange:m("onChange")});t.__docgenInfo={description:"",methods:[],displayName:"Default"};var o,r,i;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as p}from"./jsx-runtime-63Ea5SlK.js";import{a as m}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{E as a}from"./explanation-editor-dSBU1vwr.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./editor-jsonify-mta12v4L.js";import"./index-k-0mNqHS.js";import"./editor-Gp3Qu6_d.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-XMME9ave.js";import"./index-wzSCRJFK.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";const po={title:"PerseusEditor/Widgets/Explanation Editor"},t=e=>p.jsx(a,{onChange:m("onChange")});t.__docgenInfo={description:"",methods:[],displayName:"Default"};var o,r,i;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(r=t.parameters)==null?void 0:r.docs)==null?void 0:i.source}}};const mo=["Default"];export{t as Default,mo as __namedExportsOrder,po as default}; diff --git a/assets/explanation.stories-5AbygpYN.js b/assets/explanation.stories-_UYy1oQY.js similarity index 90% rename from assets/explanation.stories-5AbygpYN.js rename to assets/explanation.stories-_UYy1oQY.js index a49f3a32e0..93507d63e4 100644 --- a/assets/explanation.stories-5AbygpYN.js +++ b/assets/explanation.stories-_UYy1oQY.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-63Ea5SlK.js";import{R as a}from"./renderer-with-debug-ui-75hBDQJk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const v={content:`Here's the explanation +import{j as i}from"./jsx-runtime-63Ea5SlK.js";import{R as a}from"./renderer-with-debug-ui-Jq91P-PK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const v={content:`Here's the explanation [[☃ explanation 1]] Did you get that?`,images:{},widgets:{"explanation 1":{graded:!0,version:{major:0,minor:0},static:!1,type:"explanation",options:{hidePrompt:"Hide explanation!",widgets:{},explanation:"This is an explanation",static:!1,showPrompt:"Explanation"},alignment:"default"}}},b={content:`Here's the explanation [[☃ explanation 1]] diff --git a/assets/expression-editor-2aE8aBV7.js b/assets/expression-editor-UY7aPIQ1.js similarity index 98% rename from assets/expression-editor-2aE8aBV7.js rename to assets/expression-editor-UY7aPIQ1.js index 6e6adb1082..ba003ec6b3 100644 --- a/assets/expression-editor-2aE8aBV7.js +++ b/assets/expression-editor-UY7aPIQ1.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-63Ea5SlK.js";import{p as D}from"./util-AYeX86gl.js";import{c as A,P as E,E as I}from"./article-renderer-mU-6RWLp.js";import{_ as u}from"./jquery-yG1GhClm.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import{l as F}from"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import{c as _}from"./components-ODdjt0Ld.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import{f as N}from"./index-J2t_5nK1.js";import"./index-smZ6iCr_.js";import{B as g}from"./choice-Xr-SKHrB.js";import{C as h,l as x}from"./index-V5gl6frG.js";import{S as T}from"./index-nqMmpXbO.js";import{s as p,c as y}from"./index-deFLJwr4.js";import{H as k,d as R}from"./index-18qWGOW7.js";import{l as o}from"./index-awljIyHI.js";import{r as w}from"./index-6oxdNXpR.js";import{F as L}from"./index-9gkyvru-.js";const S=class S extends w.Component{constructor(s){super(s),this.state={dragging:-1,components:this.props.components},this.onDrop=this.onDrop.bind(this),this.onDragStart=this.onDragStart.bind(this),this.onDragEnter=this.onDragEnter.bind(this)}componentDidMount(){this._setDragEvents()}UNSAFE_componentWillReceiveProps(s){this.setState({components:s.components})}componentDidUpdate(){this._setDragEvents()}onDragStart(s){this.setState({dragging:s})}onDrop(){this.setState({dragging:-1}),this.props.onReorder(this.state.components)}onDragEnter(s){if(this.state.dragging===s)return;const e=this.state.components.slice(),r=e.splice(this.state.dragging,1);e.splice(s,0,r[0]);const n=this.props.verify(e);return n&&this.setState({dragging:s,components:e}),n}_listenEvent(s){s.dataTransfer.setData("hackhackhack","because browsers!")}_cancelEvent(s){s.preventDefault()}_setDragEvents(){this._dragItems=this._dragItems||[];const s=L.findDOMNode(this).querySelectorAll("[draggable=true]"),e=[],r=[];for(let n=0;nt.jsx(O,{index:r,component:e,area:this,draggable:e.props.draggable,dragging:r===this.state.dragging},e.key));return t.jsx("ol",{className:this.props.className,style:this.props.style,children:s})}};S.defaultProps={verify:()=>!0};let f=S;class O extends w.Component{handleDragStart(s){s.nativeEvent.dataTransfer.effectAllowed="move",this.props.area.onDragStart(this.props.index)}handleDrop(){this.props.area.onDrop(this.props.index)}handleDragEnter(s){const e=this.props.area.onDragEnter(this.props.index);s.nativeEvent.dataTransfer.effectAllowed=e?"move":"none"}handleDragOver(s){s.preventDefault()}render(){let s="sortable-disabled";return this.props.dragging?s="sortable-dragging":this.props.draggable&&(s="sortable-enabled"),t.jsx("li",{draggable:this.props.draggable,className:[s,o.css(q.sortableListItem)].join(" "),onDragStart:this.handleDragStart,onDrop:this.handleDrop,onDragEnter:this.handleDragEnter,onDragOver:this.handleDragOver,children:this.props.component})}}const q=o.StyleSheet.create({sortableListItem:{margin:"5px 0"}});f.__docgenInfo={description:`TODO(LEMS-2667): 11/26/24, at the time of writing this comment +import{j as t}from"./jsx-runtime-63Ea5SlK.js";import{p as D}from"./util-AYeX86gl.js";import{c as A,P as E,E as I}from"./article-renderer-HEYBK15c.js";import{_ as u}from"./jquery-yG1GhClm.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import{l as F}from"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c as _}from"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import{f as N}from"./index-J2t_5nK1.js";import"./index-smZ6iCr_.js";import{B as g}from"./choice-Xr-SKHrB.js";import{C as h,l as x}from"./index-V5gl6frG.js";import{S as T}from"./index-nqMmpXbO.js";import{s as p,c as y}from"./index-deFLJwr4.js";import{H as k,d as R}from"./index-18qWGOW7.js";import{l as o}from"./index-awljIyHI.js";import{r as w}from"./index-6oxdNXpR.js";import{F as L}from"./index-9gkyvru-.js";const S=class S extends w.Component{constructor(s){super(s),this.state={dragging:-1,components:this.props.components},this.onDrop=this.onDrop.bind(this),this.onDragStart=this.onDragStart.bind(this),this.onDragEnter=this.onDragEnter.bind(this)}componentDidMount(){this._setDragEvents()}UNSAFE_componentWillReceiveProps(s){this.setState({components:s.components})}componentDidUpdate(){this._setDragEvents()}onDragStart(s){this.setState({dragging:s})}onDrop(){this.setState({dragging:-1}),this.props.onReorder(this.state.components)}onDragEnter(s){if(this.state.dragging===s)return;const e=this.state.components.slice(),r=e.splice(this.state.dragging,1);e.splice(s,0,r[0]);const n=this.props.verify(e);return n&&this.setState({dragging:s,components:e}),n}_listenEvent(s){s.dataTransfer.setData("hackhackhack","because browsers!")}_cancelEvent(s){s.preventDefault()}_setDragEvents(){this._dragItems=this._dragItems||[];const s=L.findDOMNode(this).querySelectorAll("[draggable=true]"),e=[],r=[];for(let n=0;nt.jsx(O,{index:r,component:e,area:this,draggable:e.props.draggable,dragging:r===this.state.dragging},e.key));return t.jsx("ol",{className:this.props.className,style:this.props.style,children:s})}};S.defaultProps={verify:()=>!0};let f=S;class O extends w.Component{handleDragStart(s){s.nativeEvent.dataTransfer.effectAllowed="move",this.props.area.onDragStart(this.props.index)}handleDrop(){this.props.area.onDrop(this.props.index)}handleDragEnter(s){const e=this.props.area.onDragEnter(this.props.index);s.nativeEvent.dataTransfer.effectAllowed=e?"move":"none"}handleDragOver(s){s.preventDefault()}render(){let s="sortable-disabled";return this.props.dragging?s="sortable-dragging":this.props.draggable&&(s="sortable-enabled"),t.jsx("li",{draggable:this.props.draggable,className:[s,o.css(q.sortableListItem)].join(" "),onDragStart:this.handleDragStart,onDrop:this.handleDrop,onDragEnter:this.handleDragEnter,onDragOver:this.handleDragOver,children:this.props.component})}}const q=o.StyleSheet.create({sortableListItem:{margin:"5px 0"}});f.__docgenInfo={description:`TODO(LEMS-2667): 11/26/24, at the time of writing this comment it has been identified that this file has been broken long before the refactoring of createReactClass. Future implementation need to determine how to fix this functionality or deprecate it. diff --git a/assets/expression-editor.stories--kiRbfi4.js b/assets/expression-editor.stories-KW-6dd0v.js similarity index 81% rename from assets/expression-editor.stories--kiRbfi4.js rename to assets/expression-editor.stories-KW-6dd0v.js index 175465fe23..7c4f7be30b 100644 --- a/assets/expression-editor.stories--kiRbfi4.js +++ b/assets/expression-editor.stories-KW-6dd0v.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-63Ea5SlK.js";import{l as p}from"./index-awljIyHI.js";import{r as c}from"./index-6oxdNXpR.js";import{R as u}from"./renderer-with-debug-ui-75hBDQJk.js";import{E as g}from"./expression-editor-2aE8aBV7.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";import"./components-ODdjt0Ld.js";const er={title:"PerseusEditor/Widgets/Expression Editor"};class x extends c.Component{constructor(e){super(e);const t=r.widgets["expression 1"].options;this.state={answerForms:t.answerForms,times:t.times,buttonSets:t.buttonSets,functions:t.functions}}mergeQuestionWithState(){return{...r,widgets:{...r.widgets,"expression 1":{...r.widgets["expression 1"],options:{...r.widgets["expression 1"].options,...this.state}}}}}render(){const e=Object.freeze({});return o.jsxs("div",{className:p.css(s.wrapper),children:[o.jsx("div",{className:p.css(s.editorWrapper),children:o.jsx(g,{...this.state,onChange:t=>{this.setState({...t})}})}),o.jsx(u,{question:this.mergeQuestionWithState(),apiOptions:e,reviewMode:!0})]})}}const i=d=>o.jsx(x,{}),r={content:`This is a cool expression question +import{j as o}from"./jsx-runtime-63Ea5SlK.js";import{l as p}from"./index-awljIyHI.js";import{r as c}from"./index-6oxdNXpR.js";import{R as u}from"./renderer-with-debug-ui-Jq91P-PK.js";import{E as g}from"./expression-editor-UY7aPIQ1.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";import"./components-ODdjt0Ld.js";const er={title:"PerseusEditor/Widgets/Expression Editor"};class x extends c.Component{constructor(e){super(e);const t=r.widgets["expression 1"].options;this.state={answerForms:t.answerForms,times:t.times,buttonSets:t.buttonSets,functions:t.functions}}mergeQuestionWithState(){return{...r,widgets:{...r.widgets,"expression 1":{...r.widgets["expression 1"],options:{...r.widgets["expression 1"].options,...this.state}}}}}render(){const e=Object.freeze({});return o.jsxs("div",{className:p.css(s.wrapper),children:[o.jsx("div",{className:p.css(s.editorWrapper),children:o.jsx(g,{...this.state,onChange:t=>{this.setState({...t})}})}),o.jsx(u,{question:this.mergeQuestionWithState(),apiOptions:e,reviewMode:!0})]})}}const i=d=>o.jsx(x,{}),r={content:`This is a cool expression question [[☃ expression 1]] diff --git a/assets/expression.stories-DeimOHIk.js b/assets/expression.stories-VrS6qY2X.js similarity index 91% rename from assets/expression.stories-DeimOHIk.js rename to assets/expression.stories-VrS6qY2X.js index 1fbeaa417a..2aa10f31b1 100644 --- a/assets/expression.stories-DeimOHIk.js +++ b/assets/expression.stories-VrS6qY2X.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{a as w}from"./mobile-keypad-Muuas9zV.js";import"./prop-types-d_cUcR3L.js";import"./key-translator-hixns6dh.js";import"./button-assets-ozecF1qE.js";import{K as R}from"./enums-x5qaTru7.js";import{a as T}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{S as _}from"./server-item-renderer-with-debug-ui-jjme8wR5.js";import{T as W}from"./test-keypad-context-wrapper-qNJz2rBH.js";import{I as L,e as M}from"./article-renderer-mU-6RWLp.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./version-akiLXZts.js";import"./invariant-bu5zBsRS.js";import"./v4-yQnnJER4.js";import"./choice-Xr-SKHrB.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./util-AYeX86gl.js";import"./perseus-error-l3K_anoI.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-item-CWRjfKXr.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./hints-renderer-alc4yvsU.js";import"./shared-4TdECMLk.js";import"./base-radio-9_hKye4B.js";import"./choice-none-above-dRu7sfJj.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./hud-ifw9Ofbw.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./ke-score-ui-AQ1XUyPU.js";import"./side-by-side-MBJuyilC.js";import"./test-dependencies-8Mfke9yn.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";import"./input-with-examples-YO5BCgg1.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./answer-choices-lVeJkx-U.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";const c=(r,t)=>({question:{content:"[[☃ expression 1]]",images:{},widgets:{"expression 1":{type:"expression",graded:!0,options:r,version:t}}},answer:null,answerArea:Object.fromEntries(L.map(m=>[m,!1])),itemDataVersion:{major:0,minor:1},hints:[]});c({answerForms:[],times:!1,buttonSets:["basic"],functions:[],buttonsVisible:"always",ariaLabel:"Test aria label",visibleLabel:"Test visible label"},{major:1,minor:0});const N=c({answerForms:[{considered:"correct",form:!1,simplify:!1,value:"123-x"},{considered:"correct",form:!1,simplify:!1,value:"x-123"}],times:!1,buttonSets:["basic"],functions:["f","g","h"],buttonsVisible:"always"},{major:1,minor:0}),D={answerForms:[{considered:"ungraded",form:!1,simplify:!1,value:"x+1"},{considered:"wrong",form:!1,simplify:!1,value:"y+1"},{considered:"correct",form:!1,simplify:!1,value:"z+1"},{considered:"correct",form:!1,simplify:!1,value:"a+1"}],times:!1,buttonSets:["basic"],functions:["f","g","h"],buttonsVisible:"focused",visibleLabel:"number of cm",ariaLabel:"number of centimeters"},d=c(D,{major:1,minor:0}),n=({item:r,customKeypad:t,isMobile:m=!1})=>e.jsx(W,{children:e.jsx(w.Consumer,{children:({keypadElement:C})=>e.jsx(_,{item:r,keypadElement:C,apiOptions:{isMobile:m,customKeypad:t,onFocusChange:T("onFocusChange")}})})}),o=r=>{const t={keypadType:R.EXPRESSION,extraKeys:["x","y","z"]};return e.jsx("div",{style:{padding:"2rem"},children:e.jsx(M.widget,{alignment:null,value:"",visibleLabel:"",ariaLabel:"",containerSizeClass:"small",findWidgets:m=>[],isLastUsedWidget:!1,onChange:()=>{},problemNum:1,static:!1,trackInteraction:()=>{},widgetId:"expression",keypadConfiguration:t,reviewMode:!1})})},s=r=>e.jsx(n,{item:d,customKeypad:!1}),i=r=>e.jsxs("div",{children:[e.jsxs("p",{children:["MathInput uses touch events;"," ",e.jsx("a",{href:"https://developer.chrome.com/docs/devtools/device-mode/",children:"emulate mobile"})," ","to use the custom keypad."]}),e.jsx(n,{item:d,customKeypad:!0,isMobile:!0})]}),a=r=>e.jsx(n,{item:N,customKeypad:r.customKeypad}),p=r=>e.jsx(n,{item:d,customKeypad:r.customKeypad}),Rr={title:"Perseus/Widgets/Expression",argTypes:{customKeypad:{control:"boolean"}}};o.__docgenInfo={description:"",methods:[],displayName:"DesktopKitchenSink",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};s.__docgenInfo={description:"",methods:[],displayName:"Desktop",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};i.__docgenInfo={description:"",methods:[],displayName:"Mobile",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};a.__docgenInfo={description:"",methods:[],displayName:"ExpressionItem2",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};p.__docgenInfo={description:"",methods:[],displayName:"ExpressionItem3",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};var l,u,y;o.parameters={...o.parameters,docs:{...(l=o.parameters)==null?void 0:l.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{a as w}from"./mobile-keypad-Muuas9zV.js";import"./prop-types-d_cUcR3L.js";import"./key-translator-hixns6dh.js";import"./button-assets-ozecF1qE.js";import{K as R}from"./enums-x5qaTru7.js";import{a as T}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{S as _}from"./server-item-renderer-with-debug-ui-Tcs9zCKY.js";import{T as W}from"./test-keypad-context-wrapper-qNJz2rBH.js";import{I as L,e as M}from"./article-renderer-HEYBK15c.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./version-akiLXZts.js";import"./invariant-bu5zBsRS.js";import"./v4-yQnnJER4.js";import"./choice-Xr-SKHrB.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./util-AYeX86gl.js";import"./perseus-error-l3K_anoI.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-item-C-BdPaPl.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./hints-renderer-zzse9ai2.js";import"./shared-4TdECMLk.js";import"./base-radio-kypcKNEK.js";import"./choice-none-above-vDwffTnk.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./hud-ifw9Ofbw.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./ke-score-ui-AQ1XUyPU.js";import"./side-by-side-MBJuyilC.js";import"./test-dependencies-1Svp3QCw.js";import"./register-all-widgets-for-testing-vNa20up7.js";import"./input-with-examples-PaWkADGr.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./answer-choices-iyIz6W_C.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";const c=(r,t)=>({question:{content:"[[☃ expression 1]]",images:{},widgets:{"expression 1":{type:"expression",graded:!0,options:r,version:t}}},answer:null,answerArea:Object.fromEntries(L.map(m=>[m,!1])),itemDataVersion:{major:0,minor:1},hints:[]});c({answerForms:[],times:!1,buttonSets:["basic"],functions:[],buttonsVisible:"always",ariaLabel:"Test aria label",visibleLabel:"Test visible label"},{major:1,minor:0});const N=c({answerForms:[{considered:"correct",form:!1,simplify:!1,value:"123-x"},{considered:"correct",form:!1,simplify:!1,value:"x-123"}],times:!1,buttonSets:["basic"],functions:["f","g","h"],buttonsVisible:"always"},{major:1,minor:0}),D={answerForms:[{considered:"ungraded",form:!1,simplify:!1,value:"x+1"},{considered:"wrong",form:!1,simplify:!1,value:"y+1"},{considered:"correct",form:!1,simplify:!1,value:"z+1"},{considered:"correct",form:!1,simplify:!1,value:"a+1"}],times:!1,buttonSets:["basic"],functions:["f","g","h"],buttonsVisible:"focused",visibleLabel:"number of cm",ariaLabel:"number of centimeters"},d=c(D,{major:1,minor:0}),n=({item:r,customKeypad:t,isMobile:m=!1})=>e.jsx(W,{children:e.jsx(w.Consumer,{children:({keypadElement:C})=>e.jsx(_,{item:r,keypadElement:C,apiOptions:{isMobile:m,customKeypad:t,onFocusChange:T("onFocusChange")}})})}),o=r=>{const t={keypadType:R.EXPRESSION,extraKeys:["x","y","z"]};return e.jsx("div",{style:{padding:"2rem"},children:e.jsx(M.widget,{alignment:null,value:"",visibleLabel:"",ariaLabel:"",containerSizeClass:"small",findWidgets:m=>[],isLastUsedWidget:!1,onChange:()=>{},problemNum:1,static:!1,trackInteraction:()=>{},widgetId:"expression",keypadConfiguration:t,reviewMode:!1})})},s=r=>e.jsx(n,{item:d,customKeypad:!1}),i=r=>e.jsxs("div",{children:[e.jsxs("p",{children:["MathInput uses touch events;"," ",e.jsx("a",{href:"https://developer.chrome.com/docs/devtools/device-mode/",children:"emulate mobile"})," ","to use the custom keypad."]}),e.jsx(n,{item:d,customKeypad:!0,isMobile:!0})]}),a=r=>e.jsx(n,{item:N,customKeypad:r.customKeypad}),p=r=>e.jsx(n,{item:d,customKeypad:r.customKeypad}),Rr={title:"Perseus/Widgets/Expression",argTypes:{customKeypad:{control:"boolean"}}};o.__docgenInfo={description:"",methods:[],displayName:"DesktopKitchenSink",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};s.__docgenInfo={description:"",methods:[],displayName:"Desktop",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};i.__docgenInfo={description:"",methods:[],displayName:"Mobile",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};a.__docgenInfo={description:"",methods:[],displayName:"ExpressionItem2",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};p.__docgenInfo={description:"",methods:[],displayName:"ExpressionItem3",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};var l,u,y;o.parameters={...o.parameters,docs:{...(l=o.parameters)==null?void 0:l.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const keypadConfiguration = { keypadType: KeypadType.EXPRESSION, extraKeys: ["x", "y", "z"] as Array diff --git a/assets/flags-for-api-options-vLhDDii2.js b/assets/flags-for-api-options-1Jz-ky5t.js similarity index 80% rename from assets/flags-for-api-options-vLhDDii2.js rename to assets/flags-for-api-options-1Jz-ky5t.js index 64bd7fad8d..c82545321e 100644 --- a/assets/flags-for-api-options-vLhDDii2.js +++ b/assets/flags-for-api-options-1Jz-ky5t.js @@ -1 +1 @@ -import"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import{A as t}from"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";const r={mafs:{angle:!0,segment:!0,circle:!0,quadratic:!0,sinusoid:!0,polygon:!0,linear:!0,"linear-system":!0,ray:!0,point:!0,none:!0,"interactive-graph-locked-features-labels":!0,"locked-figures-aria":!0,"locked-point-labels":!0,"locked-line-labels":!0,"locked-vector-labels":!0,"locked-ellipse-labels":!0,"locked-polygon-labels":!0,"locked-function-labels":!0}},z={...t.defaults,flags:{...t.defaults.flags,...r}};export{z as a,r as f}; +import"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import{A as t}from"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";const r={mafs:{angle:!0,segment:!0,circle:!0,quadratic:!0,sinusoid:!0,polygon:!0,linear:!0,"linear-system":!0,ray:!0,point:!0,none:!0,"interactive-graph-locked-features-labels":!0,"locked-figures-aria":!0,"locked-point-labels":!0,"locked-line-labels":!0,"locked-vector-labels":!0,"locked-ellipse-labels":!0,"locked-polygon-labels":!0,"locked-function-labels":!0}},z={...t.defaults,flags:{...t.defaults.flags,...r}};export{z as a,r as f}; diff --git a/assets/graded-group-set.stories-Vbs62zS5.js b/assets/graded-group-set.stories-azt8lh9e.js similarity index 91% rename from assets/graded-group-set.stories-Vbs62zS5.js rename to assets/graded-group-set.stories-azt8lh9e.js index 1819eb59ae..c738e6e076 100644 --- a/assets/graded-group-set.stories-Vbs62zS5.js +++ b/assets/graded-group-set.stories-azt8lh9e.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{R as s}from"./renderer-with-debug-ui-75hBDQJk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const n={content:`#Section 1: Adding tenths less than one +import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{R as s}from"./renderer-with-debug-ui-Jq91P-PK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const n={content:`#Section 1: Adding tenths less than one [[☃ graded-group-set 1]] diff --git a/assets/graded-group.stories-ptte38tV.js b/assets/graded-group.stories-znyHkL9A.js similarity index 86% rename from assets/graded-group.stories-ptte38tV.js rename to assets/graded-group.stories-znyHkL9A.js index 347779fe40..1ef4ea3030 100644 --- a/assets/graded-group.stories-ptte38tV.js +++ b/assets/graded-group.stories-znyHkL9A.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-63Ea5SlK.js";import{R as a}from"./renderer-with-debug-ui-75hBDQJk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const m={content:`--- +import{j as s}from"./jsx-runtime-63Ea5SlK.js";import{R as a}from"./renderer-with-debug-ui-Jq91P-PK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const m={content:`--- ##Check your understanding! diff --git a/assets/graph-settings-XR_siz2q.js b/assets/graph-settings-Pvhg8t7C.js similarity index 97% rename from assets/graph-settings-XR_siz2q.js rename to assets/graph-settings-Pvhg8t7C.js index 25ff29bdd3..7819232f3c 100644 --- a/assets/graph-settings-XR_siz2q.js +++ b/assets/graph-settings-Pvhg8t7C.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-63Ea5SlK.js";import{p as z,c as q}from"./article-renderer-mU-6RWLp.js";import{_ as u}from"./jquery-yG1GhClm.js";import{U as j,K as C}from"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import{g as K}from"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import{c as V}from"./components-ODdjt0Ld.js";import{i as O}from"./constants-iPV6vHZm.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{C as R}from"./index-V5gl6frG.js";import{g as $}from"./_commonjsHelpers-4gQjN7DL.js";import{r as X}from"./index-6oxdNXpR.js";import{i as Q}from"./invariant-bu5zBsRS.js";import{P as d}from"./index-0C4KXdeC.js";import{F as H}from"./index-9gkyvru-.js";/* +import{j as s}from"./jsx-runtime-63Ea5SlK.js";import{p as z,c as q}from"./article-renderer-HEYBK15c.js";import{_ as u}from"./jquery-yG1GhClm.js";import{U as j,K as C}from"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import{g as K}from"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c as V}from"./components-ODdjt0Ld.js";import{i as O}from"./constants-iPV6vHZm.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{C as R}from"./index-V5gl6frG.js";import{g as $}from"./_commonjsHelpers-4gQjN7DL.js";import{r as X}from"./index-6oxdNXpR.js";import{i as Q}from"./invariant-bu5zBsRS.js";import{P as d}from"./index-k-0mNqHS.js";import{F as H}from"./index-9gkyvru-.js";/* object-assign (c) Sindre Sorhus @license MIT diff --git a/assets/graph-settings.stories-0EyA3jyu.js b/assets/graph-settings.stories-DB9t-gK6.js similarity index 79% rename from assets/graph-settings.stories-0EyA3jyu.js rename to assets/graph-settings.stories-DB9t-gK6.js index b8b7a6f9b3..21fbd4524d 100644 --- a/assets/graph-settings.stories-0EyA3jyu.js +++ b/assets/graph-settings.stories-DB9t-gK6.js @@ -1,3 +1,3 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{G as i}from"./graph-settings-XR_siz2q.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";const a={editableSettings:{control:{type:"array",options:["canvas","graph","snap","image","measure"]}},box:{control:{type:"array"}},range:{control:{type:"object"}},labels:{control:{type:"object"}},step:{control:{type:"object"}},gridStep:{control:{type:"object"}},snapStep:{control:{type:"object"}},valid:{control:{type:"text"}},backgroundImage:{control:{type:"object"}},markings:{control:{type:"select"},table:{type:{summary:'"graph" | "grid" | "none"'}},type:{name:"enum",value:["graph","grid","none"],required:!1}},rulerLabel:{control:{type:"text"}},rulerTicks:{control:{type:"number"}},showTooltips:{control:{type:"boolean"}},onChange:{control:{type:"function"}}},Wt={title:"PerseusEditor/Components/Graph Settings",component:i,argTypes:a},t=m=>e.jsx(i,{...m});t.args={range:[[-10,10],[-10,10]]};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var r,o,p;t.parameters={...t.parameters,docs:{...(r=t.parameters)==null?void 0:r.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{G as i}from"./graph-settings-Pvhg8t7C.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./index-k-0mNqHS.js";const a={editableSettings:{control:{type:"array",options:["canvas","graph","snap","image","measure"]}},box:{control:{type:"array"}},range:{control:{type:"object"}},labels:{control:{type:"object"}},step:{control:{type:"object"}},gridStep:{control:{type:"object"}},snapStep:{control:{type:"object"}},valid:{control:{type:"text"}},backgroundImage:{control:{type:"object"}},markings:{control:{type:"select"},table:{type:{summary:'"graph" | "grid" | "none"'}},type:{name:"enum",value:["graph","grid","none"],required:!1}},rulerLabel:{control:{type:"text"}},rulerTicks:{control:{type:"number"}},showTooltips:{control:{type:"boolean"}},onChange:{control:{type:"function"}}},Wt={title:"PerseusEditor/Components/Graph Settings",component:i,argTypes:a},t=m=>e.jsx(i,{...m});t.args={range:[[-10,10],[-10,10]]};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var r,o,p;t.parameters={...t.parameters,docs:{...(r=t.parameters)==null?void 0:r.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(p=(o=t.parameters)==null?void 0:o.docs)==null?void 0:p.source}}};const Xt=["Default"];export{t as Default,Xt as __namedExportsOrder,Wt as default}; diff --git a/assets/grapher.stories-y28LaYLN.js b/assets/grapher.stories-0lzR48FX.js similarity index 92% rename from assets/grapher.stories-y28LaYLN.js rename to assets/grapher.stories-0lzR48FX.js index c39fda9d29..f14a3ded06 100644 --- a/assets/grapher.stories-y28LaYLN.js +++ b/assets/grapher.stories-0lzR48FX.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{R as r}from"./renderer-with-debug-ui-75hBDQJk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const j={content:`The graph of the function $h(x)=2|x|$ is shown on the grid below. +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{R as r}from"./renderer-with-debug-ui-Jq91P-PK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const j={content:`The graph of the function $h(x)=2|x|$ is shown on the grid below. **Graph the function $f(x)=2|x-8|+1$ in the interactive graph. ** diff --git a/assets/graphie.stories-zsbd3CaB.js b/assets/graphie.stories-IU3qmC87.js similarity index 85% rename from assets/graphie.stories-zsbd3CaB.js rename to assets/graphie.stories-IU3qmC87.js index 21d018b499..67d8a31d13 100644 --- a/assets/graphie.stories-zsbd3CaB.js +++ b/assets/graphie.stories-IU3qmC87.js @@ -1,3 +1,3 @@ -import{j as l}from"./jsx-runtime-63Ea5SlK.js";import{S as u}from"./server-item-renderer-with-debug-ui-jjme8wR5.js";import{I as h}from"./article-renderer-mU-6RWLp.js";import{a as g}from"./svg-image-7aOK05RI.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-item-CWRjfKXr.js";import"./renderer-1DxKQj1_.js";import"./index-J2t_5nK1.js";import"./asset-context-H6Iqp7Gi.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./hints-renderer-alc4yvsU.js";import"./shared-4TdECMLk.js";import"./base-radio-9_hKye4B.js";import"./choice-none-above-dRu7sfJj.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./hud-ifw9Ofbw.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./ke-score-ui-AQ1XUyPU.js";import"./side-by-side-MBJuyilC.js";import"./test-dependencies-8Mfke9yn.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";import"./enums-x5qaTru7.js";import"./input-with-examples-YO5BCgg1.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./answer-choices-lVeJkx-U.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./fixed-to-responsive-for_tVF1.js";import"./video-transcript-link-_gpkjmR8.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";const f={answerArea:Object.fromEntries(h.map(d=>[d,!1])),hints:[],itemDataVersion:{major:0,minor:1},question:{content:"[[☃ image 1]]",images:{},widgets:{"image 1":{alignment:"block",graded:!0,options:{alt:"This chart presents a pie graph divided into 2 sectors: 28 percent are unsuccessful and 72 percent are successful.",backgroundImage:{height:210,url:"web+graphie://cdn.kastatic.org/ka-perseus-graphie/7c0a5afb8670fad738df800ffe16c5e516b48777",width:210},box:[210,210],caption:"Source: NASA “Current and Past Missions”",labels:[],range:[[0,10],[0,10]],static:!1,title:"Percentage of Successful Cometary Missions (1978-2014)"},static:!1,type:"image",version:{major:0,minor:0}}}},answer:null},i=200,pt={title:"Perseus/Components/Graphie",component:g,args:{box:[i,i],setup:()=>{},setDrawingAreaAvailable:()=>{}}},t={},r=()=>l.jsx(u,{item:f});r.__docgenInfo={description:"A demonstration of a Graphie rendered using the Perseus `Renderer` complete\nwith overlaid labels and an image caption below.",methods:[],displayName:"PieChartGraphieLabels"};var e,o,m;t.parameters={...t.parameters,docs:{...(e=t.parameters)==null?void 0:e.docs,source:{originalSource:"{}",...(m=(o=t.parameters)==null?void 0:o.docs)==null?void 0:m.source}}};var p,a,s,n,c;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`() => { +import{j as l}from"./jsx-runtime-63Ea5SlK.js";import{S as u}from"./server-item-renderer-with-debug-ui-Tcs9zCKY.js";import{I as h}from"./article-renderer-HEYBK15c.js";import{a as g}from"./svg-image-7aOK05RI.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-item-C-BdPaPl.js";import"./renderer-L37a98D_.js";import"./index-J2t_5nK1.js";import"./asset-context-H6Iqp7Gi.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./hints-renderer-zzse9ai2.js";import"./shared-4TdECMLk.js";import"./base-radio-kypcKNEK.js";import"./choice-none-above-vDwffTnk.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./hud-ifw9Ofbw.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./ke-score-ui-AQ1XUyPU.js";import"./side-by-side-MBJuyilC.js";import"./test-dependencies-1Svp3QCw.js";import"./register-all-widgets-for-testing-vNa20up7.js";import"./enums-x5qaTru7.js";import"./input-with-examples-PaWkADGr.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./answer-choices-iyIz6W_C.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./fixed-to-responsive-for_tVF1.js";import"./video-transcript-link-_gpkjmR8.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";const f={answerArea:Object.fromEntries(h.map(d=>[d,!1])),hints:[],itemDataVersion:{major:0,minor:1},question:{content:"[[☃ image 1]]",images:{},widgets:{"image 1":{alignment:"block",graded:!0,options:{alt:"This chart presents a pie graph divided into 2 sectors: 28 percent are unsuccessful and 72 percent are successful.",backgroundImage:{height:210,url:"web+graphie://cdn.kastatic.org/ka-perseus-graphie/7c0a5afb8670fad738df800ffe16c5e516b48777",width:210},box:[210,210],caption:"Source: NASA “Current and Past Missions”",labels:[],range:[[0,10],[0,10]],static:!1,title:"Percentage of Successful Cometary Missions (1978-2014)"},static:!1,type:"image",version:{major:0,minor:0}}}},answer:null},i=200,pt={title:"Perseus/Components/Graphie",component:g,args:{box:[i,i],setup:()=>{},setDrawingAreaAvailable:()=>{}}},t={},r=()=>l.jsx(u,{item:f});r.__docgenInfo={description:"A demonstration of a Graphie rendered using the Perseus `Renderer` complete\nwith overlaid labels and an image caption below.",methods:[],displayName:"PieChartGraphieLabels"};var e,o,m;t.parameters={...t.parameters,docs:{...(e=t.parameters)==null?void 0:e.docs,source:{originalSource:"{}",...(m=(o=t.parameters)==null?void 0:o.docs)==null?void 0:m.source}}};var p,a,s,n,c;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`() => { return ; }`,...(s=(a=r.parameters)==null?void 0:a.docs)==null?void 0:s.source},description:{story:"A demonstration of a Graphie rendered using the Perseus `Renderer` complete\nwith overlaid labels and an image caption below.",...(c=(n=r.parameters)==null?void 0:n.docs)==null?void 0:c.description}}};const at=["SquareBoxSizeAndOtherwiseEmpty","PieChartGraphieLabels"];export{r as PieChartGraphieLabels,t as SquareBoxSizeAndOtherwiseEmpty,at as __namedExportsOrder,pt as default}; diff --git a/assets/group.stories-X29O8C9X.js b/assets/group.stories-VGeWPtA7.js similarity index 85% rename from assets/group.stories-X29O8C9X.js rename to assets/group.stories-VGeWPtA7.js index b1832ab453..a55ba7df69 100644 --- a/assets/group.stories-X29O8C9X.js +++ b/assets/group.stories-VGeWPtA7.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-63Ea5SlK.js";import{R as n}from"./renderer-with-debug-ui-75hBDQJk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const a={content:`![](https://ka-perseus-graphie.s3.amazonaws.com/3e6d0981127dea205c2becc0ead24702fbe862a1.png) +import{j as i}from"./jsx-runtime-63Ea5SlK.js";import{R as n}from"./renderer-with-debug-ui-Jq91P-PK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const a={content:`![](https://ka-perseus-graphie.s3.amazonaws.com/3e6d0981127dea205c2becc0ead24702fbe862a1.png) ===== diff --git a/assets/hints-renderer-alc4yvsU.js b/assets/hints-renderer-zzse9ai2.js similarity index 98% rename from assets/hints-renderer-alc4yvsU.js rename to assets/hints-renderer-zzse9ai2.js index b6be6428d9..be55b29a22 100644 --- a/assets/hints-renderer-alc4yvsU.js +++ b/assets/hints-renderer-zzse9ai2.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-63Ea5SlK.js";import{l as T,R as N,p as R}from"./renderer-1DxKQj1_.js";import{l as s}from"./index-awljIyHI.js";import{c as A}from"./index-dnMhQZ-1.js";import{r as O}from"./index-6oxdNXpR.js";import{F as C}from"./index-9gkyvru-.js";import{_ as p}from"./jquery-yG1GhClm.js";import{P as x}from"./i18n-context-fsWEgybQ.js";import{l as y,m as E,o as W,k as j,q as L,h as _}from"./constants-iPV6vHZm.js";import{m as d}from"./media-queries-gbofTbz-.js";import{A as P}from"./perseus-api-1-ethIrW.js";import{s as $}from"./shared-4TdECMLk.js";import{U as F}from"./util-AYeX86gl.js";const b=class b extends O.Component{constructor(){super(...arguments),this.getSerializedState=()=>this.refs.renderer.getSerializedState(),this.restoreSerializedState=(e,t)=>{this.refs.renderer.restoreSerializedState(e,t)}}render(){const{apiOptions:e,className:t,hint:r,lastHint:n,lastRendered:a,pos:m,totalHints:g}=this.props,{isMobile:h}=e,o=A("hint",!h&&"perseus-hint-renderer",h&&s.css(q.newHint),h&&a&&s.css(q.lastRenderedNewHint),n&&"last-hint",a&&"last-rendered",t),l={...e,customKeypad:!1};return i.jsxs("div",{className:o,tabIndex:"-1",children:[!e.isMobile&&i.jsx("span",{className:"perseus-sr-only",children:this.context.strings.hintPos({pos:m+1})}),!e.isMobile&&g!=null&&m!=null&&i.jsx("span",{className:"perseus-hint-label",style:{display:"block",color:e.hintProgressColor},children:`${m+1} / ${g}`}),i.jsx(N,{ref:"renderer",widgets:r.widgets,content:r.content||"",images:r.images,apiOptions:l,findExternalWidgets:this.props.findExternalWidgets,linterContext:R(this.props.linterContext,"hint"),strings:this.context.strings})]})}};b.contextType=x,b.defaultProps={linterContext:T};let c=b;const q=s.StyleSheet.create({newHint:{marginBottom:1.5*y,borderLeftColor:E,borderLeftStyle:"solid",borderLeftWidth:W,[d.lgOrSmaller]:{paddingLeft:y},[d.smOrSmaller]:{paddingLeft:0},":focus":{outline:"none"}},lastRenderedNewHint:{marginBottom:0,borderLeftColor:j}});c.__docgenInfo={description:"",methods:[{name:"getSerializedState",docblock:null,modifiers:[],params:[],returns:null},{name:"restoreSerializedState",docblock:null,modifiers:[],params:[{name:"state",optional:!1,type:null},{name:"callback",optional:!1,type:null}],returns:null}],displayName:"HintRenderer",props:{apiOptions:{required:!0,tsType:{name:"Readonly",elements:[{name:"signature",type:"object",raw:`{ +import{j as i}from"./jsx-runtime-63Ea5SlK.js";import{l as T,R as N,p as R}from"./renderer-L37a98D_.js";import{l as s}from"./index-awljIyHI.js";import{c as A}from"./index-dnMhQZ-1.js";import{r as O}from"./index-6oxdNXpR.js";import{F as C}from"./index-9gkyvru-.js";import{_ as p}from"./jquery-yG1GhClm.js";import{P as x}from"./i18n-context-fsWEgybQ.js";import{l as y,m as E,o as W,k as j,q as L,h as _}from"./constants-iPV6vHZm.js";import{m as d}from"./media-queries-gbofTbz-.js";import{A as P}from"./perseus-api-1-ethIrW.js";import{s as $}from"./shared-4TdECMLk.js";import{U as F}from"./util-AYeX86gl.js";const b=class b extends O.Component{constructor(){super(...arguments),this.getSerializedState=()=>this.refs.renderer.getSerializedState(),this.restoreSerializedState=(e,t)=>{this.refs.renderer.restoreSerializedState(e,t)}}render(){const{apiOptions:e,className:t,hint:r,lastHint:n,lastRendered:a,pos:m,totalHints:g}=this.props,{isMobile:h}=e,o=A("hint",!h&&"perseus-hint-renderer",h&&s.css(q.newHint),h&&a&&s.css(q.lastRenderedNewHint),n&&"last-hint",a&&"last-rendered",t),l={...e,customKeypad:!1};return i.jsxs("div",{className:o,tabIndex:"-1",children:[!e.isMobile&&i.jsx("span",{className:"perseus-sr-only",children:this.context.strings.hintPos({pos:m+1})}),!e.isMobile&&g!=null&&m!=null&&i.jsx("span",{className:"perseus-hint-label",style:{display:"block",color:e.hintProgressColor},children:`${m+1} / ${g}`}),i.jsx(N,{ref:"renderer",widgets:r.widgets,content:r.content||"",images:r.images,apiOptions:l,findExternalWidgets:this.props.findExternalWidgets,linterContext:R(this.props.linterContext,"hint"),strings:this.context.strings})]})}};b.contextType=x,b.defaultProps={linterContext:T};let c=b;const q=s.StyleSheet.create({newHint:{marginBottom:1.5*y,borderLeftColor:E,borderLeftStyle:"solid",borderLeftWidth:W,[d.lgOrSmaller]:{paddingLeft:y},[d.smOrSmaller]:{paddingLeft:0},":focus":{outline:"none"}},lastRenderedNewHint:{marginBottom:0,borderLeftColor:j}});c.__docgenInfo={description:"",methods:[{name:"getSerializedState",docblock:null,modifiers:[],params:[],returns:null},{name:"restoreSerializedState",docblock:null,modifiers:[],params:[{name:"state",optional:!1,type:null},{name:"callback",optional:!1,type:null}],returns:null}],displayName:"HintRenderer",props:{apiOptions:{required:!0,tsType:{name:"Readonly",elements:[{name:"signature",type:"object",raw:`{ isArticle?: boolean; onFocusChange?: ( newFocusPath: FocusPath, @@ -1847,22 +1847,34 @@ the available choices.`}]}}],raw:`Readonly<{ */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -3314,14 +3326,15 @@ the available choices.`}]}}],raw:`Readonly<{ major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one diff --git a/assets/hints-renderer.stories-XSJRDrjz.js b/assets/hints-renderer.stories-WSumGzR5.js similarity index 96% rename from assets/hints-renderer.stories-XSJRDrjz.js rename to assets/hints-renderer.stories-WSumGzR5.js index 74d2362ced..921bd37170 100644 --- a/assets/hints-renderer.stories-XSJRDrjz.js +++ b/assets/hints-renderer.stories-WSumGzR5.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{V as Y}from"./index-0DbkllkJ.js";import{H as Z}from"./hints-renderer-alc4yvsU.js";import{i as e}from"./interactive-graph-question-builder-VBdpjz9Z.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./renderer-1DxKQj1_.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./index-9gkyvru-.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";const Ee={title:"Perseus/Renderers/Hints Renderer",component:Z,decorators:[X=>m.jsx(Y,{style:{left:80},children:m.jsx(X,{})})],argTypes:{hintsVisible:{control:{min:0},defaultValue:3}}},r={args:{hints:[{content:"this is hint 1",images:{},replace:!1,widgets:{}},{content:"this is hint 2",images:{},replace:!1,widgets:{}},{content:"this is hint 3",images:{},replace:!1,widgets:{}}]}},i={args:{apiOptions:{flags:{mafs:{angle:!0,circle:!0,linear:!0,"linear-system":!0,point:!0,polygon:!0,ray:!0,segment:!0,quadratic:!0,sinusoid:!0}}},hints:[{...e().withAngle().build(),replace:!1},{...e().withCircle().build(),replace:!1},{...e().withLinear().build(),replace:!1},{...e().withLinearSystem().build(),replace:!1},{...e().withPoints(3).build(),replace:!1},{...e().withPolygon().build(),replace:!1},{...e().withRay().build(),replace:!1},{...e().withSegments().build(),replace:!1},{...e().withQuadratic().build(),replace:!1},{...e().withSinusoid().build(),replace:!1}]}},a={args:{apiOptions:{flags:{mafs:{segment:!0}}},hints:[{...e().build(),replace:!1}]}},n={args:{apiOptions:{flags:{mafs:{linear:!0}}},hints:[{...e().withLinear().build(),replace:!1}]}},t={args:{apiOptions:{flags:{mafs:{"linear-system":!0}}},hints:[{...e().withLinearSystem().build(),replace:!1}]}},s={args:{apiOptions:{flags:{mafs:{ray:!0}}},hints:[{...e().withRay().build(),replace:!1}]}},l={args:{apiOptions:{flags:{mafs:{circle:!0}}},hints:[{...e().withCircle().build(),replace:!1}]}},o={args:{apiOptions:{flags:{mafs:{quadratic:!0}}},hints:[{...e().withQuadratic().build(),replace:!1}]}},p={args:{apiOptions:{flags:{mafs:{circle:!0}}},hints:[{...e().withSinusoid().build(),replace:!1}]}},c={args:{apiOptions:{flags:{mafs:{polygon:!0}}},hints:[{...e().withPolygon().build(),replace:!1},{...e().withPolygon("angles").build(),replace:!1},{...e().withPolygon("sides").build(),replace:!1}]}},u={args:{apiOptions:{flags:{mafs:{point:!0}}},hints:[{...e().withPoints(3).build(),replace:!1}]}},h={args:{apiOptions:{flags:{mafs:{angle:!0}}},hints:[{...e().withAngle().build(),replace:!1}]}};var d,g,f;r.parameters={...r.parameters,docs:{...(d=r.parameters)==null?void 0:d.docs,source:{originalSource:`{ +import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{V as Y}from"./index-0DbkllkJ.js";import{H as Z}from"./hints-renderer-zzse9ai2.js";import{i as e}from"./interactive-graph-question-builder-VBdpjz9Z.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./renderer-L37a98D_.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./index-9gkyvru-.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";const Ee={title:"Perseus/Renderers/Hints Renderer",component:Z,decorators:[X=>m.jsx(Y,{style:{left:80},children:m.jsx(X,{})})],argTypes:{hintsVisible:{control:{min:0},defaultValue:3}}},r={args:{hints:[{content:"this is hint 1",images:{},replace:!1,widgets:{}},{content:"this is hint 2",images:{},replace:!1,widgets:{}},{content:"this is hint 3",images:{},replace:!1,widgets:{}}]}},i={args:{apiOptions:{flags:{mafs:{angle:!0,circle:!0,linear:!0,"linear-system":!0,point:!0,polygon:!0,ray:!0,segment:!0,quadratic:!0,sinusoid:!0}}},hints:[{...e().withAngle().build(),replace:!1},{...e().withCircle().build(),replace:!1},{...e().withLinear().build(),replace:!1},{...e().withLinearSystem().build(),replace:!1},{...e().withPoints(3).build(),replace:!1},{...e().withPolygon().build(),replace:!1},{...e().withRay().build(),replace:!1},{...e().withSegments().build(),replace:!1},{...e().withQuadratic().build(),replace:!1},{...e().withSinusoid().build(),replace:!1}]}},a={args:{apiOptions:{flags:{mafs:{segment:!0}}},hints:[{...e().build(),replace:!1}]}},n={args:{apiOptions:{flags:{mafs:{linear:!0}}},hints:[{...e().withLinear().build(),replace:!1}]}},t={args:{apiOptions:{flags:{mafs:{"linear-system":!0}}},hints:[{...e().withLinearSystem().build(),replace:!1}]}},s={args:{apiOptions:{flags:{mafs:{ray:!0}}},hints:[{...e().withRay().build(),replace:!1}]}},l={args:{apiOptions:{flags:{mafs:{circle:!0}}},hints:[{...e().withCircle().build(),replace:!1}]}},o={args:{apiOptions:{flags:{mafs:{quadratic:!0}}},hints:[{...e().withQuadratic().build(),replace:!1}]}},p={args:{apiOptions:{flags:{mafs:{circle:!0}}},hints:[{...e().withSinusoid().build(),replace:!1}]}},c={args:{apiOptions:{flags:{mafs:{polygon:!0}}},hints:[{...e().withPolygon().build(),replace:!1},{...e().withPolygon("angles").build(),replace:!1},{...e().withPolygon("sides").build(),replace:!1}]}},u={args:{apiOptions:{flags:{mafs:{point:!0}}},hints:[{...e().withPoints(3).build(),replace:!1}]}},h={args:{apiOptions:{flags:{mafs:{angle:!0}}},hints:[{...e().withAngle().build(),replace:!1}]}};var d,g,f;r.parameters={...r.parameters,docs:{...(d=r.parameters)==null?void 0:d.docs,source:{originalSource:`{ args: { hints: [{ content: "this is hint 1", diff --git a/assets/iframe-7Gh6p0LC.js b/assets/iframe-8qXcTeqo.js similarity index 79% rename from assets/iframe-7Gh6p0LC.js rename to assets/iframe-8qXcTeqo.js index 2e62c94852..30b03c9f8f 100644 --- a/assets/iframe-7Gh6p0LC.js +++ b/assets/iframe-8qXcTeqo.js @@ -1,7 +1,7 @@ -import"../sb-preview/runtime.js";(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))p(t);new MutationObserver(t=>{for(const r of t)if(r.type==="childList")for(const _ of r.addedNodes)_.tagName==="LINK"&&_.rel==="modulepreload"&&p(_)}).observe(document,{childList:!0,subtree:!0});function a(t){const r={};return t.integrity&&(r.integrity=t.integrity),t.referrerPolicy&&(r.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?r.credentials="include":t.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function p(t){if(t.ep)return;t.ep=!0;const r=a(t);fetch(t.href,r)}})();const g="modulepreload",l=function(e,i){return new URL(e,i).href},d={},s=function(i,a,p){let t=Promise.resolve();if(a&&a.length>0){const r=document.getElementsByTagName("link");t=Promise.all(a.map(_=>{if(_=l(_,p),_ in d)return;d[_]=!0;const c=_.endsWith(".css"),E=c?'[rel="stylesheet"]':"";if(!!p)for(let m=r.length-1;m>=0;m--){const u=r[m];if(u.href===_&&(!c||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${_}"]${E}`))return;const o=document.createElement("link");if(o.rel=c?"stylesheet":g,c||(o.as="script",o.crossOrigin=""),o.href=_,document.head.appendChild(o),c)return new Promise((m,u)=>{o.addEventListener("load",m),o.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${_}`)))})}))}return t.then(()=>i()).catch(r=>{const _=new Event("vite:preloadError",{cancelable:!0});if(_.payload=r,window.dispatchEvent(_),!_.defaultPrevented)throw r})},{createBrowserChannel:O}=__STORYBOOK_MODULE_CHANNELS__,{addons:v}=__STORYBOOK_MODULE_PREVIEW_API__,n=O({page:"preview"});v.setChannel(n);window.__STORYBOOK_ADDONS_CHANNEL__=n;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=n);const R={"./packages/math-input/src/components/keypad/keypad-button.stories.tsx":async()=>s(()=>import("./keypad-button.stories-DT8Y3Yxd.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url),"./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx":async()=>s(()=>import("./keypad-mathquill.stories-rpEbEeQe.js"),__vite__mapDeps([13,1,2,3,14,9,10,15,16,17,11,18,12,19,20,21,6,22,23,24,25,8,7,26,27,28]),import.meta.url),"./packages/math-input/src/components/keypad/keypad-pages/keypad-pages.stories.tsx":async()=>s(()=>import("./keypad-pages.stories-EACJuu7S.js"),__vite__mapDeps([29,1,2,3,4,5,30,26,6,7,8,9,10,11,12]),import.meta.url),"./packages/math-input/src/components/keypad/navigation-pad.stories.tsx":async()=>s(()=>import("./navigation-pad.stories-u1r2LJel.js"),__vite__mapDeps([31,1,2,3,4,5,27,9,10,12,6,8,11]),import.meta.url),"./packages/math-input/src/components/tabbar/tabbar.stories.tsx":async()=>s(()=>import("./tabbar.stories-anfVmrOR.js"),__vite__mapDeps([32,1,2,3,24,9,10,25,8,11,12]),import.meta.url),"./packages/math-input/src/components/tabbar/tabbaritem.stories.tsx":async()=>s(()=>import("./tabbaritem.stories-Z91bESHz.js"),__vite__mapDeps([33,25,1,2,3,8,9,10,11,12]),import.meta.url),"./packages/math-input/src/full-keypad.stories.tsx":async()=>s(()=>import("./full-keypad.stories-8Xty0u74.js"),__vite__mapDeps([34,30,22,1,2,3,10,15,19,23,9,12,24,25,8,11,6,7,26,27]),import.meta.url),"./packages/math-input/src/full-mobile-input.stories.tsx":async()=>s(()=>import("./full-mobile-input.stories-YLk0dNZF.js"),__vite__mapDeps([35,1,2,3,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,4,5,36,37,28,38,39,40]),import.meta.url),"./packages/perseus-editor/src/__stories__/article-editor.stories.tsx":async()=>s(()=>import("./article-editor.stories--sedAQAw.js"),__vite__mapDeps([41,1,2,3,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163]),import.meta.url),"./packages/perseus-editor/src/__stories__/content-preview.stories.tsx":async()=>s(()=>import("./content-preview.stories-SCc4vI8q.js"),__vite__mapDeps([164,1,2,3,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,165,166,109,110,167,108,119,168]),import.meta.url),"./packages/perseus-editor/src/__stories__/editor-page.stories.tsx":async()=>s(()=>import("./editor-page.stories-1law3Fmm.js"),__vite__mapDeps([169,1,2,3,111,112,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,170,4,5,171,167,110,109,172,173]),import.meta.url),"./packages/perseus-editor/src/__stories__/editor.stories.tsx":async()=>s(()=>import("./editor.stories-xi8Dh1kH.js"),__vite__mapDeps([174,1,2,3,9,10,4,5,175,37,107,42,43,44,45,36,22,15,19,23,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,167,176,177,178,171,172,179,168,180,173]),import.meta.url),"./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx":async()=>s(()=>import("./interactive-graph-editor.stories-4wVPSUex.js"),__vite__mapDeps([181,1,2,3,9,10,83,12,21,4,5,175,37,107,42,43,44,45,36,22,15,19,23,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,167,176,177,178,171,172,179,168,182,183,170,173]),import.meta.url),"./packages/perseus-editor/src/__stories__/item-editor.stories.tsx":async()=>s(()=>import("./item-editor.stories-WtXANqO5.js"),__vite__mapDeps([184,1,2,3,172,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,168]),import.meta.url),"./packages/perseus-editor/src/__stories__/tex-error-view.stories.tsx":async()=>s(()=>import("./tex-error-view.stories--fr65KDX.js"),__vite__mapDeps([185,122,1,2,3,9,10,123,69]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/blur-input.stories.tsx":async()=>s(()=>import("./blur-input.stories-MEVoLwh0.js"),__vite__mapDeps([186,1,2,3,4,5,116]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/color-select.stories.tsx":async()=>s(()=>import("./color-select.stories-x-6zmK3s.js"),__vite__mapDeps([187,1,2,3,139,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,140]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/color-swatch.stories.tsx":async()=>s(()=>import("./color-swatch.stories-xFVVW1kt.js"),__vite__mapDeps([188,1,2,3,140,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/device-framer.stories.tsx":async()=>s(()=>import("./device-framer.stories--gF4_S4i.js"),__vite__mapDeps([189,1,2,3,12,109,110]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/graph-settings.stories.tsx":async()=>s(()=>import("./graph-settings.stories-0EyA3jyu.js"),__vite__mapDeps([190,1,2,3,112,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,113]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/interactive-graph-settings.stories.tsx":async()=>s(()=>import("./interactive-graph-settings.stories-2mM44wKW.js"),__vite__mapDeps([191,1,2,3,132,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,131,121,123]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-ellipse-settings.stories.tsx":async()=>s(()=>import("./locked-ellipse-settings.stories-i534RLiL.js"),__vite__mapDeps([192,1,2,3,134,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,135,136,137,138,139,140,141]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-figures-section.stories.tsx":async()=>s(()=>import("./locked-figures-section.stories-KUQmi_mK.js"),__vite__mapDeps([193,1,2,3,9,10,12,133,81,11,18,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,131,121,123,91,75,46,37,44,23,48,50,51,43,52,55,58,59,60,61,66,67,134,42,36,22,24,25,8,6,7,26,27,28,39,40,68,70,72,73,74,76,77,78,80,88,89,90,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,135,136,137,138,139,140,141,142,143,144,145,146,147,148]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-function-settings.stories.tsx":async()=>s(()=>import("./locked-function-settings.stories-av4xBHlQ.js"),__vite__mapDeps([194,1,2,3,142,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,91,75,46,37,44,23,48,50,51,43,52,55,58,59,60,61,66,67,74,138,42,36,22,24,25,8,6,7,26,27,28,39,40,68,70,72,73,76,77,78,80,88,89,90,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,136,139,140,135,141,143]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-label-settings.stories.tsx":async()=>s(()=>import("./locked-label-settings.stories-5243600u.js"),__vite__mapDeps([195,1,2,3,138,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,136,139,140]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-line-settings.stories.tsx":async()=>s(()=>import("./locked-line-settings.stories-b7Mj-x5V.js"),__vite__mapDeps([196,1,2,3,144,43,37,44,45,50,10,9,47,51,52,53,23,54,55,15,56,57,58,81,11,18,12,21,82,17,69,71,83,14,16,19,20,49,84,62,63,38,64,65,79,85,86,87,91,75,46,48,59,60,61,66,67,135,42,36,22,24,25,8,6,7,26,27,28,39,40,68,70,72,73,74,76,77,78,80,88,89,90,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,138,136,139,140,141,143,145,146]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-point-settings.stories.tsx":async()=>s(()=>import("./locked-point-settings.stories-NB6zBF3d.js"),__vite__mapDeps([197,1,2,3,145,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,135,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,138,136,139,140,146]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-polygon-settings.stories.tsx":async()=>s(()=>import("./locked-polygon-settings.stories-eghhomPB.js"),__vite__mapDeps([198,1,2,3,147,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,138,108,136,139,140,135,146,141]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-vector-settings.stories.tsx":async()=>s(()=>import("./locked-vector-settings.stories---K4kjTt.js"),__vite__mapDeps([199,1,2,3,148,43,37,44,45,50,10,9,47,51,52,53,23,54,55,15,56,57,58,81,11,18,12,21,82,17,69,71,83,14,16,19,20,49,84,62,63,38,64,65,79,85,86,87,135,42,36,22,24,25,8,6,7,26,27,28,39,40,46,48,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,138,136,139,140,143]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/scrollless-number-text-field.stories.tsx":async()=>s(()=>import("./scrollless-number-text-field.stories-nVFV0ihc.js"),__vite__mapDeps([200,1,2,3,9,10,21,136,74,12,69,75]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/section-control-button.stories.tsx":async()=>s(()=>import("./section-control-button.stories--zyKxUzE.js"),__vite__mapDeps([201,1,2,3,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,120,108,121]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/toggleable-caret.stories.tsx":async()=>s(()=>import("./toggleable-caret.stories-RjkVgUY7.js"),__vite__mapDeps([202,1,2,3,19,123,69,9,10]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/viewport-resizer.stories.tsx":async()=>s(()=>import("./viewport-resizer.stories-Fd_e5eUB.js"),__vite__mapDeps([203,1,2,3,4,5,167,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,110,119]),import.meta.url),"./packages/perseus-editor/src/diffs/__stories__/structured-item-diff.stories.tsx":async()=>s(()=>import("./structured-item-diff.stories-NgFI8aTT.js"),__vite__mapDeps([204,1,2,3,176,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,177,108,113,178,205]),import.meta.url),"./packages/perseus-editor/src/diffs/__stories__/tags-diff.stories.tsx":async()=>s(()=>import("./tags-diff.stories-24sTdvPu.js"),__vite__mapDeps([206,1,2,3,178,177,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,113,205]),import.meta.url),"./packages/perseus-editor/src/diffs/__stories__/text-diff.stories.tsx":async()=>s(()=>import("./text-diff.stories-EDJrVzKv.js"),__vite__mapDeps([207,1,2,3,177,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,113,205]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/categorizer-editor.stories.tsx":async()=>s(()=>import("./categorizer-editor.stories-DsW9Q3l4.js"),__vite__mapDeps([208,1,2,3,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,4,5,114,108,115,113]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/definition-editor.stories.tsx":async()=>s(()=>import("./definition-editor.stories-tMtydvHM.js"),__vite__mapDeps([209,1,2,3,4,5,117,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,115,113,118,119,120,121,122,123]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/dropdown-editor.stories.tsx":async()=>s(()=>import("./dropdown-editor.stories-tWYKsbJs.js"),__vite__mapDeps([210,1,2,3,4,5,124,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,115,113,119]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/explanation-editor.stories.tsx":async()=>s(()=>import("./explanation-editor.stories-tYLxtPBK.js"),__vite__mapDeps([211,1,2,3,4,5,125,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,115,113,118,119,120,121,122,123]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/expression-editor.stories.tsx":async()=>s(()=>import("./expression-editor.stories--kiRbfi4.js"),__vite__mapDeps([212,1,2,3,10,213,81,9,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214,126,108]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/image-editor.stories.tsx":async()=>s(()=>import("./image-editor.stories-HjYgdVg6.js"),__vite__mapDeps([215,1,2,3,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,4,5,127,108,115,116,118,119,120,121,122,123]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/input-number-editor.stories.tsx":async()=>s(()=>import("./input-number-editor.stories-cGl-q1yE.js"),__vite__mapDeps([216,1,2,3,4,5,128,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,116]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/interaction-editor.stories.tsx":async()=>s(()=>import("./interaction-editor.stories-1OB9q-H2.js"),__vite__mapDeps([217,1,2,3,129,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,115,112,108,113,119]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/interactive-graph-editor.stories.tsx":async()=>s(()=>import("./interactive-graph-editor.stories-9GkgOBVY.js"),__vite__mapDeps([218,1,2,3,4,5,173,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,130,108,131,121,123,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/label-image-editor.stories.tsx":async()=>s(()=>import("./label-image-editor.stories-5zPoLBjb.js"),__vite__mapDeps([219,1,2,3,10,149,42,43,37,44,45,36,22,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,115,150,151,152,108,153,154,155,137,156]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/matcher-editor.stories.tsx":async()=>s(()=>import("./matcher-editor.stories-F1l9Wl96.js"),__vite__mapDeps([220,1,2,3,4,5,157,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,113]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/number-line-editor.stories.tsx":async()=>s(()=>import("./number-line-editor.stories-mspSh-dG.js"),__vite__mapDeps([221,1,2,3,4,5,158,43,37,44,45,42,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,115,113]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/numeric-input-editor.stories.tsx":async()=>s(()=>import("./numeric-input-editor.stories-FLoeN7y0.js"),__vite__mapDeps([222,1,2,3,4,5,159,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,115,118,119,120,121,122,123]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/phet-simulation-editor.stories.tsx":async()=>s(()=>import("./phet-simulation-editor.stories-yDj0B-wt.js"),__vite__mapDeps([223,4,5,160,1,2,3,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/python-program-editor.stories.tsx":async()=>s(()=>import("./python-program-editor.stories-nSXHU_jt.js"),__vite__mapDeps([224,1,2,3,4,5,161,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/radio-editor.stories.tsx":async()=>s(()=>import("./radio-editor.stories-vex8NVSi.js"),__vite__mapDeps([225,1,2,3,10,162,42,43,37,44,45,36,22,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,113,118,119,120,121,122,123]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/sorter-editor.stories.tsx":async()=>s(()=>import("./sorter-editor.stories-1T4QZKfM.js"),__vite__mapDeps([226,1,2,3,4,5,163,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,113]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/answer-choices.stories.tsx":async()=>s(()=>import("./answer-choices.stories-n5jRb_FG.js"),__vite__mapDeps([227,1,2,3,4,5,10,152,42,43,37,44,45,36,22,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,150,151]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/behavior.stories.tsx":async()=>s(()=>import("./behavior.stories-3HNm0LRG.js"),__vite__mapDeps([228,1,2,3,4,5,153,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,151]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/marker.stories.tsx":async()=>s(()=>import("./marker.stories-fFV5Lwnb.js"),__vite__mapDeps([229,1,2,3,4,5,10,155,42,43,37,44,45,36,22,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,151,137,150]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/question-markers.stories.tsx":async()=>s(()=>import("./question-markers.stories-QEgdudva.js"),__vite__mapDeps([230,1,2,3,10,154,42,43,37,44,45,36,22,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,151,155,108,137,150]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/select-image.stories.tsx":async()=>s(()=>import("./select-image.stories-0lWXrtYk.js"),__vite__mapDeps([231,1,2,3,10,156,42,43,37,44,45,36,22,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,150,151]),import.meta.url),"./packages/perseus/src/__stories__/article-renderer.stories.tsx":async()=>s(()=>import("./article-renderer.stories-_fNspNtB.js"),__vite__mapDeps([232,1,2,3,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,4,5,233,214,42,43,37,44,45,36,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,234,165,235]),import.meta.url),"./packages/perseus/src/__stories__/hints-renderer.stories.tsx":async()=>s(()=>import("./hints-renderer.stories-XSJRDrjz.js"),__vite__mapDeps([236,1,2,3,9,10,106,46,37,44,38,23,47,45,15,48,49,50,51,43,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,79,80,182,94,95]),import.meta.url),"./packages/perseus/src/__stories__/server-item-renderer.stories.tsx":async()=>s(()=>import("./server-item-renderer.stories-nDALerzX.js"),__vite__mapDeps([237,1,2,3,238,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,239,180,233,214,234]),import.meta.url),"./packages/perseus/src/components/__stories__/button-group.stories.tsx":async()=>s(()=>import("./button-group.stories-SVj84HqS.js"),__vite__mapDeps([240,1,2,3,92,10]),import.meta.url),"./packages/perseus/src/components/__stories__/fixed-to-responsive.stories.tsx":async()=>s(()=>import("./fixed-to-responsive.stories-TlwP860I.js"),__vite__mapDeps([241,1,2,3,51,52,47,53]),import.meta.url),"./packages/perseus/src/components/__stories__/graph.stories.tsx":async()=>s(()=>import("./graph.stories-sCDcQW4z.js"),__vite__mapDeps([242,93,1,2,3,43,37,44,45,50,10,9,47,51,52,53,23,54,55,15,56,57,58,48]),import.meta.url),"./packages/perseus/src/components/__stories__/graphie.stories.tsx":async()=>s(()=>import("./graphie.stories-zsbd3CaB.js"),__vite__mapDeps([243,1,2,3,238,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,239,180,233,214,234]),import.meta.url),"./packages/perseus/src/components/__stories__/hud.stories.tsx":async()=>s(()=>import("./hud.stories-pOcT5wvD.js"),__vite__mapDeps([244,4,5,96,1,2,3,10,53]),import.meta.url),"./packages/perseus/src/components/__stories__/icon.stories.tsx":async()=>s(()=>import("./icon.stories-qKf7s47y.js"),__vite__mapDeps([245,57,84,1,2,3]),import.meta.url),"./packages/perseus/src/components/__stories__/image-loader.stories.tsx":async()=>s(()=>import("./image-loader.stories-oac2OU3c.js"),__vite__mapDeps([246,1,2,3,58,51]),import.meta.url),"./packages/perseus/src/components/__stories__/info-tip.stories.tsx":async()=>s(()=>import("./info-tip.stories-Gano9oQC.js"),__vite__mapDeps([247,1,2,3,68,69,9,10,54,15,16,17,11,18,12,19,21,20]),import.meta.url),"./packages/perseus/src/components/__stories__/inline-icon.stories.tsx":async()=>s(()=>import("./inline-icon.stories-kL5VCTgv.js"),__vite__mapDeps([248,56,1,2,3]),import.meta.url),"./packages/perseus/src/components/__stories__/input-with-examples.stories.tsx":async()=>s(()=>import("./input-with-examples.stories-fncAs80h.js"),__vite__mapDeps([249,4,5,72,1,2,3,46,37,44,38,23,47,45,15,48,49,50,10,9,51,43,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,73,74,12,21,69,75,76]),import.meta.url),"./packages/perseus/src/components/__stories__/lint.stories.tsx":async()=>s(()=>import("./lint.stories-U937ancb.js"),__vite__mapDeps([250,1,2,3,66,10,15,53,56]),import.meta.url),"./packages/perseus/src/components/__stories__/math-input.stories.tsx":async()=>s(()=>import("./math-input.stories-55BQXc10.js"),__vite__mapDeps([251,4,5,70,1,2,3,36,37,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,71,14,16,17,18,20,21,54,47,45,49]),import.meta.url),"./packages/perseus/src/components/__stories__/multi-button-group.stories.tsx":async()=>s(()=>import("./multi-button-group.stories-LnMy2Qwe.js"),__vite__mapDeps([252,1,2,3,97,10]),import.meta.url),"./packages/perseus/src/components/__stories__/number-input.stories.tsx":async()=>s(()=>import("./number-input.stories-408TlbwR.js"),__vite__mapDeps([253,4,5,98,1,2,3,43,37,44,45,47,63,38,49]),import.meta.url),"./packages/perseus/src/components/__stories__/range-input.stories.tsx":async()=>s(()=>import("./range-input.stories-nWKfQjxk.js"),__vite__mapDeps([254,4,5,99,1,2,3,63,38,98,43,37,44,45,47,49]),import.meta.url),"./packages/perseus/src/components/__stories__/simple-keypad-input.stories.tsx":async()=>s(()=>import("./simple-keypad-input.stories-UMFjk9DG.js"),__vite__mapDeps([255,4,5,77,1,2,3,36,37,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,63]),import.meta.url),"./packages/perseus/src/components/__stories__/sortable.stories.tsx":async()=>s(()=>import("./sortable.stories-dRXAhLFP.js"),__vite__mapDeps([256,102,1,2,3,46,37,44,38,23,47,45,15,48,49,50,10,9,51,43,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67]),import.meta.url),"./packages/perseus/src/components/__stories__/stub-tag-editor.stories.tsx":async()=>s(()=>import("./stub-tag-editor.stories-6eMueEDt.js"),__vite__mapDeps([257,4,5,64,1,2,3,63,38,65,45,15]),import.meta.url),"./packages/perseus/src/components/__stories__/svg-image.stories.tsx":async()=>s(()=>import("./svg-image.stories-bDXISQVm.js"),__vite__mapDeps([258,50,1,2,3,37,44,10,9,47,45,51,43,52,53,23,54,55,15,56,57,58]),import.meta.url),"./packages/perseus/src/components/__stories__/tex.stories.tsx":async()=>s(()=>import("./tex.stories-dZhTYzdN.js"),__vite__mapDeps([259,59,1,2,3,51]),import.meta.url),"./packages/perseus/src/components/__stories__/text-input.stories.tsx":async()=>s(()=>import("./text-input.stories-pHR7xeUU.js"),__vite__mapDeps([260,4,5,73,1,2,3,37,44,74,9,10,12,21,69,75]),import.meta.url),"./packages/perseus/src/components/__stories__/text-list-editor.stories.tsx":async()=>s(()=>import("./text-list-editor.stories-MWgp-kIj.js"),__vite__mapDeps([261,1,2,3,4,5,65,45,63,38,15]),import.meta.url),"./packages/perseus/src/components/__stories__/tooltip.stories.tsx":async()=>s(()=>import("./tooltip.stories-xcCv5gWX.js"),__vite__mapDeps([262,1,2,3,9,10,76]),import.meta.url),"./packages/perseus/src/components/__stories__/zoomable-tex.stories.tsx":async()=>s(()=>import("./zoomable-tex.stories-Uprg1vT_.js"),__vite__mapDeps([263,1,2,3,61,48,59,51,60,15]),import.meta.url),"./packages/perseus/src/components/__stories__/zoomable.stories.tsx":async()=>s(()=>import("./zoomable.stories-uUuIBdOA.js"),__vite__mapDeps([264,1,2,3,60,15]),import.meta.url),"./packages/perseus/src/components/visibility-observer/__stories__/visibility-observer.stories.tsx":async()=>s(()=>import("./visibility-observer.stories-xElGlplw.js"),__vite__mapDeps([265,1,2,3,15]),import.meta.url),"./packages/perseus/src/multi-items/__stories__/multi-renderer.stories.tsx":async()=>s(()=>import("./multi-renderer.stories-qKnFkrxo.js"),__vite__mapDeps([266,1,2,3,9,10,21,81,11,18,12,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,179,239,180,233,214,234]),import.meta.url),"./packages/perseus/src/widgets/categorizer/categorizer.stories.tsx":async()=>s(()=>import("./categorizer.stories-rqy8ljbb.js"),__vite__mapDeps([267,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/cs-program/cs-program.stories.tsx":async()=>s(()=>import("./cs-program.stories-7U4pLff7.js"),__vite__mapDeps([268,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/definition/definition.stories.tsx":async()=>s(()=>import("./definition.stories-oavcFu1X.js"),__vite__mapDeps([269,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214,233,234]),import.meta.url),"./packages/perseus/src/widgets/deprecated-standin/__stories__/deprecated-standin.stories.tsx":async()=>s(()=>import("./deprecated-standin.stories-r3V8iN5_.js"),__vite__mapDeps([270,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/dropdown/dropdown.stories.tsx":async()=>s(()=>import("./dropdown.stories-1C9X676h.js"),__vite__mapDeps([271,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/explanation/explanation.stories.tsx":async()=>s(()=>import("./explanation.stories-5AbygpYN.js"),__vite__mapDeps([272,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/expression/expression.stories.tsx":async()=>s(()=>import("./expression.stories-DeimOHIk.js"),__vite__mapDeps([273,1,2,3,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,36,37,28,38,39,40,4,5,238,81,18,21,82,17,69,71,83,14,16,20,54,47,49,84,62,63,64,65,45,79,53,85,56,57,86,87,42,43,44,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,239,180,233,214,234,235]),import.meta.url),"./packages/perseus/src/widgets/graded-group-set/graded-group-set.stories.tsx":async()=>s(()=>import("./graded-group-set.stories-Vbs62zS5.js"),__vite__mapDeps([274,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/graded-group/graded-group.stories.tsx":async()=>s(()=>import("./graded-group.stories-ptte38tV.js"),__vite__mapDeps([275,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/grapher/grapher.stories.tsx":async()=>s(()=>import("./grapher.stories-y28LaYLN.js"),__vite__mapDeps([276,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/group/group.stories.tsx":async()=>s(()=>import("./group.stories-X29O8C9X.js"),__vite__mapDeps([277,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/iframe/iframe.stories.tsx":async()=>s(()=>import("./iframe.stories-nzOsWPvb.js"),__vite__mapDeps([278,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/image/image.stories.tsx":async()=>s(()=>import("./image.stories-XXRx_cBL.js"),__vite__mapDeps([279,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/input-number/input-number.stories.tsx":async()=>s(()=>import("./input-number.stories-nvvHefrb.js"),__vite__mapDeps([280,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/interaction/interaction.stories.tsx":async()=>s(()=>import("./interaction.stories-X8tMbqkb.js"),__vite__mapDeps([281,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/interactive-graphs/interactive-graph-regression.stories.tsx":async()=>s(()=>import("./interactive-graph-regression.stories-foaf21Mz.js"),__vite__mapDeps([282,1,2,3,46,37,44,38,23,47,45,15,48,49,50,10,9,51,43,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,182,94,95]),import.meta.url),"./packages/perseus/src/widgets/interactive-graphs/interactive-graph.stories.tsx":async()=>s(()=>import("./interactive-graph.stories-6Re0NqQZ.js"),__vite__mapDeps([283,1,2,3,89,10,17,9,11,18,12,82,69,90,21,54,49,51,53,81,71,83,14,15,16,19,20,47,84,62,63,38,64,65,45,79,85,56,57,86,87,103,68,23,42,43,37,44,36,22,24,25,8,6,7,26,27,28,39,40,46,48,50,52,55,58,59,60,61,66,67,70,72,73,74,75,76,77,78,80,88,91,92,93,94,95,96,97,98,99,100,101,102,104,105,106,213,180,214,183,182]),import.meta.url),"./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-functions.stories.tsx":async()=>s(()=>import("./locked-functions.stories-gfFa5QC4.js"),__vite__mapDeps([284,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214,183,182]),import.meta.url),"./packages/perseus/src/widgets/label-image/__stories__/answer-choices.stories.tsx":async()=>s(()=>import("./answer-choices.stories-RzMHcXTB.js"),__vite__mapDeps([285,1,2,3,21,9,10,91,18,11,12,69,75,15,17,19,20,16,49,46,37,44,38,23,47,45,48,50,51,43,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67]),import.meta.url),"./packages/perseus/src/widgets/label-image/__stories__/answer-pill.stories.tsx":async()=>s(()=>import("./answer-pill.stories-ZAAxHCoP.js"),__vite__mapDeps([286,1,2,3,101,9,10,18,11,12,21,54,20,15,49,46,37,44,38,23,47,45,48,50,51,43,52,53,55,56,57,58,59,60,61,62,63,64,65,66,67]),import.meta.url),"./packages/perseus/src/widgets/label-image/__stories__/label-image.stories.tsx":async()=>s(()=>import("./label-image.stories-jqRpTW1V.js"),__vite__mapDeps([287,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/label-image/__stories__/marker.stories.tsx":async()=>s(()=>import("./marker.stories-Cm9Xu6q2.js"),__vite__mapDeps([288,1,2,3,10,100,9,54,49,84,57,101,18,11,12,21,20,15,46,37,44,38,23,47,45,48,50,51,43,52,53,55,56,58,59,60,61,62,63,64,65,66,67]),import.meta.url),"./packages/perseus/src/widgets/matcher/matcher.stories.tsx":async()=>s(()=>import("./matcher.stories-n2yFzFDY.js"),__vite__mapDeps([289,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/matrix/matrix.stories.tsx":async()=>s(()=>import("./matrix.stories-rGSiOthd.js"),__vite__mapDeps([290,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/number-line/number-line.stories.tsx":async()=>s(()=>import("./number-line.stories-RfJVKqZT.js"),__vite__mapDeps([291,1,2,3,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,213,81,18,21,82,17,69,71,83,14,16,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214,238,239,233,234,235,4,5]),import.meta.url),"./packages/perseus/src/widgets/numeric-input/numeric-input.stories.tsx":async()=>s(()=>import("./numeric-input.stories-YRCREnZ4.js"),__vite__mapDeps([292,1,2,3,4,5,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/orderer/orderer.stories.tsx":async()=>s(()=>import("./orderer.stories-FX3NncwV.js"),__vite__mapDeps([293,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/passage-ref/passage-ref.stories.tsx":async()=>s(()=>import("./passage-ref.stories-AqKP_bbn.js"),__vite__mapDeps([294,1,2,3,9,10,213,81,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/passage/passage.stories.tsx":async()=>s(()=>import("./passage.stories-ILaTIGpn.js"),__vite__mapDeps([295,1,2,3,9,10,213,81,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/phet-simulation/phet-simulation.stories.tsx":async()=>s(()=>import("./phet-simulation.stories-bbv0Wjep.js"),__vite__mapDeps([296,89,1,2,3,10,17,9,11,18,12,82,69,90,21,54,49,51,53]),import.meta.url),"./packages/perseus/src/widgets/plotter/plotter.stories.tsx":async()=>s(()=>import("./plotter.stories-3f3jnoY4.js"),__vite__mapDeps([297,1,2,3,9,10,213,81,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/python-program/python-program.stories.tsx":async()=>s(()=>import("./python-program.stories-z_9jkw0b.js"),__vite__mapDeps([298,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/base-radio.stories.tsx":async()=>s(()=>import("./base-radio.stories-ihPjXaaJ.js"),__vite__mapDeps([299,1,2,3,4,5,78,10,47,15,45,49,62,63,38,64,65,53,79,80,43,37,44,81,9,11,18,12,21,82,17,69,71,83,14,16,19,20,54,84,85,56,57,86,87,88,46,23,48,50,51,52,55,58,59,60,61,66,67]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/choice-icon.stories.tsx":async()=>s(()=>import("./choice-icon.stories-2BPZpvZi.js"),__vite__mapDeps([300,1,2,3,85,54,10,49,56,57,53,86]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/choice-none-above.stories.tsx":async()=>s(()=>import("./choice-none-above.stories-mRzVUM01.js"),__vite__mapDeps([301,1,2,3,4,5,88,49,46,37,44,38,23,47,45,15,48,50,10,9,51,43,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,81,11,18,12,21,82,17,69,71,83,14,16,19,20,84,79,85,86,87]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/choice.stories.tsx":async()=>s(()=>import("./choice.stories-4KrIkHMw.js"),__vite__mapDeps([302,1,2,3,4,5,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/focus-ring.stories.tsx":async()=>s(()=>import("./focus-ring.stories-4AFN_C87.js"),__vite__mapDeps([303,1,2,3,53,86,10]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/option-status.stories.tsx":async()=>s(()=>import("./option-status.stories-vLiZB-UF.js"),__vite__mapDeps([304,1,2,3,87,54,10,49]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/radio.stories.tsx":async()=>s(()=>import("./radio.stories-IYaJgEu5.js"),__vite__mapDeps([305,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214,166]),import.meta.url),"./packages/perseus/src/widgets/sorter/sorter.stories.tsx":async()=>s(()=>import("./sorter.stories-6P7MrjI-.js"),__vite__mapDeps([306,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/video/video-transcript-link.stories.tsx":async()=>s(()=>import("./video-transcript-link.stories-QBSva3hd.js"),__vite__mapDeps([307,1,2,3,103,9,10,83,12,90,11,18,69,49,51]),import.meta.url),"./packages/perseus/src/widgets/video/video.stories.tsx":async()=>s(()=>import("./video.stories-d_zQw0Le.js"),__vite__mapDeps([308,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url)};async function y(e){return R[e]()}const{composeConfigs:T,PreviewWeb:L,ClientApi:V}=__STORYBOOK_MODULE_PREVIEW_API__,k=async(e=[])=>{const i=await Promise.all([e[0]??s(()=>import("./entry-preview-uYEG461u.js"),__vite__mapDeps([309,310,2,3,15]),import.meta.url),e[1]??s(()=>import("./entry-preview-docs-O2vHoAqK.js"),__vite__mapDeps([311,310,312,3,2]),import.meta.url),e[2]??s(()=>import("./preview-VRZh9grL.js"),__vite__mapDeps([313,314]),import.meta.url),e[3]??s(()=>import("./preview-XhkJC14Q.js"),__vite__mapDeps([]),import.meta.url),e[4]??s(()=>import("./preview-tqQQd2o_.js"),__vite__mapDeps([315,5]),import.meta.url),e[5]??s(()=>import("./preview-wCp9WPam.js"),__vite__mapDeps([316,317]),import.meta.url),e[6]??s(()=>import("./preview-O_buDTJV.js"),__vite__mapDeps([]),import.meta.url),e[7]??s(()=>import("./preview-yMuHbJw4.js"),__vite__mapDeps([318,95]),import.meta.url),e[8]??s(()=>import("./preview-AFLxCOxy.js"),__vite__mapDeps([319,317]),import.meta.url),e[9]??s(()=>import("./preview-pF0Jw540.js"),__vite__mapDeps([]),import.meta.url),e[10]??s(()=>import("./preview-zNCj1UwK.js"),__vite__mapDeps([]),import.meta.url),e[11]??s(()=>import("./preview-HbvAqadz.js"),__vite__mapDeps([320,1,2,3,12,9,10,42,43,37,44,45,36,22,15,19,23,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,233,214,234]),import.meta.url)]);return T(i)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new L(y,k);window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;export{s as _}; +import"../sb-preview/runtime.js";(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))p(t);new MutationObserver(t=>{for(const r of t)if(r.type==="childList")for(const _ of r.addedNodes)_.tagName==="LINK"&&_.rel==="modulepreload"&&p(_)}).observe(document,{childList:!0,subtree:!0});function a(t){const r={};return t.integrity&&(r.integrity=t.integrity),t.referrerPolicy&&(r.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?r.credentials="include":t.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function p(t){if(t.ep)return;t.ep=!0;const r=a(t);fetch(t.href,r)}})();const g="modulepreload",l=function(e,i){return new URL(e,i).href},d={},s=function(i,a,p){let t=Promise.resolve();if(a&&a.length>0){const r=document.getElementsByTagName("link");t=Promise.all(a.map(_=>{if(_=l(_,p),_ in d)return;d[_]=!0;const c=_.endsWith(".css"),E=c?'[rel="stylesheet"]':"";if(!!p)for(let m=r.length-1;m>=0;m--){const u=r[m];if(u.href===_&&(!c||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${_}"]${E}`))return;const o=document.createElement("link");if(o.rel=c?"stylesheet":g,c||(o.as="script",o.crossOrigin=""),o.href=_,document.head.appendChild(o),c)return new Promise((m,u)=>{o.addEventListener("load",m),o.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${_}`)))})}))}return t.then(()=>i()).catch(r=>{const _=new Event("vite:preloadError",{cancelable:!0});if(_.payload=r,window.dispatchEvent(_),!_.defaultPrevented)throw r})},{createBrowserChannel:O}=__STORYBOOK_MODULE_CHANNELS__,{addons:v}=__STORYBOOK_MODULE_PREVIEW_API__,n=O({page:"preview"});v.setChannel(n);window.__STORYBOOK_ADDONS_CHANNEL__=n;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=n);const R={"./packages/math-input/src/components/keypad/keypad-button.stories.tsx":async()=>s(()=>import("./keypad-button.stories-DT8Y3Yxd.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url),"./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx":async()=>s(()=>import("./keypad-mathquill.stories-rpEbEeQe.js"),__vite__mapDeps([13,1,2,3,14,9,10,15,16,17,11,18,12,19,20,21,6,22,23,24,25,8,7,26,27,28]),import.meta.url),"./packages/math-input/src/components/keypad/keypad-pages/keypad-pages.stories.tsx":async()=>s(()=>import("./keypad-pages.stories-EACJuu7S.js"),__vite__mapDeps([29,1,2,3,4,5,30,26,6,7,8,9,10,11,12]),import.meta.url),"./packages/math-input/src/components/keypad/navigation-pad.stories.tsx":async()=>s(()=>import("./navigation-pad.stories-u1r2LJel.js"),__vite__mapDeps([31,1,2,3,4,5,27,9,10,12,6,8,11]),import.meta.url),"./packages/math-input/src/components/tabbar/tabbar.stories.tsx":async()=>s(()=>import("./tabbar.stories-anfVmrOR.js"),__vite__mapDeps([32,1,2,3,24,9,10,25,8,11,12]),import.meta.url),"./packages/math-input/src/components/tabbar/tabbaritem.stories.tsx":async()=>s(()=>import("./tabbaritem.stories-Z91bESHz.js"),__vite__mapDeps([33,25,1,2,3,8,9,10,11,12]),import.meta.url),"./packages/math-input/src/full-keypad.stories.tsx":async()=>s(()=>import("./full-keypad.stories-8Xty0u74.js"),__vite__mapDeps([34,30,22,1,2,3,10,15,19,23,9,12,24,25,8,11,6,7,26,27]),import.meta.url),"./packages/math-input/src/full-mobile-input.stories.tsx":async()=>s(()=>import("./full-mobile-input.stories-YLk0dNZF.js"),__vite__mapDeps([35,1,2,3,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,4,5,36,37,28,38,39,40]),import.meta.url),"./packages/perseus-editor/src/__stories__/article-editor.stories.tsx":async()=>s(()=>import("./article-editor.stories-U-66FcoM.js"),__vite__mapDeps([41,1,2,3,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163]),import.meta.url),"./packages/perseus-editor/src/__stories__/content-preview.stories.tsx":async()=>s(()=>import("./content-preview.stories-7f09zHGu.js"),__vite__mapDeps([164,1,2,3,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,165,166,109,110,167,108,119,168]),import.meta.url),"./packages/perseus-editor/src/__stories__/editor-page.stories.tsx":async()=>s(()=>import("./editor-page.stories-_TdrWFgr.js"),__vite__mapDeps([169,1,2,3,111,112,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,170,4,5,171,167,110,109,172,173]),import.meta.url),"./packages/perseus-editor/src/__stories__/editor.stories.tsx":async()=>s(()=>import("./editor.stories-8RNl2rlX.js"),__vite__mapDeps([174,1,2,3,9,10,4,5,175,37,107,42,43,44,45,36,22,15,19,23,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,167,176,177,178,171,172,179,168,180,173]),import.meta.url),"./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx":async()=>s(()=>import("./interactive-graph-editor.stories-C2oWFjPa.js"),__vite__mapDeps([181,1,2,3,9,10,83,12,21,4,5,175,37,107,42,43,44,45,36,22,15,19,23,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,167,176,177,178,171,172,179,168,182,183,170,173]),import.meta.url),"./packages/perseus-editor/src/__stories__/item-editor.stories.tsx":async()=>s(()=>import("./item-editor.stories-zR3O_IZu.js"),__vite__mapDeps([184,1,2,3,172,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,168]),import.meta.url),"./packages/perseus-editor/src/__stories__/tex-error-view.stories.tsx":async()=>s(()=>import("./tex-error-view.stories--fr65KDX.js"),__vite__mapDeps([185,122,1,2,3,9,10,123,69]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/blur-input.stories.tsx":async()=>s(()=>import("./blur-input.stories-MEVoLwh0.js"),__vite__mapDeps([186,1,2,3,4,5,116]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/color-select.stories.tsx":async()=>s(()=>import("./color-select.stories-N9ZPo6Xv.js"),__vite__mapDeps([187,1,2,3,139,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,140]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/color-swatch.stories.tsx":async()=>s(()=>import("./color-swatch.stories-MYv-ZEpI.js"),__vite__mapDeps([188,1,2,3,140,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/device-framer.stories.tsx":async()=>s(()=>import("./device-framer.stories--gF4_S4i.js"),__vite__mapDeps([189,1,2,3,12,109,110]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/graph-settings.stories.tsx":async()=>s(()=>import("./graph-settings.stories-DB9t-gK6.js"),__vite__mapDeps([190,1,2,3,112,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,113]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/interactive-graph-settings.stories.tsx":async()=>s(()=>import("./interactive-graph-settings.stories-6SqHWnn_.js"),__vite__mapDeps([191,1,2,3,132,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,131,121,123]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-ellipse-settings.stories.tsx":async()=>s(()=>import("./locked-ellipse-settings.stories-SVJRu-5d.js"),__vite__mapDeps([192,1,2,3,134,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,135,136,137,138,139,140,141]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-figures-section.stories.tsx":async()=>s(()=>import("./locked-figures-section.stories-AmwKZboa.js"),__vite__mapDeps([193,1,2,3,9,10,12,133,81,11,18,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,131,121,123,91,75,46,37,44,23,48,50,51,43,52,55,58,59,60,61,66,67,134,42,36,22,24,25,8,6,7,26,27,28,39,40,68,70,72,73,74,76,77,78,80,88,89,90,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,135,136,137,138,139,140,141,142,143,144,145,146,147,148]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-function-settings.stories.tsx":async()=>s(()=>import("./locked-function-settings.stories-ITXwf9Ir.js"),__vite__mapDeps([194,1,2,3,142,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,91,75,46,37,44,23,48,50,51,43,52,55,58,59,60,61,66,67,74,138,42,36,22,24,25,8,6,7,26,27,28,39,40,68,70,72,73,76,77,78,80,88,89,90,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,136,139,140,135,141,143]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-label-settings.stories.tsx":async()=>s(()=>import("./locked-label-settings.stories-ib43xfLg.js"),__vite__mapDeps([195,1,2,3,138,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,136,139,140]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-line-settings.stories.tsx":async()=>s(()=>import("./locked-line-settings.stories-y7BFUqhH.js"),__vite__mapDeps([196,1,2,3,144,43,37,44,45,50,10,9,47,51,52,53,23,54,55,15,56,57,58,81,11,18,12,21,82,17,69,71,83,14,16,19,20,49,84,62,63,38,64,65,79,85,86,87,91,75,46,48,59,60,61,66,67,135,42,36,22,24,25,8,6,7,26,27,28,39,40,68,70,72,73,74,76,77,78,80,88,89,90,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,138,136,139,140,141,143,145,146]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-point-settings.stories.tsx":async()=>s(()=>import("./locked-point-settings.stories-T_vBfd8j.js"),__vite__mapDeps([197,1,2,3,145,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,135,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,138,136,139,140,146]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-polygon-settings.stories.tsx":async()=>s(()=>import("./locked-polygon-settings.stories-LMEDNOR-.js"),__vite__mapDeps([198,1,2,3,147,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,138,108,136,139,140,135,146,141]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-vector-settings.stories.tsx":async()=>s(()=>import("./locked-vector-settings.stories-aYj2riJ4.js"),__vite__mapDeps([199,1,2,3,148,43,37,44,45,50,10,9,47,51,52,53,23,54,55,15,56,57,58,81,11,18,12,21,82,17,69,71,83,14,16,19,20,49,84,62,63,38,64,65,79,85,86,87,135,42,36,22,24,25,8,6,7,26,27,28,39,40,46,48,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,138,136,139,140,143]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/scrollless-number-text-field.stories.tsx":async()=>s(()=>import("./scrollless-number-text-field.stories-nVFV0ihc.js"),__vite__mapDeps([200,1,2,3,9,10,21,136,74,12,69,75]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/section-control-button.stories.tsx":async()=>s(()=>import("./section-control-button.stories-YE0i7ieC.js"),__vite__mapDeps([201,1,2,3,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,120,108,121]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/toggleable-caret.stories.tsx":async()=>s(()=>import("./toggleable-caret.stories-RjkVgUY7.js"),__vite__mapDeps([202,1,2,3,19,123,69,9,10]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/viewport-resizer.stories.tsx":async()=>s(()=>import("./viewport-resizer.stories-usc4qxau.js"),__vite__mapDeps([203,1,2,3,4,5,167,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,110,119]),import.meta.url),"./packages/perseus-editor/src/diffs/__stories__/structured-item-diff.stories.tsx":async()=>s(()=>import("./structured-item-diff.stories-wunlIIgs.js"),__vite__mapDeps([204,1,2,3,176,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,177,108,113,178,205]),import.meta.url),"./packages/perseus-editor/src/diffs/__stories__/tags-diff.stories.tsx":async()=>s(()=>import("./tags-diff.stories-Zt76dFRY.js"),__vite__mapDeps([206,1,2,3,178,177,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,113,205]),import.meta.url),"./packages/perseus-editor/src/diffs/__stories__/text-diff.stories.tsx":async()=>s(()=>import("./text-diff.stories-e15kI9cp.js"),__vite__mapDeps([207,1,2,3,177,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,113,205]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/categorizer-editor.stories.tsx":async()=>s(()=>import("./categorizer-editor.stories-WC0B5CXh.js"),__vite__mapDeps([208,1,2,3,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,4,5,114,108,115,113]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/definition-editor.stories.tsx":async()=>s(()=>import("./definition-editor.stories-Ogpo4rLz.js"),__vite__mapDeps([209,1,2,3,4,5,117,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,115,113,118,119,120,121,122,123]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/dropdown-editor.stories.tsx":async()=>s(()=>import("./dropdown-editor.stories-0hVRWfRR.js"),__vite__mapDeps([210,1,2,3,4,5,124,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,115,113,119]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/explanation-editor.stories.tsx":async()=>s(()=>import("./explanation-editor.stories-g8qha3ii.js"),__vite__mapDeps([211,1,2,3,4,5,125,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,115,113,118,119,120,121,122,123]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/expression-editor.stories.tsx":async()=>s(()=>import("./expression-editor.stories-KW-6dd0v.js"),__vite__mapDeps([212,1,2,3,10,213,81,9,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214,126,108]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/image-editor.stories.tsx":async()=>s(()=>import("./image-editor.stories-ZFuEpx9f.js"),__vite__mapDeps([215,1,2,3,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,4,5,127,108,115,116,118,119,120,121,122,123]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/input-number-editor.stories.tsx":async()=>s(()=>import("./input-number-editor.stories-BAsMep0M.js"),__vite__mapDeps([216,1,2,3,4,5,128,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,116]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/interaction-editor.stories.tsx":async()=>s(()=>import("./interaction-editor.stories-Y4YBc0me.js"),__vite__mapDeps([217,1,2,3,129,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,115,112,108,113,119]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/interactive-graph-editor.stories.tsx":async()=>s(()=>import("./interactive-graph-editor.stories-fjd06S1W.js"),__vite__mapDeps([218,1,2,3,4,5,173,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,130,108,131,121,123,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/label-image-editor.stories.tsx":async()=>s(()=>import("./label-image-editor.stories-1UuVDh5y.js"),__vite__mapDeps([219,1,2,3,10,149,42,43,37,44,45,36,22,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,115,150,151,152,108,153,154,155,137,156]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/matcher-editor.stories.tsx":async()=>s(()=>import("./matcher-editor.stories-3y2hDgKU.js"),__vite__mapDeps([220,1,2,3,4,5,157,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,113]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/number-line-editor.stories.tsx":async()=>s(()=>import("./number-line-editor.stories-WZ-TbfCq.js"),__vite__mapDeps([221,1,2,3,4,5,158,43,37,44,45,42,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,115,113]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/numeric-input-editor.stories.tsx":async()=>s(()=>import("./numeric-input-editor.stories-Y3RDrT8y.js"),__vite__mapDeps([222,1,2,3,4,5,159,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,115,118,119,120,121,122,123]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/phet-simulation-editor.stories.tsx":async()=>s(()=>import("./phet-simulation-editor.stories-lf-pScPa.js"),__vite__mapDeps([223,4,5,160,1,2,3,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/python-program-editor.stories.tsx":async()=>s(()=>import("./python-program-editor.stories-ASWY7Bew.js"),__vite__mapDeps([224,1,2,3,4,5,161,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/radio-editor.stories.tsx":async()=>s(()=>import("./radio-editor.stories-obh2f2mg.js"),__vite__mapDeps([225,1,2,3,10,162,42,43,37,44,45,36,22,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,113,118,119,120,121,122,123]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/sorter-editor.stories.tsx":async()=>s(()=>import("./sorter-editor.stories-cquW7bn1.js"),__vite__mapDeps([226,1,2,3,4,5,163,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,113]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/answer-choices.stories.tsx":async()=>s(()=>import("./answer-choices.stories-xvppGvOE.js"),__vite__mapDeps([227,1,2,3,4,5,10,152,42,43,37,44,45,36,22,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,150,151]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/behavior.stories.tsx":async()=>s(()=>import("./behavior.stories-VkoXd2M3.js"),__vite__mapDeps([228,1,2,3,4,5,153,42,43,37,44,45,36,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,151]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/marker.stories.tsx":async()=>s(()=>import("./marker.stories-AoHhxc3f.js"),__vite__mapDeps([229,1,2,3,4,5,10,155,42,43,37,44,45,36,22,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,151,137,150]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/question-markers.stories.tsx":async()=>s(()=>import("./question-markers.stories-1tSOqUl5.js"),__vite__mapDeps([230,1,2,3,10,154,42,43,37,44,45,36,22,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,151,155,108,137,150]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/select-image.stories.tsx":async()=>s(()=>import("./select-image.stories-2OS2ICt1.js"),__vite__mapDeps([231,1,2,3,10,156,42,43,37,44,45,36,22,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,150,151]),import.meta.url),"./packages/perseus/src/__stories__/article-renderer.stories.tsx":async()=>s(()=>import("./article-renderer.stories-8h3ta99e.js"),__vite__mapDeps([232,1,2,3,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,4,5,233,214,42,43,37,44,45,36,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,234,165,235]),import.meta.url),"./packages/perseus/src/__stories__/hints-renderer.stories.tsx":async()=>s(()=>import("./hints-renderer.stories-WSumGzR5.js"),__vite__mapDeps([236,1,2,3,9,10,106,46,37,44,38,23,47,45,15,48,49,50,51,43,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,79,80,182,94,95]),import.meta.url),"./packages/perseus/src/__stories__/server-item-renderer.stories.tsx":async()=>s(()=>import("./server-item-renderer.stories-tuIhpymT.js"),__vite__mapDeps([237,1,2,3,238,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,239,180,233,214,234]),import.meta.url),"./packages/perseus/src/components/__stories__/button-group.stories.tsx":async()=>s(()=>import("./button-group.stories-SVj84HqS.js"),__vite__mapDeps([240,1,2,3,92,10]),import.meta.url),"./packages/perseus/src/components/__stories__/fixed-to-responsive.stories.tsx":async()=>s(()=>import("./fixed-to-responsive.stories-TlwP860I.js"),__vite__mapDeps([241,1,2,3,51,52,47,53]),import.meta.url),"./packages/perseus/src/components/__stories__/graph.stories.tsx":async()=>s(()=>import("./graph.stories-sCDcQW4z.js"),__vite__mapDeps([242,93,1,2,3,43,37,44,45,50,10,9,47,51,52,53,23,54,55,15,56,57,58,48]),import.meta.url),"./packages/perseus/src/components/__stories__/graphie.stories.tsx":async()=>s(()=>import("./graphie.stories-IU3qmC87.js"),__vite__mapDeps([243,1,2,3,238,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,239,180,233,214,234]),import.meta.url),"./packages/perseus/src/components/__stories__/hud.stories.tsx":async()=>s(()=>import("./hud.stories-pOcT5wvD.js"),__vite__mapDeps([244,4,5,96,1,2,3,10,53]),import.meta.url),"./packages/perseus/src/components/__stories__/icon.stories.tsx":async()=>s(()=>import("./icon.stories-qKf7s47y.js"),__vite__mapDeps([245,57,84,1,2,3]),import.meta.url),"./packages/perseus/src/components/__stories__/image-loader.stories.tsx":async()=>s(()=>import("./image-loader.stories-oac2OU3c.js"),__vite__mapDeps([246,1,2,3,58,51]),import.meta.url),"./packages/perseus/src/components/__stories__/info-tip.stories.tsx":async()=>s(()=>import("./info-tip.stories-Gano9oQC.js"),__vite__mapDeps([247,1,2,3,68,69,9,10,54,15,16,17,11,18,12,19,21,20]),import.meta.url),"./packages/perseus/src/components/__stories__/inline-icon.stories.tsx":async()=>s(()=>import("./inline-icon.stories-kL5VCTgv.js"),__vite__mapDeps([248,56,1,2,3]),import.meta.url),"./packages/perseus/src/components/__stories__/input-with-examples.stories.tsx":async()=>s(()=>import("./input-with-examples.stories-Q_yGSIlH.js"),__vite__mapDeps([249,4,5,72,1,2,3,46,37,44,38,23,47,45,15,48,49,50,10,9,51,43,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,73,74,12,21,69,75,76]),import.meta.url),"./packages/perseus/src/components/__stories__/lint.stories.tsx":async()=>s(()=>import("./lint.stories-U937ancb.js"),__vite__mapDeps([250,1,2,3,66,10,15,53,56]),import.meta.url),"./packages/perseus/src/components/__stories__/math-input.stories.tsx":async()=>s(()=>import("./math-input.stories-55BQXc10.js"),__vite__mapDeps([251,4,5,70,1,2,3,36,37,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,71,14,16,17,18,20,21,54,47,45,49]),import.meta.url),"./packages/perseus/src/components/__stories__/multi-button-group.stories.tsx":async()=>s(()=>import("./multi-button-group.stories-LnMy2Qwe.js"),__vite__mapDeps([252,1,2,3,97,10]),import.meta.url),"./packages/perseus/src/components/__stories__/number-input.stories.tsx":async()=>s(()=>import("./number-input.stories-408TlbwR.js"),__vite__mapDeps([253,4,5,98,1,2,3,43,37,44,45,47,63,38,49]),import.meta.url),"./packages/perseus/src/components/__stories__/range-input.stories.tsx":async()=>s(()=>import("./range-input.stories-nWKfQjxk.js"),__vite__mapDeps([254,4,5,99,1,2,3,63,38,98,43,37,44,45,47,49]),import.meta.url),"./packages/perseus/src/components/__stories__/simple-keypad-input.stories.tsx":async()=>s(()=>import("./simple-keypad-input.stories-UMFjk9DG.js"),__vite__mapDeps([255,4,5,77,1,2,3,36,37,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,28,38,39,40,63]),import.meta.url),"./packages/perseus/src/components/__stories__/sortable.stories.tsx":async()=>s(()=>import("./sortable.stories-UrTzKax7.js"),__vite__mapDeps([256,102,1,2,3,46,37,44,38,23,47,45,15,48,49,50,10,9,51,43,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67]),import.meta.url),"./packages/perseus/src/components/__stories__/stub-tag-editor.stories.tsx":async()=>s(()=>import("./stub-tag-editor.stories-6eMueEDt.js"),__vite__mapDeps([257,4,5,64,1,2,3,63,38,65,45,15]),import.meta.url),"./packages/perseus/src/components/__stories__/svg-image.stories.tsx":async()=>s(()=>import("./svg-image.stories-bDXISQVm.js"),__vite__mapDeps([258,50,1,2,3,37,44,10,9,47,45,51,43,52,53,23,54,55,15,56,57,58]),import.meta.url),"./packages/perseus/src/components/__stories__/tex.stories.tsx":async()=>s(()=>import("./tex.stories-dZhTYzdN.js"),__vite__mapDeps([259,59,1,2,3,51]),import.meta.url),"./packages/perseus/src/components/__stories__/text-input.stories.tsx":async()=>s(()=>import("./text-input.stories-pHR7xeUU.js"),__vite__mapDeps([260,4,5,73,1,2,3,37,44,74,9,10,12,21,69,75]),import.meta.url),"./packages/perseus/src/components/__stories__/text-list-editor.stories.tsx":async()=>s(()=>import("./text-list-editor.stories-MWgp-kIj.js"),__vite__mapDeps([261,1,2,3,4,5,65,45,63,38,15]),import.meta.url),"./packages/perseus/src/components/__stories__/tooltip.stories.tsx":async()=>s(()=>import("./tooltip.stories-xcCv5gWX.js"),__vite__mapDeps([262,1,2,3,9,10,76]),import.meta.url),"./packages/perseus/src/components/__stories__/zoomable-tex.stories.tsx":async()=>s(()=>import("./zoomable-tex.stories-Uprg1vT_.js"),__vite__mapDeps([263,1,2,3,61,48,59,51,60,15]),import.meta.url),"./packages/perseus/src/components/__stories__/zoomable.stories.tsx":async()=>s(()=>import("./zoomable.stories-uUuIBdOA.js"),__vite__mapDeps([264,1,2,3,60,15]),import.meta.url),"./packages/perseus/src/components/visibility-observer/__stories__/visibility-observer.stories.tsx":async()=>s(()=>import("./visibility-observer.stories-xElGlplw.js"),__vite__mapDeps([265,1,2,3,15]),import.meta.url),"./packages/perseus/src/multi-items/__stories__/multi-renderer.stories.tsx":async()=>s(()=>import("./multi-renderer.stories-kf0pRGET.js"),__vite__mapDeps([266,1,2,3,9,10,21,81,11,18,12,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,179,239,180,233,214,234]),import.meta.url),"./packages/perseus/src/widgets/categorizer/categorizer.stories.tsx":async()=>s(()=>import("./categorizer.stories-EYuc1OZz.js"),__vite__mapDeps([267,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/cs-program/cs-program.stories.tsx":async()=>s(()=>import("./cs-program.stories-NRY7IRjl.js"),__vite__mapDeps([268,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/definition/definition.stories.tsx":async()=>s(()=>import("./definition.stories-bNFFwy0T.js"),__vite__mapDeps([269,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214,233,234]),import.meta.url),"./packages/perseus/src/widgets/deprecated-standin/__stories__/deprecated-standin.stories.tsx":async()=>s(()=>import("./deprecated-standin.stories-HSliRaD0.js"),__vite__mapDeps([270,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/dropdown/dropdown.stories.tsx":async()=>s(()=>import("./dropdown.stories-ORRIppn4.js"),__vite__mapDeps([271,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/explanation/explanation.stories.tsx":async()=>s(()=>import("./explanation.stories-_UYy1oQY.js"),__vite__mapDeps([272,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/expression/expression.stories.tsx":async()=>s(()=>import("./expression.stories-VrS6qY2X.js"),__vite__mapDeps([273,1,2,3,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,36,37,28,38,39,40,4,5,238,81,18,21,82,17,69,71,83,14,16,20,54,47,49,84,62,63,64,65,45,79,53,85,56,57,86,87,42,43,44,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,239,180,233,214,234,235]),import.meta.url),"./packages/perseus/src/widgets/graded-group-set/graded-group-set.stories.tsx":async()=>s(()=>import("./graded-group-set.stories-azt8lh9e.js"),__vite__mapDeps([274,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/graded-group/graded-group.stories.tsx":async()=>s(()=>import("./graded-group.stories-znyHkL9A.js"),__vite__mapDeps([275,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/grapher/grapher.stories.tsx":async()=>s(()=>import("./grapher.stories-0lzR48FX.js"),__vite__mapDeps([276,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/group/group.stories.tsx":async()=>s(()=>import("./group.stories-VGeWPtA7.js"),__vite__mapDeps([277,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/iframe/iframe.stories.tsx":async()=>s(()=>import("./iframe.stories-8FLtcX1n.js"),__vite__mapDeps([278,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/image/image.stories.tsx":async()=>s(()=>import("./image.stories-R8q9DvO-.js"),__vite__mapDeps([279,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/input-number/input-number.stories.tsx":async()=>s(()=>import("./input-number.stories-sstPvQtd.js"),__vite__mapDeps([280,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/interaction/interaction.stories.tsx":async()=>s(()=>import("./interaction.stories-rG49YZGO.js"),__vite__mapDeps([281,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/interactive-graphs/interactive-graph-regression.stories.tsx":async()=>s(()=>import("./interactive-graph-regression.stories-ONWW-4pw.js"),__vite__mapDeps([282,1,2,3,46,37,44,38,23,47,45,15,48,49,50,10,9,51,43,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,182,94,95]),import.meta.url),"./packages/perseus/src/widgets/interactive-graphs/interactive-graph.stories.tsx":async()=>s(()=>import("./interactive-graph.stories-mI2PM1On.js"),__vite__mapDeps([283,1,2,3,89,10,17,9,11,18,12,82,69,90,21,54,49,51,53,81,71,83,14,15,16,19,20,47,84,62,63,38,64,65,45,79,85,56,57,86,87,103,68,23,42,43,37,44,36,22,24,25,8,6,7,26,27,28,39,40,46,48,50,52,55,58,59,60,61,66,67,70,72,73,74,75,76,77,78,80,88,91,92,93,94,95,96,97,98,99,100,101,102,104,105,106,213,180,214,183,182]),import.meta.url),"./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-functions.stories.tsx":async()=>s(()=>import("./locked-functions.stories-Qyms8YQ_.js"),__vite__mapDeps([284,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214,183,182]),import.meta.url),"./packages/perseus/src/widgets/label-image/__stories__/answer-choices.stories.tsx":async()=>s(()=>import("./answer-choices.stories-1tLchOs7.js"),__vite__mapDeps([285,1,2,3,21,9,10,91,18,11,12,69,75,15,17,19,20,16,49,46,37,44,38,23,47,45,48,50,51,43,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67]),import.meta.url),"./packages/perseus/src/widgets/label-image/__stories__/answer-pill.stories.tsx":async()=>s(()=>import("./answer-pill.stories-Ro0UeCVJ.js"),__vite__mapDeps([286,1,2,3,101,9,10,18,11,12,21,54,20,15,49,46,37,44,38,23,47,45,48,50,51,43,52,53,55,56,57,58,59,60,61,62,63,64,65,66,67]),import.meta.url),"./packages/perseus/src/widgets/label-image/__stories__/label-image.stories.tsx":async()=>s(()=>import("./label-image.stories-ZWweyFui.js"),__vite__mapDeps([287,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/label-image/__stories__/marker.stories.tsx":async()=>s(()=>import("./marker.stories-eoF7qx0l.js"),__vite__mapDeps([288,1,2,3,10,100,9,54,49,84,57,101,18,11,12,21,20,15,46,37,44,38,23,47,45,48,50,51,43,52,53,55,56,58,59,60,61,62,63,64,65,66,67]),import.meta.url),"./packages/perseus/src/widgets/matcher/matcher.stories.tsx":async()=>s(()=>import("./matcher.stories-pcC_ewKn.js"),__vite__mapDeps([289,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/matrix/matrix.stories.tsx":async()=>s(()=>import("./matrix.stories-b81D4JI6.js"),__vite__mapDeps([290,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/number-line/number-line.stories.tsx":async()=>s(()=>import("./number-line.stories-OPOlSgkX.js"),__vite__mapDeps([291,1,2,3,22,10,15,19,23,9,12,24,25,8,11,6,7,26,27,213,81,18,21,82,17,69,71,83,14,16,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214,238,239,233,234,235,4,5]),import.meta.url),"./packages/perseus/src/widgets/numeric-input/numeric-input.stories.tsx":async()=>s(()=>import("./numeric-input.stories-TjXmqjKa.js"),__vite__mapDeps([292,1,2,3,4,5,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/orderer/orderer.stories.tsx":async()=>s(()=>import("./orderer.stories-I0xjRDqz.js"),__vite__mapDeps([293,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/passage-ref/passage-ref.stories.tsx":async()=>s(()=>import("./passage-ref.stories-zSAonG1e.js"),__vite__mapDeps([294,1,2,3,9,10,213,81,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/passage/passage.stories.tsx":async()=>s(()=>import("./passage.stories-XjBiRvfn.js"),__vite__mapDeps([295,1,2,3,9,10,213,81,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/phet-simulation/phet-simulation.stories.tsx":async()=>s(()=>import("./phet-simulation.stories-bbv0Wjep.js"),__vite__mapDeps([296,89,1,2,3,10,17,9,11,18,12,82,69,90,21,54,49,51,53]),import.meta.url),"./packages/perseus/src/widgets/plotter/plotter.stories.tsx":async()=>s(()=>import("./plotter.stories-NTW2gVcH.js"),__vite__mapDeps([297,1,2,3,9,10,213,81,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/python-program/python-program.stories.tsx":async()=>s(()=>import("./python-program.stories-DpPAm1fn.js"),__vite__mapDeps([298,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/base-radio.stories.tsx":async()=>s(()=>import("./base-radio.stories-vnJJMfsV.js"),__vite__mapDeps([299,1,2,3,4,5,78,10,47,15,45,49,62,63,38,64,65,53,79,80,43,37,44,81,9,11,18,12,21,82,17,69,71,83,14,16,19,20,54,84,85,56,57,86,87,88,46,23,48,50,51,52,55,58,59,60,61,66,67]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/choice-icon.stories.tsx":async()=>s(()=>import("./choice-icon.stories-2BPZpvZi.js"),__vite__mapDeps([300,1,2,3,85,54,10,49,56,57,53,86]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/choice-none-above.stories.tsx":async()=>s(()=>import("./choice-none-above.stories-EKVo8qGD.js"),__vite__mapDeps([301,1,2,3,4,5,88,49,46,37,44,38,23,47,45,15,48,50,10,9,51,43,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,81,11,18,12,21,82,17,69,71,83,14,16,19,20,84,79,85,86,87]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/choice.stories.tsx":async()=>s(()=>import("./choice.stories-4KrIkHMw.js"),__vite__mapDeps([302,1,2,3,4,5,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/focus-ring.stories.tsx":async()=>s(()=>import("./focus-ring.stories-4AFN_C87.js"),__vite__mapDeps([303,1,2,3,53,86,10]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/option-status.stories.tsx":async()=>s(()=>import("./option-status.stories-vLiZB-UF.js"),__vite__mapDeps([304,1,2,3,87,54,10,49]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/radio.stories.tsx":async()=>s(()=>import("./radio.stories-0qy9p9DE.js"),__vite__mapDeps([305,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214,166]),import.meta.url),"./packages/perseus/src/widgets/sorter/sorter.stories.tsx":async()=>s(()=>import("./sorter.stories-UHi7gDko.js"),__vite__mapDeps([306,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url),"./packages/perseus/src/widgets/video/video-transcript-link.stories.tsx":async()=>s(()=>import("./video-transcript-link.stories-QBSva3hd.js"),__vite__mapDeps([307,1,2,3,103,9,10,83,12,90,11,18,69,49,51]),import.meta.url),"./packages/perseus/src/widgets/video/video.stories.tsx":async()=>s(()=>import("./video.stories-6Vaw9f1q.js"),__vite__mapDeps([308,1,2,3,213,81,9,10,11,18,12,21,82,17,69,71,83,14,15,16,19,20,54,47,49,84,62,63,38,64,65,45,79,53,85,56,57,86,87,42,43,37,44,36,22,23,24,25,8,6,7,26,27,28,39,40,46,48,50,51,52,55,58,59,60,61,66,67,68,70,72,73,74,75,76,77,78,80,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,180,105,106,214]),import.meta.url)};async function y(e){return R[e]()}const{composeConfigs:T,PreviewWeb:L,ClientApi:V}=__STORYBOOK_MODULE_PREVIEW_API__,k=async(e=[])=>{const i=await Promise.all([e[0]??s(()=>import("./entry-preview-biHFzYXk.js"),__vite__mapDeps([309,310,2,3,15]),import.meta.url),e[1]??s(()=>import("./entry-preview-docs-O2vHoAqK.js"),__vite__mapDeps([311,310,312,3,2]),import.meta.url),e[2]??s(()=>import("./preview-VRZh9grL.js"),__vite__mapDeps([313,314]),import.meta.url),e[3]??s(()=>import("./preview-01T2A3H0.js"),__vite__mapDeps([]),import.meta.url),e[4]??s(()=>import("./preview-tqQQd2o_.js"),__vite__mapDeps([315,5]),import.meta.url),e[5]??s(()=>import("./preview-wCp9WPam.js"),__vite__mapDeps([316,317]),import.meta.url),e[6]??s(()=>import("./preview-O_buDTJV.js"),__vite__mapDeps([]),import.meta.url),e[7]??s(()=>import("./preview-yMuHbJw4.js"),__vite__mapDeps([318,95]),import.meta.url),e[8]??s(()=>import("./preview-AFLxCOxy.js"),__vite__mapDeps([319,317]),import.meta.url),e[9]??s(()=>import("./preview-pF0Jw540.js"),__vite__mapDeps([]),import.meta.url),e[10]??s(()=>import("./preview-5Dzz1ByX.js"),__vite__mapDeps([]),import.meta.url),e[11]??s(()=>import("./preview-b5Ms5gLJ.js"),__vite__mapDeps([320,1,2,3,12,9,10,42,43,37,44,45,36,22,15,19,23,24,25,8,11,6,7,26,27,28,38,39,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,16,17,18,21,20,70,71,14,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,233,214,234]),import.meta.url)]);return T(i)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new L(y,k);window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;export{s as _}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./keypad-button.stories-DT8Y3Yxd.js","./jsx-runtime-63Ea5SlK.js","./index-6oxdNXpR.js","./_commonjsHelpers-4gQjN7DL.js","./chunk-D5ZWXAHU-vR62DWf0.js","./v4-yQnnJER4.js","./button-assets-ozecF1qE.js","./keypad-button-BlFICMi6.js","./index-xfryX26Z.js","./index-0DbkllkJ.js","./index-awljIyHI.js","./react-router-dom-VIBHfbW6.js","./index-deFLJwr4.js","./keypad-mathquill.stories-rpEbEeQe.js","./index-zFNZn_u0.js","./index-9gkyvru-.js","./index-jxhLXBHb.js","./index-f-3iKkZU.js","./index-i1pBWAmI.js","./index-7-BESUpx.js","./Popper-Y5KDXl-P.js","./index-18qWGOW7.js","./mobile-keypad-Muuas9zV.js","./index-J2t_5nK1.js","./tabbar-WEwAggnz.js","./item-ct0mKlsr.js","./operators-page-pCrK11a-.js","./navigation-pad-29vyLJ52.js","./key-translator-hixns6dh.js","./keypad-pages.stories-EACJuu7S.js","./index-KhQhTAik.js","./navigation-pad.stories-u1r2LJel.js","./tabbar.stories-anfVmrOR.js","./tabbaritem.stories-Z91bESHz.js","./full-keypad.stories-8Xty0u74.js","./full-mobile-input.stories-YLk0dNZF.js","./prop-types-d_cUcR3L.js","./version-akiLXZts.js","./invariant-bu5zBsRS.js","./prop-types-mRar-0kQ.css","./enums-x5qaTru7.js","./article-editor.stories--sedAQAw.js","./article-renderer-mU-6RWLp.js","./util-AYeX86gl.js","./perseus-error-l3K_anoI.js","./jquery-yG1GhClm.js","./renderer-1DxKQj1_.js","./index-dnMhQZ-1.js","./asset-context-H6Iqp7Gi.js","./i18n-context-fsWEgybQ.js","./svg-image-7aOK05RI.js","./dependencies-CP7Uh8Kq.js","./fixed-to-responsive-for_tVF1.js","./constants-iPV6vHZm.js","./index-Dfd6auV6.js","./client-Rb4DelHy.js","./inline-icon-6fh0Wu1y.js","./icon-paths-5JCXzGsq.js","./image-loader-qoercD2n.js","./tex-MX5FPdQh.js","./zoomable-_uYFBX1Q.js","./zoomable-tex-Jjwex-Ep.js","./perseus-api-1-ethIrW.js","./index-k-0mNqHS.js","./stub-tag-editor-qMhJW4bS.js","./text-list-editor-aj1SAzcA.js","./lint-CRWxUAIQ.js","./renderer-qr6V1vrR.css","./index-BIPwuHvF.js","./index-469F30Ub.js","./math-input-ILg8RrvB.js","./index-CyYhwSUV.js","./input-with-examples-YO5BCgg1.js","./text-input-5e4vF1bl.js","./index-V5gl6frG.js","./minus-bold-ONmDo3Ve.js","./tooltip-_t9Bc-o8.js","./simple-keypad-input-7tb5_po1.js","./base-radio-9_hKye4B.js","./media-queries-gbofTbz-.js","./shared-4TdECMLk.js","./choice-Xr-SKHrB.js","./index-vITVWi7a.js","./index-nqMmpXbO.js","./icon-7RFbyLiL.js","./choice-icon-9x4jcq5T.js","./focus-ring-qYEF-qqz.js","./option-status-8mB213vS.js","./choice-none-above-dRu7sfJj.js","./phet-simulation-_7qOO4_B.js","./arrow-square-out-bold-090vdhrx.js","./answer-choices-lVeJkx-U.js","./button-group-G5CZaedn.js","./graph-QfZUzUyx.js","./index-smZ6iCr_.js","./tiny-invariant-bHgPayXn.js","./hud-ifw9Ofbw.js","./multi-button-group-QUVHbBcE.js","./number-input-ogh82yD8.js","./range-input-w5Z3sPK5.js","./marker-0QGNq-GT.js","./answer-pill-cmLXoo3T.js","./sortable-k81KAG9U.js","./video-transcript-link-_gpkjmR8.js","./article-renderer-Fup2g6Rr.css","./perseus-item-CWRjfKXr.js","./hints-renderer-alc4yvsU.js","./article-editor-orbYQOKG.js","./components-ODdjt0Ld.js","./device-framer-MUDr0WgQ.js","./constants-p_UgHLsb.js","./register-all-widgets-and-editors-for-testing-HGbBhRa9.js","./graph-settings-XR_siz2q.js","./index-0C4KXdeC.js","./categorizer-editor-d30-cizN.js","./editor-jsonify-g-bIiSIM.js","./blur-input-6j4bgLwx.js","./definition-editor-_ZvvsZ3f.js","./editor-Mb85oHy5.js","./icon-paths-EoBkHOLI.js","./section-control-button-qbKF8qYC.js","./index-wzSCRJFK.js","./tex-error-view-oha0Bum8.js","./toggleable-caret-YFS5vs4O.js","./dropdown-editor-ueJJ3t0p.js","./explanation-editor-mExrX7IC.js","./expression-editor-2aE8aBV7.js","./image-editor-npChmNVJ.js","./input-number-editor-97qMf_gS.js","./interaction-editor-2twq2tps.js","./interactive-graph-editor-V9iZpszK.js","./heading-1izW0-GJ.js","./interactive-graph-settings-fIfU8SU6.js","./locked-figures-section-9mKuroas.js","./locked-ellipse-settings-_hRNhR9E.js","./locked-figure-aria-wRg9cB39.js","./scrollless-number-text-field-d5PK69vy.js","./util-qk2aeK8X.js","./locked-label-settings-lVE0HwhW.js","./color-select-4NqU465A.js","./util-x8Ikjhfh.js","./line-stroke-select-Kn8DFI_S.js","./locked-function-settings--UMM0ipk.js","./line-swatch-qqHDCIz5.js","./locked-line-settings-0UTK3Vo6.js","./locked-point-settings-HQeaTYKF.js","./labeled-switch-7da7Bmzh.js","./locked-polygon-settings-1jqOktRr.js","./locked-vector-settings-1A9eQa19.js","./label-image-editor-1k_zX52x.js","./form-wrapped-text-field-NbyiOLVb.js","./global-colors-VIVU4Od4.js","./answer-choices-dMU0zCzM.js","./behavior-kOGaXMua.js","./question-markers-VcHdxP49.js","./marker-qF2kRuTF.js","./select-image--icrHv9d.js","./matcher-editor-rnK8ooee.js","./number-line-editor-KKCgA0P-.js","./numeric-input-editor-sonkoQhn.js","./phet-simulation-editor-33ykehAu.js","./python-program-editor-0ms7DDAR.js","./editor-k9_TKmQw.js","./sorter-editor-MkK3kay8.js","./content-preview.stories-SCc4vI8q.js","./article-renderer.testdata-spwNviYy.js","./radio.testdata-sITJ8lxE.js","./viewport-resizer-N8YtwzDx.js","./perseus-editor-0Y-TvOcR.css","./editor-page.stories-1law3Fmm.js","./editor-page-with-storybook-preview-22ofiVWH.js","./editor-page-efCZNuFo.js","./item-extras-editor-jXytEuhg.js","./flags-for-api-options-vLhDDii2.js","./editor.stories-xi8Dh1kH.js","./index-g-xpLRq1.js","./structured-item-diff-6NTcZ_YG.js","./text-diff-hxgOd6zs.js","./tags-diff-KJiz71cu.js","./multi-items-SEqLFgxB.js","./side-by-side-MBJuyilC.js","./interactive-graph-editor.stories-4wVPSUex.js","./interactive-graph-question-builder-VBdpjz9Z.js","./interactive-graph.testdata--LRl7_OC.js","./item-editor.stories-WtXANqO5.js","./tex-error-view.stories--fr65KDX.js","./blur-input.stories-MEVoLwh0.js","./color-select.stories-x-6zmK3s.js","./color-swatch.stories-xFVVW1kt.js","./device-framer.stories--gF4_S4i.js","./graph-settings.stories-0EyA3jyu.js","./interactive-graph-settings.stories-2mM44wKW.js","./locked-ellipse-settings.stories-i534RLiL.js","./locked-figures-section.stories-KUQmi_mK.js","./locked-function-settings.stories-av4xBHlQ.js","./locked-label-settings.stories-5243600u.js","./locked-line-settings.stories-b7Mj-x5V.js","./locked-point-settings.stories-NB6zBF3d.js","./locked-polygon-settings.stories-eghhomPB.js","./locked-vector-settings.stories---K4kjTt.js","./scrollless-number-text-field.stories-nVFV0ihc.js","./section-control-button.stories--zyKxUzE.js","./toggleable-caret.stories-RjkVgUY7.js","./viewport-resizer.stories-Fd_e5eUB.js","./structured-item-diff.stories-NgFI8aTT.js","./perseus-diff-wrapper-c32IFwe6.js","./tags-diff.stories-24sTdvPu.js","./text-diff.stories-EDJrVzKv.js","./categorizer-editor.stories-DsW9Q3l4.js","./definition-editor.stories-tMtydvHM.js","./dropdown-editor.stories-tWYKsbJs.js","./explanation-editor.stories-tYLxtPBK.js","./expression-editor.stories--kiRbfi4.js","./renderer-with-debug-ui-75hBDQJk.js","./register-all-widgets-for-testing-ucxEr_N9.js","./image-editor.stories-HjYgdVg6.js","./input-number-editor.stories-cGl-q1yE.js","./interaction-editor.stories-1OB9q-H2.js","./interactive-graph-editor.stories-9GkgOBVY.js","./label-image-editor.stories-5zPoLBjb.js","./matcher-editor.stories-F1l9Wl96.js","./number-line-editor.stories-mspSh-dG.js","./numeric-input-editor.stories-FLoeN7y0.js","./phet-simulation-editor.stories-yDj0B-wt.js","./python-program-editor.stories-nSXHU_jt.js","./radio-editor.stories-vex8NVSi.js","./sorter-editor.stories-1T4QZKfM.js","./answer-choices.stories-n5jRb_FG.js","./behavior.stories-3HNm0LRG.js","./marker.stories-fFV5Lwnb.js","./question-markers.stories-QEgdudva.js","./select-image.stories-0lWXrtYk.js","./article-renderer.stories-_fNspNtB.js","./test-dependencies-8Mfke9yn.js","./test-dependencies-vi99l57r.css","./test-keypad-context-wrapper-qNJz2rBH.js","./hints-renderer.stories-XSJRDrjz.js","./server-item-renderer.stories-nDALerzX.js","./server-item-renderer-with-debug-ui-jjme8wR5.js","./ke-score-ui-AQ1XUyPU.js","./button-group.stories-SVj84HqS.js","./fixed-to-responsive.stories-TlwP860I.js","./graph.stories-sCDcQW4z.js","./graphie.stories-zsbd3CaB.js","./hud.stories-pOcT5wvD.js","./icon.stories-qKf7s47y.js","./image-loader.stories-oac2OU3c.js","./info-tip.stories-Gano9oQC.js","./inline-icon.stories-kL5VCTgv.js","./input-with-examples.stories-fncAs80h.js","./lint.stories-U937ancb.js","./math-input.stories-55BQXc10.js","./multi-button-group.stories-LnMy2Qwe.js","./number-input.stories-408TlbwR.js","./range-input.stories-nWKfQjxk.js","./simple-keypad-input.stories-UMFjk9DG.js","./sortable.stories-dRXAhLFP.js","./stub-tag-editor.stories-6eMueEDt.js","./svg-image.stories-bDXISQVm.js","./tex.stories-dZhTYzdN.js","./text-input.stories-pHR7xeUU.js","./text-list-editor.stories-MWgp-kIj.js","./tooltip.stories-xcCv5gWX.js","./zoomable-tex.stories-Uprg1vT_.js","./zoomable.stories-uUuIBdOA.js","./visibility-observer.stories-xElGlplw.js","./multi-renderer.stories-qKnFkrxo.js","./categorizer.stories-rqy8ljbb.js","./cs-program.stories-7U4pLff7.js","./definition.stories-oavcFu1X.js","./deprecated-standin.stories-r3V8iN5_.js","./dropdown.stories-1C9X676h.js","./explanation.stories-5AbygpYN.js","./expression.stories-DeimOHIk.js","./graded-group-set.stories-Vbs62zS5.js","./graded-group.stories-ptte38tV.js","./grapher.stories-y28LaYLN.js","./group.stories-X29O8C9X.js","./iframe.stories-nzOsWPvb.js","./image.stories-XXRx_cBL.js","./input-number.stories-nvvHefrb.js","./interaction.stories-X8tMbqkb.js","./interactive-graph-regression.stories-foaf21Mz.js","./interactive-graph.stories-6Re0NqQZ.js","./locked-functions.stories-gfFa5QC4.js","./answer-choices.stories-RzMHcXTB.js","./answer-pill.stories-ZAAxHCoP.js","./label-image.stories-jqRpTW1V.js","./marker.stories-Cm9Xu6q2.js","./matcher.stories-n2yFzFDY.js","./matrix.stories-rGSiOthd.js","./number-line.stories-RfJVKqZT.js","./numeric-input.stories-YRCREnZ4.js","./orderer.stories-FX3NncwV.js","./passage-ref.stories-AqKP_bbn.js","./passage.stories-ILaTIGpn.js","./phet-simulation.stories-bbv0Wjep.js","./plotter.stories-3f3jnoY4.js","./python-program.stories-z_9jkw0b.js","./base-radio.stories-ihPjXaaJ.js","./choice-icon.stories-2BPZpvZi.js","./choice-none-above.stories-mRzVUM01.js","./choice.stories-4KrIkHMw.js","./focus-ring.stories-4AFN_C87.js","./option-status.stories-vLiZB-UF.js","./radio.stories-IYaJgEu5.js","./sorter.stories-6P7MrjI-.js","./video-transcript-link.stories-QBSva3hd.js","./video.stories-d_zQw0Le.js","./entry-preview-uYEG461u.js","./chunk-XP5HYGXS-fUC2V6Et.js","./entry-preview-docs-O2vHoAqK.js","./index-mQRHDdot.js","./preview-VRZh9grL.js","./index-4FLvW62B.js","./preview-tqQQd2o_.js","./preview-wCp9WPam.js","./index-PPLHz8o0.js","./preview-yMuHbJw4.js","./preview-AFLxCOxy.js","./preview-HbvAqadz.js"] + __vite__mapDeps.viteFileDeps = ["./keypad-button.stories-DT8Y3Yxd.js","./jsx-runtime-63Ea5SlK.js","./index-6oxdNXpR.js","./_commonjsHelpers-4gQjN7DL.js","./chunk-D5ZWXAHU-vR62DWf0.js","./v4-yQnnJER4.js","./button-assets-ozecF1qE.js","./keypad-button-BlFICMi6.js","./index-xfryX26Z.js","./index-0DbkllkJ.js","./index-awljIyHI.js","./react-router-dom-VIBHfbW6.js","./index-deFLJwr4.js","./keypad-mathquill.stories-rpEbEeQe.js","./index-zFNZn_u0.js","./index-9gkyvru-.js","./index-jxhLXBHb.js","./index-f-3iKkZU.js","./index-i1pBWAmI.js","./index-7-BESUpx.js","./Popper-Y5KDXl-P.js","./index-18qWGOW7.js","./mobile-keypad-Muuas9zV.js","./index-J2t_5nK1.js","./tabbar-WEwAggnz.js","./item-ct0mKlsr.js","./operators-page-pCrK11a-.js","./navigation-pad-29vyLJ52.js","./key-translator-hixns6dh.js","./keypad-pages.stories-EACJuu7S.js","./index-KhQhTAik.js","./navigation-pad.stories-u1r2LJel.js","./tabbar.stories-anfVmrOR.js","./tabbaritem.stories-Z91bESHz.js","./full-keypad.stories-8Xty0u74.js","./full-mobile-input.stories-YLk0dNZF.js","./prop-types-d_cUcR3L.js","./version-akiLXZts.js","./invariant-bu5zBsRS.js","./prop-types-mRar-0kQ.css","./enums-x5qaTru7.js","./article-editor.stories-U-66FcoM.js","./article-renderer-HEYBK15c.js","./util-AYeX86gl.js","./perseus-error-l3K_anoI.js","./jquery-yG1GhClm.js","./renderer-L37a98D_.js","./index-dnMhQZ-1.js","./asset-context-H6Iqp7Gi.js","./i18n-context-fsWEgybQ.js","./svg-image-7aOK05RI.js","./dependencies-CP7Uh8Kq.js","./fixed-to-responsive-for_tVF1.js","./constants-iPV6vHZm.js","./index-Dfd6auV6.js","./client-Rb4DelHy.js","./inline-icon-6fh0Wu1y.js","./icon-paths-5JCXzGsq.js","./image-loader-qoercD2n.js","./tex-MX5FPdQh.js","./zoomable-_uYFBX1Q.js","./zoomable-tex-Jjwex-Ep.js","./perseus-api-1-ethIrW.js","./index-0C4KXdeC.js","./stub-tag-editor-qMhJW4bS.js","./text-list-editor-aj1SAzcA.js","./lint-CRWxUAIQ.js","./renderer-qr6V1vrR.css","./index-BIPwuHvF.js","./index-469F30Ub.js","./math-input-ILg8RrvB.js","./index-CyYhwSUV.js","./input-with-examples-PaWkADGr.js","./text-input-5e4vF1bl.js","./index-V5gl6frG.js","./minus-bold-ONmDo3Ve.js","./tooltip-_t9Bc-o8.js","./simple-keypad-input-7tb5_po1.js","./base-radio-kypcKNEK.js","./media-queries-gbofTbz-.js","./shared-4TdECMLk.js","./choice-Xr-SKHrB.js","./index-vITVWi7a.js","./index-nqMmpXbO.js","./icon-7RFbyLiL.js","./choice-icon-9x4jcq5T.js","./focus-ring-qYEF-qqz.js","./option-status-8mB213vS.js","./choice-none-above-vDwffTnk.js","./phet-simulation-_7qOO4_B.js","./arrow-square-out-bold-090vdhrx.js","./answer-choices-iyIz6W_C.js","./button-group-G5CZaedn.js","./graph-QfZUzUyx.js","./index-smZ6iCr_.js","./tiny-invariant-bHgPayXn.js","./hud-ifw9Ofbw.js","./multi-button-group-QUVHbBcE.js","./number-input-ogh82yD8.js","./range-input-w5Z3sPK5.js","./marker-ecL5IfPZ.js","./answer-pill-Rz7_ywTY.js","./sortable-SI3cD6Pj.js","./video-transcript-link-_gpkjmR8.js","./article-renderer-Fup2g6Rr.css","./perseus-item-C-BdPaPl.js","./hints-renderer-zzse9ai2.js","./article-editor-4hdZsISp.js","./components-ODdjt0Ld.js","./device-framer-MUDr0WgQ.js","./constants-p_UgHLsb.js","./register-all-widgets-and-editors-for-testing-mH_Pw9e8.js","./graph-settings-Pvhg8t7C.js","./index-k-0mNqHS.js","./categorizer-editor-Ux-cs6do.js","./editor-jsonify-mta12v4L.js","./blur-input-6j4bgLwx.js","./definition-editor-j1sWsdkj.js","./editor-Gp3Qu6_d.js","./icon-paths-EoBkHOLI.js","./section-control-button-XMME9ave.js","./index-wzSCRJFK.js","./tex-error-view-oha0Bum8.js","./toggleable-caret-YFS5vs4O.js","./dropdown-editor-BFRSuUKm.js","./explanation-editor-dSBU1vwr.js","./expression-editor-UY7aPIQ1.js","./image-editor-vZOaSvdJ.js","./input-number-editor-Zo4idrK9.js","./interaction-editor-vi9RcfEM.js","./interactive-graph-editor-QsKBcTl_.js","./heading-1izW0-GJ.js","./interactive-graph-settings-o74Mjg6d.js","./locked-figures-section-w9TBjDc-.js","./locked-ellipse-settings-Y_UkseIl.js","./locked-figure-aria-1k3pfy3U.js","./scrollless-number-text-field-d5PK69vy.js","./util-qk2aeK8X.js","./locked-label-settings-CnylHQl6.js","./color-select-javI8CkK.js","./util-ZotWJxjO.js","./line-stroke-select-H15MLZYg.js","./locked-function-settings-FK0x4ZxG.js","./line-swatch-9TD4hiwz.js","./locked-line-settings-JSySSneX.js","./locked-point-settings-q-YHpFjG.js","./labeled-switch-_gGF8eh_.js","./locked-polygon-settings-U6JpAVC_.js","./locked-vector-settings-UVt2s9by.js","./label-image-editor-p_uxNi67.js","./form-wrapped-text-field-NbyiOLVb.js","./global-colors-VIVU4Od4.js","./answer-choices-mpHXtu7D.js","./behavior-XUZDhvN-.js","./question-markers-vke3EOoD.js","./marker-l6CMdFr_.js","./select-image-ajCB5YeG.js","./matcher-editor-S8mz5e0T.js","./number-line-editor-eS_UHnpw.js","./numeric-input-editor-SLlVbwKu.js","./phet-simulation-editor-O5PngvYE.js","./python-program-editor-2M-li2KT.js","./editor-l5TJAcwO.js","./sorter-editor-AVkKlgrO.js","./content-preview.stories-7f09zHGu.js","./article-renderer.testdata-spwNviYy.js","./radio.testdata-sITJ8lxE.js","./viewport-resizer-mN7DSD_Q.js","./perseus-editor-0Y-TvOcR.css","./editor-page.stories-_TdrWFgr.js","./editor-page-with-storybook-preview-51pCZMkq.js","./editor-page-rccauWVG.js","./item-extras-editor-z7TuJtsi.js","./flags-for-api-options-1Jz-ky5t.js","./editor.stories-8RNl2rlX.js","./index-JuByCDUQ.js","./structured-item-diff-OBWOWslJ.js","./text-diff-2EvPqq-b.js","./tags-diff-wQ4taY12.js","./multi-items-TymZv1Bp.js","./side-by-side-MBJuyilC.js","./interactive-graph-editor.stories-C2oWFjPa.js","./interactive-graph-question-builder-VBdpjz9Z.js","./interactive-graph.testdata--LRl7_OC.js","./item-editor.stories-zR3O_IZu.js","./tex-error-view.stories--fr65KDX.js","./blur-input.stories-MEVoLwh0.js","./color-select.stories-N9ZPo6Xv.js","./color-swatch.stories-MYv-ZEpI.js","./device-framer.stories--gF4_S4i.js","./graph-settings.stories-DB9t-gK6.js","./interactive-graph-settings.stories-6SqHWnn_.js","./locked-ellipse-settings.stories-SVJRu-5d.js","./locked-figures-section.stories-AmwKZboa.js","./locked-function-settings.stories-ITXwf9Ir.js","./locked-label-settings.stories-ib43xfLg.js","./locked-line-settings.stories-y7BFUqhH.js","./locked-point-settings.stories-T_vBfd8j.js","./locked-polygon-settings.stories-LMEDNOR-.js","./locked-vector-settings.stories-aYj2riJ4.js","./scrollless-number-text-field.stories-nVFV0ihc.js","./section-control-button.stories-YE0i7ieC.js","./toggleable-caret.stories-RjkVgUY7.js","./viewport-resizer.stories-usc4qxau.js","./structured-item-diff.stories-wunlIIgs.js","./perseus-diff-wrapper-c32IFwe6.js","./tags-diff.stories-Zt76dFRY.js","./text-diff.stories-e15kI9cp.js","./categorizer-editor.stories-WC0B5CXh.js","./definition-editor.stories-Ogpo4rLz.js","./dropdown-editor.stories-0hVRWfRR.js","./explanation-editor.stories-g8qha3ii.js","./expression-editor.stories-KW-6dd0v.js","./renderer-with-debug-ui-Jq91P-PK.js","./register-all-widgets-for-testing-vNa20up7.js","./image-editor.stories-ZFuEpx9f.js","./input-number-editor.stories-BAsMep0M.js","./interaction-editor.stories-Y4YBc0me.js","./interactive-graph-editor.stories-fjd06S1W.js","./label-image-editor.stories-1UuVDh5y.js","./matcher-editor.stories-3y2hDgKU.js","./number-line-editor.stories-WZ-TbfCq.js","./numeric-input-editor.stories-Y3RDrT8y.js","./phet-simulation-editor.stories-lf-pScPa.js","./python-program-editor.stories-ASWY7Bew.js","./radio-editor.stories-obh2f2mg.js","./sorter-editor.stories-cquW7bn1.js","./answer-choices.stories-xvppGvOE.js","./behavior.stories-VkoXd2M3.js","./marker.stories-AoHhxc3f.js","./question-markers.stories-1tSOqUl5.js","./select-image.stories-2OS2ICt1.js","./article-renderer.stories-8h3ta99e.js","./test-dependencies-1Svp3QCw.js","./test-dependencies-vi99l57r.css","./test-keypad-context-wrapper-qNJz2rBH.js","./hints-renderer.stories-WSumGzR5.js","./server-item-renderer.stories-tuIhpymT.js","./server-item-renderer-with-debug-ui-Tcs9zCKY.js","./ke-score-ui-AQ1XUyPU.js","./button-group.stories-SVj84HqS.js","./fixed-to-responsive.stories-TlwP860I.js","./graph.stories-sCDcQW4z.js","./graphie.stories-IU3qmC87.js","./hud.stories-pOcT5wvD.js","./icon.stories-qKf7s47y.js","./image-loader.stories-oac2OU3c.js","./info-tip.stories-Gano9oQC.js","./inline-icon.stories-kL5VCTgv.js","./input-with-examples.stories-Q_yGSIlH.js","./lint.stories-U937ancb.js","./math-input.stories-55BQXc10.js","./multi-button-group.stories-LnMy2Qwe.js","./number-input.stories-408TlbwR.js","./range-input.stories-nWKfQjxk.js","./simple-keypad-input.stories-UMFjk9DG.js","./sortable.stories-UrTzKax7.js","./stub-tag-editor.stories-6eMueEDt.js","./svg-image.stories-bDXISQVm.js","./tex.stories-dZhTYzdN.js","./text-input.stories-pHR7xeUU.js","./text-list-editor.stories-MWgp-kIj.js","./tooltip.stories-xcCv5gWX.js","./zoomable-tex.stories-Uprg1vT_.js","./zoomable.stories-uUuIBdOA.js","./visibility-observer.stories-xElGlplw.js","./multi-renderer.stories-kf0pRGET.js","./categorizer.stories-EYuc1OZz.js","./cs-program.stories-NRY7IRjl.js","./definition.stories-bNFFwy0T.js","./deprecated-standin.stories-HSliRaD0.js","./dropdown.stories-ORRIppn4.js","./explanation.stories-_UYy1oQY.js","./expression.stories-VrS6qY2X.js","./graded-group-set.stories-azt8lh9e.js","./graded-group.stories-znyHkL9A.js","./grapher.stories-0lzR48FX.js","./group.stories-VGeWPtA7.js","./iframe.stories-8FLtcX1n.js","./image.stories-R8q9DvO-.js","./input-number.stories-sstPvQtd.js","./interaction.stories-rG49YZGO.js","./interactive-graph-regression.stories-ONWW-4pw.js","./interactive-graph.stories-mI2PM1On.js","./locked-functions.stories-Qyms8YQ_.js","./answer-choices.stories-1tLchOs7.js","./answer-pill.stories-Ro0UeCVJ.js","./label-image.stories-ZWweyFui.js","./marker.stories-eoF7qx0l.js","./matcher.stories-pcC_ewKn.js","./matrix.stories-b81D4JI6.js","./number-line.stories-OPOlSgkX.js","./numeric-input.stories-TjXmqjKa.js","./orderer.stories-I0xjRDqz.js","./passage-ref.stories-zSAonG1e.js","./passage.stories-XjBiRvfn.js","./phet-simulation.stories-bbv0Wjep.js","./plotter.stories-NTW2gVcH.js","./python-program.stories-DpPAm1fn.js","./base-radio.stories-vnJJMfsV.js","./choice-icon.stories-2BPZpvZi.js","./choice-none-above.stories-EKVo8qGD.js","./choice.stories-4KrIkHMw.js","./focus-ring.stories-4AFN_C87.js","./option-status.stories-vLiZB-UF.js","./radio.stories-0qy9p9DE.js","./sorter.stories-UHi7gDko.js","./video-transcript-link.stories-QBSva3hd.js","./video.stories-6Vaw9f1q.js","./entry-preview-biHFzYXk.js","./chunk-XP5HYGXS-fUC2V6Et.js","./entry-preview-docs-O2vHoAqK.js","./index-mQRHDdot.js","./preview-VRZh9grL.js","./index-4FLvW62B.js","./preview-tqQQd2o_.js","./preview-wCp9WPam.js","./index-PPLHz8o0.js","./preview-yMuHbJw4.js","./preview-AFLxCOxy.js","./preview-b5Ms5gLJ.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } diff --git a/assets/iframe.stories-nzOsWPvb.js b/assets/iframe.stories-8FLtcX1n.js similarity index 78% rename from assets/iframe.stories-nzOsWPvb.js rename to assets/iframe.stories-8FLtcX1n.js index 633c88badd..c915744c1c 100644 --- a/assets/iframe.stories-nzOsWPvb.js +++ b/assets/iframe.stories-8FLtcX1n.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{R as p}from"./renderer-with-debug-ui-75hBDQJk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const e={content:`Try matching the target image +import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{R as p}from"./renderer-with-debug-ui-Jq91P-PK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const e={content:`Try matching the target image [[☃ iframe 1]] `,images:{"https://ka-perseus-images.s3.amazonaws.com/8e518475587bc83767c72b49ff094e5870c3edc3.png":{width:760,height:688}},widgets:{"iframe 1":{graded:!0,version:{major:0,minor:0},static:!1,type:"iframe",options:{settings:[{name:"hue",value:"210"},{name:"subdivisions",value:"0"},{name:"zoom",value:"2"},{name:"seed",value:"6"},{name:"",value:""}],url:"4960944252",height:"410",width:"410",allowFullScreen:!0,static:!1},alignment:"default"}}},Vt={title:"Perseus/Widgets/IFrame"},t=s=>m.jsx(p,{question:e});t.__docgenInfo={description:"",methods:[],displayName:"Question1"};var r,i,o;t.parameters={...t.parameters,docs:{...(r=t.parameters)==null?void 0:r.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/image-editor-npChmNVJ.js b/assets/image-editor-vZOaSvdJ.js similarity index 99% rename from assets/image-editor-npChmNVJ.js rename to assets/image-editor-vZOaSvdJ.js index 3231867ff5..323fb47b87 100644 --- a/assets/image-editor-npChmNVJ.js +++ b/assets/image-editor-vZOaSvdJ.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{c as p}from"./article-renderer-mU-6RWLp.js";import{_ as o}from"./jquery-yG1GhClm.js";import{U as u}from"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import{c}from"./components-ODdjt0Ld.js";import{i as b}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{E as v}from"./editor-jsonify-g-bIiSIM.js";import{r as w}from"./index-6oxdNXpR.js";import{B as f}from"./blur-input-6j4bgLwx.js";import{E as d}from"./editor-Mb85oHy5.js";const{InfoTip:y,InlineIcon:k,RangeInput:q}=c,m=400,h=[0,10],T={url:null,width:0,height:0},R="(ka-.*.s3.amazonaws.com|(fastly|cdn).kastatic.org|khanacademy.org|kasandbox.org)",A=new RegExp("^(https?|web\\+graphie)://[^/]*"+R),x=["center","above","above right","right","below right","below","below left","left","above left"],s=class s extends w.Component{constructor(){super(...arguments),this._isMounted=!1,this.state={backgroundImageError:""},this.change=(...t)=>p.apply(this,t)}componentDidMount(){this._isMounted=!0}componentWillUnmount(){this._isMounted=!1}_renderRowForLabel(t,n){return e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx(q,{value:t.coordinates,onChange:this.onCoordinateChange.bind(this,n)})}),e.jsx("td",{style:{verticalAlign:"bottom",width:"5px"},children:e.jsx("input",{type:"text",className:"graph-settings-axis-label",value:t.content,onChange:this.onContentChange.bind(this,n)})}),e.jsx("td",{children:e.jsx("select",{className:"perseus-widget-dropdown",value:t.alignment,onChange:this.onAlignmentChange.bind(this,n),children:x.map(function(r,a){return e.jsx("option",{value:r,children:r},""+a)},this)})}),e.jsx("td",{children:e.jsx("a",{href:"#",className:"simple-button orange delete-label",title:"Remove this label",onClick:this.removeLabel.bind(this,n),children:e.jsx(k,{...b})})})]},n)}removeLabel(t,n){n.preventDefault();const r=[...this.props.labels];r.splice(t,1),this.props.onChange({labels:r})}onCoordinateChange(t,n){const r=this.props.labels.slice();r[t]=o.extend({},r[t],{coordinates:n}),this.props.onChange({labels:r})}onContentChange(t,n){const r=n.target.value,a=this.props.labels.slice();a[t]=o.extend({},a[t],{content:r}),this.props.onChange({labels:a})}onAlignmentChange(t,n){const r=n.target.value,a=this.props.labels.slice();a[t]=o.extend({},a[t],{alignment:r}),this.props.onChange({labels:a})}setUrl(t,n,r,a){if(!this._isMounted)return;const i=o.clone(this.props.backgroundImage);i.url=t,i.width=n,i.height=r;const g=[i.width,i.height];this.props.onChange({backgroundImage:i,box:g},null,a)}async onUrlChange(t,n){if(!t){this.setUrl(t,0,0,n);return}if(!A.test(t)){this.setState({backgroundImageError:"Images must be from sites hosted by Khan Academy. Please input a Khan Academy-owned address, or use the Add Image tool to rehost an existing image"});return}this.setState({backgroundImageError:""});try{const r=await u.getImageSizeModern(t);this.setUrl(t,r[0],r[1],!0)}catch(r){this.setState({backgroundImageError:`There was an error loading the image URL: ${JSON.stringify(r,null,2)}`})}}onRangeChange(t,n){const r=this.props.range.slice();r[t]=n,this.props.onChange({range:r})}serialize(){return v.serialize.call(this)}render(){const t=this.props.backgroundImage,n=e.jsxs("div",{className:"image-settings",children:[!u.isLabeledSVG(t.url)&&e.jsx("div",{children:e.jsxs("label",{children:[e.jsx("div",{children:"Preview:"}),e.jsx("img",{alt:"Editor preview of image",src:t.url,style:{width:"100%"}})]})}),e.jsx("div",{children:e.jsxs("label",{children:[e.jsx("div",{children:"Dimensions:"}),e.jsxs("p",{children:[t.width,"x",t.height]})]})}),e.jsx("div",{children:e.jsxs("label",{children:[e.jsxs("div",{children:["Alt text:",e.jsx(y,{children:"This is important for screenreaders. The content of this alt text will be formatted as markdown (tables, emphasis, etc. are supported)."})]}),e.jsx(d,{apiOptions:this.props.apiOptions,content:this.props.alt,onChange:a=>{a.content!=null&&this.change("alt",a.content)},widgetEnabled:!1})]})}),e.jsx("div",{children:e.jsxs("label",{children:[e.jsx("div",{children:"Caption:"}),e.jsx(d,{apiOptions:this.props.apiOptions,content:this.props.caption,onChange:a=>{a.content!=null&&this.change("caption",a.content)},widgetEnabled:!1})]})})]}),r=e.jsx("div",{className:"renderer-widget-error",children:this.state.backgroundImageError});return e.jsxs("div",{className:"perseus-image-editor",children:[e.jsxs("label",{children:["Image url:",e.jsx(y,{children:"Paste an image or graphie image URL."}),this.state.backgroundImageError&&r,e.jsx(f,{value:t.url||"",style:{width:332},onChange:a=>this.onUrlChange(a,!1)})]}),t.url&&n]})}};s.displayName="ImageEditor",s.widgetName="image",s.defaultProps={title:"",range:[h,h],box:[m,m],backgroundImage:T,labels:[],alt:"",caption:""};let l=s;l.__docgenInfo={description:"",methods:[{name:"_renderRowForLabel",docblock:null,modifiers:[],params:[{name:"label",optional:!1,type:null},{name:"i",optional:!1,type:null}],returns:null},{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"removeLabel",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"onCoordinateChange",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"newCoordinates",optional:!1,type:null}],returns:null},{name:"onContentChange",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"onAlignmentChange",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"setUrl",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:null},{name:"width",optional:!1,type:null},{name:"height",optional:!1,type:null},{name:"silent",optional:!1,type:null}],returns:null},{name:"onUrlChange",docblock:null,modifiers:["async"],params:[{name:"url",optional:!1,type:{name:"union",raw:"string | undefined | null",elements:[{name:"string"},{name:"undefined"},{name:"null"}]}},{name:"silent",optional:!1,type:{name:"boolean"}}],returns:null},{name:"onRangeChange",docblock:null,modifiers:[],params:[{name:"type",optional:!1,type:null},{name:"newRange",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"ImageEditor",props:{apiOptions:{required:!0,tsType:{name:"Readonly",elements:[{name:"signature",type:"object",raw:`{ +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{c as p}from"./article-renderer-HEYBK15c.js";import{_ as o}from"./jquery-yG1GhClm.js";import{U as u}from"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c}from"./components-ODdjt0Ld.js";import{i as b}from"./icon-paths-5JCXzGsq.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{E as v}from"./editor-jsonify-mta12v4L.js";import{r as w}from"./index-6oxdNXpR.js";import{B as f}from"./blur-input-6j4bgLwx.js";import{E as d}from"./editor-Gp3Qu6_d.js";const{InfoTip:y,InlineIcon:k,RangeInput:q}=c,m=400,h=[0,10],T={url:null,width:0,height:0},R="(ka-.*.s3.amazonaws.com|(fastly|cdn).kastatic.org|khanacademy.org|kasandbox.org)",A=new RegExp("^(https?|web\\+graphie)://[^/]*"+R),x=["center","above","above right","right","below right","below","below left","left","above left"],s=class s extends w.Component{constructor(){super(...arguments),this._isMounted=!1,this.state={backgroundImageError:""},this.change=(...t)=>p.apply(this,t)}componentDidMount(){this._isMounted=!0}componentWillUnmount(){this._isMounted=!1}_renderRowForLabel(t,n){return e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx(q,{value:t.coordinates,onChange:this.onCoordinateChange.bind(this,n)})}),e.jsx("td",{style:{verticalAlign:"bottom",width:"5px"},children:e.jsx("input",{type:"text",className:"graph-settings-axis-label",value:t.content,onChange:this.onContentChange.bind(this,n)})}),e.jsx("td",{children:e.jsx("select",{className:"perseus-widget-dropdown",value:t.alignment,onChange:this.onAlignmentChange.bind(this,n),children:x.map(function(r,a){return e.jsx("option",{value:r,children:r},""+a)},this)})}),e.jsx("td",{children:e.jsx("a",{href:"#",className:"simple-button orange delete-label",title:"Remove this label",onClick:this.removeLabel.bind(this,n),children:e.jsx(k,{...b})})})]},n)}removeLabel(t,n){n.preventDefault();const r=[...this.props.labels];r.splice(t,1),this.props.onChange({labels:r})}onCoordinateChange(t,n){const r=this.props.labels.slice();r[t]=o.extend({},r[t],{coordinates:n}),this.props.onChange({labels:r})}onContentChange(t,n){const r=n.target.value,a=this.props.labels.slice();a[t]=o.extend({},a[t],{content:r}),this.props.onChange({labels:a})}onAlignmentChange(t,n){const r=n.target.value,a=this.props.labels.slice();a[t]=o.extend({},a[t],{alignment:r}),this.props.onChange({labels:a})}setUrl(t,n,r,a){if(!this._isMounted)return;const i=o.clone(this.props.backgroundImage);i.url=t,i.width=n,i.height=r;const g=[i.width,i.height];this.props.onChange({backgroundImage:i,box:g},null,a)}async onUrlChange(t,n){if(!t){this.setUrl(t,0,0,n);return}if(!A.test(t)){this.setState({backgroundImageError:"Images must be from sites hosted by Khan Academy. Please input a Khan Academy-owned address, or use the Add Image tool to rehost an existing image"});return}this.setState({backgroundImageError:""});try{const r=await u.getImageSizeModern(t);this.setUrl(t,r[0],r[1],!0)}catch(r){this.setState({backgroundImageError:`There was an error loading the image URL: ${JSON.stringify(r,null,2)}`})}}onRangeChange(t,n){const r=this.props.range.slice();r[t]=n,this.props.onChange({range:r})}serialize(){return v.serialize.call(this)}render(){const t=this.props.backgroundImage,n=e.jsxs("div",{className:"image-settings",children:[!u.isLabeledSVG(t.url)&&e.jsx("div",{children:e.jsxs("label",{children:[e.jsx("div",{children:"Preview:"}),e.jsx("img",{alt:"Editor preview of image",src:t.url,style:{width:"100%"}})]})}),e.jsx("div",{children:e.jsxs("label",{children:[e.jsx("div",{children:"Dimensions:"}),e.jsxs("p",{children:[t.width,"x",t.height]})]})}),e.jsx("div",{children:e.jsxs("label",{children:[e.jsxs("div",{children:["Alt text:",e.jsx(y,{children:"This is important for screenreaders. The content of this alt text will be formatted as markdown (tables, emphasis, etc. are supported)."})]}),e.jsx(d,{apiOptions:this.props.apiOptions,content:this.props.alt,onChange:a=>{a.content!=null&&this.change("alt",a.content)},widgetEnabled:!1})]})}),e.jsx("div",{children:e.jsxs("label",{children:[e.jsx("div",{children:"Caption:"}),e.jsx(d,{apiOptions:this.props.apiOptions,content:this.props.caption,onChange:a=>{a.content!=null&&this.change("caption",a.content)},widgetEnabled:!1})]})})]}),r=e.jsx("div",{className:"renderer-widget-error",children:this.state.backgroundImageError});return e.jsxs("div",{className:"perseus-image-editor",children:[e.jsxs("label",{children:["Image url:",e.jsx(y,{children:"Paste an image or graphie image URL."}),this.state.backgroundImageError&&r,e.jsx(f,{value:t.url||"",style:{width:332},onChange:a=>this.onUrlChange(a,!1)})]}),t.url&&n]})}};s.displayName="ImageEditor",s.widgetName="image",s.defaultProps={title:"",range:[h,h],box:[m,m],backgroundImage:T,labels:[],alt:"",caption:""};let l=s;l.__docgenInfo={description:"",methods:[{name:"_renderRowForLabel",docblock:null,modifiers:[],params:[{name:"label",optional:!1,type:null},{name:"i",optional:!1,type:null}],returns:null},{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"removeLabel",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"onCoordinateChange",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"newCoordinates",optional:!1,type:null}],returns:null},{name:"onContentChange",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"onAlignmentChange",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"setUrl",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:null},{name:"width",optional:!1,type:null},{name:"height",optional:!1,type:null},{name:"silent",optional:!1,type:null}],returns:null},{name:"onUrlChange",docblock:null,modifiers:["async"],params:[{name:"url",optional:!1,type:{name:"union",raw:"string | undefined | null",elements:[{name:"string"},{name:"undefined"},{name:"null"}]}},{name:"silent",optional:!1,type:{name:"boolean"}}],returns:null},{name:"onRangeChange",docblock:null,modifiers:[],params:[{name:"type",optional:!1,type:null},{name:"newRange",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"ImageEditor",props:{apiOptions:{required:!0,tsType:{name:"Readonly",elements:[{name:"signature",type:"object",raw:`{ isArticle?: boolean; onFocusChange?: ( newFocusPath: FocusPath, diff --git a/assets/image-editor.stories-HjYgdVg6.js b/assets/image-editor.stories-ZFuEpx9f.js similarity index 78% rename from assets/image-editor.stories-HjYgdVg6.js rename to assets/image-editor.stories-ZFuEpx9f.js index 7484510516..95d7a8a15a 100644 --- a/assets/image-editor.stories-HjYgdVg6.js +++ b/assets/image-editor.stories-ZFuEpx9f.js @@ -1,3 +1,3 @@ -import{j as t}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import{A as c}from"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{V as d}from"./index-0DbkllkJ.js";import{s as u}from"./index-deFLJwr4.js";import{b as f}from"./index-18qWGOW7.js";import{a as g}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{l as h}from"./index-awljIyHI.js";import{r as p}from"./index-6oxdNXpR.js";import{I as x}from"./image-editor-npChmNVJ.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-9gkyvru-.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-dnMhQZ-1.js";import"./perseus-error-l3K_anoI.js";import"./index-Dfd6auV6.js";import"./input-with-examples-YO5BCgg1.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./icon-paths-5JCXzGsq.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./Popper-Y5KDXl-P.js";import"./answer-choices-lVeJkx-U.js";import"./index-469F30Ub.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./asset-context-H6Iqp7Gi.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./fixed-to-responsive-for_tVF1.js";import"./video-transcript-link-_gpkjmR8.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-qMhJW4bS.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./choice-none-above-dRu7sfJj.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./v4-yQnnJER4.js";import"./components-ODdjt0Ld.js";import"./editor-jsonify-g-bIiSIM.js";import"./blur-input-6j4bgLwx.js";import"./editor-Mb85oHy5.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-qbKF8qYC.js";import"./index-wzSCRJFK.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";const xr={title:"PerseusEditor/Widgets/Image Editor"},y=h.StyleSheet.create({wrapper:{width:338,margin:20}}),S=g("onChange"),b=()=>{const o=p.useRef(null),[n,l]=p.useState({backgroundImage:{url:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png"}});return t.jsxs(d,{style:y.wrapper,children:[t.jsxs(f,{style:{fontStyle:"italic",marginBottom:u.small_12},children:[t.jsx("b",{children:"Note"})," that this editor has a known-issue where it does not calculate the image dimensions initially if they aren't provided. It does update the dimensions when you blur the 'Image url:' field."]}),t.jsx(x,{...n,apiOptions:c.defaults,onChange:i=>{var m;S(i),l({...(m=o.current)==null?void 0:m.serialize(),...i})},ref:o})]})},r=o=>t.jsx(b,{});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var e,s,a;r.parameters={...r.parameters,docs:{...(e=r.parameters)==null?void 0:e.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as t}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import{A as c}from"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{V as d}from"./index-0DbkllkJ.js";import{s as u}from"./index-deFLJwr4.js";import{b as f}from"./index-18qWGOW7.js";import{a as g}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{l as h}from"./index-awljIyHI.js";import{r as p}from"./index-6oxdNXpR.js";import{I as x}from"./image-editor-vZOaSvdJ.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-9gkyvru-.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-dnMhQZ-1.js";import"./perseus-error-l3K_anoI.js";import"./index-Dfd6auV6.js";import"./input-with-examples-PaWkADGr.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./icon-paths-5JCXzGsq.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./Popper-Y5KDXl-P.js";import"./answer-choices-iyIz6W_C.js";import"./index-469F30Ub.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./asset-context-H6Iqp7Gi.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./fixed-to-responsive-for_tVF1.js";import"./video-transcript-link-_gpkjmR8.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-qMhJW4bS.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./choice-none-above-vDwffTnk.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./v4-yQnnJER4.js";import"./components-ODdjt0Ld.js";import"./editor-jsonify-mta12v4L.js";import"./blur-input-6j4bgLwx.js";import"./editor-Gp3Qu6_d.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-XMME9ave.js";import"./index-wzSCRJFK.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";const xr={title:"PerseusEditor/Widgets/Image Editor"},y=h.StyleSheet.create({wrapper:{width:338,margin:20}}),S=g("onChange"),b=()=>{const o=p.useRef(null),[n,l]=p.useState({backgroundImage:{url:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png"}});return t.jsxs(d,{style:y.wrapper,children:[t.jsxs(f,{style:{fontStyle:"italic",marginBottom:u.small_12},children:[t.jsx("b",{children:"Note"})," that this editor has a known-issue where it does not calculate the image dimensions initially if they aren't provided. It does update the dimensions when you blur the 'Image url:' field."]}),t.jsx(x,{...n,apiOptions:c.defaults,onChange:i=>{var m;S(i),l({...(m=o.current)==null?void 0:m.serialize(),...i})},ref:o})]})},r=o=>t.jsx(b,{});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var e,s,a;r.parameters={...r.parameters,docs:{...(e=r.parameters)==null?void 0:e.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(a=(s=r.parameters)==null?void 0:s.docs)==null?void 0:a.source}}};const yr=["Default"];export{r as Default,yr as __namedExportsOrder,xr as default}; diff --git a/assets/image.stories-XXRx_cBL.js b/assets/image.stories-R8q9DvO-.js similarity index 88% rename from assets/image.stories-XXRx_cBL.js rename to assets/image.stories-R8q9DvO-.js index ebb94dcf3f..9cfb13a388 100644 --- a/assets/image.stories-XXRx_cBL.js +++ b/assets/image.stories-R8q9DvO-.js @@ -1,4 +1,4 @@ -import{j as d}from"./jsx-runtime-63Ea5SlK.js";import{R as c}from"./renderer-with-debug-ui-75hBDQJk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const t={content:`[[☃ image 1]] +import{j as d}from"./jsx-runtime-63Ea5SlK.js";import{R as c}from"./renderer-with-debug-ui-Jq91P-PK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const t={content:`[[☃ image 1]] ===== diff --git a/assets/index-g-xpLRq1.js b/assets/index-JuByCDUQ.js similarity index 99% rename from assets/index-g-xpLRq1.js rename to assets/index-JuByCDUQ.js index 07e9b1398a..f6527a8644 100644 --- a/assets/index-g-xpLRq1.js +++ b/assets/index-JuByCDUQ.js @@ -1,4 +1,4 @@ -import{a as M}from"./version-akiLXZts.js";import"./article-editor-orbYQOKG.js";import"./device-framer-MUDr0WgQ.js";import"./viewport-resizer-N8YtwzDx.js";import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{P as d}from"./index-0C4KXdeC.js";import{r as p}from"./index-6oxdNXpR.js";import{_}from"./jquery-yG1GhClm.js";import{R as x,W as D}from"./structured-item-diff-6NTcZ_YG.js";import{H as V}from"./editor-page-efCZNuFo.js";import{E as H}from"./editor-Mb85oHy5.js";import{w as G}from"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import{c as K,r as B,a as J,d as Q}from"./renderer-1DxKQj1_.js";import{A as Y}from"./perseus-api-1-ethIrW.js";import{l as g,g as Z,e as X}from"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./base-radio-9_hKye4B.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./dependencies-CP7Uh8Kq.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{J as ee,A as re}from"./register-all-widgets-and-editors-for-testing-HGbBhRa9.js";import{c as te}from"./components-ODdjt0Ld.js";import{c as E,i as ne}from"./icon-paths-5JCXzGsq.js";import{M as ae}from"./multi-items-SEqLFgxB.js";import{l as s}from"./index-awljIyHI.js";import{F as ie}from"./index-9gkyvru-.js";/* empty css */const se="@khanacademy/perseus-editor",oe="__lib_version__";M(se,oe);const q=d.shape({content:d.string,images:d.objectOf(d.any),widgets:d.objectOf(d.any)}),b=class b extends p.Component{constructor(){super(...arguments),this.state=b._stateFromProps(this.props)}UNSAFE_componentWillReceiveProps(e){this.setState(b._stateFromProps(e))}render(){const{before:e,after:t}=this.state,n=Math.max(e.length,t.length),i=_.times(n,l=>r.jsx(x,{before:l{const{before:t,after:n}=e;return{before:Array.isArray(t)?t:[t],after:Array.isArray(n)?n:[n]}};let W=b;W.__docgenInfo={description:"",methods:[{name:"_stateFromProps",docblock:null,modifiers:["static"],params:[{name:"props",optional:!1,type:null}],returns:null}],displayName:"ArticleDiff",props:{after:{description:"",type:{name:"union",value:[{name:"custom",raw:"rendererProps"},{name:"arrayOf",value:{name:"custom",raw:"rendererProps"}}]},required:!0},before:{description:"",type:{name:"union",value:[{name:"custom",raw:"rendererProps"},{name:"arrayOf",value:{name:"custom",raw:"rendererProps"}}]},required:!0}}};const L=d.shape({question:d.shape({}).isRequired,answerArea:d.shape({}).isRequired,hints:d.arrayOf(d.any).isRequired}),N=class N extends p.Component{render(){const{before:e,after:t}=this.props,n=Math.max(e.hints.length,t.hints.length),i=r.jsx(x,{before:e.question,after:t.question,title:"Question",showAlignmentOptions:!1,showSeparator:!0}),l=r.jsx(D,{before:e.answerArea,after:t.answerArea,title:"Question extras"}),u=_.times(n,function(y){return r.jsx(x,{before:y{}};let v=A;const O=s.StyleSheet.create({baseButton:{top:"0",fontSize:"11px",padding:"3px 10px",backgroundRepeat:"repeat-x",borderColor:` +import{a as M}from"./version-akiLXZts.js";import"./article-editor-4hdZsISp.js";import"./device-framer-MUDr0WgQ.js";import"./viewport-resizer-mN7DSD_Q.js";import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{P as d}from"./index-k-0mNqHS.js";import{r as p}from"./index-6oxdNXpR.js";import{_}from"./jquery-yG1GhClm.js";import{R as x,W as D}from"./structured-item-diff-OBWOWslJ.js";import{H as V}from"./editor-page-rccauWVG.js";import{E as H}from"./editor-Gp3Qu6_d.js";import{w as G}from"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import{c as K,r as B,a as J,d as Q}from"./renderer-L37a98D_.js";import{A as Y}from"./perseus-api-1-ethIrW.js";import{l as g,g as Z,e as X}from"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./base-radio-kypcKNEK.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./dependencies-CP7Uh8Kq.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{J as ee,A as re}from"./register-all-widgets-and-editors-for-testing-mH_Pw9e8.js";import{c as te}from"./components-ODdjt0Ld.js";import{c as E,i as ne}from"./icon-paths-5JCXzGsq.js";import{M as ae}from"./multi-items-TymZv1Bp.js";import{l as s}from"./index-awljIyHI.js";import{F as ie}from"./index-9gkyvru-.js";/* empty css */const se="@khanacademy/perseus-editor",oe="__lib_version__";M(se,oe);const q=d.shape({content:d.string,images:d.objectOf(d.any),widgets:d.objectOf(d.any)}),b=class b extends p.Component{constructor(){super(...arguments),this.state=b._stateFromProps(this.props)}UNSAFE_componentWillReceiveProps(e){this.setState(b._stateFromProps(e))}render(){const{before:e,after:t}=this.state,n=Math.max(e.length,t.length),i=_.times(n,l=>r.jsx(x,{before:l{const{before:t,after:n}=e;return{before:Array.isArray(t)?t:[t],after:Array.isArray(n)?n:[n]}};let W=b;W.__docgenInfo={description:"",methods:[{name:"_stateFromProps",docblock:null,modifiers:["static"],params:[{name:"props",optional:!1,type:null}],returns:null}],displayName:"ArticleDiff",props:{after:{description:"",type:{name:"union",value:[{name:"custom",raw:"rendererProps"},{name:"arrayOf",value:{name:"custom",raw:"rendererProps"}}]},required:!0},before:{description:"",type:{name:"union",value:[{name:"custom",raw:"rendererProps"},{name:"arrayOf",value:{name:"custom",raw:"rendererProps"}}]},required:!0}}};const L=d.shape({question:d.shape({}).isRequired,answerArea:d.shape({}).isRequired,hints:d.arrayOf(d.any).isRequired}),N=class N extends p.Component{render(){const{before:e,after:t}=this.props,n=Math.max(e.hints.length,t.hints.length),i=r.jsx(x,{before:e.question,after:t.question,title:"Question",showAlignmentOptions:!1,showSeparator:!0}),l=r.jsx(D,{before:e.answerArea,after:t.answerArea,title:"Question extras"}),u=_.times(n,function(y){return r.jsx(x,{before:y{}};let v=A;const O=s.StyleSheet.create({baseButton:{top:"0",fontSize:"11px",padding:"3px 10px",backgroundRepeat:"repeat-x",borderColor:` rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25) @@ -4871,22 +4871,34 @@ the available choices.`}]}}],raw:`Readonly<{ */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -6338,14 +6350,15 @@ the available choices.`}]}}],raw:`Readonly<{ major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!1},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]}},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]}},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one diff --git a/assets/index-eAyo8Lf0.js b/assets/index-Ymxyq6zK.js similarity index 93% rename from assets/index-eAyo8Lf0.js rename to assets/index-Ymxyq6zK.js index 9ae60508ce..aba83d7824 100644 --- a/assets/index-eAyo8Lf0.js +++ b/assets/index-Ymxyq6zK.js @@ -1 +1 @@ -import{m as b,a as d,G as S,K as B,P as L,g as C,L as H,b as u,v as g,w as y,c as I,E as h,$ as k,y as P,d as W,N as A,e as F,D as x,x as D,C as R,f,S as v,R as E,I as M,h as N,i as q,A as w,F as O,j as U,k as Z,l as j,W as z,n as G,T as J,t as K,o as Q,p as V,q as X,r as Y,s as _,u as $,z as aa,B as sa,H as oa,J as ta,M as ea,V as ra,O as pa,Q as ia,U as na,X as ma,Y as la,Z as ca,_ as Ta,a0 as ba,a1 as da,a2 as Sa,a3 as Ba,a4 as La,a5 as Ca,a6 as Ha,a7 as ua,a8 as ga,a9 as ya,aa as Ia,ab as ha,ac as ka,ad as Pa}from"./DocsRenderer-CFRXHY34-FMg1UtII.js";import"./iframe-7Gh6p0LC.js";import"../sb-preview/runtime.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./jsx-runtime-63Ea5SlK.js";import"./index-9gkyvru-.js";import"./index-4FLvW62B.js";import"./index-mQRHDdot.js";import"./index-PPLHz8o0.js";import"./react-18-8FLnVqma.js";import"./client-Rb4DelHy.js";export{b as A,d as ActionBar,S as AddonPanel,B as Badge,L as Bar,C as Blockquote,H as Button,u as ClipboardCode,g as Code,y as DL,I as Div,h as DocumentWrapper,k as EmptyTabContent,P as ErrorFormatter,W as FlexBar,A as Form,F as H1,x as H2,D as H3,R as H4,f as H5,v as H6,E as HR,M as IconButton,N as IconButtonSkeleton,q as Icons,w as Img,O as LI,U as Link,Z as ListItem,j as Loader,z as Modal,G as OL,J as P,K as Placeholder,Q as Pre,V as ResetWrapper,X as ScrollArea,Y as Separator,_ as Spaced,$ as Span,aa as StorybookIcon,sa as StorybookLogo,oa as Symbols,ta as SyntaxHighlighter,ea as TT,ra as TabBar,pa as TabButton,ia as TabWrapper,na as Table,ma as Tabs,la as TabsState,ca as TooltipLinkList,Ta as TooltipMessage,ba as TooltipNote,da as UL,Sa as WithTooltip,Ba as WithTooltipPure,La as Zoom,Ca as codeCommon,Ha as components,ua as createCopyToClipboardFunction,ga as getStoryHref,ya as icons,Ia as interleaveSeparators,ha as nameSpaceClassNames,ka as resetComponents,Pa as withReset}; +import{m as b,a as d,G as S,K as B,P as L,g as C,L as H,b as u,v as g,w as y,c as I,E as h,$ as k,y as P,d as W,N as A,e as F,D as x,x as D,C as R,f,S as v,R as E,I as M,h as N,i as q,A as w,F as O,j as U,k as Z,l as j,W as z,n as G,T as J,t as K,o as Q,p as V,q as X,r as Y,s as _,u as $,z as aa,B as sa,H as oa,J as ta,M as ea,V as ra,O as pa,Q as ia,U as na,X as ma,Y as la,Z as ca,_ as Ta,a0 as ba,a1 as da,a2 as Sa,a3 as Ba,a4 as La,a5 as Ca,a6 as Ha,a7 as ua,a8 as ga,a9 as ya,aa as Ia,ab as ha,ac as ka,ad as Pa}from"./DocsRenderer-CFRXHY34-9NOLoDuI.js";import"./iframe-8qXcTeqo.js";import"../sb-preview/runtime.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./jsx-runtime-63Ea5SlK.js";import"./index-9gkyvru-.js";import"./index-4FLvW62B.js";import"./index-mQRHDdot.js";import"./index-PPLHz8o0.js";import"./react-18-8FLnVqma.js";import"./client-Rb4DelHy.js";export{b as A,d as ActionBar,S as AddonPanel,B as Badge,L as Bar,C as Blockquote,H as Button,u as ClipboardCode,g as Code,y as DL,I as Div,h as DocumentWrapper,k as EmptyTabContent,P as ErrorFormatter,W as FlexBar,A as Form,F as H1,x as H2,D as H3,R as H4,f as H5,v as H6,E as HR,M as IconButton,N as IconButtonSkeleton,q as Icons,w as Img,O as LI,U as Link,Z as ListItem,j as Loader,z as Modal,G as OL,J as P,K as Placeholder,Q as Pre,V as ResetWrapper,X as ScrollArea,Y as Separator,_ as Spaced,$ as Span,aa as StorybookIcon,sa as StorybookLogo,oa as Symbols,ta as SyntaxHighlighter,ea as TT,ra as TabBar,pa as TabButton,ia as TabWrapper,na as Table,ma as Tabs,la as TabsState,ca as TooltipLinkList,Ta as TooltipMessage,ba as TooltipNote,da as UL,Sa as WithTooltip,Ba as WithTooltipPure,La as Zoom,Ca as codeCommon,Ha as components,ua as createCopyToClipboardFunction,ga as getStoryHref,ya as icons,Ia as interleaveSeparators,ha as nameSpaceClassNames,ka as resetComponents,Pa as withReset}; diff --git a/assets/input-number-editor-97qMf_gS.js b/assets/input-number-editor-Zo4idrK9.js similarity index 96% rename from assets/input-number-editor-97qMf_gS.js rename to assets/input-number-editor-Zo4idrK9.js index 0da47c9626..370e51fbc2 100644 --- a/assets/input-number-editor-97qMf_gS.js +++ b/assets/input-number-editor-Zo4idrK9.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-mU-6RWLp.js";import{_ as p}from"./jquery-yG1GhClm.js";import{U as l}from"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import{c as u}from"./components-ODdjt0Ld.js";import"./index-k-0mNqHS.js";import{P as m}from"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{r as o}from"./index-6oxdNXpR.js";import{B as d}from"./blur-input-6j4bgLwx.js";const{InfoTip:a}=u,c={number:{name:"Numbers",forms:"integer, decimal, proper, improper, mixed"},decimal:{name:"Decimals",forms:"decimal"},integer:{name:"Integers",forms:"integer"},rational:{name:"Fractions and mixed numbers",forms:"integer, proper, improper, mixed"},improper:{name:"Improper numbers (no mixed)",forms:"integer, proper, improper"},mixed:{name:"Mixed numbers (no improper)",forms:"integer, proper, mixed"},percent:{name:"Numbers or percents",forms:"integer, decimal, proper, improper, mixed, percent"},pi:{name:"Numbers with pi",forms:"pi"}},n=class n extends o.Component{constructor(){super(...arguments),this.input=o.createRef(),this.handleAnswerChange=i=>{const r=l.firstNumericalParse(i,this.context.strings)||0;this.props.onChange({value:r})},this.focus=()=>{var i;return(i=this.input.current)==null||i.focus(),!0},this.serialize=()=>({value:this.props.value,simplify:this.props.simplify,size:this.props.size,inexact:this.props.inexact,maxError:this.props.maxError,answerType:this.props.answerType,rightAlign:this.props.rightAlign})}render(){const i=p.map(c,function(r,s){return e.jsx("option",{value:s,children:r.name},s)},this);return e.jsxs("div",{children:[e.jsx("div",{children:e.jsxs("label",{children:["Correct answer:"," ",e.jsx(d,{value:""+this.props.value,onChange:this.handleAnswerChange,ref:this.input})]})}),e.jsxs("div",{children:[e.jsxs("label",{children:["Unsimplified answers"," ",e.jsxs("select",{value:this.props.simplify,onChange:r=>{this.props.onChange({simplify:r.target.value})},children:[e.jsx("option",{value:"required",children:"will not be graded"}),e.jsx("option",{value:"optional",children:"will be accepted"}),e.jsx("option",{value:"enforced",children:"will be marked wrong"})]})]}),e.jsxs(a,{children:[e.jsx("p",{children:'Normally select "will not be graded". This will give the user a message saying the answer is correct but not simplified. The user will then have to simplify it and re-enter, but will not be penalized. (5th grade and anything after)'}),e.jsx("p",{children:'Select "will be accepted" only if the user is not expected to know how to simplify fractions yet. (Anything prior to 5th grade)'}),e.jsx("p",{children:'Select "will be marked wrong" only if we are specifically assessing the ability to simplify.'})]})]}),e.jsxs("div",{children:[e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:this.props.inexact,onChange:r=>{this.props.onChange({inexact:r.target.checked})}})," ","Allow inexact answers"]}),e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",style:{visibility:"hidden"}}),"Max error:"," ",e.jsx("input",{type:"text",disabled:!this.props.inexact,defaultValue:this.props.maxError,"aria-label":"Max error",onBlur:r=>{const s=""+(l.firstNumericalParse(r.target.value,this.context.strings)||0);r.target.value=s,this.props.onChange({maxError:s})}})]})]}),e.jsxs("div",{children:["Answer type:"," ",e.jsx("select",{value:this.props.answerType,onChange:r=>{this.props.onChange({answerType:r.target.value})},"aria-label":"Answer type",children:i}),e.jsx(a,{children:e.jsx("p",{children:'Use the default "Numbers" unless the answer must be in a specific form (e.g., question is about converting decimals to fractions).'})})]}),e.jsxs("div",{children:[e.jsxs("label",{children:["Width"," ",e.jsxs("select",{value:this.props.size,onChange:r=>{this.props.onChange({size:r.target.value})},children:[e.jsx("option",{value:"normal",children:"Normal (80px)"}),e.jsx("option",{value:"small",children:"Small (40px)"})]})]}),e.jsx(a,{children:e.jsx("p",{children:'Use size "Normal" for all text boxes, unless there are multiple text boxes in one line and the answer area is too narrow to fit them.'})})]}),e.jsx("div",{children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:this.props.rightAlign,onChange:r=>{this.props.onChange({rightAlign:r.target.checked})}})," ","Right alignment"]})})]})}};n.contextType=m,n.widgetName="input-number",n.defaultProps={value:0,simplify:"required",size:"normal",inexact:!1,maxError:.1,answerType:"number",rightAlign:!1};let t=n;t.__docgenInfo={description:"",methods:[{name:"handleAnswerChange",docblock:null,modifiers:[],params:[{name:"str",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"InputNumberEditor",props:{value:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}},simplify:{required:!1,tsType:{name:"union",raw:'PerseusInputNumberWidgetOptions["simplify"]'},description:"",defaultValue:{value:'"required"',computed:!1}},size:{required:!1,tsType:{name:"union",raw:'PerseusInputNumberWidgetOptions["size"]'},description:"",defaultValue:{value:'"normal"',computed:!1}},inexact:{required:!1,tsType:{name:"boolean",raw:'PerseusInputNumberWidgetOptions["inexact"]'},description:"",defaultValue:{value:"false",computed:!1}},maxError:{required:!1,tsType:{name:"union",raw:'PerseusInputNumberWidgetOptions["maxError"]'},description:"",defaultValue:{value:"0.1",computed:!1}},answerType:{required:!1,tsType:{name:"union",raw:'PerseusInputNumberWidgetOptions["answerType"]'},description:"",defaultValue:{value:'"number"',computed:!1}},rightAlign:{required:!1,tsType:{name:"boolean",raw:'PerseusInputNumberWidgetOptions["rightAlign"]'},description:"",defaultValue:{value:"false",computed:!1}},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:`(arg1: { +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-HEYBK15c.js";import{_ as p}from"./jquery-yG1GhClm.js";import{U as l}from"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c as u}from"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";import{P as m}from"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{r as o}from"./index-6oxdNXpR.js";import{B as d}from"./blur-input-6j4bgLwx.js";const{InfoTip:a}=u,c={number:{name:"Numbers",forms:"integer, decimal, proper, improper, mixed"},decimal:{name:"Decimals",forms:"decimal"},integer:{name:"Integers",forms:"integer"},rational:{name:"Fractions and mixed numbers",forms:"integer, proper, improper, mixed"},improper:{name:"Improper numbers (no mixed)",forms:"integer, proper, improper"},mixed:{name:"Mixed numbers (no improper)",forms:"integer, proper, mixed"},percent:{name:"Numbers or percents",forms:"integer, decimal, proper, improper, mixed, percent"},pi:{name:"Numbers with pi",forms:"pi"}},n=class n extends o.Component{constructor(){super(...arguments),this.input=o.createRef(),this.handleAnswerChange=i=>{const r=l.firstNumericalParse(i,this.context.strings)||0;this.props.onChange({value:r})},this.focus=()=>{var i;return(i=this.input.current)==null||i.focus(),!0},this.serialize=()=>({value:this.props.value,simplify:this.props.simplify,size:this.props.size,inexact:this.props.inexact,maxError:this.props.maxError,answerType:this.props.answerType,rightAlign:this.props.rightAlign})}render(){const i=p.map(c,function(r,s){return e.jsx("option",{value:s,children:r.name},s)},this);return e.jsxs("div",{children:[e.jsx("div",{children:e.jsxs("label",{children:["Correct answer:"," ",e.jsx(d,{value:""+this.props.value,onChange:this.handleAnswerChange,ref:this.input})]})}),e.jsxs("div",{children:[e.jsxs("label",{children:["Unsimplified answers"," ",e.jsxs("select",{value:this.props.simplify,onChange:r=>{this.props.onChange({simplify:r.target.value})},children:[e.jsx("option",{value:"required",children:"will not be graded"}),e.jsx("option",{value:"optional",children:"will be accepted"}),e.jsx("option",{value:"enforced",children:"will be marked wrong"})]})]}),e.jsxs(a,{children:[e.jsx("p",{children:'Normally select "will not be graded". This will give the user a message saying the answer is correct but not simplified. The user will then have to simplify it and re-enter, but will not be penalized. (5th grade and anything after)'}),e.jsx("p",{children:'Select "will be accepted" only if the user is not expected to know how to simplify fractions yet. (Anything prior to 5th grade)'}),e.jsx("p",{children:'Select "will be marked wrong" only if we are specifically assessing the ability to simplify.'})]})]}),e.jsxs("div",{children:[e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:this.props.inexact,onChange:r=>{this.props.onChange({inexact:r.target.checked})}})," ","Allow inexact answers"]}),e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",style:{visibility:"hidden"}}),"Max error:"," ",e.jsx("input",{type:"text",disabled:!this.props.inexact,defaultValue:this.props.maxError,"aria-label":"Max error",onBlur:r=>{const s=""+(l.firstNumericalParse(r.target.value,this.context.strings)||0);r.target.value=s,this.props.onChange({maxError:s})}})]})]}),e.jsxs("div",{children:["Answer type:"," ",e.jsx("select",{value:this.props.answerType,onChange:r=>{this.props.onChange({answerType:r.target.value})},"aria-label":"Answer type",children:i}),e.jsx(a,{children:e.jsx("p",{children:'Use the default "Numbers" unless the answer must be in a specific form (e.g., question is about converting decimals to fractions).'})})]}),e.jsxs("div",{children:[e.jsxs("label",{children:["Width"," ",e.jsxs("select",{value:this.props.size,onChange:r=>{this.props.onChange({size:r.target.value})},children:[e.jsx("option",{value:"normal",children:"Normal (80px)"}),e.jsx("option",{value:"small",children:"Small (40px)"})]})]}),e.jsx(a,{children:e.jsx("p",{children:'Use size "Normal" for all text boxes, unless there are multiple text boxes in one line and the answer area is too narrow to fit them.'})})]}),e.jsx("div",{children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:this.props.rightAlign,onChange:r=>{this.props.onChange({rightAlign:r.target.checked})}})," ","Right alignment"]})})]})}};n.contextType=m,n.widgetName="input-number",n.defaultProps={value:0,simplify:"required",size:"normal",inexact:!1,maxError:.1,answerType:"number",rightAlign:!1};let t=n;t.__docgenInfo={description:"",methods:[{name:"handleAnswerChange",docblock:null,modifiers:[],params:[{name:"str",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"InputNumberEditor",props:{value:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}},simplify:{required:!1,tsType:{name:"union",raw:'PerseusInputNumberWidgetOptions["simplify"]'},description:"",defaultValue:{value:'"required"',computed:!1}},size:{required:!1,tsType:{name:"union",raw:'PerseusInputNumberWidgetOptions["size"]'},description:"",defaultValue:{value:'"normal"',computed:!1}},inexact:{required:!1,tsType:{name:"boolean",raw:'PerseusInputNumberWidgetOptions["inexact"]'},description:"",defaultValue:{value:"false",computed:!1}},maxError:{required:!1,tsType:{name:"union",raw:'PerseusInputNumberWidgetOptions["maxError"]'},description:"",defaultValue:{value:"0.1",computed:!1}},answerType:{required:!1,tsType:{name:"union",raw:'PerseusInputNumberWidgetOptions["answerType"]'},description:"",defaultValue:{value:'"number"',computed:!1}},rightAlign:{required:!1,tsType:{name:"boolean",raw:'PerseusInputNumberWidgetOptions["rightAlign"]'},description:"",defaultValue:{value:"false",computed:!1}},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:`(arg1: { value?: ParsedValue | 0; simplify?: Props["simplify"]; size?: Props["size"]; diff --git a/assets/input-number-editor.stories-cGl-q1yE.js b/assets/input-number-editor.stories-BAsMep0M.js similarity index 77% rename from assets/input-number-editor.stories-cGl-q1yE.js rename to assets/input-number-editor.stories-BAsMep0M.js index b47141c42b..33c555e7a2 100644 --- a/assets/input-number-editor.stories-cGl-q1yE.js +++ b/assets/input-number-editor.stories-BAsMep0M.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{a as p}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{I as e}from"./input-number-editor-97qMf_gS.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./blur-input-6j4bgLwx.js";const Yr={title:"PerseusEditor/Widgets/InputNumber Editor"},r=a=>m.jsx(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{a as p}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{I as e}from"./input-number-editor-Zo4idrK9.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./blur-input-6j4bgLwx.js";const Yr={title:"PerseusEditor/Widgets/InputNumber Editor"},r=a=>m.jsx(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(o=r.parameters)==null?void 0:o.docs)==null?void 0:i.source}}};const Zr=["Default"];export{r as Default,Zr as __namedExportsOrder,Yr as default}; diff --git a/assets/input-number.stories-nvvHefrb.js b/assets/input-number.stories-sstPvQtd.js similarity index 92% rename from assets/input-number.stories-nvvHefrb.js rename to assets/input-number.stories-sstPvQtd.js index 3355f0b946..fc3bbe5f32 100644 --- a/assets/input-number.stories-nvvHefrb.js +++ b/assets/input-number.stories-sstPvQtd.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{R as o}from"./renderer-with-debug-ui-75hBDQJk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const f={content:`Denis baked a peach pie and cut it into $3$ equal-sized pieces. Denis's dad eats $1$ section of the pie. +import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{R as o}from"./renderer-with-debug-ui-Jq91P-PK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const f={content:`Denis baked a peach pie and cut it into $3$ equal-sized pieces. Denis's dad eats $1$ section of the pie. **What fraction of the pie did Denis's dad eat?** ![](https://ka-perseus-graphie.s3.amazonaws.com/74a2b7583a2c26ebfb3ad714e29867541253fc97.png) diff --git a/assets/input-with-examples-YO5BCgg1.js b/assets/input-with-examples-PaWkADGr.js similarity index 98% rename from assets/input-with-examples-YO5BCgg1.js rename to assets/input-with-examples-PaWkADGr.js index ef8e0d1ce2..774ddb7ed7 100644 --- a/assets/input-with-examples-YO5BCgg1.js +++ b/assets/input-with-examples-PaWkADGr.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-63Ea5SlK.js";import{l as u,R as p,p as d}from"./renderer-1DxKQj1_.js";import{r as m}from"./index-6oxdNXpR.js";import{_ as c}from"./jquery-yG1GhClm.js";import{C as r}from"./perseus-api-1-ethIrW.js";import{U as h}from"./util-AYeX86gl.js";import{P as f}from"./i18n-context-fsWEgybQ.js";import{T as y}from"./text-input-5e4vF1bl.js";import{T as g,H as o,V as x}from"./tooltip-_t9Bc-o8.js";const{captureScratchpadTouchStart:b}=h,s=class s extends m.Component{constructor(){super(...arguments),this.state={focused:!1,showExamples:!1},this._getUniqueId=()=>`input-with-examples-${btoa(this.props.id).replace(/=/g,"")}`,this._getInputClassName=()=>{let e=r.INPUT+" "+r.INTERACTIVE;return this.state.focused&&(e+=" "+r.FOCUSED),this.props.className&&(e+=" "+this.props.className),e},this._renderInput=()=>{const e=this._getUniqueId(),a={id:e,"aria-describedby":e,ref:"input",className:this._getInputClassName(),labelText:this.props.labelText,value:this.props.value,onFocus:this._handleFocus,onBlur:this._handleBlur,disabled:this.props.disabled,style:this.props.style,onChange:this.props.onChange,onTouchStart:b,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:"false"};return t.jsx(y,{...a})},this._handleFocus=()=>{this.props.onFocus(),this.setState({focused:!0,showExamples:!0})},this.show=()=>{this.setState({showExamples:!0})},this.hide=()=>{this.setState({showExamples:!1})},this._handleBlur=()=>{this.props.onBlur(),this.setState({focused:!1,showExamples:!1})},this.focus=()=>{this.refs.input.focus()},this.blur=()=>{this.refs.input.blur()},this.handleChange=e=>{this.props.onChange(e.target.value)}}render(){const e=this._renderInput(),a=c.map(this.props.examples,l=>"- "+l).join(` +import{j as t}from"./jsx-runtime-63Ea5SlK.js";import{l as u,R as p,p as d}from"./renderer-L37a98D_.js";import{r as m}from"./index-6oxdNXpR.js";import{_ as c}from"./jquery-yG1GhClm.js";import{C as r}from"./perseus-api-1-ethIrW.js";import{U as h}from"./util-AYeX86gl.js";import{P as f}from"./i18n-context-fsWEgybQ.js";import{T as y}from"./text-input-5e4vF1bl.js";import{T as g,H as o,V as x}from"./tooltip-_t9Bc-o8.js";const{captureScratchpadTouchStart:b}=h,s=class s extends m.Component{constructor(){super(...arguments),this.state={focused:!1,showExamples:!1},this._getUniqueId=()=>`input-with-examples-${btoa(this.props.id).replace(/=/g,"")}`,this._getInputClassName=()=>{let e=r.INPUT+" "+r.INTERACTIVE;return this.state.focused&&(e+=" "+r.FOCUSED),this.props.className&&(e+=" "+this.props.className),e},this._renderInput=()=>{const e=this._getUniqueId(),a={id:e,"aria-describedby":e,ref:"input",className:this._getInputClassName(),labelText:this.props.labelText,value:this.props.value,onFocus:this._handleFocus,onBlur:this._handleBlur,disabled:this.props.disabled,style:this.props.style,onChange:this.props.onChange,onTouchStart:b,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:"false"};return t.jsx(y,{...a})},this._handleFocus=()=>{this.props.onFocus(),this.setState({focused:!0,showExamples:!0})},this.show=()=>{this.setState({showExamples:!0})},this.hide=()=>{this.setState({showExamples:!1})},this._handleBlur=()=>{this.props.onBlur(),this.setState({focused:!1,showExamples:!1})},this.focus=()=>{this.refs.input.focus()},this.blur=()=>{this.refs.input.blur()},this.handleChange=e=>{this.props.onChange(e.target.value)}}render(){const e=this._renderInput(),a=c.map(this.props.examples,l=>"- "+l).join(` `),i=this.props.shouldShowExamples&&this.state.showExamples;return t.jsxs(g,{className:"perseus-formats-tooltip preview-measure",horizontalPosition:o.Left,horizontalAlign:o.Left,verticalPosition:x.Bottom,arrowSize:10,borderColor:"#ccc",show:i,children:[e,t.jsx("div",{id:this._getUniqueId(),children:t.jsx(p,{content:a,linterContext:d(this.props.linterContext,"input-with-examples"),strings:this.context.strings})})]})}};s.contextType=f,s.defaultProps={shouldShowExamples:!0,onFocus:function(){},onBlur:function(){},disabled:!1,linterContext:u,className:""};let n=s;n.__docgenInfo={description:"",methods:[{name:"_getUniqueId",docblock:null,modifiers:[],params:[],returns:null},{name:"_getInputClassName",docblock:null,modifiers:[],params:[],returns:null},{name:"_renderInput",docblock:null,modifiers:[],params:[],returns:null},{name:"_handleFocus",docblock:null,modifiers:[],params:[],returns:null},{name:"show",docblock:null,modifiers:[],params:[],returns:null},{name:"hide",docblock:null,modifiers:[],params:[],returns:null},{name:"_handleBlur",docblock:null,modifiers:[],params:[],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"blur",docblock:null,modifiers:[],params:[],returns:null},{name:"handleChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null}],displayName:"InputWithExamples",props:{value:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"any"},description:""},className:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},examples:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:""},shouldShowExamples:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},convertDotToTimes:{required:!1,tsType:{name:"boolean"},description:""},buttonSet:{required:!1,tsType:{name:"string"},description:""},buttonsVisible:{required:!1,tsType:{name:"union",raw:'"always" | "never" | "focused"',elements:[{name:"literal",value:'"always"'},{name:"literal",value:'"never"'},{name:"literal",value:'"focused"'}]},description:""},labelText:{required:!1,tsType:{name:"string"},description:""},onFocus:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"",defaultValue:{value:"function () {}",computed:!1}},onBlur:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"",defaultValue:{value:"function () {}",computed:!1}},disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},style:{required:!1,tsType:{name:"StyleType"},description:""},id:{required:!0,tsType:{name:"string"},description:""},linterContext:{required:!1,tsType:{name:"signature",type:"object",raw:`{ contentType: string; highlightLint: boolean; diff --git a/assets/input-with-examples.stories-fncAs80h.js b/assets/input-with-examples.stories-Q_yGSIlH.js similarity index 93% rename from assets/input-with-examples.stories-fncAs80h.js rename to assets/input-with-examples.stories-Q_yGSIlH.js index d14363b6f0..a822265e98 100644 --- a/assets/input-with-examples.stories-fncAs80h.js +++ b/assets/input-with-examples.stories-Q_yGSIlH.js @@ -1,4 +1,4 @@ -import{a as b}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{I as f}from"./input-with-examples-YO5BCgg1.js";import"./v4-yQnnJER4.js";import"./jsx-runtime-63Ea5SlK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./renderer-1DxKQj1_.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./index-9gkyvru-.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-awljIyHI.js";import"./index-0DbkllkJ.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-469F30Ub.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";const ir={title:"Perseus/Components/Input with Examples",component:f,args:{examples:[],id:"",onChange:b("onChange"),value:""}},s=["Sample 1","Sample 2","Sample 3"],r={},t={args:{examples:s}},e={args:{examples:s,labelText:"Test label"}},o={args:{disabled:!0,examples:s}};var p,a,m;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:"{}",...(m=(a=r.parameters)==null?void 0:a.docs)==null?void 0:m.source}}};var i,l,n;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:`{ +import{a as b}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{I as f}from"./input-with-examples-PaWkADGr.js";import"./v4-yQnnJER4.js";import"./jsx-runtime-63Ea5SlK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./renderer-L37a98D_.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./index-9gkyvru-.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-awljIyHI.js";import"./index-0DbkllkJ.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-469F30Ub.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";const ir={title:"Perseus/Components/Input with Examples",component:f,args:{examples:[],id:"",onChange:b("onChange"),value:""}},s=["Sample 1","Sample 2","Sample 3"],r={},t={args:{examples:s}},e={args:{examples:s,labelText:"Test label"}},o={args:{disabled:!0,examples:s}};var p,a,m;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:"{}",...(m=(a=r.parameters)==null?void 0:a.docs)==null?void 0:m.source}}};var i,l,n;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:`{ args: { examples: testExamples } diff --git a/assets/interaction-editor-2twq2tps.js b/assets/interaction-editor-vi9RcfEM.js similarity index 98% rename from assets/interaction-editor-2twq2tps.js rename to assets/interaction-editor-vi9RcfEM.js index 5687e4f86a..b9e39eb4d6 100644 --- a/assets/interaction-editor-2twq2tps.js +++ b/assets/interaction-editor-vi9RcfEM.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{c as u}from"./article-renderer-mU-6RWLp.js";import{_ as a}from"./jquery-yG1GhClm.js";import{U as J}from"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import{a as m,g as $}from"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import{K as o}from"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{E as g}from"./editor-jsonify-g-bIiSIM.js";import{r as p}from"./index-6oxdNXpR.js";import{G as H}from"./graph-settings-XR_siz2q.js";import{c}from"./components-ODdjt0Ld.js";import{c as K,i as Q}from"./icon-paths-5JCXzGsq.js";import{g as Z,b as ee,a as se}from"./icon-paths-EoBkHOLI.js";import"./prop-types-d_cUcR3L.js";import{c as te}from"./key-translator-hixns6dh.js";import"./mobile-keypad-Muuas9zV.js";import{u as ne}from"./button-assets-ozecF1qE.js";import{V as ae}from"./index-0DbkllkJ.js";import{c as W}from"./index-deFLJwr4.js";import{l as re}from"./index-awljIyHI.js";const{InlineIcon:v}=c,D=class D extends p.Component{constructor(s){super(s),this.toggle=t=>{t.preventDefault(),this.setState({show:!this.state.show})},this.state={show:s.initiallyVisible}}render(){return e.jsxs("div",{className:"perseus-interaction-element",children:[e.jsxs("a",{href:"#",className:"perseus-interaction-element-title "+(this.state.show?"open":"closed"),onClick:this.toggle,children:[this.state.show?e.jsx(v,{...K}):e.jsx(v,{...Z}),this.props.title]}),e.jsxs("div",{className:"perseus-interaction-element-content "+(this.state.show?"enter":"leave"),children:[this.props.children,(this.props.onUp!=null||this.props.onDown!=null||this.props.onDelete!=null)&&e.jsxs("div",{className:"edit-controls",children:[this.props.onUp!=null&&e.jsx("button",{onClick:this.props.onUp,children:e.jsx(v,{...ee})}),this.props.onDown!=null&&e.jsx("button",{onClick:this.props.onDown,children:e.jsx(v,{...se})}),this.props.onDelete!=null&&e.jsx("button",{onClick:this.props.onDelete,children:e.jsx(v,{...Q})})]})]})]})}};D.defaultProps={initiallyVisible:!1,title:"More"};let d=D;d.__docgenInfo={description:"",methods:[{name:"toggle",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactSyntheticEvent",raw:"React.SyntheticEvent",alias:"React.SyntheticEvent"}}],returns:null}],displayName:"ElementContainer",props:{children:{required:!0,tsType:{name:"union",raw:"React.ReactElement | ReadonlyArray>",elements:[{name:"ReactReactElement",raw:"React.ReactElement",elements:[{name:"any"}]},{name:"ReadonlyArray",elements:[{name:"ReactReactElement",raw:"React.ReactElement",elements:[{name:"any"}]}],raw:"ReadonlyArray>"}]},description:""},initiallyVisible:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},onDelete:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void | null | undefined",signature:{arguments:[],return:{name:"union",raw:"void | null | undefined",elements:[{name:"void"},{name:"null"},{name:"undefined"}]}}},description:""},onDown:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void | null | undefined",signature:{arguments:[],return:{name:"union",raw:"void | null | undefined",elements:[{name:"void"},{name:"null"},{name:"undefined"}]}}},description:""},onUp:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void | null | undefined",signature:{arguments:[],return:{name:"union",raw:"void | null | undefined",elements:[{name:"void"},{name:"null"},{name:"undefined"}]}}},description:""},title:{required:!1,tsType:{name:"union",raw:"string | React.ReactElement",elements:[{name:"string"},{name:"ReactReactElement",raw:"React.ReactElement",elements:[{name:"any"}]}]},description:"",defaultValue:{value:'"More"',computed:!1}}}};const{ButtonGroup:ie}=c,le=[o.BLACK,o.BLUE,o.GREEN,o.PINK,o.PURPLE,o.RED,o.GRAY],oe=[o.LIGHT_BLUE,o.LIGHT_ORANGE,o.LIGHT_PINK,o.LIGHT_GREEN,o.LIGHT_PURPLE,o.LIGHT_RED,"#fff"],E=class E extends p.Component{render(){const s=this.props.lightColors?oe:le;return e.jsx(ie,{value:this.props.value,allowEmpty:!1,buttons:a.map(s,t=>({value:t,content:e.jsxs("span",{children:[e.jsx("span",{className:"colorpicker-circle",style:{background:t}})," "]})})),onChange:this.props.onChange})}};E.defaultProps={value:o.BLACK,lightColors:!1};let h=E;h.__docgenInfo={description:"",methods:[],displayName:"ColorPicker",props:{lightColors:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},value:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"black"',computed:!1}}}};const{ButtonGroup:pe}=c,X=class X extends p.Component{render(){return e.jsx(pe,{value:this.props.value,allowEmpty:!1,buttons:[{value:"",content:e.jsx("span",{children:"—"})},{value:"-",content:e.jsx("span",{children:"–––"})},{value:"- ",content:e.jsx("span",{children:"–  –"})},{value:".",content:e.jsx("span",{children:"····"})},{value:". ",content:e.jsx("span",{children:"· · ·"})}],onChange:this.props.onChange})}};X.defaultProps={value:""};let f=X;f.__docgenInfo={description:"",methods:[],displayName:"DashPicker",props:{value:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}}}};function r(O){const s=p.useRef(null),t=p.useRef(),{locale:n,strings:l}=ne();return p.useEffect(()=>{s.current&&!t.current&&(t.current=te(s.current,n,l,i=>({...i,handlers:{edit:x=>{let V=x.latex();V=V.replace(/<>/g,"\\ne"),O.value!==V&&O.onChange(V)},upOutOf:x=>{x.typedText("^")}}})))}),e.jsx(ae,{style:de.outerWrapper,children:e.jsx("span",{ref:s,className:"perseus-math-input mq-editable-field mq-math-mode"})})}const de=re.StyleSheet.create({outerWrapper:{display:"inline-block",borderStyle:"solid",borderWidth:1,borderColor:W.offBlack50,borderRadius:3,background:W.white}});r.__docgenInfo={description:`A simple Mathquill MathField input for the InteractionEditor. +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{c as u}from"./article-renderer-HEYBK15c.js";import{_ as a}from"./jquery-yG1GhClm.js";import{U as J}from"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import{a as m,g as $}from"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import{K as o}from"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{E as g}from"./editor-jsonify-mta12v4L.js";import{r as p}from"./index-6oxdNXpR.js";import{G as H}from"./graph-settings-Pvhg8t7C.js";import{c}from"./components-ODdjt0Ld.js";import{c as K,i as Q}from"./icon-paths-5JCXzGsq.js";import{g as Z,b as ee,a as se}from"./icon-paths-EoBkHOLI.js";import"./prop-types-d_cUcR3L.js";import{c as te}from"./key-translator-hixns6dh.js";import"./mobile-keypad-Muuas9zV.js";import{u as ne}from"./button-assets-ozecF1qE.js";import{V as ae}from"./index-0DbkllkJ.js";import{c as W}from"./index-deFLJwr4.js";import{l as re}from"./index-awljIyHI.js";const{InlineIcon:v}=c,D=class D extends p.Component{constructor(s){super(s),this.toggle=t=>{t.preventDefault(),this.setState({show:!this.state.show})},this.state={show:s.initiallyVisible}}render(){return e.jsxs("div",{className:"perseus-interaction-element",children:[e.jsxs("a",{href:"#",className:"perseus-interaction-element-title "+(this.state.show?"open":"closed"),onClick:this.toggle,children:[this.state.show?e.jsx(v,{...K}):e.jsx(v,{...Z}),this.props.title]}),e.jsxs("div",{className:"perseus-interaction-element-content "+(this.state.show?"enter":"leave"),children:[this.props.children,(this.props.onUp!=null||this.props.onDown!=null||this.props.onDelete!=null)&&e.jsxs("div",{className:"edit-controls",children:[this.props.onUp!=null&&e.jsx("button",{onClick:this.props.onUp,children:e.jsx(v,{...ee})}),this.props.onDown!=null&&e.jsx("button",{onClick:this.props.onDown,children:e.jsx(v,{...se})}),this.props.onDelete!=null&&e.jsx("button",{onClick:this.props.onDelete,children:e.jsx(v,{...Q})})]})]})]})}};D.defaultProps={initiallyVisible:!1,title:"More"};let d=D;d.__docgenInfo={description:"",methods:[{name:"toggle",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactSyntheticEvent",raw:"React.SyntheticEvent",alias:"React.SyntheticEvent"}}],returns:null}],displayName:"ElementContainer",props:{children:{required:!0,tsType:{name:"union",raw:"React.ReactElement | ReadonlyArray>",elements:[{name:"ReactReactElement",raw:"React.ReactElement",elements:[{name:"any"}]},{name:"ReadonlyArray",elements:[{name:"ReactReactElement",raw:"React.ReactElement",elements:[{name:"any"}]}],raw:"ReadonlyArray>"}]},description:""},initiallyVisible:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},onDelete:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void | null | undefined",signature:{arguments:[],return:{name:"union",raw:"void | null | undefined",elements:[{name:"void"},{name:"null"},{name:"undefined"}]}}},description:""},onDown:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void | null | undefined",signature:{arguments:[],return:{name:"union",raw:"void | null | undefined",elements:[{name:"void"},{name:"null"},{name:"undefined"}]}}},description:""},onUp:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void | null | undefined",signature:{arguments:[],return:{name:"union",raw:"void | null | undefined",elements:[{name:"void"},{name:"null"},{name:"undefined"}]}}},description:""},title:{required:!1,tsType:{name:"union",raw:"string | React.ReactElement",elements:[{name:"string"},{name:"ReactReactElement",raw:"React.ReactElement",elements:[{name:"any"}]}]},description:"",defaultValue:{value:'"More"',computed:!1}}}};const{ButtonGroup:ie}=c,le=[o.BLACK,o.BLUE,o.GREEN,o.PINK,o.PURPLE,o.RED,o.GRAY],oe=[o.LIGHT_BLUE,o.LIGHT_ORANGE,o.LIGHT_PINK,o.LIGHT_GREEN,o.LIGHT_PURPLE,o.LIGHT_RED,"#fff"],E=class E extends p.Component{render(){const s=this.props.lightColors?oe:le;return e.jsx(ie,{value:this.props.value,allowEmpty:!1,buttons:a.map(s,t=>({value:t,content:e.jsxs("span",{children:[e.jsx("span",{className:"colorpicker-circle",style:{background:t}})," "]})})),onChange:this.props.onChange})}};E.defaultProps={value:o.BLACK,lightColors:!1};let h=E;h.__docgenInfo={description:"",methods:[],displayName:"ColorPicker",props:{lightColors:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},value:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"black"',computed:!1}}}};const{ButtonGroup:pe}=c,X=class X extends p.Component{render(){return e.jsx(pe,{value:this.props.value,allowEmpty:!1,buttons:[{value:"",content:e.jsx("span",{children:"—"})},{value:"-",content:e.jsx("span",{children:"–––"})},{value:"- ",content:e.jsx("span",{children:"–  –"})},{value:".",content:e.jsx("span",{children:"····"})},{value:". ",content:e.jsx("span",{children:"· · ·"})}],onChange:this.props.onChange})}};X.defaultProps={value:""};let f=X;f.__docgenInfo={description:"",methods:[],displayName:"DashPicker",props:{value:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}}}};function r(O){const s=p.useRef(null),t=p.useRef(),{locale:n,strings:l}=ne();return p.useEffect(()=>{s.current&&!t.current&&(t.current=te(s.current,n,l,i=>({...i,handlers:{edit:x=>{let V=x.latex();V=V.replace(/<>/g,"\\ne"),O.value!==V&&O.onChange(V)},upOutOf:x=>{x.typedText("^")}}})))}),e.jsx(ae,{style:de.outerWrapper,children:e.jsx("span",{ref:s,className:"perseus-math-input mq-editable-field mq-math-mode"})})}const de=re.StyleSheet.create({outerWrapper:{display:"inline-block",borderStyle:"solid",borderWidth:1,borderColor:W.offBlack50,borderRadius:3,background:W.white}});r.__docgenInfo={description:`A simple Mathquill MathField input for the InteractionEditor. Unlike our other uses of Mathquill, we're not using a keypad here; it's just the input itself for use writing TeX.`,methods:[],displayName:"MathquillInput",props:{value:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}}},description:""}}};const{NumberInput:ce}=c,{getDependencies:ue}=m,M=class M extends p.Component{constructor(){super(...arguments),this.change=(...s)=>u.apply(this,s),this.serialize=()=>g.serialize.call(this)}render(){const{TeX:s}=ue();return e.jsxs("div",{className:"graph-settings",children:[e.jsxs("div",{className:"perseus-widget-row",children:[e.jsx(s,{children:this.props.funcName+"(x)="})," ",e.jsx(r,{value:this.props.value,onChange:this.change("value")})]}),e.jsxs("div",{className:"perseus-widget-row",children:["Range: ",e.jsx(s,{children:"\\Large("}),e.jsx(r,{value:this.props.rangeMin,onChange:this.change("rangeMin")}),e.jsx(s,{children:","})," ",e.jsx(r,{value:this.props.rangeMax,onChange:this.change("rangeMax")}),e.jsx(s,{children:"\\Large)"})]}),e.jsx("div",{className:"perseus-widget-row",children:e.jsx(h,{value:this.props.color,onChange:this.change("color")})}),e.jsx("div",{className:"perseus-widget-row",children:e.jsx(f,{value:this.props.strokeDasharray,onChange:this.change("strokeDasharray")})}),e.jsx("div",{className:"perseus-widget-row",children:e.jsxs("div",{className:"perseus-widget-left-col",children:["Width:"," ",e.jsx(ce,{value:this.props.strokeWidth,placeholder:2,onChange:this.change("strokeWidth")})]})})]})}};M.defaultProps={value:"x",rangeMin:"-10",rangeMax:"10",color:o.BLUE,strokeDasharray:"",strokeWidth:2};let y=M;y.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"FunctionEditor",props:{value:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"x"',computed:!1}},rangeMin:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"-10"',computed:!1}},rangeMax:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"10"',computed:!1}},color:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"color.blue",computed:!0}},strokeDasharray:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},strokeWidth:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"2",computed:!1}}}};const{TextInput:he}=c,{getDependencies:me}=m,A=class A extends p.Component{constructor(){super(...arguments),this.change=(...s)=>u.apply(this,s),this.serialize=()=>g.serialize.call(this)}render(){const{TeX:s}=me();return e.jsxs("div",{className:"graph-settings",children:[e.jsx("div",{className:"perseus-widget-row",children:e.jsx(he,{value:this.props.label,onChange:this.change("label"),style:{width:"100%"}})}),e.jsxs("div",{className:"perseus-widget-row",children:["Location: ",e.jsx(s,{children:"\\Large("}),e.jsx(r,{value:this.props.coordX,onChange:this.change("coordX")}),e.jsx(s,{children:","})," ",e.jsx(r,{value:this.props.coordY,onChange:this.change("coordY")}),e.jsx(s,{children:"\\Large)"})]}),e.jsx("div",{className:"perseus-widget-row",children:e.jsx(h,{value:this.props.color,onChange:this.change("color")})})]})}};A.defaultProps={coordX:"0",coordY:"0",color:o.BLACK,label:"\\phi"};let j=A;j.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"LabelEditor",props:{color:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"black"',computed:!1}},coordX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},coordY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},label:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"\\\\phi"',computed:!1}}}};const{ButtonGroup:ge}=c,Y=class Y extends p.Component{render(){return e.jsx(ge,{value:this.props.value,allowEmpty:!1,buttons:[{value:"",content:e.jsx("span",{children:"—"})},{value:"->",content:e.jsx("span",{children:"→"})}],onChange:this.props.onChange})}};Y.defaultProps={value:""};let _=Y;_.__docgenInfo={description:"",methods:[],displayName:"ArrowPicker",props:{value:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}}}};const{NumberInput:fe}=c,{getDependencies:xe}=m,L=class L extends p.Component{constructor(){super(...arguments),this.change=(...s)=>u.apply(this,s),this.serialize=()=>g.serialize.call(this)}render(){const{TeX:s}=xe();return e.jsxs("div",{className:"graph-settings",children:[e.jsxs("div",{className:"perseus-widget-row",children:["Start: ",e.jsx(s,{children:"\\Large("}),e.jsx(r,{value:this.props.startX,onChange:this.change("startX")}),e.jsx(s,{children:","})," ",e.jsx(r,{value:this.props.startY,onChange:this.change("startY")}),e.jsx(s,{children:"\\Large)"})]}),e.jsxs("div",{className:"perseus-widget-row",children:["End: ",e.jsx(s,{children:"\\Large("}),e.jsx(r,{value:this.props.endX,onChange:this.change("endX")}),e.jsx(s,{children:","})," ",e.jsx(r,{value:this.props.endY,onChange:this.change("endY")}),e.jsx(s,{children:"\\Large)"})]}),e.jsx("div",{className:"perseus-widget-row",children:e.jsx(h,{value:this.props.color,onChange:this.change("color")})}),e.jsxs("div",{className:"perseus-widget-row",children:[e.jsx(f,{value:this.props.strokeDasharray,onChange:this.change("strokeDasharray")}),"   ",e.jsx(_,{value:this.props.arrows,onChange:this.change("arrows")})]}),e.jsx("div",{className:"perseus-widget-row",children:e.jsxs("div",{className:"perseus-widget-left-col",children:["Width:"," ",e.jsx(fe,{value:this.props.strokeWidth,placeholder:2,onChange:this.change("strokeWidth")})]})})]})}};L.defaultProps={startX:"-5",startY:"5",endX:"5",endY:"5",color:o.BLACK,strokeDasharray:"",arrows:"",strokeWidth:2};let w=L;w.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"LineEditor",props:{startX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"-5"',computed:!1}},startY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"5"',computed:!1}},endX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"5"',computed:!1}},endY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"5"',computed:!1}},color:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"black"',computed:!1}},strokeDasharray:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},arrows:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},strokeWidth:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"2",computed:!1}}}};const{ButtonGroup:ve,NumberInput:ye}=c,I=class I extends p.Component{constructor(){super(...arguments),this.change=s=>u.call(this,s)}render(){const{TeX:s}=$();return e.jsxs("div",{children:[e.jsxs("div",{className:"perseus-widget-row",children:["Constraint:"," ",e.jsx(ve,{value:this.props.constraint,allowEmpty:!1,buttons:[{value:"none",content:"None"},{value:"snap",content:"Snap"},{value:"x",content:"x="},{value:"y",content:"y="}],onChange:this.change("constraint")})]}),this.props.constraint==="snap"&&e.jsxs("div",{className:"perseus-widget-row",children:["Snap:"," ",e.jsx(ye,{value:this.props.snap,placeholder:0,onChange:this.change("snap")})]}),this.props.constraint==="x"&&e.jsx("div",{className:"graph-settings",children:e.jsxs("div",{className:"perseus-widget-row",children:[e.jsx(s,{children:"x="})," ",e.jsx(r,{value:this.props.constraintFn,onChange:this.change("constraintFn")})]})}),this.props.constraint==="y"&&e.jsx("div",{className:"graph-settings",children:e.jsxs("div",{className:"perseus-widget-row",children:[e.jsx(s,{children:"y="})," ",e.jsx(r,{value:this.props.constraintFn,onChange:this.change("constraintFn")})]})}),"Ensure these are set so nothing can be dragged off the canvas:",e.jsx("div",{className:"perseus-widget-row",children:e.jsxs("div",{className:"perseus-widget-row",children:[e.jsx(s,{children:"x \\in \\Large["})," ",e.jsx(r,{value:this.props.constraintXMin,onChange:this.change("constraintXMin")}),e.jsx(s,{children:", "})," ",e.jsx(r,{value:this.props.constraintXMax,onChange:this.change("constraintXMax")})," ",e.jsx(s,{children:"\\Large]"})]})}),e.jsx("div",{className:"perseus-widget-row",children:e.jsxs("div",{className:"perseus-widget-row",children:[e.jsx(s,{children:"y \\in \\Large["})," ",e.jsx(r,{value:this.props.constraintYMin,onChange:this.change("constraintYMin")}),e.jsx(s,{children:", "})," ",e.jsx(r,{value:this.props.constraintYMax,onChange:this.change("constraintYMax")})," ",e.jsx(s,{children:"\\Large]"})]})})]})}};I.defaultProps={constraint:"none",snap:.5,constraintFn:"0",constraintXMin:"-10",constraintXMax:"10",constraintYMin:"-10",constraintYMax:"10"};let b=I;b.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"propName",optional:!1,type:{name:"string"}}],returns:{type:{name:"unknown"}}}],displayName:"ConstraintEditor",props:{constraint:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"none"',computed:!1}},constraintFn:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},constraintXMax:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"10"',computed:!1}},constraintXMin:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"-10"',computed:!1}},constraintYMax:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"10"',computed:!1}},constraintYMin:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"-10"',computed:!1}},snap:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0.5",computed:!1}}}};const{NumberInput:B}=c,{getDependencies:je}=m,U=class U extends p.Component{constructor(){super(...arguments),this.change=(...s)=>u.apply(this,s),this.serialize=()=>g.serialize.call(this)}render(){const{TeX:s}=je();return e.jsxs("div",{className:"graph-settings",children:["Initial position:",e.jsxs("div",{className:"perseus-widget-row",children:["Start: ",e.jsx(s,{children:"\\Large("}),e.jsx(r,{value:this.props.startX,onChange:this.change("startX")}),e.jsx(s,{children:","})," ",e.jsx(r,{value:this.props.startY,onChange:this.change("startY")}),e.jsx(s,{children:"\\Large)"})]}),e.jsxs("div",{className:"perseus-widget-row",children:["End: ",e.jsx(s,{children:"\\Large("}),e.jsx(r,{value:this.props.endX,onChange:this.change("endX")}),e.jsx(s,{children:","})," ",e.jsx(r,{value:this.props.endY,onChange:this.change("endY")}),e.jsx(s,{children:"\\Large)"})]}),e.jsxs("div",{className:"perseus-widget-row",children:["Start updates ",e.jsx(s,{children:"(x_n, y_n)"})," for ",e.jsx(s,{children:"n ="}),e.jsx(B,{value:this.props.startSubscript,placeholder:0,onChange:this.change("startSubscript")})]}),e.jsxs("div",{className:"perseus-widget-row",children:["End updates ",e.jsx(s,{children:"(x_m, y_m)"})," for ",e.jsx(s,{children:"m ="}),e.jsx(B,{value:this.props.endSubscript,placeholder:0,onChange:this.change("endSubscript")})]}),e.jsx("div",{className:"perseus-widget-row",children:"All constraints are applied to the start point."}),e.jsx(b,{...this.props})]})}};U.defaultProps={startX:"-5",startY:"5",endX:"5",endY:"5",constraint:"none",snap:.5,constraintFn:"0",constraintXMin:"-10",constraintXMax:"10",constraintYMin:"-10",constraintYMax:"10"};let N=U;N.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MovableLineEditor",props:{startX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"-5"',computed:!1}},startY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"5"',computed:!1}},endX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"5"',computed:!1}},endY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"5"',computed:!1}},constraint:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"none"',computed:!1}},snap:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0.5",computed:!1}},constraintFn:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},startSubscript:{required:!0,tsType:{name:"number"},description:""},endSubscript:{required:!0,tsType:{name:"number"},description:""},constraintXMin:{defaultValue:{value:'"-10"',computed:!1},required:!1},constraintXMax:{defaultValue:{value:'"10"',computed:!1},required:!1},constraintYMin:{defaultValue:{value:'"-10"',computed:!1},required:!1},constraintYMax:{defaultValue:{value:'"10"',computed:!1},required:!1}}};const{NumberInput:we}=c,{getDependencies:be}=m,P=class P extends p.Component{constructor(){super(...arguments),this.change=(...s)=>u.apply(this,s),this.serialize=()=>g.serialize.call(this)}render(){const{TeX:s}=be();return e.jsxs("div",{className:"graph-settings",children:[e.jsxs("div",{className:"perseus-widget-row",children:["Start: ",e.jsx(s,{children:"\\Large("}),e.jsx(r,{value:this.props.startX,onChange:this.change("startX")}),e.jsx(s,{children:","})," ",e.jsx(r,{value:this.props.startY,onChange:this.change("startY")}),e.jsx(s,{children:"\\Large)"})]}),e.jsxs("div",{className:"perseus-widget-row",children:["Update ",e.jsx(s,{children:"(x_n, y_n)"})," for ",e.jsx(s,{children:"n ="})," ",e.jsx(we,{value:this.props.varSubscript,placeholder:0,onChange:this.change("varSubscript")})]}),e.jsx(b,{...this.props})]})}};P.defaultProps={startX:"0",startY:"0",constraint:"none",snap:.5,constraintFn:"0",constraintXMin:"-10",constraintXMax:"10",constraintYMin:"-10",constraintYMax:"10"};let C=P;C.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MovablePointEditor",props:{startX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},startY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},constraint:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"none"',computed:!1}},snap:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0.5",computed:!1}},constraintFn:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},varSubscript:{required:!0,tsType:{name:"number"},description:""},constraintXMin:{defaultValue:{value:'"-10"',computed:!1},required:!1},constraintXMax:{defaultValue:{value:'"10"',computed:!1},required:!1},constraintYMin:{defaultValue:{value:'"-10"',computed:!1},required:!1},constraintYMax:{defaultValue:{value:'"10"',computed:!1},required:!1}}};const{NumberInput:Ne}=c,{getDependencies:Ce}=m,z=class z extends p.Component{constructor(){super(...arguments),this.change=(...s)=>u.apply(this,s),this.serialize=()=>g.serialize.call(this)}render(){const{TeX:s}=Ce();return e.jsxs("div",{className:"graph-settings",children:[e.jsxs("div",{className:"perseus-widget-row",children:[e.jsx(s,{children:"X(t) ="})," ",e.jsx(r,{value:this.props.x,onChange:this.change("x")})]}),e.jsxs("div",{className:"perseus-widget-row",children:[e.jsx(s,{children:"Y(t) ="})," ",e.jsx(r,{value:this.props.y,onChange:this.change("y")})]}),e.jsxs("div",{className:"perseus-widget-row",children:["Range: ",e.jsx(s,{children:"\\Large("}),e.jsx(r,{value:this.props.rangeMin,onChange:this.change("rangeMin")}),e.jsx(s,{children:","})," ",e.jsx(r,{value:this.props.rangeMax,onChange:this.change("rangeMax")}),e.jsx(s,{children:"\\Large)"})]}),e.jsx("div",{className:"perseus-widget-row",children:e.jsx(h,{value:this.props.color,onChange:this.change("color")})}),e.jsx("div",{className:"perseus-widget-row",children:e.jsx(f,{value:this.props.strokeDasharray,onChange:this.change("strokeDasharray")})}),e.jsx("div",{className:"perseus-widget-row",children:e.jsxs("div",{className:"perseus-widget-left-col",children:["Width:"," ",e.jsx(Ne,{value:this.props.strokeWidth,placeholder:2,onChange:this.change("strokeWidth")})]})})]})}};z.defaultProps={x:"cos(t)",y:"sin(t)",rangeMin:"0",rangeMax:"2\\pi",color:o.BLUE,strokeDasharray:"",strokeWidth:2};let k=z;k.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"ParametricEditor",props:{x:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"cos(t)"',computed:!1}},y:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"sin(t)"',computed:!1}},rangeMin:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},rangeMax:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"2\\\\pi"',computed:!1}},color:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"color.blue",computed:!0}},strokeDasharray:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},strokeWidth:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"2",computed:!1}}}};const{getDependencies:ke}=m,G=class G extends p.Component{constructor(){super(...arguments),this.change=(...s)=>u.apply(this,s),this.serialize=()=>g.serialize.call(this)}render(){const{TeX:s}=ke();return e.jsxs("div",{className:"graph-settings",children:[e.jsxs("div",{className:"perseus-widget-row",children:["Coordinate: ",e.jsx(s,{children:"\\Large("}),e.jsx(r,{value:this.props.coordX,onChange:this.change("coordX")}),e.jsx(s,{children:","})," ",e.jsx(r,{value:this.props.coordY,onChange:this.change("coordY")}),e.jsx(s,{children:"\\Large)"})]}),e.jsx("div",{className:"perseus-widget-row",children:e.jsx(h,{value:this.props.color,onChange:this.change("color")})})]})}};G.defaultProps={coordX:"0",coordY:"0",color:o.BLACK};let T=G;T.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PointEditor",props:{coordX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},coordY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},color:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"black"',computed:!1}}}};const{getDependencies:Te}=m,F=class F extends p.Component{constructor(){super(...arguments),this.change=(...s)=>u.apply(this,s),this.serialize=()=>g.serialize.call(this)}render(){const{TeX:s}=Te();return e.jsxs("div",{className:"graph-settings",children:[e.jsxs("div",{className:"perseus-widget-row",children:["Bottom left: ",e.jsx(s,{children:"\\Large("}),e.jsx(r,{value:this.props.coordX,onChange:this.change("coordX")}),e.jsx(s,{children:","})," ",e.jsx(r,{value:this.props.coordY,onChange:this.change("coordY")}),e.jsx(s,{children:"\\Large)"})]}),e.jsxs("div",{className:"perseus-widget-row",children:["Width:"," ",e.jsx(r,{value:this.props.width,onChange:this.change("width")})]}),e.jsxs("div",{className:"perseus-widget-row",children:["Height:"," ",e.jsx(r,{value:this.props.height,onChange:this.change("height")})]}),e.jsx("div",{className:"perseus-widget-row",children:e.jsx(h,{value:this.props.color,lightColors:!0,onChange:this.change("color")})}),e.jsx("div",{className:"perseus-widget-row",children:"You want a border? Sorry, draw your own."})]})}};F.defaultProps={coordX:"-5",coordY:"5",width:"2",height:"3",color:o.LIGHT_BLUE};let q=F;q.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"RectangleEditor",props:{color:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"#9AB8ED"',computed:!1}},coordX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"-5"',computed:!1}},coordY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"5"',computed:!1}},height:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"3"',computed:!1}},width:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"2"',computed:!1}}}};const{getDependencies:qe}=m,{unescapeMathMode:Ve}=J,_e={graph:{box:[400,400],labels:["x","y"],range:[[-10,10],[-10,10]],tickStep:[1,1],gridStep:[1,1],markings:"graph"},elements:[]},S=class S extends p.Component{constructor(){super(...arguments),this.state={usedVarSubscripts:this._getAllVarSubscripts(this.props.elements),usedFunctionNames:this._getAllFunctionNames(this.props.elements)},this._updateGraphProps=s=>{this.change({graph:a.extend(a.omit(s,"step"),{tickStep:s.step})})},this._addNewElement=s=>{const t=s.target.value;if(t==="")return;s.target.value="";const n={type:t,key:t+"-"+(Math.random()*16777215<<0).toString(16),options:t==="point"?a.clone(T.defaultProps):t==="line"?a.clone(w.defaultProps):t==="movable-point"?a.clone(C.defaultProps):t==="movable-line"?a.clone(N.defaultProps):t==="function"?a.clone(y.defaultProps):t==="parametric"?a.clone(k.defaultProps):t==="label"?a.clone(j.defaultProps):t==="rectangle"?a.clone(q.defaultProps):{}};let l;if(t==="movable-point")l=a.max([a.max(this.state.usedVarSubscripts),-1])+1,n.options.varSubscript=l;else if(t==="movable-line")l=a.max([a.max(this.state.usedVarSubscripts),-1])+1,n.options.startSubscript=l,n.options.endSubscript=l+1;else if(t==="function"){const i=String.fromCharCode(a.max([a.max(a.map(this.state.usedFunctionNames,function(x){return x.charCodeAt(0)})),101])+1);n.options.funcName=i}this.change({elements:this.props.elements.concat(n)})},this._deleteElement=s=>{const t=this.props.elements[s];this.change({elements:a.without(this.props.elements,t)})},this._moveElementUp=s=>{const t=this.props.elements[s],n=a.without(this.props.elements,t);n.splice(s-1,0,t),this.change({elements:n})},this._moveElementDown=s=>{const t=this.props.elements[s],n=a.without(this.props.elements,t);n.splice(s+1,0,t),this.change({elements:n})},this.change=(...s)=>u.apply(this,s),this.serialize=()=>g.serialize.call(this)}UNSAFE_componentWillReceiveProps(s){this.setState({usedVarSubscripts:this._getAllVarSubscripts(s.elements),usedFunctionNames:this._getAllFunctionNames(s.elements)})}_getAllVarSubscripts(s){return a.map(a.where(s,{type:"movable-point"}),t=>t.options.varSubscript).concat(a.map(a.where(s,{type:"movable-line"}),t=>t.options.startSubscript)).concat(a.map(a.where(s,{type:"movable-line"}),t=>t.options.endSubscript))}_getAllFunctionNames(s){return a.map(a.where(s,{type:"function"}),t=>t.options.funcName)}render(){const{TeX:s}=qe();return e.jsxs("div",{className:"perseus-widget-interaction-editor",children:[e.jsxs(d,{title:"Grid settings",children:[e.jsx(H,{editableSettings:["canvas","graph"],box:this.props.graph.box,labels:this.props.graph.labels,range:this.props.graph.range,step:this.props.graph.tickStep,gridStep:this.props.graph.gridStep,markings:this.props.graph.markings,onChange:this._updateGraphProps}),e.jsx(e.Fragment,{children:this.props.graph.valid!==!0&&e.jsx("div",{children:this.props.graph.valid})})]}),a.map(this.props.elements,function(t,n){if(t.type==="movable-point")return e.jsx(d,{title:e.jsxs("span",{children:["Movable point"," ",e.jsx(s,{children:"(x_{"+t.options.varSubscript+"}, y_{"+t.options.varSubscript+"})"})]}),onUp:n===0?null:this._moveElementUp.bind(this,n),onDown:n===this.props.elements.length-1?null:this._moveElementDown.bind(this,n),onDelete:this._deleteElement.bind(this,n),children:e.jsx(C,{...t.options,onChange:l=>{const i=JSON.parse(JSON.stringify(this.props.elements));a.extend(i[n].options,l),this.change({elements:i})}})},t.key);if(t.type==="movable-line")return e.jsx(d,{title:e.jsxs("span",{children:["Movable line"," ",e.jsx(s,{children:"(x_{"+t.options.startSubscript+"}, y_{"+t.options.startSubscript+"})"})," ","to"," ",e.jsx(s,{children:"(x_{"+t.options.endSubscript+"}, y_{"+t.options.endSubscript+"})"})]}),onUp:n===0?null:this._moveElementUp.bind(this,n),onDown:n===this.props.elements.length-1?null:this._moveElementDown.bind(this,n),onDelete:this._deleteElement.bind(this,n),children:e.jsx(N,{...t.options,onChange:l=>{const i=JSON.parse(JSON.stringify(this.props.elements));a.extend(i[n].options,l),this.change({elements:i})}})},t.key);if(t.type==="point")return e.jsx(d,{title:e.jsxs("span",{children:["Point"," ",e.jsx(s,{children:"("+t.options.coordX+", "+t.options.coordY+")"})]}),onUp:n===0?null:this._moveElementUp.bind(this,n),onDown:n===this.props.elements.length-1?null:this._moveElementDown.bind(this,n),onDelete:this._deleteElement.bind(this,n),children:e.jsx(T,{...t.options,onChange:l=>{const i=JSON.parse(JSON.stringify(this.props.elements));a.extend(i[n].options,l),this.change({elements:i})}})},t.key);if(t.type==="line")return e.jsx(d,{title:e.jsxs("span",{children:["Line"," ",e.jsx(s,{children:"("+t.options.startX+", "+t.options.startY+")"})," ","to"," ",e.jsx(s,{children:"("+t.options.endX+", "+t.options.endY+")"})]}),onUp:n===0?null:this._moveElementUp.bind(this,n),onDown:n===this.props.elements.length-1?null:this._moveElementDown.bind(this,n),onDelete:this._deleteElement.bind(this,n),children:e.jsx(w,{...t.options,onChange:l=>{const i=JSON.parse(JSON.stringify(this.props.elements));a.extend(i[n].options,l),this.change({elements:i})}})},t.key);if(t.type==="function")return e.jsx(d,{title:e.jsxs("span",{children:["Function"," ",e.jsx(s,{children:t.options.funcName+"(x) = "+t.options.value})]}),onUp:n===0?null:this._moveElementUp.bind(this,n),onDown:n===this.props.elements.length-1?null:this._moveElementDown.bind(this,n),onDelete:this._deleteElement,children:e.jsx(y,{...t.options,onChange:l=>{const i=JSON.parse(JSON.stringify(this.props.elements));a.extend(i[n].options,l),this.change({elements:i})}})},t.key);if(t.type==="parametric")return e.jsx(d,{title:e.jsx("span",{children:"Parametric"}),onUp:n===0?null:this._moveElementUp.bind(this,n),onDown:n===this.props.elements.length-1?null:this._moveElementDown.bind(this,n),onDelete:this._deleteElement,children:e.jsx(k,{...t.options,onChange:l=>{const i=JSON.parse(JSON.stringify(this.props.elements));a.extend(i[n].options,l),this.change({elements:i})}})},t.key);if(t.type==="label")return e.jsx(d,{title:e.jsxs("span",{children:["Label"," ",e.jsx(s,{children:Ve(t.options.label)})," "]}),onUp:n===0?null:this._moveElementUp.bind(this,n),onDown:n===this.props.elements.length-1?null:this._moveElementDown.bind(this,n),onDelete:this._deleteElement,children:e.jsx(j,{...t.options,onChange:l=>{const i=JSON.parse(JSON.stringify(this.props.elements));a.extend(i[n].options,l),this.change({elements:i})}})},t.key);if(t.type==="rectangle")return e.jsx(d,{title:e.jsxs("span",{children:["Rectangle"," ",e.jsx(s,{children:"("+t.options.coordX+", "+t.options.coordY+")"})," — ",e.jsx(s,{children:t.options.width+" \\times "+t.options.height})]}),onUp:n===0?null:this._moveElementUp.bind(this,n),onDown:n===this.props.elements.length-1?null:this._moveElementDown.bind(this,n),onDelete:this._deleteElement,children:e.jsx(q,{...t.options,onChange:l=>{const i=JSON.parse(JSON.stringify(this.props.elements));a.extend(i[n].options,l),this.change({elements:i})}})},t.key)},this),e.jsx("div",{className:"perseus-widget-interaction-editor-select-element",children:e.jsxs("select",{onChange:this._addNewElement,children:[e.jsxs("option",{value:"",children:["Add an element","…"]}),e.jsx("option",{disabled:!0,children:"--"}),e.jsx("option",{value:"point",children:"Point"}),e.jsx("option",{value:"line",children:"Line segment"}),e.jsx("option",{value:"function",children:"Function plot"}),e.jsx("option",{value:"parametric",children:"Parametric plot"}),e.jsx("option",{value:"label",children:"Label"}),e.jsx("option",{value:"rectangle",children:"Rectangle"}),e.jsx("option",{value:"movable-point",children:"★ Movable point"}),e.jsx("option",{value:"movable-line",children:"★ Movable line segment"})]})})]})}};S.widgetName="interaction",S.defaultProps=_e;let R=S;R.__docgenInfo={description:"",methods:[{name:"_getAllVarSubscripts",docblock:null,modifiers:[],params:[{name:"elements",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:{type:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray"}}},{name:"_getAllFunctionNames",docblock:null,modifiers:[],params:[{name:"elements",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:{type:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"}}},{name:"_updateGraphProps",docblock:null,modifiers:[],params:[{name:"newProps",optional:!1,type:null}],returns:null},{name:"_addNewElement",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"_deleteElement",docblock:null,modifiers:[],params:[{name:"index",optional:!1,type:null}],returns:null},{name:"_moveElementUp",docblock:null,modifiers:[],params:[{name:"index",optional:!1,type:null}],returns:null},{name:"_moveElementDown",docblock:null,modifiers:[],params:[{name:"index",optional:!1,type:null}],returns:null},{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"InteractionEditor",props:{elements:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[]",computed:!1}},graph:{required:!1,tsType:{name:"signature",type:"object",raw:`{ box: ReadonlyArray; diff --git a/assets/interaction-editor.stories-1OB9q-H2.js b/assets/interaction-editor.stories-Y4YBc0me.js similarity index 76% rename from assets/interaction-editor.stories-1OB9q-H2.js rename to assets/interaction-editor.stories-Y4YBc0me.js index e972af4428..3887349573 100644 --- a/assets/interaction-editor.stories-1OB9q-H2.js +++ b/assets/interaction-editor.stories-Y4YBc0me.js @@ -1,4 +1,4 @@ -import{j as l}from"./jsx-runtime-63Ea5SlK.js";import{r as o}from"./index-6oxdNXpR.js";import{I as h}from"./interaction-editor-2twq2tps.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./editor-jsonify-g-bIiSIM.js";import"./graph-settings-XR_siz2q.js";import"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";import"./icon-paths-EoBkHOLI.js";const mr={title:"PerseusEditor/Widgets/Interaction Editor"},t=d=>{const[e,n]=o.useState(),[s,a]=o.useState();function c(r){r.graph&&a(r.graph),r.elements&&n(r.elements)}return l.jsx(h,{onChange:c,elements:e,graph:s})};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,m,p;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as l}from"./jsx-runtime-63Ea5SlK.js";import{r as o}from"./index-6oxdNXpR.js";import{I as h}from"./interaction-editor-vi9RcfEM.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./editor-jsonify-mta12v4L.js";import"./graph-settings-Pvhg8t7C.js";import"./components-ODdjt0Ld.js";import"./index-k-0mNqHS.js";import"./icon-paths-EoBkHOLI.js";const mr={title:"PerseusEditor/Widgets/Interaction Editor"},t=d=>{const[e,n]=o.useState(),[s,a]=o.useState();function c(r){r.graph&&a(r.graph),r.elements&&n(r.elements)}return l.jsx(h,{onChange:c,elements:e,graph:s})};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,m,p;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const [elements, setElements] = useState(); const [graph, setGraph] = useState(); function handleChange(next) { diff --git a/assets/interaction.stories-X8tMbqkb.js b/assets/interaction.stories-rG49YZGO.js similarity index 86% rename from assets/interaction.stories-X8tMbqkb.js rename to assets/interaction.stories-rG49YZGO.js index 31db9f1bcd..c3256404cb 100644 --- a/assets/interaction.stories-X8tMbqkb.js +++ b/assets/interaction.stories-rG49YZGO.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-63Ea5SlK.js";import{R as a}from"./renderer-with-debug-ui-75hBDQJk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const p={content:`Drag the dot all the way to the right. +import{j as i}from"./jsx-runtime-63Ea5SlK.js";import{R as a}from"./renderer-with-debug-ui-Jq91P-PK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const p={content:`Drag the dot all the way to the right. [[☃ interaction 1]] diff --git a/assets/interactive-graph-editor-V9iZpszK.js b/assets/interactive-graph-editor-QsKBcTl_.js similarity index 99% rename from assets/interactive-graph-editor-V9iZpszK.js rename to assets/interactive-graph-editor-QsKBcTl_.js index 40bb3cb679..a02680b33d 100644 --- a/assets/interactive-graph-editor-V9iZpszK.js +++ b/assets/interactive-graph-editor-QsKBcTl_.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{U as pe}from"./util-AYeX86gl.js";import{l as ve,s as we,e as Ue}from"./svg-image-7aOK05RI.js";import{g as fe,f as ke,h as qe,i as Te,j as Ae,k as Re,n as Ce,o as xe,q as Oe,r as He,s as Ke}from"./article-renderer-mU-6RWLp.js";import{_ as C}from"./jquery-yG1GhClm.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import{m as Be,n as Xe}from"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import{c as Qe}from"./components-ODdjt0Ld.js";import{i as Ye}from"./constants-iPV6vHZm.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import{w as je}from"./index-J2t_5nK1.js";import{i as y}from"./tiny-invariant-bHgPayXn.js";import"./index-smZ6iCr_.js";import{V as d}from"./index-0DbkllkJ.js";import{S as x,O as m}from"./answer-choices-lVeJkx-U.js";import{T as Ze,a as Je,C as S}from"./index-V5gl6frG.js";import{s as i,c,a as H}from"./index-deFLJwr4.js";import{c as Ne,f as D,L as h,a as K,b as F}from"./index-18qWGOW7.js";import{l as f}from"./index-awljIyHI.js";import{r as P}from"./index-6oxdNXpR.js";import{H as B}from"./heading-1izW0-GJ.js";import{S as g}from"./index-nqMmpXbO.js";import{L as A,I as er}from"./interactive-graph-settings-fIfU8SU6.js";import{L as rr}from"./locked-figures-section-9mKuroas.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import{B as nr}from"./choice-Xr-SKHrB.js";import{C as b,P as tr}from"./locked-label-settings-lVE0HwhW.js";import{S as ar}from"./scrollless-number-text-field-d5PK69vy.js";const G="unlimited",Pe=n=>{const r=parseInt(n,10);return isNaN(r)||r===0?G:r},Ie=({numPoints:n=1,onChange:r})=>e.jsx(x,{selectedValue:`${n}`,onChange:t=>{r(Pe(t))},placeholder:"",style:ir.singleSelectShort,children:[...[...Array(7).keys()].map(t=>e.jsx(m,{value:`${t}`,label:`${t} point${t>1?"s":""}`},t)),e.jsx(m,{value:G,label:"unlimited"},"unlimited")]}),ir=f.StyleSheet.create({singleSelectShort:{height:26}});Ie.__docgenInfo={description:"",methods:[],displayName:"GraphPointsCountSelector",props:{numPoints:{required:!1,tsType:{name:"union",raw:"number | typeof UNLIMITED",elements:[{name:"number"},{name:"UNLIMITED"}]},description:"",defaultValue:{value:"1",computed:!1}},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(points: PointValue) => void",signature:{arguments:[{type:{name:"union",raw:"number | typeof UNLIMITED",elements:[{name:"number"},{name:"UNLIMITED"}]},name:"points"}],return:{name:"void"}}},description:""}}};const We=n=>e.jsxs(x,{selectedValue:n.graphType,onChange:n.onChange,placeholder:"Select an answer type",style:sr.singleSelectShort,children:[n.showNoneOption&&e.jsx(m,{value:"none",label:"None"}),e.jsx(m,{value:"linear",label:"Linear function"}),e.jsx(m,{value:"quadratic",label:"Quadratic function"}),e.jsx(m,{value:"sinusoid",label:"Sinusoid function"}),e.jsx(m,{value:"circle",label:"Circle"}),e.jsx(m,{value:"point",label:"Point(s)"}),e.jsx(m,{value:"linear-system",label:"Linear System"}),e.jsx(m,{value:"polygon",label:"Polygon"}),e.jsx(m,{value:"segment",label:"Line Segment(s)"}),e.jsx(m,{value:"ray",label:"Ray"}),e.jsx(m,{value:"angle",label:"Angle"})]}),sr=f.StyleSheet.create({singleSelectShort:{height:26}});We.__docgenInfo={description:"",methods:[],displayName:"GraphTypeSelector",props:{graphType:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newGraphType: string) => void",signature:{arguments:[{type:{name:"string"},name:"newGraphType"}],return:{name:"void"}}},description:""},showNoneOption:{required:!0,tsType:{name:"boolean"},description:""}}};function Le(n){return e.jsxs(e.Fragment,{children:[e.jsx(B,{title:"Correct Answer",isOpen:!0,isCollapsible:!1}),e.jsxs(d,{children:[e.jsxs(d,{children:[e.jsx(Ne,{style:{paddingTop:i.xxSmall_6,paddingBottom:i.xxSmall_6,color:c.offBlack64},children:"Graph the correct answer in the graph below and ensure the equation or point coordinates displayed represent the correct answer."}),e.jsx(D,{style:{fontSize:12,backgroundColor:"#eee",paddingInline:i.xxSmall_6,borderColor:"#ccc",borderStyle:"solid",borderWidth:1},children:n.equationString})]}),n.children]})]})}Le.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphCorrectAnswer",props:{equationString:{required:!0,tsType:{name:"string"},description:""},children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""}}};function Ee(n){const{ariaLabelValue:r,ariaDescriptionValue:t,onChange:a}=n,[s,u]=P.useState(!0);return e.jsxs(e.Fragment,{children:[e.jsx(B,{title:"Description",isCollapsible:!0,isOpen:s,onToggle:u}),s&&e.jsxs(d,{children:[e.jsx(Ne,{style:M.caption,children:"Use these fields to describe the graph as a whole. These are used by screen readers to describe content to users who may be visually impaired."}),e.jsxs(h,{tag:"label",children:["Title",e.jsx(Ze,{value:r,onChange:l=>a({fullGraphAriaLabel:l||void 0}),style:M.spaceAbove})]}),e.jsx(g,{size:i.small_12}),e.jsxs(h,{tag:"label",children:["Description",e.jsx(Je,{rows:8,resizeType:"vertical",value:t,onChange:l=>a({fullGraphAriaDescription:l||void 0}),style:M.spaceAbove})]})]})]})}const M=f.StyleSheet.create({caption:{color:c.offBlack64,paddingTop:i.xxSmall_6,paddingBottom:i.xxSmall_6},spaceAbove:{marginTop:i.xxxSmall_4}});Ee.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphDescription",props:{ariaLabelValue:{required:!0,tsType:{name:"string"},description:""},ariaDescriptionValue:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(graphProps: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"signature",type:"object",raw:`{ +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{U as pe}from"./util-AYeX86gl.js";import{l as ve,s as we,e as Ue}from"./svg-image-7aOK05RI.js";import{g as fe,f as ke,h as qe,i as Te,j as Ae,k as Re,n as Ce,o as xe,q as Oe,r as He,s as Ke}from"./article-renderer-HEYBK15c.js";import{_ as C}from"./jquery-yG1GhClm.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import{m as Be,n as Xe}from"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c as Qe}from"./components-ODdjt0Ld.js";import{i as Ye}from"./constants-iPV6vHZm.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import{w as je}from"./index-J2t_5nK1.js";import{i as y}from"./tiny-invariant-bHgPayXn.js";import"./index-smZ6iCr_.js";import{V as d}from"./index-0DbkllkJ.js";import{S as x,O as m}from"./answer-choices-iyIz6W_C.js";import{T as Ze,a as Je,C as S}from"./index-V5gl6frG.js";import{s as i,c,a as H}from"./index-deFLJwr4.js";import{c as Ne,f as D,L as h,a as K,b as F}from"./index-18qWGOW7.js";import{l as f}from"./index-awljIyHI.js";import{r as P}from"./index-6oxdNXpR.js";import{H as B}from"./heading-1izW0-GJ.js";import{S as g}from"./index-nqMmpXbO.js";import{L as A,I as er}from"./interactive-graph-settings-o74Mjg6d.js";import{L as rr}from"./locked-figures-section-w9TBjDc-.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import{B as nr}from"./choice-Xr-SKHrB.js";import{C as b,P as tr}from"./locked-label-settings-CnylHQl6.js";import{S as ar}from"./scrollless-number-text-field-d5PK69vy.js";const G="unlimited",Pe=n=>{const r=parseInt(n,10);return isNaN(r)||r===0?G:r},Ie=({numPoints:n=1,onChange:r})=>e.jsx(x,{selectedValue:`${n}`,onChange:t=>{r(Pe(t))},placeholder:"",style:ir.singleSelectShort,children:[...[...Array(7).keys()].map(t=>e.jsx(m,{value:`${t}`,label:`${t} point${t>1?"s":""}`},t)),e.jsx(m,{value:G,label:"unlimited"},"unlimited")]}),ir=f.StyleSheet.create({singleSelectShort:{height:26}});Ie.__docgenInfo={description:"",methods:[],displayName:"GraphPointsCountSelector",props:{numPoints:{required:!1,tsType:{name:"union",raw:"number | typeof UNLIMITED",elements:[{name:"number"},{name:"UNLIMITED"}]},description:"",defaultValue:{value:"1",computed:!1}},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(points: PointValue) => void",signature:{arguments:[{type:{name:"union",raw:"number | typeof UNLIMITED",elements:[{name:"number"},{name:"UNLIMITED"}]},name:"points"}],return:{name:"void"}}},description:""}}};const We=n=>e.jsxs(x,{selectedValue:n.graphType,onChange:n.onChange,placeholder:"Select an answer type",style:sr.singleSelectShort,children:[n.showNoneOption&&e.jsx(m,{value:"none",label:"None"}),e.jsx(m,{value:"linear",label:"Linear function"}),e.jsx(m,{value:"quadratic",label:"Quadratic function"}),e.jsx(m,{value:"sinusoid",label:"Sinusoid function"}),e.jsx(m,{value:"circle",label:"Circle"}),e.jsx(m,{value:"point",label:"Point(s)"}),e.jsx(m,{value:"linear-system",label:"Linear System"}),e.jsx(m,{value:"polygon",label:"Polygon"}),e.jsx(m,{value:"segment",label:"Line Segment(s)"}),e.jsx(m,{value:"ray",label:"Ray"}),e.jsx(m,{value:"angle",label:"Angle"})]}),sr=f.StyleSheet.create({singleSelectShort:{height:26}});We.__docgenInfo={description:"",methods:[],displayName:"GraphTypeSelector",props:{graphType:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newGraphType: string) => void",signature:{arguments:[{type:{name:"string"},name:"newGraphType"}],return:{name:"void"}}},description:""},showNoneOption:{required:!0,tsType:{name:"boolean"},description:""}}};function Le(n){return e.jsxs(e.Fragment,{children:[e.jsx(B,{title:"Correct Answer",isOpen:!0,isCollapsible:!1}),e.jsxs(d,{children:[e.jsxs(d,{children:[e.jsx(Ne,{style:{paddingTop:i.xxSmall_6,paddingBottom:i.xxSmall_6,color:c.offBlack64},children:"Graph the correct answer in the graph below and ensure the equation or point coordinates displayed represent the correct answer."}),e.jsx(D,{style:{fontSize:12,backgroundColor:"#eee",paddingInline:i.xxSmall_6,borderColor:"#ccc",borderStyle:"solid",borderWidth:1},children:n.equationString})]}),n.children]})]})}Le.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphCorrectAnswer",props:{equationString:{required:!0,tsType:{name:"string"},description:""},children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""}}};function Ee(n){const{ariaLabelValue:r,ariaDescriptionValue:t,onChange:a}=n,[s,u]=P.useState(!0);return e.jsxs(e.Fragment,{children:[e.jsx(B,{title:"Description",isCollapsible:!0,isOpen:s,onToggle:u}),s&&e.jsxs(d,{children:[e.jsx(Ne,{style:M.caption,children:"Use these fields to describe the graph as a whole. These are used by screen readers to describe content to users who may be visually impaired."}),e.jsxs(h,{tag:"label",children:["Title",e.jsx(Ze,{value:r,onChange:l=>a({fullGraphAriaLabel:l||void 0}),style:M.spaceAbove})]}),e.jsx(g,{size:i.small_12}),e.jsxs(h,{tag:"label",children:["Description",e.jsx(Je,{rows:8,resizeType:"vertical",value:t,onChange:l=>a({fullGraphAriaDescription:l||void 0}),style:M.spaceAbove})]})]})]})}const M=f.StyleSheet.create({caption:{color:c.offBlack64,paddingTop:i.xxSmall_6,paddingBottom:i.xxSmall_6},spaceAbove:{marginTop:i.xxxSmall_4}});Ee.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphDescription",props:{ariaLabelValue:{required:!0,tsType:{name:"string"},description:""},ariaDescriptionValue:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(graphProps: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"signature",type:"object",raw:`{ apiOptions: APIOptionsWithDefaults; /** diff --git a/assets/interactive-graph-editor.stories-4wVPSUex.js b/assets/interactive-graph-editor.stories-C2oWFjPa.js similarity index 87% rename from assets/interactive-graph-editor.stories-4wVPSUex.js rename to assets/interactive-graph-editor.stories-C2oWFjPa.js index aa061b0ec2..96a8992774 100644 --- a/assets/interactive-graph-editor.stories-4wVPSUex.js +++ b/assets/interactive-graph-editor.stories-C2oWFjPa.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{V as x}from"./index-0DbkllkJ.js";import{S as lt}from"./index-nqMmpXbO.js";import{s as l,c as j}from"./index-deFLJwr4.js";import{L as ct,B as pt}from"./index-18qWGOW7.js";import{a as dt}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{l as mt}from"./index-awljIyHI.js";import{r as s}from"./index-6oxdNXpR.js";import"./index-g-xpLRq1.js";import{i as ut}from"./interactive-graph-question-builder-VBdpjz9Z.js";import{i as ft,s as gt,a as ht,l as bt,b as kt,r as vt,c as St,q as Wt,d as yt,p as Lt,e as Pt,f as Rt,g as r}from"./interactive-graph.testdata--LRl7_OC.js";import{r as It}from"./register-all-widgets-and-editors-for-testing-HGbBhRa9.js";import{E as t}from"./editor-page-with-storybook-preview-22ofiVWH.js";import{f as a}from"./flags-for-api-options-vLhDDii2.js";import{E as wt}from"./editor-page-efCZNuFo.js";import"./v4-yQnnJER4.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./version-akiLXZts.js";import"./article-editor-orbYQOKG.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./device-framer-MUDr0WgQ.js";import"./constants-p_UgHLsb.js";import"./section-control-button-qbKF8qYC.js";import"./index-wzSCRJFK.js";import"./editor-Mb85oHy5.js";import"./icon-paths-EoBkHOLI.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";import"./viewport-resizer-N8YtwzDx.js";import"./index-0C4KXdeC.js";import"./structured-item-diff-6NTcZ_YG.js";import"./text-diff-hxgOd6zs.js";import"./tags-diff-KJiz71cu.js";import"./multi-items-SEqLFgxB.js";/* empty css */import"./graph-settings-XR_siz2q.js";import"./categorizer-editor-d30-cizN.js";import"./editor-jsonify-g-bIiSIM.js";import"./blur-input-6j4bgLwx.js";import"./definition-editor-_ZvvsZ3f.js";import"./dropdown-editor-ueJJ3t0p.js";import"./explanation-editor-mExrX7IC.js";import"./expression-editor-2aE8aBV7.js";import"./image-editor-npChmNVJ.js";import"./input-number-editor-97qMf_gS.js";import"./interaction-editor-2twq2tps.js";import"./interactive-graph-editor-V9iZpszK.js";import"./heading-1izW0-GJ.js";import"./interactive-graph-settings-fIfU8SU6.js";import"./locked-figures-section-9mKuroas.js";import"./locked-ellipse-settings-_hRNhR9E.js";import"./locked-figure-aria-wRg9cB39.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-lVE0HwhW.js";import"./color-select-4NqU465A.js";import"./util-x8Ikjhfh.js";import"./line-stroke-select-Kn8DFI_S.js";import"./locked-function-settings--UMM0ipk.js";import"./line-swatch-qqHDCIz5.js";import"./locked-line-settings-0UTK3Vo6.js";import"./locked-point-settings-HQeaTYKF.js";import"./labeled-switch-7da7Bmzh.js";import"./locked-polygon-settings-1jqOktRr.js";import"./locked-vector-settings-1A9eQa19.js";import"./label-image-editor-1k_zX52x.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-dMU0zCzM.js";import"./behavior-kOGaXMua.js";import"./question-markers-VcHdxP49.js";import"./marker-qF2kRuTF.js";import"./select-image--icrHv9d.js";import"./matcher-editor-rnK8ooee.js";import"./number-line-editor-KKCgA0P-.js";import"./numeric-input-editor-sonkoQhn.js";import"./phet-simulation-editor-33ykehAu.js";import"./python-program-editor-0ms7DDAR.js";import"./editor-k9_TKmQw.js";import"./sorter-editor-MkK3kay8.js";import"./item-extras-editor-jXytEuhg.js";It();const Ma={title:"PerseusEditor/Widgets/Interactive Graph"},Et=dt("onChange"),c=()=>e.jsx(t,{question:ft}),p=()=>e.jsx(t,{question:gt}),d=()=>e.jsx(t,{question:ht}),m=()=>e.jsx(t,{question:bt}),u=()=>e.jsx(t,{question:kt}),f=()=>e.jsx(t,{question:vt}),g=()=>e.jsx(t,{question:St}),h=()=>e.jsx(t,{question:Wt}),b=()=>e.jsx(t,{question:yt}),k=()=>e.jsx(t,{question:Lt}),v=()=>e.jsx(t,{question:Pt}),S=()=>e.jsx(t,{question:Rt}),W=()=>e.jsx(t,{question:ut().withNoInteractiveFigure().addLockedFunction("5*sin(x)",{color:"red"}).build()}),i=()=>e.jsx(t,{apiOptions:{isMobile:!1,flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!1,"locked-figures-aria":!1,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r});i.parameters={chromatic:{disableSnapshot:!0}};const y=()=>e.jsx(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r}),L=()=>e.jsx(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!0,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r}),P=()=>e.jsx(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!0,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r}),R=()=>e.jsx(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!0,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r}),I=()=>e.jsx(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!0,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r}),w=()=>e.jsx(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!0,"locked-function-labels":!1}}},question:r}),E=()=>e.jsx(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!0}}},question:r}),q=()=>e.jsx(t,{question:r}),n=()=>{const[Ke,Xe]=s.useState("phone"),[Ze,et]=s.useState(!1),[tt,ot]=s.useState(),[M,rt]=s.useState(r),[G,at]=s.useState(),[st,it]=s.useState([]),_=s.useRef(null);return s.useEffect(()=>{if(_.current){const o=_.current.getSaveWarnings();it(o)}},[_,M,G]),e.jsxs(x,{style:F.container,children:[e.jsx(wt,{ref:_,apiOptions:{isMobile:!1,flags:a},previewDevice:Ke,onPreviewDeviceChange:o=>Xe(o),developerMode:!0,jsonMode:Ze,answerArea:tt,question:M,hints:G,frameSource:"about:blank",previewURL:"about:blank",itemId:"1",onChange:o=>{Et(o),"jsonMode"in o&&et(o.jsonMode),"answerArea"in o&&ot(o.answerArea),"question"in o&&rt(o.question),"hints"in o&&at(o.hints)}}),e.jsxs(x,{style:F.errorContainer,children:[e.jsx(ct,{children:"Save Warnings:"}),e.jsx(lt,{size:l.small_12}),st.map((o,nt)=>e.jsx(pt,{style:F.errorMessage,children:o},nt))]})]})};n.parameters={chromatic:{disableSnapshot:!0}};const F=mt.StyleSheet.create({container:{flexDirection:"row"},errorContainer:{border:`1px solid ${j.offBlack}`,padding:l.medium_16,flexGrow:1,marginRight:l.xLarge_32,height:"80vh",position:"sticky",top:l.xLarge_32,overflowY:"auto"},errorMessage:{color:j.red,marginBottom:l.small_12}});c.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphWithAriaLabel"};p.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphSegment"};d.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphSegments"};m.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphLinear"};u.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphLinearSystem"};f.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphRay"};g.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphCircle"};h.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphQuadratic"};b.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphSinusoid"};k.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphPoint"};v.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphPolygon"};S.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphAngle"};W.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphNone"};i.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedFiguresCurrent"};y.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedLabelsFlag"};L.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedPointLabelsFlag"};P.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedLineLabelsFlag"};R.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedVectorLabelsFlag"};I.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedEllipseLabelsFlag"};w.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedPolygonLabelsFlag"};E.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedFunctionLabelsFlag"};q.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedFigureLabelsAllFlags"};n.__docgenInfo={description:"",methods:[],displayName:"WithSaveWarnings"};var C,A,Q;c.parameters={...c.parameters,docs:{...(C=c.parameters)==null?void 0:C.docs,source:{originalSource:"(): React.ReactElement => ",...(Q=(A=c.parameters)==null?void 0:A.docs)==null?void 0:Q.source}}};var N,O,D;p.parameters={...p.parameters,docs:{...(N=p.parameters)==null?void 0:N.docs,source:{originalSource:`(): React.ReactElement => { +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{V as x}from"./index-0DbkllkJ.js";import{S as lt}from"./index-nqMmpXbO.js";import{s as l,c as j}from"./index-deFLJwr4.js";import{L as ct,B as pt}from"./index-18qWGOW7.js";import{a as dt}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{l as mt}from"./index-awljIyHI.js";import{r as s}from"./index-6oxdNXpR.js";import"./index-JuByCDUQ.js";import{i as ut}from"./interactive-graph-question-builder-VBdpjz9Z.js";import{i as ft,s as gt,a as ht,l as bt,b as kt,r as vt,c as St,q as Wt,d as yt,p as Lt,e as Pt,f as Rt,g as r}from"./interactive-graph.testdata--LRl7_OC.js";import{r as It}from"./register-all-widgets-and-editors-for-testing-mH_Pw9e8.js";import{E as t}from"./editor-page-with-storybook-preview-51pCZMkq.js";import{f as a}from"./flags-for-api-options-1Jz-ky5t.js";import{E as wt}from"./editor-page-rccauWVG.js";import"./v4-yQnnJER4.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./version-akiLXZts.js";import"./article-editor-4hdZsISp.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./device-framer-MUDr0WgQ.js";import"./constants-p_UgHLsb.js";import"./section-control-button-XMME9ave.js";import"./index-wzSCRJFK.js";import"./editor-Gp3Qu6_d.js";import"./icon-paths-EoBkHOLI.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";import"./viewport-resizer-mN7DSD_Q.js";import"./index-k-0mNqHS.js";import"./structured-item-diff-OBWOWslJ.js";import"./text-diff-2EvPqq-b.js";import"./tags-diff-wQ4taY12.js";import"./multi-items-TymZv1Bp.js";/* empty css */import"./graph-settings-Pvhg8t7C.js";import"./categorizer-editor-Ux-cs6do.js";import"./editor-jsonify-mta12v4L.js";import"./blur-input-6j4bgLwx.js";import"./definition-editor-j1sWsdkj.js";import"./dropdown-editor-BFRSuUKm.js";import"./explanation-editor-dSBU1vwr.js";import"./expression-editor-UY7aPIQ1.js";import"./image-editor-vZOaSvdJ.js";import"./input-number-editor-Zo4idrK9.js";import"./interaction-editor-vi9RcfEM.js";import"./interactive-graph-editor-QsKBcTl_.js";import"./heading-1izW0-GJ.js";import"./interactive-graph-settings-o74Mjg6d.js";import"./locked-figures-section-w9TBjDc-.js";import"./locked-ellipse-settings-Y_UkseIl.js";import"./locked-figure-aria-1k3pfy3U.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-CnylHQl6.js";import"./color-select-javI8CkK.js";import"./util-ZotWJxjO.js";import"./line-stroke-select-H15MLZYg.js";import"./locked-function-settings-FK0x4ZxG.js";import"./line-swatch-9TD4hiwz.js";import"./locked-line-settings-JSySSneX.js";import"./locked-point-settings-q-YHpFjG.js";import"./labeled-switch-_gGF8eh_.js";import"./locked-polygon-settings-U6JpAVC_.js";import"./locked-vector-settings-UVt2s9by.js";import"./label-image-editor-p_uxNi67.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-mpHXtu7D.js";import"./behavior-XUZDhvN-.js";import"./question-markers-vke3EOoD.js";import"./marker-l6CMdFr_.js";import"./select-image-ajCB5YeG.js";import"./matcher-editor-S8mz5e0T.js";import"./number-line-editor-eS_UHnpw.js";import"./numeric-input-editor-SLlVbwKu.js";import"./phet-simulation-editor-O5PngvYE.js";import"./python-program-editor-2M-li2KT.js";import"./editor-l5TJAcwO.js";import"./sorter-editor-AVkKlgrO.js";import"./item-extras-editor-z7TuJtsi.js";It();const Ma={title:"PerseusEditor/Widgets/Interactive Graph"},Et=dt("onChange"),c=()=>e.jsx(t,{question:ft}),p=()=>e.jsx(t,{question:gt}),d=()=>e.jsx(t,{question:ht}),m=()=>e.jsx(t,{question:bt}),u=()=>e.jsx(t,{question:kt}),f=()=>e.jsx(t,{question:vt}),g=()=>e.jsx(t,{question:St}),h=()=>e.jsx(t,{question:Wt}),b=()=>e.jsx(t,{question:yt}),k=()=>e.jsx(t,{question:Lt}),v=()=>e.jsx(t,{question:Pt}),S=()=>e.jsx(t,{question:Rt}),W=()=>e.jsx(t,{question:ut().withNoInteractiveFigure().addLockedFunction("5*sin(x)",{color:"red"}).build()}),i=()=>e.jsx(t,{apiOptions:{isMobile:!1,flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!1,"locked-figures-aria":!1,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r});i.parameters={chromatic:{disableSnapshot:!0}};const y=()=>e.jsx(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r}),L=()=>e.jsx(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!0,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r}),P=()=>e.jsx(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!0,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r}),R=()=>e.jsx(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!0,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r}),I=()=>e.jsx(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!0,"locked-polygon-labels":!1,"locked-function-labels":!1}}},question:r}),w=()=>e.jsx(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!0,"locked-function-labels":!1}}},question:r}),E=()=>e.jsx(t,{apiOptions:{flags:{mafs:{...a.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-polygon-labels":!1,"locked-function-labels":!0}}},question:r}),q=()=>e.jsx(t,{question:r}),n=()=>{const[Ke,Xe]=s.useState("phone"),[Ze,et]=s.useState(!1),[tt,ot]=s.useState(),[M,rt]=s.useState(r),[G,at]=s.useState(),[st,it]=s.useState([]),_=s.useRef(null);return s.useEffect(()=>{if(_.current){const o=_.current.getSaveWarnings();it(o)}},[_,M,G]),e.jsxs(x,{style:F.container,children:[e.jsx(wt,{ref:_,apiOptions:{isMobile:!1,flags:a},previewDevice:Ke,onPreviewDeviceChange:o=>Xe(o),developerMode:!0,jsonMode:Ze,answerArea:tt,question:M,hints:G,frameSource:"about:blank",previewURL:"about:blank",itemId:"1",onChange:o=>{Et(o),"jsonMode"in o&&et(o.jsonMode),"answerArea"in o&&ot(o.answerArea),"question"in o&&rt(o.question),"hints"in o&&at(o.hints)}}),e.jsxs(x,{style:F.errorContainer,children:[e.jsx(ct,{children:"Save Warnings:"}),e.jsx(lt,{size:l.small_12}),st.map((o,nt)=>e.jsx(pt,{style:F.errorMessage,children:o},nt))]})]})};n.parameters={chromatic:{disableSnapshot:!0}};const F=mt.StyleSheet.create({container:{flexDirection:"row"},errorContainer:{border:`1px solid ${j.offBlack}`,padding:l.medium_16,flexGrow:1,marginRight:l.xLarge_32,height:"80vh",position:"sticky",top:l.xLarge_32,overflowY:"auto"},errorMessage:{color:j.red,marginBottom:l.small_12}});c.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphWithAriaLabel"};p.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphSegment"};d.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphSegments"};m.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphLinear"};u.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphLinearSystem"};f.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphRay"};g.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphCircle"};h.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphQuadratic"};b.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphSinusoid"};k.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphPoint"};v.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphPolygon"};S.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphAngle"};W.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphNone"};i.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedFiguresCurrent"};y.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedLabelsFlag"};L.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedPointLabelsFlag"};P.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedLineLabelsFlag"};R.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedVectorLabelsFlag"};I.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedEllipseLabelsFlag"};w.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedPolygonLabelsFlag"};E.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedFunctionLabelsFlag"};q.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedFigureLabelsAllFlags"};n.__docgenInfo={description:"",methods:[],displayName:"WithSaveWarnings"};var C,A,Q;c.parameters={...c.parameters,docs:{...(C=c.parameters)==null?void 0:C.docs,source:{originalSource:"(): React.ReactElement => ",...(Q=(A=c.parameters)==null?void 0:A.docs)==null?void 0:Q.source}}};var N,O,D;p.parameters={...p.parameters,docs:{...(N=p.parameters)==null?void 0:N.docs,source:{originalSource:`(): React.ReactElement => { return ; }`,...(D=(O=p.parameters)==null?void 0:O.docs)==null?void 0:D.source}}};var V,B,H;d.parameters={...d.parameters,docs:{...(V=d.parameters)==null?void 0:V.docs,source:{originalSource:`(): React.ReactElement => { return ; diff --git a/assets/interactive-graph-editor.stories-9GkgOBVY.js b/assets/interactive-graph-editor.stories-fjd06S1W.js similarity index 85% rename from assets/interactive-graph-editor.stories-9GkgOBVY.js rename to assets/interactive-graph-editor.stories-fjd06S1W.js index c54f1b52d8..524592ba74 100644 --- a/assets/interactive-graph-editor.stories-9GkgOBVY.js +++ b/assets/interactive-graph-editor.stories-fjd06S1W.js @@ -1,4 +1,4 @@ -import{j as X}from"./jsx-runtime-63Ea5SlK.js";import{a as Y}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{r as Z}from"./index-6oxdNXpR.js";import{a as $}from"./flags-for-api-options-vLhDDii2.js";import{I as oo}from"./interactive-graph-editor-V9iZpszK.js";import{g as ro}from"./util-x8Ikjhfh.js";import"./v4-yQnnJER4.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./heading-1izW0-GJ.js";import"./index-wzSCRJFK.js";import"./toggleable-caret-YFS5vs4O.js";import"./interactive-graph-settings-fIfU8SU6.js";import"./locked-figures-section-9mKuroas.js";import"./locked-ellipse-settings-_hRNhR9E.js";import"./locked-figure-aria-wRg9cB39.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-lVE0HwhW.js";import"./color-select-4NqU465A.js";import"./line-stroke-select-Kn8DFI_S.js";import"./locked-function-settings--UMM0ipk.js";import"./line-swatch-qqHDCIz5.js";import"./locked-line-settings-0UTK3Vo6.js";import"./locked-point-settings-HQeaTYKF.js";import"./labeled-switch-7da7Bmzh.js";import"./locked-polygon-settings-1jqOktRr.js";import"./locked-vector-settings-1A9eQa19.js";const t={apiOptions:$,graph:{type:"segment"},correct:{type:"segment"}},o=ro("point"),dt={title:"PerseusEditor/Widgets/Interactive Graph Editor",component:oo,args:{box:[3e3,3e3],gridStep:[1,1],labels:["x","y"],markings:"graph",range:[[-10,10],[-10,10]],rulerLabel:"",rulerTicks:10,showProtractor:!1,showRuler:!1,showTooltips:!1,snapStep:[1,1],step:[1,1],onChange:Y("onChange")},argTypes:{lockedFigures:{table:{readonly:!0}}}};function r(q,z){const B=(N,Q)=>({...N,...Q}),[J,K]=Z.useReducer(B,z);return X.jsx(q,{...J,onChange:K})}const a={},p={decorators:[r]},e={args:t,decorators:[r]},n={args:{...t,graph:{type:"polygon"},correct:{type:"polygon",numSides:4,showAngles:!0,showSides:!0,snapTo:"angles"}},decorators:[r]},i={args:{...t,lockedFigures:[{...o,coord:[1,1]},{...o,coord:[-1,-1]}]},decorators:[r]},s={args:{...t,lockedFigures:[{type:"line",kind:"line",points:[{...o,coord:[0,2]},{...o,coord:[2,3]}],color:"green",lineStyle:"solid",showPoint1:!1,showPoint2:!1},{type:"line",kind:"ray",points:[{...o,color:"pink",coord:[0,0]},{...o,color:"pink",coord:[4,2]}],color:"pink",lineStyle:"solid",showPoint1:!0,showPoint2:!1},{type:"line",kind:"segment",points:[{...o,color:"grayH",coord:[0,-2]},{...o,color:"grayH",coord:[4,0]}],color:"grayH",lineStyle:"solid",showPoint1:!0,showPoint2:!0}]},decorators:[r]},c={args:{...t,lockedFigures:[{type:"ellipse",center:[0,0],radius:[5,2],angle:0,color:"green",fillStyle:"translucent",strokeStyle:"solid"}]},decorators:[r]},m={args:{...t,lockedFigures:[{type:"polygon",points:[[-9,4],[-6,4],[-6,1],[-9,1]],color:"green",fillStyle:"translucent",strokeStyle:"solid",showVertices:!0}]},decorators:[r]};var l,d,u;a.parameters={...a.parameters,docs:{...(l=a.parameters)==null?void 0:l.docs,source:{originalSource:"{}",...(u=(d=a.parameters)==null?void 0:d.docs)==null?void 0:u.source}}};var g,h,f;p.parameters={...p.parameters,docs:{...(g=p.parameters)==null?void 0:g.docs,source:{originalSource:`{ +import{j as X}from"./jsx-runtime-63Ea5SlK.js";import{a as Y}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{r as Z}from"./index-6oxdNXpR.js";import{a as $}from"./flags-for-api-options-1Jz-ky5t.js";import{I as oo}from"./interactive-graph-editor-QsKBcTl_.js";import{g as ro}from"./util-ZotWJxjO.js";import"./v4-yQnnJER4.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./heading-1izW0-GJ.js";import"./index-wzSCRJFK.js";import"./toggleable-caret-YFS5vs4O.js";import"./interactive-graph-settings-o74Mjg6d.js";import"./locked-figures-section-w9TBjDc-.js";import"./locked-ellipse-settings-Y_UkseIl.js";import"./locked-figure-aria-1k3pfy3U.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-CnylHQl6.js";import"./color-select-javI8CkK.js";import"./line-stroke-select-H15MLZYg.js";import"./locked-function-settings-FK0x4ZxG.js";import"./line-swatch-9TD4hiwz.js";import"./locked-line-settings-JSySSneX.js";import"./locked-point-settings-q-YHpFjG.js";import"./labeled-switch-_gGF8eh_.js";import"./locked-polygon-settings-U6JpAVC_.js";import"./locked-vector-settings-UVt2s9by.js";const t={apiOptions:$,graph:{type:"segment"},correct:{type:"segment"}},o=ro("point"),dt={title:"PerseusEditor/Widgets/Interactive Graph Editor",component:oo,args:{box:[3e3,3e3],gridStep:[1,1],labels:["x","y"],markings:"graph",range:[[-10,10],[-10,10]],rulerLabel:"",rulerTicks:10,showProtractor:!1,showRuler:!1,showTooltips:!1,snapStep:[1,1],step:[1,1],onChange:Y("onChange")},argTypes:{lockedFigures:{table:{readonly:!0}}}};function r(q,z){const B=(N,Q)=>({...N,...Q}),[J,K]=Z.useReducer(B,z);return X.jsx(q,{...J,onChange:K})}const a={},p={decorators:[r]},e={args:t,decorators:[r]},n={args:{...t,graph:{type:"polygon"},correct:{type:"polygon",numSides:4,showAngles:!0,showSides:!0,snapTo:"angles"}},decorators:[r]},i={args:{...t,lockedFigures:[{...o,coord:[1,1]},{...o,coord:[-1,-1]}]},decorators:[r]},s={args:{...t,lockedFigures:[{type:"line",kind:"line",points:[{...o,coord:[0,2]},{...o,coord:[2,3]}],color:"green",lineStyle:"solid",showPoint1:!1,showPoint2:!1},{type:"line",kind:"ray",points:[{...o,color:"pink",coord:[0,0]},{...o,color:"pink",coord:[4,2]}],color:"pink",lineStyle:"solid",showPoint1:!0,showPoint2:!1},{type:"line",kind:"segment",points:[{...o,color:"grayH",coord:[0,-2]},{...o,color:"grayH",coord:[4,0]}],color:"grayH",lineStyle:"solid",showPoint1:!0,showPoint2:!0}]},decorators:[r]},c={args:{...t,lockedFigures:[{type:"ellipse",center:[0,0],radius:[5,2],angle:0,color:"green",fillStyle:"translucent",strokeStyle:"solid"}]},decorators:[r]},m={args:{...t,lockedFigures:[{type:"polygon",points:[[-9,4],[-6,4],[-6,1],[-9,1]],color:"green",fillStyle:"translucent",strokeStyle:"solid",showVertices:!0}]},decorators:[r]};var l,d,u;a.parameters={...a.parameters,docs:{...(l=a.parameters)==null?void 0:l.docs,source:{originalSource:"{}",...(u=(d=a.parameters)==null?void 0:d.docs)==null?void 0:u.source}}};var g,h,f;p.parameters={...p.parameters,docs:{...(g=p.parameters)==null?void 0:g.docs,source:{originalSource:`{ decorators: [StatefulDecorator] }`,...(f=(h=p.parameters)==null?void 0:h.docs)==null?void 0:f.source}}};var y,k,P,S,w;e.parameters={...e.parameters,docs:{...(y=e.parameters)==null?void 0:y.docs,source:{originalSource:`{ args: mafsOptions, diff --git a/assets/interactive-graph-regression.stories-foaf21Mz.js b/assets/interactive-graph-regression.stories-ONWW-4pw.js similarity index 99% rename from assets/interactive-graph-regression.stories-foaf21Mz.js rename to assets/interactive-graph-regression.stories-ONWW-4pw.js index 2a55601f21..079689c6d5 100644 --- a/assets/interactive-graph-regression.stories-foaf21Mz.js +++ b/assets/interactive-graph-regression.stories-ONWW-4pw.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{R as is}from"./renderer-1DxKQj1_.js";import{m as os}from"./i18n-context-fsWEgybQ.js";import{i as t}from"./interactive-graph-question-builder-VBdpjz9Z.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./index-9gkyvru-.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./index-awljIyHI.js";import"./index-0DbkllkJ.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";const Fs={title:"Perseus/Widgets/Interactive Graph Visual Regression Tests"},a=s=>e.jsx(r,{question:t().withAxisLabels("\\text{Custom $x$ label}","\\text{Custom $y$ label}").build()}),i=s=>e.jsx(r,{question:t().withGridStep(2.571,3.123).build()}),o=s=>e.jsx(r,{question:t().withTickStep(1.5,1.5).build()}),n=s=>e.jsx(r,{question:t().withMarkings("grid").build()}),c=s=>e.jsx(r,{question:t().withMarkings("none").build()}),d=s=>e.jsx(r,{question:t().withXRange(-2,2).withYRange(-2,2).build()}),u=s=>e.jsx(r,{question:t().withXRange(-50,50).withYRange(-50,50).build()}),m=s=>e.jsx(e.Fragment,{children:e.jsx(r,{question:t().withXRange(0,20).addLockedLine([1,1],[5,2]).build()})}),p=s=>e.jsx(e.Fragment,{children:e.jsx(r,{question:t().withXRange(-1,20).addLockedLine([1,1],[5,2]).build()})}),g=s=>e.jsx(e.Fragment,{children:e.jsx(r,{question:t().withXRange(-3,20).addLockedLine([1,1],[5,2]).build()})}),l=s=>e.jsx(r,{question:t().withXRange(1,20).build()}),h=s=>e.jsx(r,{question:t().withXRange(6,20).build()}),f=s=>e.jsx(r,{question:t().withXRange(-20,0).build()}),R=s=>e.jsx(r,{question:t().withXRange(-20,-1).build()}),M=s=>e.jsx(r,{question:t().withYRange(0,20).build()}),A=s=>e.jsx(r,{question:t().withYRange(-1,20).build()}),x=s=>e.jsx(r,{question:t().withYRange(1,20).build()}),W=s=>e.jsx(e.Fragment,{children:e.jsx(r,{question:t().withYRange(-3,20).addLockedLine([-3,2],[5,16]).build()})}),S=s=>e.jsx(r,{question:t().withYRange(-20,0).build()}),b=s=>e.jsx(r,{question:t().withYRange(-20,-1).build()}),L=s=>e.jsx("div",{className:"framework-perseus perseus-mobile",children:e.jsx(r,{question:t().build()})}),w=s=>e.jsx(r,{question:t().withSegments({numSegments:3}).build()}),q=s=>e.jsx("div",{className:"framework-perseus perseus-mobile",children:e.jsx(r,{question:t().withCircle().withXRange(-10,10).withYRange(-5,5).build()})}),_=s=>e.jsx(r,{question:t().addLockedLine([-3,-3],[3,3]).withXRange(-5,5).withYRange(-10,10).build()}),y=s=>e.jsx(r,{question:t().addLockedPointAt(3,2).addLockedPointAt(-1,1).addLockedPointAt(0,-4).build()}),Q=s=>e.jsx(r,{question:t().addLockedLine([-1,1],[2,3]).build()}),N=s=>e.jsx(r,{question:t().withProtractor().build()});function r(s){const{question:k}=s;return e.jsx(is,{strings:os,content:k.content,widgets:k.widgets,images:k.images,apiOptions:{flags:{mafs:{segment:!0,circle:!0,linear:!0}}}})}a.__docgenInfo={description:"",methods:[],displayName:"MafsWithCustomAxisLabels"};i.__docgenInfo={description:"",methods:[],displayName:"MafsWithFractionalGridStep"};o.__docgenInfo={description:"",methods:[],displayName:"MafsWithFractionalAxisTicks"};n.__docgenInfo={description:"",methods:[],displayName:"MafsWithGridMarkings"};c.__docgenInfo={description:"",methods:[],displayName:"MafsWithNoMarkings"};d.__docgenInfo={description:"",methods:[],displayName:"MafsWithSmallRange"};u.__docgenInfo={description:"",methods:[],displayName:"MafsWithLargeRange"};m.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisAtLeft"};p.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisNearLeft"};g.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisJustOverLeft"};l.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisOffLeft"};h.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisOffFarLeft"};f.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisAtRight"};R.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisOffRight"};M.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisAtBottom"};A.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisNearBottom"};x.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisOffBottom"};W.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisJustOverBottom"};S.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisAtTop"};b.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisOffTop"};L.__docgenInfo={description:"",methods:[],displayName:"MafsInMobileContainer"};w.__docgenInfo={description:"",methods:[],displayName:"MafsWithMultipleSegments"};q.__docgenInfo={description:"",methods:[],displayName:"MafsCircleGraphWithNonsquareRange"};_.__docgenInfo={description:"",methods:[],displayName:"MafsLineGraphWithNonsquareRange"};y.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedPoints"};Q.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedLine"};N.__docgenInfo={description:"",methods:[],displayName:"MafsWithProtractor"};var G,v,Y;a.parameters={...a.parameters,docs:{...(G=a.parameters)==null?void 0:G.docs,source:{originalSource:'(args: StoryArgs): React.ReactElement => ',...(Y=(v=a.parameters)==null?void 0:v.docs)==null?void 0:Y.source}}};var B,X,j;i.parameters={...i.parameters,docs:{...(B=i.parameters)==null?void 0:B.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(j=(X=i.parameters)==null?void 0:X.docs)==null?void 0:j.source}}};var I,E,O;o.parameters={...o.parameters,docs:{...(I=o.parameters)==null?void 0:I.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(O=(E=o.parameters)==null?void 0:E.docs)==null?void 0:O.source}}};var C,P,F;n.parameters={...n.parameters,docs:{...(C=n.parameters)==null?void 0:C.docs,source:{originalSource:'(args: StoryArgs): React.ReactElement => ',...(F=(P=n.parameters)==null?void 0:P.docs)==null?void 0:F.source}}};var T,$,J;c.parameters={...c.parameters,docs:{...(T=c.parameters)==null?void 0:T.docs,source:{originalSource:'(args: StoryArgs): React.ReactElement => ',...(J=($=c.parameters)==null?void 0:$.docs)==null?void 0:J.source}}};var V,z,D;d.parameters={...d.parameters,docs:{...(V=d.parameters)==null?void 0:V.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(D=(z=d.parameters)==null?void 0:z.docs)==null?void 0:D.source}}};var H,K,U;u.parameters={...u.parameters,docs:{...(H=u.parameters)==null?void 0:H.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(U=(K=u.parameters)==null?void 0:K.docs)==null?void 0:U.source}}};var Z,ee,se;m.parameters={...m.parameters,docs:{...(Z=m.parameters)==null?void 0:Z.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => <> +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{R as is}from"./renderer-L37a98D_.js";import{m as os}from"./i18n-context-fsWEgybQ.js";import{i as t}from"./interactive-graph-question-builder-VBdpjz9Z.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./index-9gkyvru-.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./index-awljIyHI.js";import"./index-0DbkllkJ.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";const Fs={title:"Perseus/Widgets/Interactive Graph Visual Regression Tests"},a=s=>e.jsx(r,{question:t().withAxisLabels("\\text{Custom $x$ label}","\\text{Custom $y$ label}").build()}),i=s=>e.jsx(r,{question:t().withGridStep(2.571,3.123).build()}),o=s=>e.jsx(r,{question:t().withTickStep(1.5,1.5).build()}),n=s=>e.jsx(r,{question:t().withMarkings("grid").build()}),c=s=>e.jsx(r,{question:t().withMarkings("none").build()}),d=s=>e.jsx(r,{question:t().withXRange(-2,2).withYRange(-2,2).build()}),u=s=>e.jsx(r,{question:t().withXRange(-50,50).withYRange(-50,50).build()}),m=s=>e.jsx(e.Fragment,{children:e.jsx(r,{question:t().withXRange(0,20).addLockedLine([1,1],[5,2]).build()})}),p=s=>e.jsx(e.Fragment,{children:e.jsx(r,{question:t().withXRange(-1,20).addLockedLine([1,1],[5,2]).build()})}),g=s=>e.jsx(e.Fragment,{children:e.jsx(r,{question:t().withXRange(-3,20).addLockedLine([1,1],[5,2]).build()})}),l=s=>e.jsx(r,{question:t().withXRange(1,20).build()}),h=s=>e.jsx(r,{question:t().withXRange(6,20).build()}),f=s=>e.jsx(r,{question:t().withXRange(-20,0).build()}),R=s=>e.jsx(r,{question:t().withXRange(-20,-1).build()}),M=s=>e.jsx(r,{question:t().withYRange(0,20).build()}),A=s=>e.jsx(r,{question:t().withYRange(-1,20).build()}),x=s=>e.jsx(r,{question:t().withYRange(1,20).build()}),W=s=>e.jsx(e.Fragment,{children:e.jsx(r,{question:t().withYRange(-3,20).addLockedLine([-3,2],[5,16]).build()})}),S=s=>e.jsx(r,{question:t().withYRange(-20,0).build()}),b=s=>e.jsx(r,{question:t().withYRange(-20,-1).build()}),L=s=>e.jsx("div",{className:"framework-perseus perseus-mobile",children:e.jsx(r,{question:t().build()})}),w=s=>e.jsx(r,{question:t().withSegments({numSegments:3}).build()}),q=s=>e.jsx("div",{className:"framework-perseus perseus-mobile",children:e.jsx(r,{question:t().withCircle().withXRange(-10,10).withYRange(-5,5).build()})}),_=s=>e.jsx(r,{question:t().addLockedLine([-3,-3],[3,3]).withXRange(-5,5).withYRange(-10,10).build()}),y=s=>e.jsx(r,{question:t().addLockedPointAt(3,2).addLockedPointAt(-1,1).addLockedPointAt(0,-4).build()}),Q=s=>e.jsx(r,{question:t().addLockedLine([-1,1],[2,3]).build()}),N=s=>e.jsx(r,{question:t().withProtractor().build()});function r(s){const{question:k}=s;return e.jsx(is,{strings:os,content:k.content,widgets:k.widgets,images:k.images,apiOptions:{flags:{mafs:{segment:!0,circle:!0,linear:!0}}}})}a.__docgenInfo={description:"",methods:[],displayName:"MafsWithCustomAxisLabels"};i.__docgenInfo={description:"",methods:[],displayName:"MafsWithFractionalGridStep"};o.__docgenInfo={description:"",methods:[],displayName:"MafsWithFractionalAxisTicks"};n.__docgenInfo={description:"",methods:[],displayName:"MafsWithGridMarkings"};c.__docgenInfo={description:"",methods:[],displayName:"MafsWithNoMarkings"};d.__docgenInfo={description:"",methods:[],displayName:"MafsWithSmallRange"};u.__docgenInfo={description:"",methods:[],displayName:"MafsWithLargeRange"};m.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisAtLeft"};p.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisNearLeft"};g.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisJustOverLeft"};l.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisOffLeft"};h.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisOffFarLeft"};f.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisAtRight"};R.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisOffRight"};M.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisAtBottom"};A.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisNearBottom"};x.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisOffBottom"};W.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisJustOverBottom"};S.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisAtTop"};b.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisOffTop"};L.__docgenInfo={description:"",methods:[],displayName:"MafsInMobileContainer"};w.__docgenInfo={description:"",methods:[],displayName:"MafsWithMultipleSegments"};q.__docgenInfo={description:"",methods:[],displayName:"MafsCircleGraphWithNonsquareRange"};_.__docgenInfo={description:"",methods:[],displayName:"MafsLineGraphWithNonsquareRange"};y.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedPoints"};Q.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedLine"};N.__docgenInfo={description:"",methods:[],displayName:"MafsWithProtractor"};var G,v,Y;a.parameters={...a.parameters,docs:{...(G=a.parameters)==null?void 0:G.docs,source:{originalSource:'(args: StoryArgs): React.ReactElement => ',...(Y=(v=a.parameters)==null?void 0:v.docs)==null?void 0:Y.source}}};var B,X,j;i.parameters={...i.parameters,docs:{...(B=i.parameters)==null?void 0:B.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(j=(X=i.parameters)==null?void 0:X.docs)==null?void 0:j.source}}};var I,E,O;o.parameters={...o.parameters,docs:{...(I=o.parameters)==null?void 0:I.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(O=(E=o.parameters)==null?void 0:E.docs)==null?void 0:O.source}}};var C,P,F;n.parameters={...n.parameters,docs:{...(C=n.parameters)==null?void 0:C.docs,source:{originalSource:'(args: StoryArgs): React.ReactElement => ',...(F=(P=n.parameters)==null?void 0:P.docs)==null?void 0:F.source}}};var T,$,J;c.parameters={...c.parameters,docs:{...(T=c.parameters)==null?void 0:T.docs,source:{originalSource:'(args: StoryArgs): React.ReactElement => ',...(J=($=c.parameters)==null?void 0:$.docs)==null?void 0:J.source}}};var V,z,D;d.parameters={...d.parameters,docs:{...(V=d.parameters)==null?void 0:V.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(D=(z=d.parameters)==null?void 0:z.docs)==null?void 0:D.source}}};var H,K,U;u.parameters={...u.parameters,docs:{...(H=u.parameters)==null?void 0:H.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(U=(K=u.parameters)==null?void 0:K.docs)==null?void 0:U.source}}};var Z,ee,se;m.parameters={...m.parameters,docs:{...(Z=m.parameters)==null?void 0:Z.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => <> `,...(se=(ee=m.parameters)==null?void 0:ee.docs)==null?void 0:se.source}}};var te,re,ae;p.parameters={...p.parameters,docs:{...(te=p.parameters)==null?void 0:te.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => <> diff --git a/assets/interactive-graph-settings-fIfU8SU6.js b/assets/interactive-graph-settings-o74Mjg6d.js similarity index 98% rename from assets/interactive-graph-settings-fIfU8SU6.js rename to assets/interactive-graph-settings-o74Mjg6d.js index 4fe6933f15..9ee715183e 100644 --- a/assets/interactive-graph-settings-fIfU8SU6.js +++ b/assets/interactive-graph-settings-o74Mjg6d.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{c as P}from"./article-renderer-mU-6RWLp.js";import{_ as o}from"./jquery-yG1GhClm.js";import{U as x}from"./util-AYeX86gl.js";import{B as E}from"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import{c as _}from"./components-ODdjt0Ld.js";import{i as j}from"./constants-iPV6vHZm.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{V as v}from"./index-0DbkllkJ.js";import{C as N}from"./index-V5gl6frG.js";import{s as m,c as q}from"./index-deFLJwr4.js";import{l as T}from"./index-awljIyHI.js";import{r as k}from"./index-6oxdNXpR.js";import{H as G}from"./heading-1izW0-GJ.js";import{b as I}from"./index-18qWGOW7.js";const h=y=>{const{children:n,label:e,labelSide:t="left",style:s}=y;return a.jsx("label",{className:T.css(w.label),children:a.jsxs(v,{style:[w.row,s],children:[t==="start"||a.jsx(I,{style:w.spaceEnd,children:e}),n,t==="end"&&a.jsx(I,{style:w.spaceStart,children:e})]})})},w=T.StyleSheet.create({label:{width:"fit-content"},row:{flexDirection:"row",marginTop:m.xSmall_8,alignItems:"center",width:"fit-content"},spaceStart:{marginInlineStart:m.xSmall_8},spaceEnd:{marginInlineEnd:m.xSmall_8}});h.__docgenInfo={description:"",methods:[],displayName:"LabeledRow",props:{id:{required:!1,tsType:{name:"string"},description:""},label:{required:!0,tsType:{name:"string"},description:""},labelSide:{required:!1,tsType:{name:"union",raw:'"start" | "end"',elements:[{name:"literal",value:'"start"'},{name:"literal",value:'"end"'}]},description:""},style:{required:!1,tsType:{name:"StyleType"},description:""},children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""}}};const{ButtonGroup:B,InfoTip:C,RangeInput:c}=_,z={url:null,width:0,height:0};function U(y,n){return Math.floor((y[1]-y[0])/n)}const f=class f extends k.Component{constructor(n){super(n),this._isMounted=!1,this.bgUrlRef=k.createRef(),this.labelXRef=k.createRef(),this.labelYRef=k.createRef(),this.change=(...e)=>P.apply(this,e),this.changeBackgroundUrl=e=>{var i;if(e.type==="keypress"&&e.key!=="Enter")return;const t=(u,l,r)=>{const p={...this.props.backgroundImage};p.url=u,p.width=l,p.height=r,this.setState({backgroundImage:p},this.changeGraph)},s=(i=this.bgUrlRef.current)==null?void 0:i.value;s?x.getImageSize(s,(u,l)=>{this._isMounted&&t(s,u,l)}):t(null,0,0)},this.renderLabelChoices=e=>e.map(t=>a.jsx("option",{value:t[1],children:t[0]},t[1])),this.validRange=e=>o.every(e,function(s){return o.isFinite(s)})?e[0]>=e[1]?"Range must have a higher number on the right":!0:"Range must be a valid number",this.validateStepValue=e=>{const{step:t,range:s,name:i,minTicks:u,maxTicks:l}=e,r=U(s,t);return rl?i+" is too small, there can be at most "+l+" ticks.":!0},this.validSnapStep=(e,t)=>this.validateStepValue({step:e,range:t,name:"Snap step",minTicks:5,maxTicks:60}),this.validGridStep=(e,t)=>this.validateStepValue({step:e,range:t,name:"Grid step",minTicks:3,maxTicks:60}),this.validStep=(e,t)=>this.validateStepValue({step:e,range:t,name:"Step",minTicks:3,maxTicks:20}),this.validBackgroundImageSize=e=>e.url?e.width<=450&&e.height<=450?!0:"Image must be smaller than 450px x 450px.":!0,this.validateGraphSettings=(e,t,s,i,u)=>{const l=this;let r;if(!o.every(e,function(d){return r=l.validRange(d),r===!0})||!o.every(t,function(d,g){return r=l.validStep(d,e[g]),r===!0})||!o.every(s,function(d,g){return r=l.validGridStep(d,e[g]),r===!0})||!o.every(i,function(d,g){return r=l.validSnapStep(d,e[g]),r===!0}))return r;const R=this.validBackgroundImageSize(u);return R!==!0?(r=R,r):!0},this.changeLabel=(e,t)=>{const s=t.target.value,i=this.state.labelsTextbox.slice();i[e]=s,this.setState({labelsTextbox:i},this.changeGraph)},this.changeRange=(e,t)=>{const s=this.state.rangeTextbox.slice();s[e]=t;const i=this.state.stepTextbox.slice(),u=this.state.gridStepTextbox.slice(),l=this.state.snapStepTextbox.slice(),r=x.scaleFromExtent(s[e],this.props.box[e]);if(this.validRange(s[e])===!0){i[e]=x.tickStepFromExtent(s[e],this.props.box[e]);const p=x.gridStepFromTickStep(i[e],r);p&&(u[e]=p),l[e]=u[e]/2}this.setState({stepTextbox:i,gridStepTextbox:u,snapStepTextbox:l,rangeTextbox:s},this.changeGraph)},this.changeStep=e=>{this.setState({stepTextbox:e},this.changeGraph)},this.changeSnapStep=e=>{this.setState({snapStepTextbox:e},this.changeGraph)},this.changeGridStep=e=>{this.setState({gridStepTextbox:e,snapStepTextbox:o.map(e,function(t){return t/2})},this.changeGraph)},this.changeGraph=()=>{const e=this.state.labelsTextbox,t=o.map(this.state.rangeTextbox,function(p){return o.map(p,Number)}),s=o.map(this.state.stepTextbox,Number),i=this.state.gridStepTextbox,u=this.state.snapStepTextbox,l=this.state.backgroundImage,r=this.validateGraphSettings(t,s,i,u,l);r===!0?this.change({valid:!0,labels:e,range:t,step:s,gridStep:i,snapStep:u,backgroundImage:l}):this.change({valid:r})},this.state={isExpanded:!0,...f.stateFromProps(n)}}static stateFromProps(n){return{labelsTextbox:n.labels,gridStepTextbox:n.gridStep,snapStepTextbox:n.snapStep,stepTextbox:n.step,rangeTextbox:n.range,backgroundImage:{...n.backgroundImage}}}componentDidMount(){this._isMounted=!0,this.changeGraph=o.debounce(this.changeGraph,300)}UNSAFE_componentWillReceiveProps(n){(!o.isEqual(this.props.labels,n.labels)||!o.isEqual(this.props.gridStep,n.gridStep)||!o.isEqual(this.props.snapStep,n.snapStep)||!o.isEqual(this.props.step,n.step)||!o.isEqual(this.props.range,n.range)||!o.isEqual(this.props.backgroundImage,n.backgroundImage))&&this.setState(f.stateFromProps(n))}componentWillUnmount(){this._isMounted=!1}render(){return a.jsxs(a.Fragment,{children:[a.jsx(G,{title:"Common Graph Settings",isOpen:this.state.isExpanded,isCollapsible:!0,onToggle:()=>this.setState({isExpanded:!this.state.isExpanded})}),this.state.isExpanded&&a.jsxs(v,{children:[a.jsxs("div",{className:"graph-settings",children:[a.jsxs("div",{className:"perseus-widget-row",children:[a.jsx("div",{className:"perseus-widget-left-col",children:a.jsx(h,{label:"x Label",children:a.jsx("input",{type:"text",className:"graph-settings-axis-label",ref:this.labelXRef,onChange:n=>this.changeLabel(0,n),value:this.state.labelsTextbox[0]||""})})}),a.jsx("div",{className:"perseus-widget-right-col",children:a.jsx(h,{label:"y Label",children:a.jsx("input",{type:"text",className:"graph-settings-axis-label",ref:this.labelYRef,onChange:n=>this.changeLabel(1,n),value:this.state.labelsTextbox[1]||""})})})]}),a.jsxs("div",{className:"perseus-widget-row",children:[a.jsx("div",{className:"perseus-widget-left-col",children:a.jsx(h,{label:"x Range",children:a.jsx(c,{value:this.state.rangeTextbox[0],onChange:n=>this.changeRange(0,n)})})}),a.jsx("div",{className:"perseus-widget-right-col",children:a.jsx(h,{label:"y Range",children:a.jsx(c,{value:this.state.rangeTextbox[1],onChange:n=>this.changeRange(1,n)})})})]}),a.jsxs("div",{className:"perseus-widget-row",children:[a.jsx("div",{className:"perseus-widget-left-col",children:a.jsx(h,{label:"Tick Step",children:a.jsx(c,{value:this.state.stepTextbox,onChange:this.changeStep})})}),a.jsx("div",{className:"perseus-widget-right-col",children:a.jsx(h,{label:"Grid Step",children:a.jsx(c,{value:this.state.gridStepTextbox,onChange:this.changeGridStep})})})]}),a.jsx("div",{className:"perseus-widget-row",children:a.jsx("div",{className:"perseus-widget-left-col",children:a.jsx(h,{label:"Snap Step",children:a.jsx(c,{value:this.state.snapStepTextbox,onChange:this.changeSnapStep})})})}),a.jsx("div",{className:"perseus-widget-row",children:a.jsx(h,{label:"Markings:",children:a.jsx(B,{value:this.props.markings,allowEmpty:!1,buttons:[{value:"graph",content:"Graph"},{value:"grid",content:"Grid"},{value:"none",content:"None"}],onChange:this.change("markings")})})}),a.jsx("div",{className:"perseus-widget-left-col",children:a.jsx(N,{label:"Show tooltips",checked:this.props.showTooltips,onChange:n=>{this.change({showTooltips:n})}})})]}),a.jsxs(h,{label:"Background image URL:",style:b.resetSpaceTop,children:[a.jsx("input",{type:"text",className:T.css(b.backgroundUrlInput),ref:this.bgUrlRef,value:this.state.backgroundImage.url||"",onChange:n=>{const e={...this.props.backgroundImage};e.url=n.target.value,this.setState({backgroundImage:e})},onKeyPress:this.changeBackgroundUrl,onBlur:this.changeBackgroundUrl}),a.jsx(C,{children:a.jsx("p",{children:'Create an image in graphie, or use the "Add image" function to create a background.'})})]}),a.jsxs(v,{style:b.protractorSection,children:[a.jsx(v,{style:b.checkboxRow,children:a.jsx(N,{label:"Show protractor",checked:this.props.showProtractor,onChange:n=>{this.change({showProtractor:n})},style:b.resetSpaceTop})}),this.props.showProtractor&&a.jsx(E,{layout:"floating",text:"The protractor is not accessible. Please consider an alternate approach.",kind:"warning"})]})]})]})}};f.defaultProps={box:[j.defaultBoxSizeSmall,j.defaultBoxSizeSmall],labels:["x","y"],range:[[-10,10],[-10,10]],step:[1,1],gridStep:[1,1],snapStep:[1,1],valid:!0,backgroundImage:z,markings:"graph",showProtractor:!1,showTooltips:!1};let S=f;const b=T.StyleSheet.create({resetSpaceTop:{marginTop:0},backgroundUrlInput:{border:`1px solid ${q.offBlack32}`,borderRadius:m.xxxSmall_4,padding:m.xxxSmall_4},checkboxRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:m.xSmall_8},protractorSection:{marginTop:m.xSmall_8,borderTop:`1px solid ${q.offBlack16}`,paddingTop:m.xSmall_8,paddingBottom:m.xSmall_8,borderBottom:`1px solid ${q.offBlack16}`}}),me=S;S.__docgenInfo={description:"",methods:[{name:"stateFromProps",docblock:null,modifiers:["static"],params:[{name:"props",optional:!1,type:{name:"signature",type:"object",raw:`{ +import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{c as P}from"./article-renderer-HEYBK15c.js";import{_ as o}from"./jquery-yG1GhClm.js";import{U as x}from"./util-AYeX86gl.js";import{B as E}from"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c as _}from"./components-ODdjt0Ld.js";import{i as j}from"./constants-iPV6vHZm.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{V as v}from"./index-0DbkllkJ.js";import{C as N}from"./index-V5gl6frG.js";import{s as m,c as q}from"./index-deFLJwr4.js";import{l as T}from"./index-awljIyHI.js";import{r as k}from"./index-6oxdNXpR.js";import{H as G}from"./heading-1izW0-GJ.js";import{b as I}from"./index-18qWGOW7.js";const h=y=>{const{children:n,label:e,labelSide:t="left",style:s}=y;return a.jsx("label",{className:T.css(w.label),children:a.jsxs(v,{style:[w.row,s],children:[t==="start"||a.jsx(I,{style:w.spaceEnd,children:e}),n,t==="end"&&a.jsx(I,{style:w.spaceStart,children:e})]})})},w=T.StyleSheet.create({label:{width:"fit-content"},row:{flexDirection:"row",marginTop:m.xSmall_8,alignItems:"center",width:"fit-content"},spaceStart:{marginInlineStart:m.xSmall_8},spaceEnd:{marginInlineEnd:m.xSmall_8}});h.__docgenInfo={description:"",methods:[],displayName:"LabeledRow",props:{id:{required:!1,tsType:{name:"string"},description:""},label:{required:!0,tsType:{name:"string"},description:""},labelSide:{required:!1,tsType:{name:"union",raw:'"start" | "end"',elements:[{name:"literal",value:'"start"'},{name:"literal",value:'"end"'}]},description:""},style:{required:!1,tsType:{name:"StyleType"},description:""},children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""}}};const{ButtonGroup:B,InfoTip:C,RangeInput:c}=_,z={url:null,width:0,height:0};function U(y,n){return Math.floor((y[1]-y[0])/n)}const f=class f extends k.Component{constructor(n){super(n),this._isMounted=!1,this.bgUrlRef=k.createRef(),this.labelXRef=k.createRef(),this.labelYRef=k.createRef(),this.change=(...e)=>P.apply(this,e),this.changeBackgroundUrl=e=>{var i;if(e.type==="keypress"&&e.key!=="Enter")return;const t=(u,l,r)=>{const p={...this.props.backgroundImage};p.url=u,p.width=l,p.height=r,this.setState({backgroundImage:p},this.changeGraph)},s=(i=this.bgUrlRef.current)==null?void 0:i.value;s?x.getImageSize(s,(u,l)=>{this._isMounted&&t(s,u,l)}):t(null,0,0)},this.renderLabelChoices=e=>e.map(t=>a.jsx("option",{value:t[1],children:t[0]},t[1])),this.validRange=e=>o.every(e,function(s){return o.isFinite(s)})?e[0]>=e[1]?"Range must have a higher number on the right":!0:"Range must be a valid number",this.validateStepValue=e=>{const{step:t,range:s,name:i,minTicks:u,maxTicks:l}=e,r=U(s,t);return rl?i+" is too small, there can be at most "+l+" ticks.":!0},this.validSnapStep=(e,t)=>this.validateStepValue({step:e,range:t,name:"Snap step",minTicks:5,maxTicks:60}),this.validGridStep=(e,t)=>this.validateStepValue({step:e,range:t,name:"Grid step",minTicks:3,maxTicks:60}),this.validStep=(e,t)=>this.validateStepValue({step:e,range:t,name:"Step",minTicks:3,maxTicks:20}),this.validBackgroundImageSize=e=>e.url?e.width<=450&&e.height<=450?!0:"Image must be smaller than 450px x 450px.":!0,this.validateGraphSettings=(e,t,s,i,u)=>{const l=this;let r;if(!o.every(e,function(d){return r=l.validRange(d),r===!0})||!o.every(t,function(d,g){return r=l.validStep(d,e[g]),r===!0})||!o.every(s,function(d,g){return r=l.validGridStep(d,e[g]),r===!0})||!o.every(i,function(d,g){return r=l.validSnapStep(d,e[g]),r===!0}))return r;const R=this.validBackgroundImageSize(u);return R!==!0?(r=R,r):!0},this.changeLabel=(e,t)=>{const s=t.target.value,i=this.state.labelsTextbox.slice();i[e]=s,this.setState({labelsTextbox:i},this.changeGraph)},this.changeRange=(e,t)=>{const s=this.state.rangeTextbox.slice();s[e]=t;const i=this.state.stepTextbox.slice(),u=this.state.gridStepTextbox.slice(),l=this.state.snapStepTextbox.slice(),r=x.scaleFromExtent(s[e],this.props.box[e]);if(this.validRange(s[e])===!0){i[e]=x.tickStepFromExtent(s[e],this.props.box[e]);const p=x.gridStepFromTickStep(i[e],r);p&&(u[e]=p),l[e]=u[e]/2}this.setState({stepTextbox:i,gridStepTextbox:u,snapStepTextbox:l,rangeTextbox:s},this.changeGraph)},this.changeStep=e=>{this.setState({stepTextbox:e},this.changeGraph)},this.changeSnapStep=e=>{this.setState({snapStepTextbox:e},this.changeGraph)},this.changeGridStep=e=>{this.setState({gridStepTextbox:e,snapStepTextbox:o.map(e,function(t){return t/2})},this.changeGraph)},this.changeGraph=()=>{const e=this.state.labelsTextbox,t=o.map(this.state.rangeTextbox,function(p){return o.map(p,Number)}),s=o.map(this.state.stepTextbox,Number),i=this.state.gridStepTextbox,u=this.state.snapStepTextbox,l=this.state.backgroundImage,r=this.validateGraphSettings(t,s,i,u,l);r===!0?this.change({valid:!0,labels:e,range:t,step:s,gridStep:i,snapStep:u,backgroundImage:l}):this.change({valid:r})},this.state={isExpanded:!0,...f.stateFromProps(n)}}static stateFromProps(n){return{labelsTextbox:n.labels,gridStepTextbox:n.gridStep,snapStepTextbox:n.snapStep,stepTextbox:n.step,rangeTextbox:n.range,backgroundImage:{...n.backgroundImage}}}componentDidMount(){this._isMounted=!0,this.changeGraph=o.debounce(this.changeGraph,300)}UNSAFE_componentWillReceiveProps(n){(!o.isEqual(this.props.labels,n.labels)||!o.isEqual(this.props.gridStep,n.gridStep)||!o.isEqual(this.props.snapStep,n.snapStep)||!o.isEqual(this.props.step,n.step)||!o.isEqual(this.props.range,n.range)||!o.isEqual(this.props.backgroundImage,n.backgroundImage))&&this.setState(f.stateFromProps(n))}componentWillUnmount(){this._isMounted=!1}render(){return a.jsxs(a.Fragment,{children:[a.jsx(G,{title:"Common Graph Settings",isOpen:this.state.isExpanded,isCollapsible:!0,onToggle:()=>this.setState({isExpanded:!this.state.isExpanded})}),this.state.isExpanded&&a.jsxs(v,{children:[a.jsxs("div",{className:"graph-settings",children:[a.jsxs("div",{className:"perseus-widget-row",children:[a.jsx("div",{className:"perseus-widget-left-col",children:a.jsx(h,{label:"x Label",children:a.jsx("input",{type:"text",className:"graph-settings-axis-label",ref:this.labelXRef,onChange:n=>this.changeLabel(0,n),value:this.state.labelsTextbox[0]||""})})}),a.jsx("div",{className:"perseus-widget-right-col",children:a.jsx(h,{label:"y Label",children:a.jsx("input",{type:"text",className:"graph-settings-axis-label",ref:this.labelYRef,onChange:n=>this.changeLabel(1,n),value:this.state.labelsTextbox[1]||""})})})]}),a.jsxs("div",{className:"perseus-widget-row",children:[a.jsx("div",{className:"perseus-widget-left-col",children:a.jsx(h,{label:"x Range",children:a.jsx(c,{value:this.state.rangeTextbox[0],onChange:n=>this.changeRange(0,n)})})}),a.jsx("div",{className:"perseus-widget-right-col",children:a.jsx(h,{label:"y Range",children:a.jsx(c,{value:this.state.rangeTextbox[1],onChange:n=>this.changeRange(1,n)})})})]}),a.jsxs("div",{className:"perseus-widget-row",children:[a.jsx("div",{className:"perseus-widget-left-col",children:a.jsx(h,{label:"Tick Step",children:a.jsx(c,{value:this.state.stepTextbox,onChange:this.changeStep})})}),a.jsx("div",{className:"perseus-widget-right-col",children:a.jsx(h,{label:"Grid Step",children:a.jsx(c,{value:this.state.gridStepTextbox,onChange:this.changeGridStep})})})]}),a.jsx("div",{className:"perseus-widget-row",children:a.jsx("div",{className:"perseus-widget-left-col",children:a.jsx(h,{label:"Snap Step",children:a.jsx(c,{value:this.state.snapStepTextbox,onChange:this.changeSnapStep})})})}),a.jsx("div",{className:"perseus-widget-row",children:a.jsx(h,{label:"Markings:",children:a.jsx(B,{value:this.props.markings,allowEmpty:!1,buttons:[{value:"graph",content:"Graph"},{value:"grid",content:"Grid"},{value:"none",content:"None"}],onChange:this.change("markings")})})}),a.jsx("div",{className:"perseus-widget-left-col",children:a.jsx(N,{label:"Show tooltips",checked:this.props.showTooltips,onChange:n=>{this.change({showTooltips:n})}})})]}),a.jsxs(h,{label:"Background image URL:",style:b.resetSpaceTop,children:[a.jsx("input",{type:"text",className:T.css(b.backgroundUrlInput),ref:this.bgUrlRef,value:this.state.backgroundImage.url||"",onChange:n=>{const e={...this.props.backgroundImage};e.url=n.target.value,this.setState({backgroundImage:e})},onKeyPress:this.changeBackgroundUrl,onBlur:this.changeBackgroundUrl}),a.jsx(C,{children:a.jsx("p",{children:'Create an image in graphie, or use the "Add image" function to create a background.'})})]}),a.jsxs(v,{style:b.protractorSection,children:[a.jsx(v,{style:b.checkboxRow,children:a.jsx(N,{label:"Show protractor",checked:this.props.showProtractor,onChange:n=>{this.change({showProtractor:n})},style:b.resetSpaceTop})}),this.props.showProtractor&&a.jsx(E,{layout:"floating",text:"The protractor is not accessible. Please consider an alternate approach.",kind:"warning"})]})]})]})}};f.defaultProps={box:[j.defaultBoxSizeSmall,j.defaultBoxSizeSmall],labels:["x","y"],range:[[-10,10],[-10,10]],step:[1,1],gridStep:[1,1],snapStep:[1,1],valid:!0,backgroundImage:z,markings:"graph",showProtractor:!1,showTooltips:!1};let S=f;const b=T.StyleSheet.create({resetSpaceTop:{marginTop:0},backgroundUrlInput:{border:`1px solid ${q.offBlack32}`,borderRadius:m.xxxSmall_4,padding:m.xxxSmall_4},checkboxRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:m.xSmall_8},protractorSection:{marginTop:m.xSmall_8,borderTop:`1px solid ${q.offBlack16}`,paddingTop:m.xSmall_8,paddingBottom:m.xSmall_8,borderBottom:`1px solid ${q.offBlack16}`}}),me=S;S.__docgenInfo={description:"",methods:[{name:"stateFromProps",docblock:null,modifiers:["static"],params:[{name:"props",optional:!1,type:{name:"signature",type:"object",raw:`{ /** * The size of the graph area in pixels. */ diff --git a/assets/interactive-graph-settings.stories-2mM44wKW.js b/assets/interactive-graph-settings.stories-6SqHWnn_.js similarity index 87% rename from assets/interactive-graph-settings.stories-2mM44wKW.js rename to assets/interactive-graph-settings.stories-6SqHWnn_.js index 4a8e1dfea1..10905e42f1 100644 --- a/assets/interactive-graph-settings.stories-2mM44wKW.js +++ b/assets/interactive-graph-settings.stories-6SqHWnn_.js @@ -1,4 +1,4 @@ -import{j as u}from"./jsx-runtime-63Ea5SlK.js";import{r as b}from"./index-6oxdNXpR.js";import{I as e}from"./interactive-graph-settings-fIfU8SU6.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./heading-1izW0-GJ.js";import"./index-wzSCRJFK.js";import"./toggleable-caret-YFS5vs4O.js";const x={box:{control:{type:"array"}},labels:{control:{type:"array"},type:{name:"ReadonlyArray",required:!1}},range:{control:{type:"array"},type:{name:"[Range, Range]",required:!1}},step:{control:{type:"array"},type:{name:"[number, number]",required:!1}},gridStep:{control:{type:"array"},type:{name:"[number, number]",required:!0}},snapStep:{control:{type:"array"},type:{name:"[number, number]",required:!0}},valid:{control:{type:"text"},type:{name:"string",required:!1}},backgroundImage:{control:{type:"object"},type:{name:"PerseusImageBackground",required:!1}},markings:{control:{type:"select"},table:{type:{summary:'"graph" | "grid" | "none"'}},type:{name:"enum",value:["graph","grid","none"],required:!1}},showProtractor:{control:{type:"boolean"},type:{name:"boolean",required:!1}},showRuler:{control:{type:"boolean"},type:{name:"boolean",required:!1}},showTooltips:{control:{type:"boolean"},type:{name:"boolean",required:!1}},rulerLabel:{control:{type:"select"},table:{type:{summary:'"mm", "cm", "m", "km", "in", "ft", "yd", "mi"'}},type:{name:"enum",value:["mm","cm","m","km","in","ft","yd","mi"],required:!1}},rulerTicks:{control:{type:"number"},type:{name:"number",required:!1}}},st={title:"PerseusEditor/Components/Interactive Graph Settings",component:e,argTypes:x},r=o=>u.jsx(e,{...o});r.args={box:[288,288],gridStep:[1,1],labels:["x","y"],markings:"graph",range:[[-10,10],[-10,10]],rulerLabel:"",rulerTicks:10,showProtractor:!1,showRuler:!1,showTooltips:!1,snapStep:[1,1],step:[1,1]};const t={render:function(){const d=(h,f)=>({...h,...f}),[y,g]=b.useReducer(d,{});return u.jsx(e,{...y,onChange:g})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var p,i,m;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as u}from"./jsx-runtime-63Ea5SlK.js";import{r as b}from"./index-6oxdNXpR.js";import{I as e}from"./interactive-graph-settings-o74Mjg6d.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./heading-1izW0-GJ.js";import"./index-wzSCRJFK.js";import"./toggleable-caret-YFS5vs4O.js";const x={box:{control:{type:"array"}},labels:{control:{type:"array"},type:{name:"ReadonlyArray",required:!1}},range:{control:{type:"array"},type:{name:"[Range, Range]",required:!1}},step:{control:{type:"array"},type:{name:"[number, number]",required:!1}},gridStep:{control:{type:"array"},type:{name:"[number, number]",required:!0}},snapStep:{control:{type:"array"},type:{name:"[number, number]",required:!0}},valid:{control:{type:"text"},type:{name:"string",required:!1}},backgroundImage:{control:{type:"object"},type:{name:"PerseusImageBackground",required:!1}},markings:{control:{type:"select"},table:{type:{summary:'"graph" | "grid" | "none"'}},type:{name:"enum",value:["graph","grid","none"],required:!1}},showProtractor:{control:{type:"boolean"},type:{name:"boolean",required:!1}},showRuler:{control:{type:"boolean"},type:{name:"boolean",required:!1}},showTooltips:{control:{type:"boolean"},type:{name:"boolean",required:!1}},rulerLabel:{control:{type:"select"},table:{type:{summary:'"mm", "cm", "m", "km", "in", "ft", "yd", "mi"'}},type:{name:"enum",value:["mm","cm","m","km","in","ft","yd","mi"],required:!1}},rulerTicks:{control:{type:"number"},type:{name:"number",required:!1}}},st={title:"PerseusEditor/Components/Interactive Graph Settings",component:e,argTypes:x},r=o=>u.jsx(e,{...o});r.args={box:[288,288],gridStep:[1,1],labels:["x","y"],markings:"graph",range:[[-10,10],[-10,10]],rulerLabel:"",rulerTicks:10,showProtractor:!1,showRuler:!1,showTooltips:!1,snapStep:[1,1],step:[1,1]};const t={render:function(){const d=(h,f)=>({...h,...f}),[y,g]=b.useReducer(d,{});return u.jsx(e,{...y,onChange:g})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var p,i,m;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(m=(i=r.parameters)==null?void 0:i.docs)==null?void 0:m.source}}};var a,n,s,c,l;t.parameters={...t.parameters,docs:{...(a=t.parameters)==null?void 0:a.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/interactive-graph.stories-6Re0NqQZ.js b/assets/interactive-graph.stories-mI2PM1On.js similarity index 97% rename from assets/interactive-graph.stories-6Re0NqQZ.js rename to assets/interactive-graph.stories-mI2PM1On.js index a07ed15783..12d7450080 100644 --- a/assets/interactive-graph.stories-6Re0NqQZ.js +++ b/assets/interactive-graph.stories-mI2PM1On.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-63Ea5SlK.js";import{B as Yt}from"./phet-simulation-_7qOO4_B.js";import{B as re}from"./choice-Xr-SKHrB.js";import{b as ue,a as Ut,_ as S,V as y}from"./index-0DbkllkJ.js";import{r as c}from"./index-6oxdNXpR.js";import{l as X}from"./index-awljIyHI.js";import{L as Xt,c as Zt}from"./react-router-dom-VIBHfbW6.js";import{i as eo}from"./index-i1pBWAmI.js";import{P as ge}from"./index-469F30Ub.js";import{m as to,c as oo,u as ro,T as so}from"./index-f-3iKkZU.js";import{c as s,b as w,s as g}from"./index-deFLJwr4.js";import{S as te}from"./index-nqMmpXbO.js";import{L as no}from"./video-transcript-link-_gpkjmR8.js";import{a as io,S as ao}from"./index-7-BESUpx.js";import{b as co,L as lo,H as uo}from"./index-18qWGOW7.js";import{T as he}from"./index-BIPwuHvF.js";import{w as po}from"./index-J2t_5nK1.js";import"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import{a as mo}from"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import{R as go,s as ho}from"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import{S as fo}from"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-k-0mNqHS.js";import{m as fe}from"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{R as d}from"./renderer-with-debug-ui-75hBDQJk.js";import{j as Tt,k as yo,m as xo,n as bo,o as So,t as pe,u as vo,v as ko,w as Ro,x as Io,y as wo,z as jo,A as Lo,B as qo,C as _o,D as Wo,E as Co,F as Ao,G as Eo,H as Oo,I as No}from"./interactive-graph.testdata--LRl7_OC.js";import"./index-vITVWi7a.js";import"./arrow-square-out-bold-090vdhrx.js";import"./index-Dfd6auV6.js";import"./constants-iPV6vHZm.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-jxhLXBHb.js";import"./Popper-Y5KDXl-P.js";import"./index-dnMhQZ-1.js";import"./media-queries-gbofTbz-.js";import"./choice-icon-9x4jcq5T.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./perseus-error-l3K_anoI.js";import"./input-with-examples-YO5BCgg1.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./shared-4TdECMLk.js";import"./answer-choices-lVeJkx-U.js";import"./minus-bold-ONmDo3Ve.js";import"./asset-context-H6Iqp7Gi.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./fixed-to-responsive-for_tVF1.js";import"./stub-tag-editor-qMhJW4bS.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./choice-none-above-dRu7sfJj.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./side-by-side-MBJuyilC.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";import"./interactive-graph-question-builder-VBdpjz9Z.js";const Po=e=>{switch(e){case"xsmall":return"small";case"small":return"medium";case"medium":return"medium";case"large":return"medium"}},Qo=e=>({xsmall:24,small:32,medium:40,large:48})[e],se={color:{bg:{hovered:"transparent",active:"transparent",disabled:"transparent",filled:{action:{hovered:"transparent",active:"transparent"},critical:{hovered:"transparent",active:"transparent"}}},stroke:{disabled:{default:s.offBlack32,inverse:s.white50},inverse:s.white,action:{default:s.blue,active:s.activeBlue,inverse:s.fadedBlue},critical:{default:s.red,active:s.activeRed,inverse:s.fadedRed},primary:{action:{hovered:s.blue,active:s.activeBlue},critical:{hovered:s.red,active:s.activeRed},inverse:{default:s.white,hovered:s.white}},secondary:{default:s.offBlack},tertiary:{default:s.offBlack64},filled:{action:{hovered:s.blue,active:s.activeBlue},critical:{hovered:s.red,active:s.activeRed}}}},border:{width:{default:w.width.thin,active:w.width.none,hovered:w.width.thin,hoveredInverse:w.width.thin},radius:{default:w.radius.medium_4}}},Bo=to(se,{color:{bg:{hovered:s.white,active:s.white64,filled:{action:{hovered:s.blue,active:s.activeBlue},critical:{hovered:s.red,active:s.activeRed}}},stroke:{action:{inverse:s.eggplant},critical:{inverse:s.eggplant},primary:{action:{hovered:s.eggplant,active:s.eggplant},critical:{hovered:s.eggplant,active:s.eggplant},inverse:{hovered:s.eggplant}},filled:{action:{hovered:s.white,active:s.white},critical:{hovered:s.white,active:s.white}}}},border:{width:{hovered:w.width.none,hoveredInverse:w.width.none}}}),Do={default:se,khanmigo:Bo},zt=oo(se);function Mo(e){var o;const n=c.useContext(so),i=(o=Do[n])!=null?o:se;return c.createElement(zt.Provider,{value:i},e.children)}const Uo=["color","disabled","href","icon","kind","light","size","skipClientNav","style","testId"];function To({icon:e,size:o}){switch(Po(o)){case"small":return c.createElement(ge,{size:"small",color:"currentColor",icon:e});case"medium":default:return c.createElement(ge,{size:"medium",color:"currentColor",icon:e})}}const zo=ue("a"),Fo=ue("button"),Go=ue(Xt),$o=c.forwardRef(function(o,n){const{color:i,disabled:r,href:l,icon:u,kind:m="primary",light:p=!1,size:a="medium",skipClientNav:b,style:j,testId:k}=o,R=Ut(o,Uo),{theme:I,themeName:x}=ro(zt),v=ae=>{const me=Ho(i,m,p,a,I,x),Jt=[Vo.shared,me.default,r&&me.disabled],ce=c.createElement(To,{size:a,icon:u}),le=S({"data-testid":k,style:[Jt,j]},R);return l&&!r?ae&&!b&&eo(l)?c.createElement(Go,S({},le,{to:l,ref:n}),ce):c.createElement(zo,S({},le,{href:l,ref:n}),ce):c.createElement(Fo,S({type:"button"},le,{onClick:r?void 0:R.onClick,"aria-disabled":r,ref:n}),ce)};return c.createElement(Zt.Consumer,null,ae=>v(ae))}),Vo=X.StyleSheet.create({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",padding:0,cursor:"pointer",border:"none",outline:"none",textDecoration:"none",background:"none",margin:-8,touchAction:"manipulation"}}),oe={};function Ko(e,o,n,i,r){switch(e){case"primary":const l=r==="destructive"?o.color.stroke.primary.critical.hovered:o.color.stroke.primary.action.hovered;return{":hover":{backgroundColor:o.color.bg.hovered,color:i?o.color.stroke.primary.inverse.hovered:l,outlineColor:i?o.color.stroke.inverse:n,outlineOffset:1,outlineStyle:"solid",outlineWidth:i?o.border.width.hoveredInverse:o.border.width.hovered},":active":{backgroundColor:o.color.bg.active}};case"secondary":case"tertiary":return{":hover":{backgroundColor:r==="destructive"?o.color.bg.filled.critical.hovered:o.color.bg.filled.action.hovered,color:r==="destructive"?o.color.stroke.filled.critical.hovered:o.color.stroke.filled.action.hovered,outlineWidth:o.border.width.active},":active":{backgroundColor:r==="destructive"?o.color.bg.filled.critical.active:o.color.bg.filled.action.active,color:r==="destructive"?o.color.stroke.filled.critical.active:o.color.stroke.filled.action.active,outlineWidth:o.border.width.active}};default:return{":focus-visible":{},":hover":{},":active":{}}}}const Ho=(e="default",o,n,i,r,l)=>{const u=e==="destructive"?r.color.stroke.critical.default:r.color.stroke.action.default,m=`${u}-${o}-${n}-${i}-${l}`;if(oe[m])return oe[m];if(n&&o!=="primary")throw new Error("Light is only supported for primary IconButtons");const p=(()=>{switch(o){case"primary":return n?r.color.stroke.primary.inverse.default:u;case"secondary":return r.color.stroke.secondary.default;case"tertiary":return r.color.stroke.tertiary.default;default:throw new Error("IconButton kind not recognized")}})(),a=Qo(i),b=Ko(o,r,u,n,e),j=e==="destructive"?r.color.stroke.critical.inverse:r.color.stroke.action.inverse,k=e==="destructive"?r.color.stroke.critical.active:r.color.stroke.action.active,R=n?r.color.stroke.inverse:u,I=n?r.color.stroke.disabled.inverse:r.color.stroke.disabled.default,x={backgroundColor:r.color.bg.disabled,color:I,outlineColor:I},v={default:{height:a,width:a,color:p,borderRadius:r.border.radius.default,":hover":S({boxShadow:"none",color:R,borderRadius:r.border.radius.default,outlineWidth:r.border.width.default},b[":hover"]),"@media not (hover: hover)":{":hover":{boxShadow:"none",color:p,borderRadius:r.border.radius.default,outline:"none",backgroundColor:"transparent"}},":focus":{boxShadow:`0 0 0 ${r.border.width.default}px ${R}`,borderRadius:r.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":S({boxShadow:"none",outlineWidth:r.border.width.default,outlineColor:R,outlineOffset:1,outlineStyle:"solid",borderRadius:r.border.radius.default},b[":focus-visible"]),":active":S({color:n?j:k,outlineWidth:r.border.width.default,outlineColor:n?j:k,outlineOffset:1,outlineStyle:"solid",borderRadius:r.border.radius.default},b[":active"])},disabled:{color:I,cursor:"not-allowed",":hover":S({},x,{outline:"none"}),":active":S({},x,{outline:"none"}),":focus":{boxShadow:`0 0 0 ${r.border.width.default}px ${I}`,borderRadius:r.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":x}};return oe[m]=X.StyleSheet.create(v),oe[m]},Jo=["color","disabled","href","kind","light","size","skipClientNav","tabIndex","target"],ye=c.forwardRef(function(o,n){const{color:i="default",disabled:r=!1,href:l,kind:u="primary",light:m=!1,size:p="medium",skipClientNav:a,tabIndex:b,target:j}=o,k=Ut(o,Jo);function R(x){const v=x.key;!l&&(v==="Enter"||v==="Space")&&x.preventDefault()}function I(x){const v=x.key;!l&&(v==="Enter"||v==="Space")&&k.onClick&&k.onClick(x)}return c.createElement(Mo,null,c.createElement($o,S({},k,{color:i,disabled:r,href:l,kind:u,light:m,ref:n,skipClientNav:a,size:p,target:j,tabIndex:b,onKeyDown:R,onKeyUp:I})))});class ne extends c.Component{render(){const{color:o,leftContent:n,rightContent:i,size:r,subtitle:l,title:u}=this.props,m=l?lo:uo;return c.createElement(y,{style:[f.container,o==="dark"&&f.dark,r==="small"&&f.small]},c.createElement(y,{style:[f.column,f.leftColumn,u?f.withTitle:null]},n),u&&c.createElement(y,{style:[f.column,f.wideColumn]},c.createElement(y,{style:[f.titles,f.center]},c.createElement(m,{id:"wb-toolbar-title"},u),l&&c.createElement(co,{style:o==="light"&&f.subtitle},l))),c.createElement(y,{style:[f.column,f.rightColumn,u?f.withTitle:null]},i))}}ne.defaultProps={color:"light",leftContent:null,rightContent:null,size:"medium"};const f=X.StyleSheet.create({container:{border:`1px solid ${s.offBlack16}`,flex:1,flexDirection:"row",justifyContent:"space-between",minHeight:66,paddingLeft:g.medium_16,paddingRight:g.medium_16,width:"100%"},small:{minHeight:50},dark:{backgroundColor:s.darkBlue,boxShadow:`0 1px 0 0 ${s.white64}`,color:"white"},column:{justifyContent:"center"},withTitle:{flex:1},wideColumn:{flex:1,flexBasis:"50%"},leftColumn:{alignItems:"center",flexDirection:"row",flexShrink:0,justifyContent:"flex-start"},rightColumn:{alignItems:"center",flexDirection:"row",justifyContent:"flex-end"},center:{textAlign:"center"},subtitle:{color:s.offBlack64},titles:{padding:g.small_12}}),Yo=""+new URL("camera-slash-Oge78uaV.svg",import.meta.url).href,Xo=""+new URL("graph-RU2fqeKx.svg",import.meta.url).href,Zo=""+new URL("image-PFUjt3DK.svg",import.meta.url).href,er=["angle","segment","linear","linear-system","ray","polygon","point","circle","quadratic","sinusoid","unlimited-point","unlimited-polygon"],tr=er.reduce((e,o)=>(e[o]=!0,e),{});function Ft(e){const{value:o,onInput:n,...i}=e,[r,l]=c.useState(!1),[u,m]=c.useState("");return t.jsx("input",{...i,value:r?u:o,onChange:p=>{m(p.target.value),n(p.target.value)},onFocus:()=>{m(o),l(!0)},onBlur:()=>{l(!1)}})}Ft.__docgenInfo={description:"",methods:[],displayName:"EditableControlledInput",props:{value:{required:!0,tsType:{name:"string"},description:""},onInput:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValue: string) => unknown",signature:{arguments:[{type:{name:"string"},name:"newValue"}],return:{name:"unknown"}}},description:""}}};function Z(e){let o;return n=>((o==null||n!==o.arg)&&(o={arg:n,result:e(n)}),o.result)}const or={type:"next"},rr={type:"previous"},sr=e=>mr(e)?{type:"jump-to-index",index:parseInt(e,10)-1}:{type:"noop"};function nr(e){return{type:"set-questions",questions:e}}function ir(e){return{type:"load-questions-from-storage",questions:e}}const ar={type:"remove-current-question"};function cr(e,o){switch(o.type){case"next":return de(e,n=>n+1);case"previous":return de(e,n=>n-1);case"jump-to-index":return de(e,()=>o.index);case"set-questions":return{...e,questions:o.questions};case"load-questions-from-storage":return e.questions||!o.questions?e:{...e,questions:o.questions};case"remove-current-question":{const n=ee(e);return{...e,questions:e.questions.split(` +import{j as t}from"./jsx-runtime-63Ea5SlK.js";import{B as Yt}from"./phet-simulation-_7qOO4_B.js";import{B as re}from"./choice-Xr-SKHrB.js";import{b as ue,a as Ut,_ as S,V as y}from"./index-0DbkllkJ.js";import{r as c}from"./index-6oxdNXpR.js";import{l as X}from"./index-awljIyHI.js";import{L as Xt,c as Zt}from"./react-router-dom-VIBHfbW6.js";import{i as eo}from"./index-i1pBWAmI.js";import{P as ge}from"./index-469F30Ub.js";import{m as to,c as oo,u as ro,T as so}from"./index-f-3iKkZU.js";import{c as s,b as w,s as g}from"./index-deFLJwr4.js";import{S as te}from"./index-nqMmpXbO.js";import{L as no}from"./video-transcript-link-_gpkjmR8.js";import{a as io,S as ao}from"./index-7-BESUpx.js";import{b as co,L as lo,H as uo}from"./index-18qWGOW7.js";import{T as he}from"./index-BIPwuHvF.js";import{w as po}from"./index-J2t_5nK1.js";import"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import{a as mo}from"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import{R as go,s as ho}from"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import{S as fo}from"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-0C4KXdeC.js";import{m as fe}from"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{R as d}from"./renderer-with-debug-ui-Jq91P-PK.js";import{j as Tt,k as yo,m as xo,n as bo,o as So,t as pe,u as vo,v as ko,w as Ro,x as Io,y as wo,z as jo,A as Lo,B as qo,C as _o,D as Wo,E as Co,F as Ao,G as Eo,H as Oo,I as No}from"./interactive-graph.testdata--LRl7_OC.js";import"./index-vITVWi7a.js";import"./arrow-square-out-bold-090vdhrx.js";import"./index-Dfd6auV6.js";import"./constants-iPV6vHZm.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-jxhLXBHb.js";import"./Popper-Y5KDXl-P.js";import"./index-dnMhQZ-1.js";import"./media-queries-gbofTbz-.js";import"./choice-icon-9x4jcq5T.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./perseus-error-l3K_anoI.js";import"./input-with-examples-PaWkADGr.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./shared-4TdECMLk.js";import"./answer-choices-iyIz6W_C.js";import"./minus-bold-ONmDo3Ve.js";import"./asset-context-H6Iqp7Gi.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./fixed-to-responsive-for_tVF1.js";import"./stub-tag-editor-qMhJW4bS.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./choice-none-above-vDwffTnk.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./side-by-side-MBJuyilC.js";import"./register-all-widgets-for-testing-vNa20up7.js";import"./interactive-graph-question-builder-VBdpjz9Z.js";const Po=e=>{switch(e){case"xsmall":return"small";case"small":return"medium";case"medium":return"medium";case"large":return"medium"}},Qo=e=>({xsmall:24,small:32,medium:40,large:48})[e],se={color:{bg:{hovered:"transparent",active:"transparent",disabled:"transparent",filled:{action:{hovered:"transparent",active:"transparent"},critical:{hovered:"transparent",active:"transparent"}}},stroke:{disabled:{default:s.offBlack32,inverse:s.white50},inverse:s.white,action:{default:s.blue,active:s.activeBlue,inverse:s.fadedBlue},critical:{default:s.red,active:s.activeRed,inverse:s.fadedRed},primary:{action:{hovered:s.blue,active:s.activeBlue},critical:{hovered:s.red,active:s.activeRed},inverse:{default:s.white,hovered:s.white}},secondary:{default:s.offBlack},tertiary:{default:s.offBlack64},filled:{action:{hovered:s.blue,active:s.activeBlue},critical:{hovered:s.red,active:s.activeRed}}}},border:{width:{default:w.width.thin,active:w.width.none,hovered:w.width.thin,hoveredInverse:w.width.thin},radius:{default:w.radius.medium_4}}},Bo=to(se,{color:{bg:{hovered:s.white,active:s.white64,filled:{action:{hovered:s.blue,active:s.activeBlue},critical:{hovered:s.red,active:s.activeRed}}},stroke:{action:{inverse:s.eggplant},critical:{inverse:s.eggplant},primary:{action:{hovered:s.eggplant,active:s.eggplant},critical:{hovered:s.eggplant,active:s.eggplant},inverse:{hovered:s.eggplant}},filled:{action:{hovered:s.white,active:s.white},critical:{hovered:s.white,active:s.white}}}},border:{width:{hovered:w.width.none,hoveredInverse:w.width.none}}}),Do={default:se,khanmigo:Bo},zt=oo(se);function Mo(e){var o;const n=c.useContext(so),i=(o=Do[n])!=null?o:se;return c.createElement(zt.Provider,{value:i},e.children)}const Uo=["color","disabled","href","icon","kind","light","size","skipClientNav","style","testId"];function To({icon:e,size:o}){switch(Po(o)){case"small":return c.createElement(ge,{size:"small",color:"currentColor",icon:e});case"medium":default:return c.createElement(ge,{size:"medium",color:"currentColor",icon:e})}}const zo=ue("a"),Fo=ue("button"),Go=ue(Xt),$o=c.forwardRef(function(o,n){const{color:i,disabled:r,href:l,icon:u,kind:m="primary",light:p=!1,size:a="medium",skipClientNav:b,style:j,testId:k}=o,R=Ut(o,Uo),{theme:I,themeName:x}=ro(zt),v=ae=>{const me=Ho(i,m,p,a,I,x),Jt=[Vo.shared,me.default,r&&me.disabled],ce=c.createElement(To,{size:a,icon:u}),le=S({"data-testid":k,style:[Jt,j]},R);return l&&!r?ae&&!b&&eo(l)?c.createElement(Go,S({},le,{to:l,ref:n}),ce):c.createElement(zo,S({},le,{href:l,ref:n}),ce):c.createElement(Fo,S({type:"button"},le,{onClick:r?void 0:R.onClick,"aria-disabled":r,ref:n}),ce)};return c.createElement(Zt.Consumer,null,ae=>v(ae))}),Vo=X.StyleSheet.create({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",padding:0,cursor:"pointer",border:"none",outline:"none",textDecoration:"none",background:"none",margin:-8,touchAction:"manipulation"}}),oe={};function Ko(e,o,n,i,r){switch(e){case"primary":const l=r==="destructive"?o.color.stroke.primary.critical.hovered:o.color.stroke.primary.action.hovered;return{":hover":{backgroundColor:o.color.bg.hovered,color:i?o.color.stroke.primary.inverse.hovered:l,outlineColor:i?o.color.stroke.inverse:n,outlineOffset:1,outlineStyle:"solid",outlineWidth:i?o.border.width.hoveredInverse:o.border.width.hovered},":active":{backgroundColor:o.color.bg.active}};case"secondary":case"tertiary":return{":hover":{backgroundColor:r==="destructive"?o.color.bg.filled.critical.hovered:o.color.bg.filled.action.hovered,color:r==="destructive"?o.color.stroke.filled.critical.hovered:o.color.stroke.filled.action.hovered,outlineWidth:o.border.width.active},":active":{backgroundColor:r==="destructive"?o.color.bg.filled.critical.active:o.color.bg.filled.action.active,color:r==="destructive"?o.color.stroke.filled.critical.active:o.color.stroke.filled.action.active,outlineWidth:o.border.width.active}};default:return{":focus-visible":{},":hover":{},":active":{}}}}const Ho=(e="default",o,n,i,r,l)=>{const u=e==="destructive"?r.color.stroke.critical.default:r.color.stroke.action.default,m=`${u}-${o}-${n}-${i}-${l}`;if(oe[m])return oe[m];if(n&&o!=="primary")throw new Error("Light is only supported for primary IconButtons");const p=(()=>{switch(o){case"primary":return n?r.color.stroke.primary.inverse.default:u;case"secondary":return r.color.stroke.secondary.default;case"tertiary":return r.color.stroke.tertiary.default;default:throw new Error("IconButton kind not recognized")}})(),a=Qo(i),b=Ko(o,r,u,n,e),j=e==="destructive"?r.color.stroke.critical.inverse:r.color.stroke.action.inverse,k=e==="destructive"?r.color.stroke.critical.active:r.color.stroke.action.active,R=n?r.color.stroke.inverse:u,I=n?r.color.stroke.disabled.inverse:r.color.stroke.disabled.default,x={backgroundColor:r.color.bg.disabled,color:I,outlineColor:I},v={default:{height:a,width:a,color:p,borderRadius:r.border.radius.default,":hover":S({boxShadow:"none",color:R,borderRadius:r.border.radius.default,outlineWidth:r.border.width.default},b[":hover"]),"@media not (hover: hover)":{":hover":{boxShadow:"none",color:p,borderRadius:r.border.radius.default,outline:"none",backgroundColor:"transparent"}},":focus":{boxShadow:`0 0 0 ${r.border.width.default}px ${R}`,borderRadius:r.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":S({boxShadow:"none",outlineWidth:r.border.width.default,outlineColor:R,outlineOffset:1,outlineStyle:"solid",borderRadius:r.border.radius.default},b[":focus-visible"]),":active":S({color:n?j:k,outlineWidth:r.border.width.default,outlineColor:n?j:k,outlineOffset:1,outlineStyle:"solid",borderRadius:r.border.radius.default},b[":active"])},disabled:{color:I,cursor:"not-allowed",":hover":S({},x,{outline:"none"}),":active":S({},x,{outline:"none"}),":focus":{boxShadow:`0 0 0 ${r.border.width.default}px ${I}`,borderRadius:r.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":x}};return oe[m]=X.StyleSheet.create(v),oe[m]},Jo=["color","disabled","href","kind","light","size","skipClientNav","tabIndex","target"],ye=c.forwardRef(function(o,n){const{color:i="default",disabled:r=!1,href:l,kind:u="primary",light:m=!1,size:p="medium",skipClientNav:a,tabIndex:b,target:j}=o,k=Ut(o,Jo);function R(x){const v=x.key;!l&&(v==="Enter"||v==="Space")&&x.preventDefault()}function I(x){const v=x.key;!l&&(v==="Enter"||v==="Space")&&k.onClick&&k.onClick(x)}return c.createElement(Mo,null,c.createElement($o,S({},k,{color:i,disabled:r,href:l,kind:u,light:m,ref:n,skipClientNav:a,size:p,target:j,tabIndex:b,onKeyDown:R,onKeyUp:I})))});class ne extends c.Component{render(){const{color:o,leftContent:n,rightContent:i,size:r,subtitle:l,title:u}=this.props,m=l?lo:uo;return c.createElement(y,{style:[f.container,o==="dark"&&f.dark,r==="small"&&f.small]},c.createElement(y,{style:[f.column,f.leftColumn,u?f.withTitle:null]},n),u&&c.createElement(y,{style:[f.column,f.wideColumn]},c.createElement(y,{style:[f.titles,f.center]},c.createElement(m,{id:"wb-toolbar-title"},u),l&&c.createElement(co,{style:o==="light"&&f.subtitle},l))),c.createElement(y,{style:[f.column,f.rightColumn,u?f.withTitle:null]},i))}}ne.defaultProps={color:"light",leftContent:null,rightContent:null,size:"medium"};const f=X.StyleSheet.create({container:{border:`1px solid ${s.offBlack16}`,flex:1,flexDirection:"row",justifyContent:"space-between",minHeight:66,paddingLeft:g.medium_16,paddingRight:g.medium_16,width:"100%"},small:{minHeight:50},dark:{backgroundColor:s.darkBlue,boxShadow:`0 1px 0 0 ${s.white64}`,color:"white"},column:{justifyContent:"center"},withTitle:{flex:1},wideColumn:{flex:1,flexBasis:"50%"},leftColumn:{alignItems:"center",flexDirection:"row",flexShrink:0,justifyContent:"flex-start"},rightColumn:{alignItems:"center",flexDirection:"row",justifyContent:"flex-end"},center:{textAlign:"center"},subtitle:{color:s.offBlack64},titles:{padding:g.small_12}}),Yo=""+new URL("camera-slash-Oge78uaV.svg",import.meta.url).href,Xo=""+new URL("graph-RU2fqeKx.svg",import.meta.url).href,Zo=""+new URL("image-PFUjt3DK.svg",import.meta.url).href,er=["angle","segment","linear","linear-system","ray","polygon","point","circle","quadratic","sinusoid","unlimited-point","unlimited-polygon"],tr=er.reduce((e,o)=>(e[o]=!0,e),{});function Ft(e){const{value:o,onInput:n,...i}=e,[r,l]=c.useState(!1),[u,m]=c.useState("");return t.jsx("input",{...i,value:r?u:o,onChange:p=>{m(p.target.value),n(p.target.value)},onFocus:()=>{m(o),l(!0)},onBlur:()=>{l(!1)}})}Ft.__docgenInfo={description:"",methods:[],displayName:"EditableControlledInput",props:{value:{required:!0,tsType:{name:"string"},description:""},onInput:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValue: string) => unknown",signature:{arguments:[{type:{name:"string"},name:"newValue"}],return:{name:"unknown"}}},description:""}}};function Z(e){let o;return n=>((o==null||n!==o.arg)&&(o={arg:n,result:e(n)}),o.result)}const or={type:"next"},rr={type:"previous"},sr=e=>mr(e)?{type:"jump-to-index",index:parseInt(e,10)-1}:{type:"noop"};function nr(e){return{type:"set-questions",questions:e}}function ir(e){return{type:"load-questions-from-storage",questions:e}}const ar={type:"remove-current-question"};function cr(e,o){switch(o.type){case"next":return de(e,n=>n+1);case"previous":return de(e,n=>n-1);case"jump-to-index":return de(e,()=>o.index);case"set-questions":return{...e,questions:o.questions};case"load-questions-from-storage":return e.questions||!o.questions?e:{...e,questions:o.questions};case"remove-current-question":{const n=ee(e);return{...e,questions:e.questions.split(` `).filter((i,r)=>r!==n).join(` `)}}}return e}function de(e,o){const n=ee(e),i=ie(e);return{...e,requestedIndex:Gt(o(n),i)}}function Gt(e,o){return o.length===0||e<0?0:e>=o.length?o.length-1:e}const $t=Z(e=>e.questions.split(` `).map(o=>o.trim()).filter(Boolean)),ie=Z(e=>$t(e).map(pr)),lr=Z(e=>ie(e)[ee(e)]??null),dr=Z(e=>$t(e)[ee(e)]??null),ur=Z(e=>ie(e).length),ee=e=>Gt(e.requestedIndex,ie(e));function pr(e){try{return JSON.parse(e)}catch{return{content:"**Could not parse the JSON for this question.**\n\n```\n"+e+"\n```",widgets:{},images:{}}}}function mr(e){return/^\d+$/.test(e)&&+e>0}const gr=X.StyleSheet.create({header:{display:"flex",alignItems:"center",boxShadow:"0 0 10px #0002",borderBlockEnd:`1px solid ${s.offBlack32}`,background:s.offBlack8,padding:g.small_12,justifyContent:"space-between",flexDirection:"row-reverse",flexWrap:"wrap"}}),Vt=({children:e})=>t.jsx("header",{className:X.css(gr.header),children:e});Vt.__docgenInfo={description:"",methods:[],displayName:"Header"};const hr=` diff --git a/assets/item-editor.stories-WtXANqO5.js b/assets/item-editor.stories-zR3O_IZu.js similarity index 74% rename from assets/item-editor.stories-WtXANqO5.js rename to assets/item-editor.stories-zR3O_IZu.js index eb391df376..aac8a96118 100644 --- a/assets/item-editor.stories-WtXANqO5.js +++ b/assets/item-editor.stories-zR3O_IZu.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{r as x}from"./index-6oxdNXpR.js";import{I as p}from"./item-extras-editor-jXytEuhg.js";/* empty css */import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";const E=t=>{const{onChange:o,...n}=t,[c,d]=x.useState(n);return a.jsx(p,{...c,onChange:m=>{o==null||o(m),d(u=>({...u,...m}))}})},ot={title:"PerseusEditor/Item Extras Editor",component:p,render:t=>a.jsx(E,{...t}),argTypes:{onChange:{action:"changed"}}},r={args:{...p.defaultProps}};var i,s,e;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`{ +import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{r as x}from"./index-6oxdNXpR.js";import{I as p}from"./item-extras-editor-z7TuJtsi.js";/* empty css */import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";const E=t=>{const{onChange:o,...n}=t,[c,d]=x.useState(n);return a.jsx(p,{...c,onChange:m=>{o==null||o(m),d(u=>({...u,...m}))}})},ot={title:"PerseusEditor/Item Extras Editor",component:p,render:t=>a.jsx(E,{...t}),argTypes:{onChange:{action:"changed"}}},r={args:{...p.defaultProps}};var i,s,e;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`{ args: { ...ItemExtrasEditor.defaultProps } diff --git a/assets/item-extras-editor-jXytEuhg.js b/assets/item-extras-editor-z7TuJtsi.js similarity index 95% rename from assets/item-extras-editor-jXytEuhg.js rename to assets/item-extras-editor-z7TuJtsi.js index 3564eab419..69683df266 100644 --- a/assets/item-extras-editor-jXytEuhg.js +++ b/assets/item-extras-editor-z7TuJtsi.js @@ -1 +1 @@ -import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{I as c}from"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import{c as h}from"./components-ODdjt0Ld.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{V as s}from"./index-0DbkllkJ.js";import{C as u}from"./index-V5gl6frG.js";import{s as p}from"./index-deFLJwr4.js";import{l as f}from"./index-awljIyHI.js";import{r as d}from"./index-6oxdNXpR.js";const{InfoTip:m}=h,o=class o extends d.Component{constructor(){super(...arguments),this.serialize=()=>{const e={...o.defaultProps};for(const n of c)e[n]=!!this.props[n];return e}}shouldShowFinancialCalculatorOptions(){return this.props.financialCalculatorMonthlyPayment||this.props.financialCalculatorTotalAmount||this.props.financialCalculatorTimeToPayOff}render(){return a.jsx("div",{className:"perseus-answer-editor",children:a.jsxs("div",{className:"perseus-answer-options",children:[a.jsx(t,{label:"Show calculator",infoTip:"Use the calculator when completing difficult calculations is NOT the intent of the question. DON’T use the calculator when testing the student’s ability to complete different types of computations.",checked:this.props.calculator,onChange:e=>{this.props.onChange({calculator:e})}}),a.jsx(t,{label:"Show financial calculator",infoTip:"This provides the student with the ability to view a financial calculator, e.g., for answering financial questions. Once checked, requires at least one of the three options below to be checked.",checked:this.shouldShowFinancialCalculatorOptions(),onChange:e=>{this.props.onChange({financialCalculatorMonthlyPayment:e,financialCalculatorTotalAmount:e,financialCalculatorTimeToPayOff:e})}}),this.shouldShowFinancialCalculatorOptions()&&a.jsxs(a.Fragment,{children:[a.jsx(t,{label:"Include monthly payment",infoTip:"This provides the student with the ability to view a monthly payment calculator; e.g., given a loan amount, interest rate, and term, what is the monthly payment?",checked:this.props.financialCalculatorMonthlyPayment,onChange:e=>{this.props.onChange({financialCalculatorMonthlyPayment:e})},indent:!0}),a.jsx(t,{label:"Include total amount",infoTip:"This provides the student with the ability to view a total amount calculator; e.g., given a monthly payment, interest rate, and term, what is the total amount to be paid?",checked:this.props.financialCalculatorTotalAmount,onChange:e=>{this.props.onChange({financialCalculatorTotalAmount:e})},indent:!0}),a.jsx(t,{label:"Include time-to-pay-off",infoTip:"This provides the student with the ability to view a time to pay off calculator; e.g., given a loan amount, interest rate, and monthly payment, how long will it take to pay off the loan?",checked:this.props.financialCalculatorTimeToPayOff,onChange:e=>{this.props.onChange({financialCalculatorTimeToPayOff:e})},indent:!0})]}),a.jsx(t,{label:"Show periodic table",infoTip:"This provides the student with the ability to view a periodic table of the elements, e.g., for answering chemistry questions.",checked:this.props.periodicTable,onChange:e=>{this.props.onChange({periodicTable:e,periodicTableWithKey:!1})}}),this.props.periodicTable&&a.jsx(t,{label:"Include key/legend with periodic table",infoTip:"Include a key for HS courses; omit for AP chemistry.",checked:this.props.periodicTableWithKey,onChange:e=>{this.props.onChange({periodicTableWithKey:e})},indent:!0}),a.jsx(t,{label:"Show z table (statistics)",infoTip:"This provides the student with the ability to view a table of critical values for the z distribution, e.g. for answering statistics questions.",checked:this.props.zTable,onChange:e=>{this.props.onChange({zTable:e})}}),a.jsx(t,{label:"Show t table (statistics)",infoTip:"This provides the student with the ability to view a table of critical values for the Student's t distribution, e.g. for answering statistics questions.",checked:this.props.tTable,onChange:e=>{this.props.onChange({tTable:e})}}),a.jsx(t,{label:"Show chi-squared table (statistics)",infoTip:"This provides the student with the ability to view a table of critical values for the chi-squared distribution, e.g. for answering statistics questions.",checked:this.props.chi2Table,onChange:e=>{this.props.onChange({chi2Table:e})}})]})})}};o.defaultProps={calculator:!1,chi2Table:!1,financialCalculatorMonthlyPayment:!1,financialCalculatorTotalAmount:!1,financialCalculatorTimeToPayOff:!1,periodicTable:!1,periodicTableWithKey:!1,tTable:!1,zTable:!1};let l=o;const t=i=>a.jsx(s,{style:[r.checkbox,i.indent?r.indented:void 0],children:a.jsx(u,{label:a.jsxs(s,{style:{flexDirection:"row"},children:[i.label," ",a.jsx(m,{children:i.infoTip})]}),checked:i.checked,onChange:e=>i.onChange(e)})}),r=f.StyleSheet.create({indented:{marginInlineStart:p.large_24}});l.__docgenInfo={description:"",methods:[{name:"shouldShowFinancialCalculatorOptions",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"ItemExtrasEditor",props:{onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(props: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"Record",elements:[{name:"unknown[number]",raw:"(typeof ItemExtras)[number]"},{name:"boolean"}],raw:"Record<(typeof ItemExtras)[number], boolean>"}],raw:"Partial"},name:"props"}],return:{name:"void"}}},description:""},calculator:{defaultValue:{value:"false",computed:!1},required:!1},chi2Table:{defaultValue:{value:"false",computed:!1},required:!1},financialCalculatorMonthlyPayment:{defaultValue:{value:"false",computed:!1},required:!1},financialCalculatorTotalAmount:{defaultValue:{value:"false",computed:!1},required:!1},financialCalculatorTimeToPayOff:{defaultValue:{value:"false",computed:!1},required:!1},periodicTable:{defaultValue:{value:"false",computed:!1},required:!1},periodicTableWithKey:{defaultValue:{value:"false",computed:!1},required:!1},tTable:{defaultValue:{value:"false",computed:!1},required:!1},zTable:{defaultValue:{value:"false",computed:!1},required:!1}}};export{l as I}; +import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{I as c}from"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c as h}from"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{V as s}from"./index-0DbkllkJ.js";import{C as u}from"./index-V5gl6frG.js";import{s as p}from"./index-deFLJwr4.js";import{l as f}from"./index-awljIyHI.js";import{r as d}from"./index-6oxdNXpR.js";const{InfoTip:m}=h,o=class o extends d.Component{constructor(){super(...arguments),this.serialize=()=>{const e={...o.defaultProps};for(const n of c)e[n]=!!this.props[n];return e}}shouldShowFinancialCalculatorOptions(){return this.props.financialCalculatorMonthlyPayment||this.props.financialCalculatorTotalAmount||this.props.financialCalculatorTimeToPayOff}render(){return a.jsx("div",{className:"perseus-answer-editor",children:a.jsxs("div",{className:"perseus-answer-options",children:[a.jsx(t,{label:"Show calculator",infoTip:"Use the calculator when completing difficult calculations is NOT the intent of the question. DON’T use the calculator when testing the student’s ability to complete different types of computations.",checked:this.props.calculator,onChange:e=>{this.props.onChange({calculator:e})}}),a.jsx(t,{label:"Show financial calculator",infoTip:"This provides the student with the ability to view a financial calculator, e.g., for answering financial questions. Once checked, requires at least one of the three options below to be checked.",checked:this.shouldShowFinancialCalculatorOptions(),onChange:e=>{this.props.onChange({financialCalculatorMonthlyPayment:e,financialCalculatorTotalAmount:e,financialCalculatorTimeToPayOff:e})}}),this.shouldShowFinancialCalculatorOptions()&&a.jsxs(a.Fragment,{children:[a.jsx(t,{label:"Include monthly payment",infoTip:"This provides the student with the ability to view a monthly payment calculator; e.g., given a loan amount, interest rate, and term, what is the monthly payment?",checked:this.props.financialCalculatorMonthlyPayment,onChange:e=>{this.props.onChange({financialCalculatorMonthlyPayment:e})},indent:!0}),a.jsx(t,{label:"Include total amount",infoTip:"This provides the student with the ability to view a total amount calculator; e.g., given a monthly payment, interest rate, and term, what is the total amount to be paid?",checked:this.props.financialCalculatorTotalAmount,onChange:e=>{this.props.onChange({financialCalculatorTotalAmount:e})},indent:!0}),a.jsx(t,{label:"Include time-to-pay-off",infoTip:"This provides the student with the ability to view a time to pay off calculator; e.g., given a loan amount, interest rate, and monthly payment, how long will it take to pay off the loan?",checked:this.props.financialCalculatorTimeToPayOff,onChange:e=>{this.props.onChange({financialCalculatorTimeToPayOff:e})},indent:!0})]}),a.jsx(t,{label:"Show periodic table",infoTip:"This provides the student with the ability to view a periodic table of the elements, e.g., for answering chemistry questions.",checked:this.props.periodicTable,onChange:e=>{this.props.onChange({periodicTable:e,periodicTableWithKey:!1})}}),this.props.periodicTable&&a.jsx(t,{label:"Include key/legend with periodic table",infoTip:"Include a key for HS courses; omit for AP chemistry.",checked:this.props.periodicTableWithKey,onChange:e=>{this.props.onChange({periodicTableWithKey:e})},indent:!0}),a.jsx(t,{label:"Show z table (statistics)",infoTip:"This provides the student with the ability to view a table of critical values for the z distribution, e.g. for answering statistics questions.",checked:this.props.zTable,onChange:e=>{this.props.onChange({zTable:e})}}),a.jsx(t,{label:"Show t table (statistics)",infoTip:"This provides the student with the ability to view a table of critical values for the Student's t distribution, e.g. for answering statistics questions.",checked:this.props.tTable,onChange:e=>{this.props.onChange({tTable:e})}}),a.jsx(t,{label:"Show chi-squared table (statistics)",infoTip:"This provides the student with the ability to view a table of critical values for the chi-squared distribution, e.g. for answering statistics questions.",checked:this.props.chi2Table,onChange:e=>{this.props.onChange({chi2Table:e})}})]})})}};o.defaultProps={calculator:!1,chi2Table:!1,financialCalculatorMonthlyPayment:!1,financialCalculatorTotalAmount:!1,financialCalculatorTimeToPayOff:!1,periodicTable:!1,periodicTableWithKey:!1,tTable:!1,zTable:!1};let l=o;const t=i=>a.jsx(s,{style:[r.checkbox,i.indent?r.indented:void 0],children:a.jsx(u,{label:a.jsxs(s,{style:{flexDirection:"row"},children:[i.label," ",a.jsx(m,{children:i.infoTip})]}),checked:i.checked,onChange:e=>i.onChange(e)})}),r=f.StyleSheet.create({indented:{marginInlineStart:p.large_24}});l.__docgenInfo={description:"",methods:[{name:"shouldShowFinancialCalculatorOptions",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"ItemExtrasEditor",props:{onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(props: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"Record",elements:[{name:"unknown[number]",raw:"(typeof ItemExtras)[number]"},{name:"boolean"}],raw:"Record<(typeof ItemExtras)[number], boolean>"}],raw:"Partial"},name:"props"}],return:{name:"void"}}},description:""},calculator:{defaultValue:{value:"false",computed:!1},required:!1},chi2Table:{defaultValue:{value:"false",computed:!1},required:!1},financialCalculatorMonthlyPayment:{defaultValue:{value:"false",computed:!1},required:!1},financialCalculatorTotalAmount:{defaultValue:{value:"false",computed:!1},required:!1},financialCalculatorTimeToPayOff:{defaultValue:{value:"false",computed:!1},required:!1},periodicTable:{defaultValue:{value:"false",computed:!1},required:!1},periodicTableWithKey:{defaultValue:{value:"false",computed:!1},required:!1},tTable:{defaultValue:{value:"false",computed:!1},required:!1},zTable:{defaultValue:{value:"false",computed:!1},required:!1}}};export{l as I}; diff --git a/assets/label-image-editor-1k_zX52x.js b/assets/label-image-editor-p_uxNi67.js similarity index 91% rename from assets/label-image-editor-1k_zX52x.js rename to assets/label-image-editor-p_uxNi67.js index ee5f489da9..2773c91827 100644 --- a/assets/label-image-editor-1k_zX52x.js +++ b/assets/label-image-editor-p_uxNi67.js @@ -1,4 +1,4 @@ -import{j as n}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import{U as g}from"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{E as f}from"./editor-jsonify-g-bIiSIM.js";import{l}from"./index-awljIyHI.js";import{r as y}from"./index-6oxdNXpR.js";import{F as k}from"./form-wrapped-text-field-NbyiOLVb.js";import{A as C}from"./answer-choices-dMU0zCzM.js";import{B as w}from"./behavior-kOGaXMua.js";import{Q as A}from"./question-markers-VcHdxP49.js";import{S as v}from"./select-image--icrHv9d.js";const u=class u extends y.Component{constructor(){super(...arguments),this.getSaveWarnings=()=>{const{choices:e,imageAlt:t,imageUrl:s,markers:r}=this.props,a=[];if(e.length<2&&a.push("Question requires at least two answer choices"),s?t||a.push("Question image has no alt text"):a.push("Image is not specified for question"),!r.length)a.push("Question has no markers, to label answers on image");else{let i=0,o=0;for(const m of r)m.answers.length||i++,m.label||o++;i&&a.push(`Question has ${i} markers with no answers selected`),o&&a.push(`Question has ${o} markers with no ARIA label`)}return a},this.handleImageChange=e=>{this.props.onChange({imageUrl:e,imageWidth:0,imageHeight:0}),e&&g.getImageSize(e,(t,s)=>{this.props.onChange({imageUrl:e,imageWidth:t,imageHeight:s})})},this.handleAltChange=e=>{this.props.onChange({imageAlt:e})},this.handleChoicesChange=e=>{this.props.onChange({choices:e})},this.handleMarkersChange=e=>{this.props.onChange({markers:e})},this.handleBehaviorChange=e=>{this.props.onChange(e)}}componentDidUpdate(e){const t={};e.markers.forEach(r=>t[`${r.x}.${r.y}`]=r);const s=this.props.markers.map((r,a)=>t.hasOwnProperty(`${r.x}.${r.y}`)?-1:a).filter(r=>r!==-1);s.length&&this._questionMarkers&&this._questionMarkers.openDropdownForMarkerIndices(s)}serialize(){return f.serialize.call(this)}render(){const{choices:e,imageAlt:t,imageUrl:s,imageWidth:r,imageHeight:a,markers:i,multipleAnswers:o,hideChoicesFromInstructions:m}=this.props,c=s&&r>0&&a>0;return n.jsxs("div",{children:[n.jsx(v,{onChange:this.handleImageChange,url:s}),n.jsx("div",{className:l.css(p.smallSpacer)}),c&&n.jsx(k,{placeholder:"Alt text (for screen readers)",onChange:h=>this.handleAltChange(h.target.value),value:t,width:"100%"}),n.jsx("div",{className:l.css(p.largeSpacer)}),n.jsx(A,{choices:e,imageUrl:c?s:"",imageWidth:r,imageHeight:a,markers:i,onChange:this.handleMarkersChange,ref:h=>this._questionMarkers=h}),n.jsx("div",{className:l.css(p.largeSpacer)}),n.jsx(C,{choices:e,onChange:this.handleChoicesChange}),n.jsx("div",{className:l.css(p.largeSpacer)}),n.jsx(w,{preferredPopoverDirection:"NONE",multipleAnswers:o,hideChoicesFromInstructions:m,onChange:this.handleBehaviorChange})]})}};u.defaultProps={choices:[],imageAlt:"",imageUrl:"",imageWidth:0,imageHeight:0,markers:[],multipleAnswers:!1,hideChoicesFromInstructions:!1},u.widgetName="label-image";let d=u;const p=l.StyleSheet.create({largeSpacer:{height:32},smallSpacer:{height:16}});d.__docgenInfo={description:"",methods:[{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"any"}}},{name:"handleImageChange",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:{name:"string"}}],returns:null},{name:"handleAltChange",docblock:null,modifiers:[],params:[{name:"alt",optional:!1,type:{name:"string"}}],returns:null},{name:"handleChoicesChange",docblock:null,modifiers:[],params:[{name:"choices",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:null},{name:"handleMarkersChange",docblock:null,modifiers:[],params:[{name:"markers",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ +import{j as n}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import{U as g}from"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{E as f}from"./editor-jsonify-mta12v4L.js";import{l}from"./index-awljIyHI.js";import{r as y}from"./index-6oxdNXpR.js";import{F as k}from"./form-wrapped-text-field-NbyiOLVb.js";import{A as C}from"./answer-choices-mpHXtu7D.js";import{B as w}from"./behavior-XUZDhvN-.js";import{Q as A}from"./question-markers-vke3EOoD.js";import{S as v}from"./select-image-ajCB5YeG.js";const u=class u extends y.Component{constructor(){super(...arguments),this.getSaveWarnings=()=>{const{choices:e,imageAlt:t,imageUrl:s,markers:r}=this.props,a=[];if(e.length<2&&a.push("Question requires at least two answer choices"),s?t||a.push("Question image has no alt text"):a.push("Image is not specified for question"),!r.length)a.push("Question has no markers, to label answers on image");else{let i=0,o=0;for(const m of r)m.answers.length||i++,m.label||o++;i&&a.push(`Question has ${i} markers with no answers selected`),o&&a.push(`Question has ${o} markers with no ARIA label`)}return a},this.handleImageChange=e=>{this.props.onChange({imageUrl:e,imageWidth:0,imageHeight:0}),e&&g.getImageSize(e,(t,s)=>{this.props.onChange({imageUrl:e,imageWidth:t,imageHeight:s})})},this.handleAltChange=e=>{this.props.onChange({imageAlt:e})},this.handleChoicesChange=e=>{this.props.onChange({choices:e})},this.handleMarkersChange=e=>{this.props.onChange({markers:e})},this.handleBehaviorChange=e=>{this.props.onChange(e)}}componentDidUpdate(e){const t={};e.markers.forEach(r=>t[`${r.x}.${r.y}`]=r);const s=this.props.markers.map((r,a)=>t.hasOwnProperty(`${r.x}.${r.y}`)?-1:a).filter(r=>r!==-1);s.length&&this._questionMarkers&&this._questionMarkers.openDropdownForMarkerIndices(s)}serialize(){return f.serialize.call(this)}render(){const{choices:e,imageAlt:t,imageUrl:s,imageWidth:r,imageHeight:a,markers:i,multipleAnswers:o,hideChoicesFromInstructions:m}=this.props,c=s&&r>0&&a>0;return n.jsxs("div",{children:[n.jsx(v,{onChange:this.handleImageChange,url:s}),n.jsx("div",{className:l.css(p.smallSpacer)}),c&&n.jsx(k,{placeholder:"Alt text (for screen readers)",onChange:h=>this.handleAltChange(h.target.value),value:t,width:"100%"}),n.jsx("div",{className:l.css(p.largeSpacer)}),n.jsx(A,{choices:e,imageUrl:c?s:"",imageWidth:r,imageHeight:a,markers:i,onChange:this.handleMarkersChange,ref:h=>this._questionMarkers=h}),n.jsx("div",{className:l.css(p.largeSpacer)}),n.jsx(C,{choices:e,onChange:this.handleChoicesChange}),n.jsx("div",{className:l.css(p.largeSpacer)}),n.jsx(w,{preferredPopoverDirection:"NONE",multipleAnswers:o,hideChoicesFromInstructions:m,onChange:this.handleBehaviorChange})]})}};u.defaultProps={choices:[],imageAlt:"",imageUrl:"",imageWidth:0,imageHeight:0,markers:[],multipleAnswers:!1,hideChoicesFromInstructions:!1},u.widgetName="label-image";let d=u;const p=l.StyleSheet.create({largeSpacer:{height:32},smallSpacer:{height:16}});d.__docgenInfo={description:"",methods:[{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"any"}}},{name:"handleImageChange",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:{name:"string"}}],returns:null},{name:"handleAltChange",docblock:null,modifiers:[],params:[{name:"alt",optional:!1,type:{name:"string"}}],returns:null},{name:"handleChoicesChange",docblock:null,modifiers:[],params:[{name:"choices",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:null},{name:"handleMarkersChange",docblock:null,modifiers:[],params:[{name:"markers",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ // The list of correct answers expected for the marker. answers: ReadonlyArray; // The marker title or description. diff --git a/assets/label-image-editor.stories-5zPoLBjb.js b/assets/label-image-editor.stories-1UuVDh5y.js similarity index 77% rename from assets/label-image-editor.stories-5zPoLBjb.js rename to assets/label-image-editor.stories-1UuVDh5y.js index 29e4a462bf..8c04519c99 100644 --- a/assets/label-image-editor.stories-5zPoLBjb.js +++ b/assets/label-image-editor.stories-1UuVDh5y.js @@ -1,3 +1,3 @@ -import{j as o}from"./jsx-runtime-63Ea5SlK.js";import{l as e}from"./index-awljIyHI.js";import{r as a}from"./index-6oxdNXpR.js";import{L as n}from"./label-image-editor-1k_zX52x.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./editor-jsonify-g-bIiSIM.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-dMU0zCzM.js";import"./components-ODdjt0Ld.js";import"./behavior-kOGaXMua.js";import"./question-markers-VcHdxP49.js";import"./marker-qF2kRuTF.js";import"./util-qk2aeK8X.js";import"./select-image--icrHv9d.js";const st={title:"PerseusEditor/Widgets/Label Image Editor"},l=e.StyleSheet.create({wrapper:{width:338}});class c extends a.Component{constructor(){super(...arguments),this.state={imageAlt:"Map of Europe",choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],imageUrl:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",imageWidth:1280,imageHeight:1024,markers:[{answers:["BMW","Volkswagen","Porsche"],label:"Germany",x:37.3,y:53.6},{answers:[],label:"",x:21,y:46},{answers:["Lamborghini","Fiat","Ferrari"],label:"Italy",x:41.4,y:78.8}]}}render(){return o.jsx("div",{className:e.css(l.wrapper),children:o.jsx(n,{...this.state,onChange:t=>this.setState({...this._widget.serialize(),...t}),ref:t=>this._widget=t})})}}const r=s=>o.jsx(c,{});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,m,p;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as o}from"./jsx-runtime-63Ea5SlK.js";import{l as e}from"./index-awljIyHI.js";import{r as a}from"./index-6oxdNXpR.js";import{L as n}from"./label-image-editor-p_uxNi67.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./editor-jsonify-mta12v4L.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-mpHXtu7D.js";import"./components-ODdjt0Ld.js";import"./behavior-XUZDhvN-.js";import"./question-markers-vke3EOoD.js";import"./marker-l6CMdFr_.js";import"./util-qk2aeK8X.js";import"./select-image-ajCB5YeG.js";const st={title:"PerseusEditor/Widgets/Label Image Editor"},l=e.StyleSheet.create({wrapper:{width:338}});class c extends a.Component{constructor(){super(...arguments),this.state={imageAlt:"Map of Europe",choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],imageUrl:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",imageWidth:1280,imageHeight:1024,markers:[{answers:["BMW","Volkswagen","Porsche"],label:"Germany",x:37.3,y:53.6},{answers:[],label:"",x:21,y:46},{answers:["Lamborghini","Fiat","Ferrari"],label:"Italy",x:41.4,y:78.8}]}}render(){return o.jsx("div",{className:e.css(l.wrapper),children:o.jsx(n,{...this.state,onChange:t=>this.setState({...this._widget.serialize(),...t}),ref:t=>this._widget=t})})}}const r=s=>o.jsx(c,{});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,m,p;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(p=(m=r.parameters)==null?void 0:m.docs)==null?void 0:p.source}}};const at=["Default"];export{r as Default,at as __namedExportsOrder,st as default}; diff --git a/assets/label-image.stories-jqRpTW1V.js b/assets/label-image.stories-ZWweyFui.js similarity index 93% rename from assets/label-image.stories-jqRpTW1V.js rename to assets/label-image.stories-ZWweyFui.js index e3ac858028..1418353435 100644 --- a/assets/label-image.stories-jqRpTW1V.js +++ b/assets/label-image.stories-ZWweyFui.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-63Ea5SlK.js";import{R as l}from"./renderer-with-debug-ui-75hBDQJk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const W={content:`Carol created a chart and a bar graph to show how many of each type of vehicle were in her supermarket parking lot. +import{j as s}from"./jsx-runtime-63Ea5SlK.js";import{R as l}from"./renderer-with-debug-ui-Jq91P-PK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const W={content:`Carol created a chart and a bar graph to show how many of each type of vehicle were in her supermarket parking lot. Vehicle Type | Number in the parking lot :- | :-: diff --git a/assets/labeled-switch-7da7Bmzh.js b/assets/labeled-switch-_gGF8eh_.js similarity index 94% rename from assets/labeled-switch-7da7Bmzh.js rename to assets/labeled-switch-_gGF8eh_.js index 8a777a13c1..1b21eb632f 100644 --- a/assets/labeled-switch-7da7Bmzh.js +++ b/assets/labeled-switch-_gGF8eh_.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{u as a,V as l}from"./index-0DbkllkJ.js";import{S as m}from"./index-nqMmpXbO.js";import{S as c}from"./article-renderer-mU-6RWLp.js";import{s as d}from"./index-deFLJwr4.js";import{a as p}from"./index-18qWGOW7.js";import{l as u}from"./index-awljIyHI.js";const h=r=>{const{checked:s,label:i,style:o,onChange:n}=r,t=a().get("switch");return e.jsxs(l,{style:[y.row,o],children:[e.jsx(c,{id:t,checked:s,onChange:n}),e.jsx(m,{size:d.xSmall_8}),e.jsx(p,{tag:"label",htmlFor:t,children:i})]})},y=u.StyleSheet.create({row:{flexDirection:"row",alignItems:"center"}});h.__docgenInfo={description:"",methods:[],displayName:"LabeledSwitch",props:{label:{required:!0,tsType:{name:"string"},description:""},checked:{required:!0,tsType:{name:"boolean"},description:""},style:{required:!1,tsType:{name:"StyleType"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValue: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"newValue"}],return:{name:"void"}}},description:""}}};export{h as L}; +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{u as a,V as l}from"./index-0DbkllkJ.js";import{S as m}from"./index-nqMmpXbO.js";import{S as c}from"./article-renderer-HEYBK15c.js";import{s as d}from"./index-deFLJwr4.js";import{a as p}from"./index-18qWGOW7.js";import{l as u}from"./index-awljIyHI.js";const h=r=>{const{checked:s,label:i,style:o,onChange:n}=r,t=a().get("switch");return e.jsxs(l,{style:[y.row,o],children:[e.jsx(c,{id:t,checked:s,onChange:n}),e.jsx(m,{size:d.xSmall_8}),e.jsx(p,{tag:"label",htmlFor:t,children:i})]})},y=u.StyleSheet.create({row:{flexDirection:"row",alignItems:"center"}});h.__docgenInfo={description:"",methods:[],displayName:"LabeledSwitch",props:{label:{required:!0,tsType:{name:"string"},description:""},checked:{required:!0,tsType:{name:"boolean"},description:""},style:{required:!1,tsType:{name:"StyleType"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValue: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"newValue"}],return:{name:"void"}}},description:""}}};export{h as L}; diff --git a/assets/line-stroke-select-Kn8DFI_S.js b/assets/line-stroke-select-H15MLZYg.js similarity index 94% rename from assets/line-stroke-select-Kn8DFI_S.js rename to assets/line-stroke-select-H15MLZYg.js index c1a003da85..55ae5e07ef 100644 --- a/assets/line-stroke-select-Kn8DFI_S.js +++ b/assets/line-stroke-select-H15MLZYg.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{S as l,O as t}from"./answer-choices-lVeJkx-U.js";import{S as i}from"./index-nqMmpXbO.js";import{s as n}from"./index-deFLJwr4.js";import{a as o}from"./index-18qWGOW7.js";import{l as d}from"./index-awljIyHI.js";const m=s=>{const{selectedValue:r,onChange:a}=s;return e.jsxs(o,{tag:"label",style:p.lineStrokeSelect,children:["stroke",e.jsx(i,{size:n.xxxSmall_4}),e.jsxs(l,{selectedValue:r,onChange:a,placeholder:"",children:[e.jsx(t,{value:"solid",label:"solid"}),e.jsx(t,{value:"dashed",label:"dashed"})]})]})},p=d.StyleSheet.create({lineStrokeSelect:{display:"flex",flexDirection:"row",alignItems:"center",minWidth:0}});m.__docgenInfo={description:"",methods:[],displayName:"LineStrokeSelect",props:{selectedValue:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValue: string) => void",signature:{arguments:[{type:{name:"string"},name:"newValue"}],return:{name:"void"}}},description:""}}};export{m as L}; +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{S as l,O as t}from"./answer-choices-iyIz6W_C.js";import{S as i}from"./index-nqMmpXbO.js";import{s as n}from"./index-deFLJwr4.js";import{a as o}from"./index-18qWGOW7.js";import{l as d}from"./index-awljIyHI.js";const m=s=>{const{selectedValue:r,onChange:a}=s;return e.jsxs(o,{tag:"label",style:p.lineStrokeSelect,children:["stroke",e.jsx(i,{size:n.xxxSmall_4}),e.jsxs(l,{selectedValue:r,onChange:a,placeholder:"",children:[e.jsx(t,{value:"solid",label:"solid"}),e.jsx(t,{value:"dashed",label:"dashed"})]})]})},p=d.StyleSheet.create({lineStrokeSelect:{display:"flex",flexDirection:"row",alignItems:"center",minWidth:0}});m.__docgenInfo={description:"",methods:[],displayName:"LineStrokeSelect",props:{selectedValue:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValue: string) => void",signature:{arguments:[{type:{name:"string"},name:"newValue"}],return:{name:"void"}}},description:""}}};export{m as L}; diff --git a/assets/line-swatch-qqHDCIz5.js b/assets/line-swatch-9TD4hiwz.js similarity index 81% rename from assets/line-swatch-qqHDCIz5.js rename to assets/line-swatch-9TD4hiwz.js index f3df68f586..ae19671e3f 100644 --- a/assets/line-swatch-qqHDCIz5.js +++ b/assets/line-swatch-9TD4hiwz.js @@ -1 +1 @@ -import{j as t}from"./jsx-runtime-63Ea5SlK.js";import{l as n}from"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{V as i}from"./index-0DbkllkJ.js";import{c as a,s as e}from"./index-deFLJwr4.js";import{l}from"./index-awljIyHI.js";const s=p=>{const{color:r,lineStyle:o}=p;return t.jsx(i,{style:m.container,children:t.jsx(i,{"aria-label":`${r}, ${o}`,style:[m.lineSwatch,{border:`5px ${o} ${n[r]}`}]})})},m=l.StyleSheet.create({container:{backgroundColor:a.white,justifyContent:"center",padding:e.xSmall_8,borderRadius:e.xxxSmall_4},lineSwatch:{width:40}});s.__docgenInfo={description:"",methods:[],displayName:"LineSwatch",props:{color:{required:!0,tsType:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},description:""},lineStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""}}};export{s as L}; +import{j as t}from"./jsx-runtime-63Ea5SlK.js";import{l as n}from"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{V as i}from"./index-0DbkllkJ.js";import{c as a,s as e}from"./index-deFLJwr4.js";import{l}from"./index-awljIyHI.js";const s=p=>{const{color:r,lineStyle:o}=p;return t.jsx(i,{style:m.container,children:t.jsx(i,{"aria-label":`${r}, ${o}`,style:[m.lineSwatch,{border:`5px ${o} ${n[r]}`}]})})},m=l.StyleSheet.create({container:{backgroundColor:a.white,justifyContent:"center",padding:e.xSmall_8,borderRadius:e.xxxSmall_4},lineSwatch:{width:40}});s.__docgenInfo={description:"",methods:[],displayName:"LineSwatch",props:{color:{required:!0,tsType:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},description:""},lineStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""}}};export{s as L}; diff --git a/assets/locked-ellipse-settings-_hRNhR9E.js b/assets/locked-ellipse-settings-Y_UkseIl.js similarity index 94% rename from assets/locked-ellipse-settings-_hRNhR9E.js rename to assets/locked-ellipse-settings-Y_UkseIl.js index 155f2041f6..db069cd133 100644 --- a/assets/locked-ellipse-settings-_hRNhR9E.js +++ b/assets/locked-ellipse-settings-Y_UkseIl.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{l as j,a as F}from"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import{c as W}from"./components-ODdjt0Ld.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{B as V}from"./choice-Xr-SKHrB.js";import{V as p}from"./index-0DbkllkJ.js";import{S as X,O as G}from"./answer-choices-lVeJkx-U.js";import{S as d}from"./index-nqMmpXbO.js";import{s,c as h}from"./index-deFLJwr4.js";import{a as w,L as H}from"./index-18qWGOW7.js";import{L as J,p as K}from"./locked-figure-aria-wRg9cB39.js";import{l as v}from"./index-awljIyHI.js";import{r as Q}from"./index-6oxdNXpR.js";import{S as Y}from"./scrollless-number-text-field-d5PK69vy.js";import{r as $,d as Z}from"./util-qk2aeK8X.js";import{P as ee,C as L,L as re,a as ne}from"./locked-label-settings-lVE0HwhW.js";import{C as ae}from"./color-select-4NqU465A.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import{L as te}from"./line-stroke-select-Kn8DFI_S.js";import{g as le,j as ie,a as oe}from"./util-x8Ikjhfh.js";const _=c=>{const{angle:u,onChange:t}=c,[i,y]=Q.useState($(u).toString());function b(n){y(n),!(isNaN(+n)||n==="")&&t(Z(n))}return e.jsxs(w,{tag:"label",style:q.row,children:["angle (degrees)",e.jsx(d,{size:s.xxSmall_6}),e.jsx(Y,{value:i,onChange:b,style:q.textField}),e.jsx(d,{size:s.xxSmall_6})]})},q=v.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},textField:{width:s.xxxLarge_64}});_.__docgenInfo={description:"",methods:[],displayName:"AngleInput",props:{angle:{required:!0,tsType:{name:"number"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(angle: number) => void",signature:{arguments:[{type:{name:"number"},name:"angle"}],return:{name:"void"}}},description:""}}};const z=c=>{const{color:u,fillStyle:t,strokeStyle:i}=c;return e.jsx(p,{"aria-label":`${u}, stroke ${i}, fill ${t}`,style:[T.container,{border:`4px ${i} ${j[u]}`}],children:e.jsx(p,{style:[T.innerCircle,{backgroundColor:j[u],opacity:t==="white"?0:F[t]}]})})},T=v.StyleSheet.create({container:{outline:`2px solid ${h.offWhite}`,borderRadius:"50%",width:s.xLarge_32,height:s.large_24,backgroundColor:h.white,alignItems:"center",justifyContent:"center"},innerCircle:{width:28,height:20,borderRadius:"50%"}});z.__docgenInfo={description:"",methods:[],displayName:"EllipseSwatch",props:{color:{required:!0,tsType:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},description:""},fillStyle:{required:!0,tsType:{name:"union",raw:'"none" | "white" | "translucent" | "solid"',elements:[{name:"literal",value:'"none"'},{name:"literal",value:'"white"'},{name:"literal",value:'"translucent"'},{name:"literal",value:'"solid"'}]},description:""},strokeStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""}}};const{InfoTip:se}=W,P=c=>{var S,C;const{flags:u,center:t,radius:i,angle:y,color:b,labels:n,ariaLabel:A,fillStyle:f,strokeStyle:x,expanded:E,onToggle:I,onChangeProps:m,onMove:R,onRemove:N}=c;async function B(){const r=await ie(n),l=i[0]===i[1];let a="";l?a+=`Circle${r} with radius ${i[0]}`:a+=`Ellipse${r} with x radius ${i[0]} and y radius ${i[1]}`,a+=`, centered at (${t[0]}, ${t[1]})`,!l&&y!==0&&(a+=`, rotated by ${$(y)} degrees`);const g=oe(b,x,f);return a+=g,a}function O(r){const l=r[0]-t[0],a=r[1]-t[1],g={center:r};g.labels=n==null?void 0:n.map(k=>({...k,coord:[k.coord[0]+l,k.coord[1]+a]})),m(g)}function D(r){const l={color:r};l.labels=n==null?void 0:n.map(a=>({...a,color:r})),m(l)}function M(r,l){if(!n)return;const a=[...n];a[l]={...n[l],...r},m({labels:a})}function U(r){if(!n)return;const l=n.filter((a,g)=>g!==r);m({labels:l})}return e.jsxs(ee,{expanded:E,onToggle:I,header:e.jsxs(p,{style:o.row,children:[e.jsx(H,{children:`Ellipse (${t[0]}, ${t[1]}), radius ${i[0]}, ${i[1]}`}),e.jsx(d,{size:s.xSmall_8}),e.jsx(z,{color:c.color,fillStyle:f,strokeStyle:x})]}),children:[e.jsxs(p,{style:o.row,children:[e.jsx(L,{coord:t,style:o.spaceUnder,onChange:O}),e.jsx(p,{style:o.spaceUnder,children:e.jsx(se,{children:"The coordinates for the center of the ellipse."})})]}),e.jsx(L,{coord:i,labels:["x radius","y radius"],style:o.spaceUnder,onChange:r=>m({radius:r})}),e.jsx(_,{angle:y,onChange:r=>m({angle:r})}),e.jsx(d,{size:s.xSmall_8}),e.jsxs(p,{style:[o.row,o.spaceUnder],children:[e.jsx(ae,{selectedValue:b,onChange:D}),e.jsx(d,{size:s.medium_16}),e.jsxs(w,{tag:"label",style:[o.row,o.truncatedWidth],children:["fill",e.jsx(d,{size:s.xxSmall_6}),e.jsx(X,{selectedValue:f,onChange:r=>m({fillStyle:r}),placeholder:"",children:Object.keys(F).map(r=>e.jsx(G,{value:r,label:r},r))})]})]}),e.jsx(te,{selectedValue:x,onChange:r=>m({strokeStyle:r})}),((S=u==null?void 0:u.mafs)==null?void 0:S["locked-figures-aria"])&&e.jsxs(e.Fragment,{children:[e.jsx(d,{size:s.small_12}),e.jsx(p,{style:o.horizontalRule}),e.jsx(J,{ariaLabel:A,getPrepopulatedAriaLabel:B,onChangeProps:r=>{m(r)}})]}),((C=u==null?void 0:u.mafs)==null?void 0:C["locked-ellipse-labels"])&&e.jsxs(e.Fragment,{children:[e.jsx(d,{size:s.xxxSmall_4}),e.jsx(p,{style:o.horizontalRule}),e.jsx(d,{size:s.small_12}),e.jsx(w,{children:"Visible labels"}),n==null?void 0:n.map((r,l)=>e.jsx(re,{...r,expanded:!0,onChangeProps:a=>{M(a,l)},onRemove:()=>{U(l)},containerStyle:o.labelContainer})),e.jsx(V,{kind:"tertiary",startIcon:K,onClick:()=>{const r={...le("label"),coord:[t[0],t[1]-((n==null?void 0:n.length)??0)],color:b};m({labels:[...n??[],r]})},style:o.addButton,children:"Add visible label"})]}),e.jsx(ne,{figureType:c.type,onMove:R,onRemove:N})]})},o=v.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},spaceUnder:{marginBottom:s.xSmall_8},truncatedWidth:{minWidth:0},addButton:{alignSelf:"start"},labelContainer:{backgroundColor:h.white},horizontalRule:{height:1,backgroundColor:h.offBlack16}}),Ze=P;P.__docgenInfo={description:"",methods:[],displayName:"LockedEllipseSettings",props:{flags:{required:!1,tsType:{name:'Readonly["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{l as j,a as F}from"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c as W}from"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{B as V}from"./choice-Xr-SKHrB.js";import{V as p}from"./index-0DbkllkJ.js";import{S as X,O as G}from"./answer-choices-iyIz6W_C.js";import{S as d}from"./index-nqMmpXbO.js";import{s,c as h}from"./index-deFLJwr4.js";import{a as w,L as H}from"./index-18qWGOW7.js";import{L as J,p as K}from"./locked-figure-aria-1k3pfy3U.js";import{l as v}from"./index-awljIyHI.js";import{r as Q}from"./index-6oxdNXpR.js";import{S as Y}from"./scrollless-number-text-field-d5PK69vy.js";import{r as $,d as Z}from"./util-qk2aeK8X.js";import{P as ee,C as L,L as re,a as ne}from"./locked-label-settings-CnylHQl6.js";import{C as ae}from"./color-select-javI8CkK.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import{L as te}from"./line-stroke-select-H15MLZYg.js";import{g as le,j as ie,a as oe}from"./util-ZotWJxjO.js";const _=c=>{const{angle:u,onChange:t}=c,[i,y]=Q.useState($(u).toString());function b(n){y(n),!(isNaN(+n)||n==="")&&t(Z(n))}return e.jsxs(w,{tag:"label",style:q.row,children:["angle (degrees)",e.jsx(d,{size:s.xxSmall_6}),e.jsx(Y,{value:i,onChange:b,style:q.textField}),e.jsx(d,{size:s.xxSmall_6})]})},q=v.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},textField:{width:s.xxxLarge_64}});_.__docgenInfo={description:"",methods:[],displayName:"AngleInput",props:{angle:{required:!0,tsType:{name:"number"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(angle: number) => void",signature:{arguments:[{type:{name:"number"},name:"angle"}],return:{name:"void"}}},description:""}}};const z=c=>{const{color:u,fillStyle:t,strokeStyle:i}=c;return e.jsx(p,{"aria-label":`${u}, stroke ${i}, fill ${t}`,style:[T.container,{border:`4px ${i} ${j[u]}`}],children:e.jsx(p,{style:[T.innerCircle,{backgroundColor:j[u],opacity:t==="white"?0:F[t]}]})})},T=v.StyleSheet.create({container:{outline:`2px solid ${h.offWhite}`,borderRadius:"50%",width:s.xLarge_32,height:s.large_24,backgroundColor:h.white,alignItems:"center",justifyContent:"center"},innerCircle:{width:28,height:20,borderRadius:"50%"}});z.__docgenInfo={description:"",methods:[],displayName:"EllipseSwatch",props:{color:{required:!0,tsType:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},description:""},fillStyle:{required:!0,tsType:{name:"union",raw:'"none" | "white" | "translucent" | "solid"',elements:[{name:"literal",value:'"none"'},{name:"literal",value:'"white"'},{name:"literal",value:'"translucent"'},{name:"literal",value:'"solid"'}]},description:""},strokeStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""}}};const{InfoTip:se}=W,P=c=>{var S,C;const{flags:u,center:t,radius:i,angle:y,color:b,labels:n,ariaLabel:A,fillStyle:f,strokeStyle:x,expanded:E,onToggle:I,onChangeProps:m,onMove:R,onRemove:N}=c;async function B(){const r=await ie(n),l=i[0]===i[1];let a="";l?a+=`Circle${r} with radius ${i[0]}`:a+=`Ellipse${r} with x radius ${i[0]} and y radius ${i[1]}`,a+=`, centered at (${t[0]}, ${t[1]})`,!l&&y!==0&&(a+=`, rotated by ${$(y)} degrees`);const g=oe(b,x,f);return a+=g,a}function O(r){const l=r[0]-t[0],a=r[1]-t[1],g={center:r};g.labels=n==null?void 0:n.map(k=>({...k,coord:[k.coord[0]+l,k.coord[1]+a]})),m(g)}function D(r){const l={color:r};l.labels=n==null?void 0:n.map(a=>({...a,color:r})),m(l)}function M(r,l){if(!n)return;const a=[...n];a[l]={...n[l],...r},m({labels:a})}function U(r){if(!n)return;const l=n.filter((a,g)=>g!==r);m({labels:l})}return e.jsxs(ee,{expanded:E,onToggle:I,header:e.jsxs(p,{style:o.row,children:[e.jsx(H,{children:`Ellipse (${t[0]}, ${t[1]}), radius ${i[0]}, ${i[1]}`}),e.jsx(d,{size:s.xSmall_8}),e.jsx(z,{color:c.color,fillStyle:f,strokeStyle:x})]}),children:[e.jsxs(p,{style:o.row,children:[e.jsx(L,{coord:t,style:o.spaceUnder,onChange:O}),e.jsx(p,{style:o.spaceUnder,children:e.jsx(se,{children:"The coordinates for the center of the ellipse."})})]}),e.jsx(L,{coord:i,labels:["x radius","y radius"],style:o.spaceUnder,onChange:r=>m({radius:r})}),e.jsx(_,{angle:y,onChange:r=>m({angle:r})}),e.jsx(d,{size:s.xSmall_8}),e.jsxs(p,{style:[o.row,o.spaceUnder],children:[e.jsx(ae,{selectedValue:b,onChange:D}),e.jsx(d,{size:s.medium_16}),e.jsxs(w,{tag:"label",style:[o.row,o.truncatedWidth],children:["fill",e.jsx(d,{size:s.xxSmall_6}),e.jsx(X,{selectedValue:f,onChange:r=>m({fillStyle:r}),placeholder:"",children:Object.keys(F).map(r=>e.jsx(G,{value:r,label:r},r))})]})]}),e.jsx(te,{selectedValue:x,onChange:r=>m({strokeStyle:r})}),((S=u==null?void 0:u.mafs)==null?void 0:S["locked-figures-aria"])&&e.jsxs(e.Fragment,{children:[e.jsx(d,{size:s.small_12}),e.jsx(p,{style:o.horizontalRule}),e.jsx(J,{ariaLabel:A,getPrepopulatedAriaLabel:B,onChangeProps:r=>{m(r)}})]}),((C=u==null?void 0:u.mafs)==null?void 0:C["locked-ellipse-labels"])&&e.jsxs(e.Fragment,{children:[e.jsx(d,{size:s.xxxSmall_4}),e.jsx(p,{style:o.horizontalRule}),e.jsx(d,{size:s.small_12}),e.jsx(w,{children:"Visible labels"}),n==null?void 0:n.map((r,l)=>e.jsx(re,{...r,expanded:!0,onChangeProps:a=>{M(a,l)},onRemove:()=>{U(l)},containerStyle:o.labelContainer})),e.jsx(V,{kind:"tertiary",startIcon:K,onClick:()=>{const r={...le("label"),coord:[t[0],t[1]-((n==null?void 0:n.length)??0)],color:b};m({labels:[...n??[],r]})},style:o.addButton,children:"Add visible label"})]}),e.jsx(ne,{figureType:c.type,onMove:R,onRemove:N})]})},o=v.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},spaceUnder:{marginBottom:s.xSmall_8},truncatedWidth:{minWidth:0},addButton:{alignSelf:"start"},labelContainer:{backgroundColor:h.white},horizontalRule:{height:1,backgroundColor:h.offBlack16}}),Ze=P;P.__docgenInfo={description:"",methods:[],displayName:"LockedEllipseSettings",props:{flags:{required:!1,tsType:{name:'Readonly["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" | "backward" | "forward" | "front"`,elements:[{name:"literal",value:'"back"'},{name:"literal",value:'"backward"'},{name:"literal",value:'"forward"'},{name:"literal",value:'"front"'}]},name:"movement"}],return:{name:"void"}}},description:"Called when a movement button (top, up, down, bottom) is pressed."},onRemove:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"Called when the delete button is pressed."},expanded:{required:!1,tsType:{name:"boolean"},description:"Whether this accordion is expanded."},onToggle:{required:!1,tsType:{name:"signature",type:"function",raw:"(expanded: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"expanded"}],return:{name:"void"}}},description:"Called when the accordion is expanded or collapsed."},type:{required:!0,tsType:{name:"literal",value:'"ellipse"'},description:""},center:{required:!0,tsType:{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},description:""},radius:{required:!0,tsType:{name:"tuple",raw:"[x: number, y: number]",elements:[{name:"unknown"},{name:"unknown"}]},description:""},angle:{required:!0,tsType:{name:"number"},description:""},color:{required:!0,tsType:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},description:""},fillStyle:{required:!0,tsType:{name:"union",raw:'"none" | "white" | "translucent" | "solid"',elements:[{name:"literal",value:'"none"'},{name:"literal",value:'"white"'},{name:"literal",value:'"translucent"'},{name:"literal",value:'"solid"'}]},description:""},strokeStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""},labels:{required:!1,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:`{ diff --git a/assets/locked-ellipse-settings.stories-i534RLiL.js b/assets/locked-ellipse-settings.stories-SVJRu-5d.js similarity index 82% rename from assets/locked-ellipse-settings.stories-i534RLiL.js rename to assets/locked-ellipse-settings.stories-SVJRu-5d.js index 3abcd78540..2ebaf01e2c 100644 --- a/assets/locked-ellipse-settings.stories-i534RLiL.js +++ b/assets/locked-ellipse-settings.stories-SVJRu-5d.js @@ -1,4 +1,4 @@ -import{j as d}from"./jsx-runtime-63Ea5SlK.js";import{r as a}from"./index-6oxdNXpR.js";import{L as i}from"./locked-ellipse-settings-_hRNhR9E.js";import{g as k}from"./util-x8Ikjhfh.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./locked-figure-aria-wRg9cB39.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-lVE0HwhW.js";import"./color-select-4NqU465A.js";import"./line-stroke-select-Kn8DFI_S.js";const Eo={title:"PerseusEditor/Components/Locked Ellipse Settings",component:i},r=s=>d.jsx(i,{...s}),c={...k("ellipse"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};r.args=c;const o={render:function(){const[t,m]=a.useState(c),p=n=>{m({...t,...n})};return d.jsx(i,{...t,onChangeProps:p})}};o.parameters={chromatic:{disableSnapshot:!0}};const e={render:function(){const[t,m]=a.useState(!0),[p,n]=a.useState(c),R=C=>{n({...p,...C})};return d.jsx(i,{...p,expanded:t,onToggle:m,onChangeProps:R})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var l,u,g;r.parameters={...r.parameters,docs:{...(l=r.parameters)==null?void 0:l.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as d}from"./jsx-runtime-63Ea5SlK.js";import{r as a}from"./index-6oxdNXpR.js";import{L as i}from"./locked-ellipse-settings-Y_UkseIl.js";import{g as k}from"./util-ZotWJxjO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./locked-figure-aria-1k3pfy3U.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-CnylHQl6.js";import"./color-select-javI8CkK.js";import"./line-stroke-select-H15MLZYg.js";const Eo={title:"PerseusEditor/Components/Locked Ellipse Settings",component:i},r=s=>d.jsx(i,{...s}),c={...k("ellipse"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};r.args=c;const o={render:function(){const[t,m]=a.useState(c),p=n=>{m({...t,...n})};return d.jsx(i,{...t,onChangeProps:p})}};o.parameters={chromatic:{disableSnapshot:!0}};const e={render:function(){const[t,m]=a.useState(!0),[p,n]=a.useState(c),R=C=>{n({...p,...C})};return d.jsx(i,{...p,expanded:t,onToggle:m,onChangeProps:R})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var l,u,g;r.parameters={...r.parameters,docs:{...(l=r.parameters)==null?void 0:l.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(g=(u=r.parameters)==null?void 0:u.docs)==null?void 0:g.source}}};var P,f,x;o.parameters={...o.parameters,docs:{...(P=o.parameters)==null?void 0:P.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/locked-figure-aria-wRg9cB39.js b/assets/locked-figure-aria-1k3pfy3U.js similarity index 90% rename from assets/locked-figure-aria-wRg9cB39.js rename to assets/locked-figure-aria-1k3pfy3U.js index 18c32c6c04..13d8956290 100644 --- a/assets/locked-figure-aria-wRg9cB39.js +++ b/assets/locked-figure-aria-1k3pfy3U.js @@ -1,2 +1,2 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import{c as f}from"./components-ODdjt0Ld.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{B as g}from"./choice-Xr-SKHrB.js";import{V as l}from"./index-0DbkllkJ.js";import{a as h}from"./index-V5gl6frG.js";import{S as t,a as b}from"./index-nqMmpXbO.js";import{c as x,s as i}from"./index-deFLJwr4.js";import{a as y,c as w}from"./index-18qWGOW7.js";import{l as L}from"./index-awljIyHI.js";import{r as p}from"./index-6oxdNXpR.js";const W=""+new URL("plus-circle-MfbD-3cx.svg",import.meta.url).href,j=""+new URL("pencil-circle-IMSnQlOm.svg",import.meta.url).href,{InfoTip:v}=f;function S(m){const{ariaLabel:d,getPrepopulatedAriaLabel:c,onChangeProps:s}=m,n=`aria-label-${p.useId()}`,[u,o]=p.useState(!1);return e.jsxs(l,{children:[e.jsx(t,{size:i.xSmall_8}),e.jsxs(l,{style:a.row,children:[e.jsx(y,{tag:"label",htmlFor:n,children:"Aria label"}),e.jsx(b,{}),e.jsxs(v,{children:["Aria label is used by screen readers to describe content to users who may be visually impaired. ",e.jsx("br",{}),e.jsx("br",{}),"Populating this field will make it so that users can use a screen reader to navigate to this point and hear the description.",e.jsx("br",{}),e.jsx("br",{}),"If you leave this field blank, the point will be hidden from screen readers. Users will not be able to navigate to this point using a screen reader."]})]}),e.jsx(t,{size:i.xxSmall_6}),e.jsx(w,{style:a.caption,children:"The figure is hidden from screen readers if this field is left blank."}),e.jsx(t,{size:i.xxSmall_6}),e.jsx(h,{id:n,value:u?"Loading...":d??"",onChange:r=>{s({ariaLabel:r||void 0})},placeholder:"Ex. Point at (x, y)",rows:1,resizeType:"vertical"}),e.jsx(g,{kind:"tertiary",startIcon:j,style:a.button,onClick:()=>{o(!0),c().then(r=>{o(!1),s({ariaLabel:r})})},children:"Auto-generate"})]})}const a=L.StyleSheet.create({row:{flexDirection:"row",alignItems:"center"},button:{alignSelf:"start"},caption:{color:x.offBlack64}});S.__docgenInfo={description:"",methods:[],displayName:"LockedFigureAria",props:{ariaLabel:{required:!0,tsType:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}]},description:""},getPrepopulatedAriaLabel:{required:!0,tsType:{name:"signature",type:"function",raw:"() => Promise",signature:{arguments:[],return:{name:"Promise",elements:[{name:"string"}],raw:"Promise"}}},description:`The async function that generates the prepopulated aria label +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c as f}from"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{B as g}from"./choice-Xr-SKHrB.js";import{V as l}from"./index-0DbkllkJ.js";import{a as h}from"./index-V5gl6frG.js";import{S as t,a as b}from"./index-nqMmpXbO.js";import{c as x,s as i}from"./index-deFLJwr4.js";import{a as y,c as w}from"./index-18qWGOW7.js";import{l as L}from"./index-awljIyHI.js";import{r as p}from"./index-6oxdNXpR.js";const W=""+new URL("plus-circle-MfbD-3cx.svg",import.meta.url).href,j=""+new URL("pencil-circle-IMSnQlOm.svg",import.meta.url).href,{InfoTip:v}=f;function S(m){const{ariaLabel:d,getPrepopulatedAriaLabel:c,onChangeProps:s}=m,n=`aria-label-${p.useId()}`,[u,o]=p.useState(!1);return e.jsxs(l,{children:[e.jsx(t,{size:i.xSmall_8}),e.jsxs(l,{style:a.row,children:[e.jsx(y,{tag:"label",htmlFor:n,children:"Aria label"}),e.jsx(b,{}),e.jsxs(v,{children:["Aria label is used by screen readers to describe content to users who may be visually impaired. ",e.jsx("br",{}),e.jsx("br",{}),"Populating this field will make it so that users can use a screen reader to navigate to this point and hear the description.",e.jsx("br",{}),e.jsx("br",{}),"If you leave this field blank, the point will be hidden from screen readers. Users will not be able to navigate to this point using a screen reader."]})]}),e.jsx(t,{size:i.xxSmall_6}),e.jsx(w,{style:a.caption,children:"The figure is hidden from screen readers if this field is left blank."}),e.jsx(t,{size:i.xxSmall_6}),e.jsx(h,{id:n,value:u?"Loading...":d??"",onChange:r=>{s({ariaLabel:r||void 0})},placeholder:"Ex. Point at (x, y)",rows:1,resizeType:"vertical"}),e.jsx(g,{kind:"tertiary",startIcon:j,style:a.button,onClick:()=>{o(!0),c().then(r=>{o(!1),s({ariaLabel:r})})},children:"Auto-generate"})]})}const a=L.StyleSheet.create({row:{flexDirection:"row",alignItems:"center"},button:{alignSelf:"start"},caption:{color:x.offBlack64}});S.__docgenInfo={description:"",methods:[],displayName:"LockedFigureAria",props:{ariaLabel:{required:!0,tsType:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}]},description:""},getPrepopulatedAriaLabel:{required:!0,tsType:{name:"signature",type:"function",raw:"() => Promise",signature:{arguments:[],return:{name:"Promise",elements:[{name:"string"}],raw:"Promise"}}},description:`The async function that generates the prepopulated aria label for the locked figure with math details converted to spoken words.`},onChangeProps:{required:!0,tsType:{name:"signature",type:"function",raw:"(props: {ariaLabel?: string | undefined}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{ariaLabel?: string | undefined}",signature:{properties:[{key:"ariaLabel",value:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}],required:!1}}]}},name:"props"}],return:{name:"void"}}},description:""}}};export{S as L,W as p}; diff --git a/assets/locked-figures-section-9mKuroas.js b/assets/locked-figures-section-w9TBjDc-.js similarity index 99% rename from assets/locked-figures-section-9mKuroas.js rename to assets/locked-figures-section-w9TBjDc-.js index 85c4968245..665ed37cb2 100644 --- a/assets/locked-figures-section-9mKuroas.js +++ b/assets/locked-figures-section-w9TBjDc-.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{B as W}from"./choice-Xr-SKHrB.js";import{V as p,u as I}from"./index-0DbkllkJ.js";import{S as E}from"./index-nqMmpXbO.js";import{s as g,c as F}from"./index-deFLJwr4.js";import{l as f}from"./index-awljIyHI.js";import{r as v}from"./index-6oxdNXpR.js";import{H as z}from"./heading-1izW0-GJ.js";import{a as S,b as _}from"./answer-choices-lVeJkx-U.js";import{L as $}from"./locked-ellipse-settings-_hRNhR9E.js";import{L as M}from"./locked-function-settings--UMM0ipk.js";import{L as D}from"./locked-label-settings-lVE0HwhW.js";import{L as V}from"./locked-line-settings-0UTK3Vo6.js";import{L as G}from"./locked-point-settings-HQeaTYKF.js";import{L as U}from"./locked-polygon-settings-1jqOktRr.js";import{L as H}from"./locked-vector-settings-1A9eQa19.js";import{g as K}from"./util-x8Ikjhfh.js";const q=n=>{const{id:h,onChange:o}=n,l=["point","line","vector","ellipse","polygon","function"];return n.showLabelsFlag&&l.push("label"),r.jsx(p,{style:w.container,children:r.jsx(S,{menuText:"Add locked figure",style:w.addElementSelect,children:l.map(u=>r.jsx(_,{label:u,onClick:()=>o(u)},`${h}-${u}`))})})},w=f.StyleSheet.create({container:{marginTop:g.xSmall_8},addElementSelect:{backgroundColor:F.fadedBlue8,borderRadius:g.xxxSmall_4}});q.__docgenInfo={description:"",methods:[],displayName:"LockedFigureSelect",props:{showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},id:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}}},description:""}}};const T=n=>{switch(n.type){case"point":return r.jsx(G,{...n});case"line":return r.jsx(V,{...n});case"vector":return r.jsx(H,{...n});case"ellipse":return r.jsx($,{...n});case"polygon":return r.jsx(U,{...n});case"function":return r.jsx(M,{...n});case"label":if(n.showLabelsFlag)return r.jsx(D,{...n});break}return null};T.__docgenInfo={description:"",methods:[],displayName:"LockedFigureSettings",props:{flags:{required:!1,tsType:{name:'Readonly["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" +import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{B as W}from"./choice-Xr-SKHrB.js";import{V as p,u as I}from"./index-0DbkllkJ.js";import{S as E}from"./index-nqMmpXbO.js";import{s as g,c as F}from"./index-deFLJwr4.js";import{l as f}from"./index-awljIyHI.js";import{r as v}from"./index-6oxdNXpR.js";import{H as z}from"./heading-1izW0-GJ.js";import{a as S,b as _}from"./answer-choices-iyIz6W_C.js";import{L as $}from"./locked-ellipse-settings-Y_UkseIl.js";import{L as M}from"./locked-function-settings-FK0x4ZxG.js";import{L as D}from"./locked-label-settings-CnylHQl6.js";import{L as V}from"./locked-line-settings-JSySSneX.js";import{L as G}from"./locked-point-settings-q-YHpFjG.js";import{L as U}from"./locked-polygon-settings-U6JpAVC_.js";import{L as H}from"./locked-vector-settings-UVt2s9by.js";import{g as K}from"./util-ZotWJxjO.js";const q=n=>{const{id:h,onChange:o}=n,l=["point","line","vector","ellipse","polygon","function"];return n.showLabelsFlag&&l.push("label"),r.jsx(p,{style:w.container,children:r.jsx(S,{menuText:"Add locked figure",style:w.addElementSelect,children:l.map(u=>r.jsx(_,{label:u,onClick:()=>o(u)},`${h}-${u}`))})})},w=f.StyleSheet.create({container:{marginTop:g.xSmall_8},addElementSelect:{backgroundColor:F.fadedBlue8,borderRadius:g.xxxSmall_4}});q.__docgenInfo={description:"",methods:[],displayName:"LockedFigureSelect",props:{showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},id:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}}},description:""}}};const T=n=>{switch(n.type){case"point":return r.jsx(G,{...n});case"line":return r.jsx(V,{...n});case"vector":return r.jsx(H,{...n});case"ellipse":return r.jsx($,{...n});case"polygon":return r.jsx(U,{...n});case"function":return r.jsx(M,{...n});case"label":if(n.showLabelsFlag)return r.jsx(D,{...n});break}return null};T.__docgenInfo={description:"",methods:[],displayName:"LockedFigureSettings",props:{flags:{required:!1,tsType:{name:'Readonly["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" | "backward" | "forward" | "front"`,elements:[{name:"literal",value:'"back"'},{name:"literal",value:'"backward"'},{name:"literal",value:'"forward"'},{name:"literal",value:'"front"'}]},name:"movement"}],return:{name:"void"}}},description:"Called when a movement button (top, up, down, bottom) is pressed."},onRemove:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"Called when the delete button is pressed."},expanded:{required:!1,tsType:{name:"boolean"},description:"Whether this accordion is expanded."},onToggle:{required:!1,tsType:{name:"signature",type:"function",raw:"(expanded: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"expanded"}],return:{name:"void"}}},description:"Called when the accordion is expanded or collapsed."}}};const A=n=>{const h=Array((n.figures??[]).length).fill(!1),[o,l]=v.useState(h),[u,R]=v.useState(!0),c=I().get("locked-figures-section"),{figures:a,onChange:m}=n;function C(e){const i={lockedFigures:[...a||[],K(e)]};m(i),l([...o,!0])}function O(e,t){if(e===0&&(t==="back"||t==="backward")||a&&e===a.length-1&&(t==="front"||t==="forward"))return;const s=[...a||[]],d=[...o],[y]=s.splice(e,1);switch(d.splice(e,1),t){case"back":s.unshift(y),d.unshift(!0);break;case"backward":s.splice(e-1,0,y),d.splice(e-1,0,!0);break;case"forward":s.splice(e+1,0,y),d.splice(e+1,0,!0);break;case"front":s.push(y),d.push(!0);break}m({lockedFigures:s}),l(d)}function x(e){if(window.confirm("Are you sure you want to delete this figure?")){const t=a||[];m({lockedFigures:[...t.slice(0,e),...t.slice(e+1)]});const i=[...o];i.splice(e,1),l(i)}}function L(e,t){const i=a||[],s={lockedFigures:[...i.slice(0,e),{...i[e],...t},...i.slice(e+1)]};m(s)}function j(e){l(Array(a==null?void 0:a.length).fill(e))}const b=o.every(e=>!e),N=b?"Expand all":"Collapse all",P=!!(a!=null&&a.length);return r.jsxs(r.Fragment,{children:[r.jsx(z,{title:"Locked Figures",isOpen:u,onToggle:()=>R(!u),isCollapsible:!0}),u&&r.jsxs(p,{children:[a==null?void 0:a.map((e,t)=>r.jsx(T,{flags:n.flags,showLabelsFlag:n.showLabelsFlag,expanded:o[t],onToggle:i=>{const s=[...o];s[t]=i,l(s)},...e,onChangeProps:i=>L(t,i),onMove:i=>O(t,i),onRemove:()=>x(t)},`${c}-locked-${e}-${t}`)),r.jsxs(p,{style:k.buttonContainer,children:[r.jsx(q,{showLabelsFlag:n.showLabelsFlag,id:`${c}-select`,onChange:C}),r.jsx(E,{size:g.small_12}),P&&r.jsx(W,{kind:"secondary",onClick:()=>j(b),style:k.button,children:N})]})]})]})},k=f.StyleSheet.create({buttonContainer:{flexDirection:"row",alignItems:"center"},button:{marginTop:g.xSmall_8,flexGrow:1}}),me=A;A.__docgenInfo={description:"",methods:[],displayName:"LockedFiguresSection",props:{flags:{required:!1,tsType:{name:'Readonly["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},figures:{required:!1,tsType:{name:"Array",elements:[{name:"union",raw:`| LockedPointType diff --git a/assets/locked-figures-section.stories-KUQmi_mK.js b/assets/locked-figures-section.stories-AmwKZboa.js similarity index 77% rename from assets/locked-figures-section.stories-KUQmi_mK.js rename to assets/locked-figures-section.stories-AmwKZboa.js index 2ecfe07f2b..d88be80607 100644 --- a/assets/locked-figures-section.stories-KUQmi_mK.js +++ b/assets/locked-figures-section.stories-AmwKZboa.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{V as R}from"./index-0DbkllkJ.js";import{s as c,c as y}from"./index-deFLJwr4.js";import{l as w}from"./index-awljIyHI.js";import{r as k}from"./index-6oxdNXpR.js";import{L as i}from"./locked-figures-section-9mKuroas.js";import{g as d}from"./util-x8Ikjhfh.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./heading-1izW0-GJ.js";import"./index-wzSCRJFK.js";import"./toggleable-caret-YFS5vs4O.js";import"./answer-choices-lVeJkx-U.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-1DxKQj1_.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./index-J2t_5nK1.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./locked-ellipse-settings-_hRNhR9E.js";import"./article-renderer-mU-6RWLp.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./locked-figure-aria-wRg9cB39.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-lVE0HwhW.js";import"./color-select-4NqU465A.js";import"./line-stroke-select-Kn8DFI_S.js";import"./locked-function-settings--UMM0ipk.js";import"./line-swatch-qqHDCIz5.js";import"./locked-line-settings-0UTK3Vo6.js";import"./locked-point-settings-HQeaTYKF.js";import"./labeled-switch-7da7Bmzh.js";import"./locked-polygon-settings-1jqOktRr.js";import"./locked-vector-settings-1A9eQa19.js";const Wo={title:"PerseusEditor/Components/Locked Figures Section",component:i},r=p=>e.jsx(i,{...p});r.args={};const o={render:function(){const[m,s]=k.useState([]),n=a=>{s(a.lockedFigures)};return e.jsx(i,{figures:m,onChange:n})}},t={render:function(){const[m,s]=k.useState([d("point"),d("line")]),n=a=>{s(a.lockedFigures)};return e.jsx(R,{style:D.prodSizeContainer,children:e.jsx(i,{figures:m,onChange:n})})}},_=310,C=10,j=_+2*C,D=w.StyleSheet.create({prodSizeContainer:{width:j,padding:C,marginInlineStart:c.medium_16,border:`1px solid ${y.offBlack32}`,borderRadius:c.xxxSmall_4}});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var u,g,l;r.parameters={...r.parameters,docs:{...(u=r.parameters)==null?void 0:u.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{V as R}from"./index-0DbkllkJ.js";import{s as c,c as y}from"./index-deFLJwr4.js";import{l as w}from"./index-awljIyHI.js";import{r as k}from"./index-6oxdNXpR.js";import{L as i}from"./locked-figures-section-w9TBjDc-.js";import{g as d}from"./util-ZotWJxjO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./heading-1izW0-GJ.js";import"./index-wzSCRJFK.js";import"./toggleable-caret-YFS5vs4O.js";import"./answer-choices-iyIz6W_C.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-L37a98D_.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./index-J2t_5nK1.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./locked-ellipse-settings-Y_UkseIl.js";import"./article-renderer-HEYBK15c.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./locked-figure-aria-1k3pfy3U.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-CnylHQl6.js";import"./color-select-javI8CkK.js";import"./line-stroke-select-H15MLZYg.js";import"./locked-function-settings-FK0x4ZxG.js";import"./line-swatch-9TD4hiwz.js";import"./locked-line-settings-JSySSneX.js";import"./locked-point-settings-q-YHpFjG.js";import"./labeled-switch-_gGF8eh_.js";import"./locked-polygon-settings-U6JpAVC_.js";import"./locked-vector-settings-UVt2s9by.js";const Wo={title:"PerseusEditor/Components/Locked Figures Section",component:i},r=p=>e.jsx(i,{...p});r.args={};const o={render:function(){const[m,s]=k.useState([]),n=a=>{s(a.lockedFigures)};return e.jsx(i,{figures:m,onChange:n})}},t={render:function(){const[m,s]=k.useState([d("point"),d("line")]),n=a=>{s(a.lockedFigures)};return e.jsx(R,{style:D.prodSizeContainer,children:e.jsx(i,{figures:m,onChange:n})})}},_=310,C=10,j=_+2*C,D=w.StyleSheet.create({prodSizeContainer:{width:j,padding:C,marginInlineStart:c.medium_16,border:`1px solid ${y.offBlack32}`,borderRadius:c.xxxSmall_4}});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var u,g,l;r.parameters={...r.parameters,docs:{...(u=r.parameters)==null?void 0:u.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(l=(g=r.parameters)==null?void 0:g.docs)==null?void 0:l.source}}};var f,F,S;o.parameters={...o.parameters,docs:{...(f=o.parameters)==null?void 0:f.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/locked-function-settings--UMM0ipk.js b/assets/locked-function-settings-FK0x4ZxG.js similarity index 96% rename from assets/locked-function-settings--UMM0ipk.js rename to assets/locked-function-settings-FK0x4ZxG.js index dd6a07938f..6b9af11d87 100644 --- a/assets/locked-function-settings--UMM0ipk.js +++ b/assets/locked-function-settings-FK0x4ZxG.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{B as K}from"./choice-Xr-SKHrB.js";import{V as c}from"./index-0DbkllkJ.js";import{S as M,O as C}from"./answer-choices-lVeJkx-U.js";import{T as q}from"./index-V5gl6frG.js";import{P as _,L as Q,a as Z,I as R}from"./locked-label-settings-lVE0HwhW.js";import{S as s}from"./index-nqMmpXbO.js";import{s as i,c as f}from"./index-deFLJwr4.js";import{L as E,a as v}from"./index-18qWGOW7.js";import{L as ee,p as ae}from"./locked-figure-aria-wRg9cB39.js";import{l as S}from"./index-awljIyHI.js";import{r as k}from"./index-6oxdNXpR.js";import{C as ne}from"./color-select-4NqU465A.js";import{L as re}from"./line-stroke-select-Kn8DFI_S.js";import{L as te}from"./line-swatch-qqHDCIz5.js";import{g as oe,j as le,a as ie}from"./util-x8Ikjhfh.js";const se=""+new URL("copy-oXFFmXIn.svg",import.meta.url).href,de=""+new URL("note-pencil-qql72tMF.svg",import.meta.url).href,B={linear:["x + 5","1/2x - 2"],polynomial:["1/2x^2 + 3x - 4","(1/3)x^3 - 2x^2 + 3x - 4"],trigonometric:["sin(x) * 3","arctan(2x) + 4"]},$=p=>{var z,A;const{flags:d,color:m,strokeStyle:y,equation:g,directionalAxis:x,domain:t,labels:o,ariaLabel:D,onChangeProps:u,onMove:N,onRemove:W}=p,F=x==="x"?"y=":"x=",O=`Function (${F}${g})`,[j,T]=k.useState([t&&t[0]!==-1/0?t[0].toString():"",t&&t[1]!==1/0?t[1].toString():""]),[b,H]=k.useState("");k.useEffect(()=>{T([t&&t[0]!==-1/0?t[0].toString():"",t&&t[1]!==1/0?t[1].toString():""])},[t]);async function V(){let r=`Function${await le(o)} with equation ${F}${g}`;t&&!(t[0]===-1/0&&t[1]===1/0)&&(r+=`, domain from ${t[0]} to ${t[1]}`);const l=ie(m,y);return r+=l,r}function h(a,r){const l={};l[a]=r,u(l)}function I(a,r){const l=[...j];l[a]=r,T(l);const w=t?[...t]:[-1/0,1/0];let L=parseFloat(r);r===""&&a===0?L=-1/0:r===""&&a===1&&(L=1/0),w[a]=L,u({domain:w})}const X=Object.keys(B),P=b!=="",G=P?B[b]:["Select category to see example equations"];function U(a){const r={color:a};r.labels=o==null?void 0:o.map(l=>({...l,color:a})),u(r)}function Y(a,r){if(!o)return;const l=[...o];l[r]={...o[r],...a},u({labels:l})}function J(a){if(!o)return;const r=o.filter((l,w)=>w!==a);u({labels:r})}return e.jsxs(_,{expanded:p.expanded,onToggle:p.onToggle,header:e.jsxs(c,{style:n.row,children:[e.jsx(E,{style:n.accordionHeader,children:O}),e.jsx(s,{size:i.xSmall_8}),e.jsx(te,{color:m,lineStyle:y})]}),children:[e.jsxs(c,{style:[n.row,n.spaceUnder],children:[e.jsx(ne,{selectedValue:m,onChange:U}),e.jsx(s,{size:i.small_12}),e.jsx(re,{selectedValue:y,onChange:a=>{h("strokeStyle",a)}})]}),e.jsxs(c,{style:[n.row,n.rowSpace],children:[e.jsxs(M,{selectedValue:x,onChange:a=>{h("directionalAxis",a)},"aria-label":"equation prefix",style:[n.dropdownLabel,n.axisMenu],placeholder:"",children:[e.jsx(C,{value:"x",label:"y ="}),e.jsx(C,{value:"y",label:"x ="})]}),e.jsx(s,{size:i.xSmall_8}),e.jsx(q,{type:"text","aria-label":"equation",value:g,onChange:a=>{h("equation",a)},style:[n.textField]})]}),e.jsxs(c,{style:[n.row,n.rowSpace],children:[e.jsxs(v,{tag:"label",style:[n.dropdownLabel,n.domainMin],children:["domain min",e.jsx(s,{size:i.xxSmall_6}),e.jsx(q,{type:"number",style:n.domainMinField,value:j[0],onChange:a=>{I(0,a)}})]}),e.jsx(s,{size:i.medium_16}),e.jsxs(v,{tag:"label","aria-label":"domain max",style:[n.dropdownLabel,n.domainMax],children:["max",e.jsx(s,{size:i.xxSmall_6}),e.jsx(q,{type:"number",style:n.domainMaxField,value:j[1],onChange:a=>{I(1,a)}})]})]}),e.jsxs(_,{header:e.jsx(E,{children:"Example Functions"}),expanded:!1,containerStyle:n.exampleWorkspace,panelStyle:n.exampleAccordionPanel,children:[e.jsxs(v,{tag:"label",style:n.dropdownLabel,children:["Choose a category",e.jsx(s,{size:i.xxSmall_6}),e.jsx(M,{selectedValue:b,onChange:H,placeholder:"examples",children:X.map(a=>e.jsx(C,{value:a,label:a},a))})]}),P&&e.jsx("ul",{className:S.css(n.exampleContainer),children:G.map((a,r)=>e.jsx(me,{category:b,example:a,index:r,pasteEquationFn:h},r))})]}),((z=d==null?void 0:d.mafs)==null?void 0:z["locked-figures-aria"])&&e.jsxs(e.Fragment,{children:[e.jsx(s,{size:i.small_12}),e.jsx(c,{style:n.horizontalRule}),e.jsx(ee,{ariaLabel:D,getPrepopulatedAriaLabel:V,onChangeProps:a=>{u(a)}})]}),((A=d==null?void 0:d.mafs)==null?void 0:A["locked-function-labels"])&&e.jsxs(e.Fragment,{children:[e.jsx(s,{size:i.xxxSmall_4}),e.jsx(c,{style:n.horizontalRule}),e.jsx(s,{size:i.small_12}),e.jsx(v,{children:"Visible labels"}),o==null?void 0:o.map((a,r)=>e.jsx(Q,{...a,expanded:!0,onChangeProps:l=>{Y(l,r)},onRemove:()=>{J(r)},containerStyle:n.labelContainer},r)),e.jsx(K,{kind:"tertiary",startIcon:ae,onClick:()=>{const a={...oe("label"),coord:[0,-((o==null?void 0:o.length)??0)],color:m};u({labels:[...o??[],a]})},style:n.addButton,children:"Add visible label"})]}),e.jsx(Z,{figureType:p.type,onMove:N,onRemove:W})]})},me=p=>{const{category:d,example:m,index:y,pasteEquationFn:g}=p,x=k.useId();return e.jsxs("li",{className:S.css(n.exampleRow),children:[e.jsx(R,{icon:de,"aria-label":"paste example","aria-describedby":x,onClick:()=>g("equation",m),size:"medium",style:n.copyPasteButton}),e.jsx(R,{icon:se,"aria-label":"copy example","aria-describedby":x,onClick:()=>navigator.clipboard.writeText(m),size:"medium",style:n.copyPasteButton}),e.jsx(s,{size:i.xxxSmall_4}),e.jsx(c,{style:n.exampleContent,id:x,children:m})]},`${d}-${y}`)},n=S.StyleSheet.create({accordionHeader:{textOverflow:"ellipsis",maxWidth:"calc(100% - 64px)",overflow:"hidden",whiteSpace:"nowrap"},axisMenu:{minWidth:"auto"},copyPasteButton:{flexShrink:"0",margin:"0 2px"},domainMin:{justifyContent:"space-between",width:"calc(((100% - 141px) / 2) + 88.7px)",textWrap:"nowrap"},domainMinField:{width:"calc(100% - 88.7px)"},domainMax:{width:"calc(((100% - 141px) / 2) + 36.2px)"},domainMaxField:{width:"calc(100% - 36.2px)"},dropdownLabel:{alignItems:"center",display:"flex"},exampleAccordionPanel:{alignItems:"start",paddingBottom:"12px",flexDirection:"row",flexWrap:"wrap"},exampleContainer:{background:"white",border:`1px solid ${f.fadedOffBlack16}`,borderRadius:"4px",flexGrow:"1",listStyleType:"none",maxHeight:"88px",margin:"8px 0 0 0",overflowY:"scroll",padding:"4px 12px 4px 4px"},exampleContent:{fontFamily:'"Lato", sans-serif',flexGrow:"1",color:f.offBlack},exampleRow:{alignItems:"center",display:"flex",flexDirection:"row",minHeight:"44px"},exampleWorkspace:{background:f.white50},rowSpace:{marginTop:i.xSmall_8},row:{display:"flex",flexDirection:"row",alignItems:"center"},textField:{flexGrow:"1"},addButton:{alignSelf:"start"},horizontalRule:{height:1,backgroundColor:f.offBlack16},labelContainer:{backgroundColor:f.white}}),Se=$;$.__docgenInfo={description:"",methods:[],displayName:"LockedFunctionSettings",props:{type:{required:!0,tsType:{name:"literal",value:'"function"'},description:""},color:{required:!0,tsType:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},description:""},strokeStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""},equation:{required:!0,tsType:{name:"string"},description:""},directionalAxis:{required:!0,tsType:{name:"union",raw:'"x" | "y"',elements:[{name:"literal",value:'"x"'},{name:"literal",value:'"y"'}]},description:""},domain:{required:!1,tsType:{name:"Interval"},description:""},labels:{required:!1,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:`{ +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{B as K}from"./choice-Xr-SKHrB.js";import{V as c}from"./index-0DbkllkJ.js";import{S as M,O as C}from"./answer-choices-iyIz6W_C.js";import{T as q}from"./index-V5gl6frG.js";import{P as _,L as Q,a as Z,I as R}from"./locked-label-settings-CnylHQl6.js";import{S as s}from"./index-nqMmpXbO.js";import{s as i,c as f}from"./index-deFLJwr4.js";import{L as E,a as v}from"./index-18qWGOW7.js";import{L as ee,p as ae}from"./locked-figure-aria-1k3pfy3U.js";import{l as S}from"./index-awljIyHI.js";import{r as k}from"./index-6oxdNXpR.js";import{C as ne}from"./color-select-javI8CkK.js";import{L as re}from"./line-stroke-select-H15MLZYg.js";import{L as te}from"./line-swatch-9TD4hiwz.js";import{g as oe,j as le,a as ie}from"./util-ZotWJxjO.js";const se=""+new URL("copy-oXFFmXIn.svg",import.meta.url).href,de=""+new URL("note-pencil-qql72tMF.svg",import.meta.url).href,B={linear:["x + 5","1/2x - 2"],polynomial:["1/2x^2 + 3x - 4","(1/3)x^3 - 2x^2 + 3x - 4"],trigonometric:["sin(x) * 3","arctan(2x) + 4"]},$=p=>{var z,A;const{flags:d,color:m,strokeStyle:y,equation:g,directionalAxis:x,domain:t,labels:o,ariaLabel:D,onChangeProps:u,onMove:N,onRemove:W}=p,F=x==="x"?"y=":"x=",O=`Function (${F}${g})`,[j,T]=k.useState([t&&t[0]!==-1/0?t[0].toString():"",t&&t[1]!==1/0?t[1].toString():""]),[b,H]=k.useState("");k.useEffect(()=>{T([t&&t[0]!==-1/0?t[0].toString():"",t&&t[1]!==1/0?t[1].toString():""])},[t]);async function V(){let r=`Function${await le(o)} with equation ${F}${g}`;t&&!(t[0]===-1/0&&t[1]===1/0)&&(r+=`, domain from ${t[0]} to ${t[1]}`);const l=ie(m,y);return r+=l,r}function h(a,r){const l={};l[a]=r,u(l)}function I(a,r){const l=[...j];l[a]=r,T(l);const w=t?[...t]:[-1/0,1/0];let L=parseFloat(r);r===""&&a===0?L=-1/0:r===""&&a===1&&(L=1/0),w[a]=L,u({domain:w})}const X=Object.keys(B),P=b!=="",G=P?B[b]:["Select category to see example equations"];function U(a){const r={color:a};r.labels=o==null?void 0:o.map(l=>({...l,color:a})),u(r)}function Y(a,r){if(!o)return;const l=[...o];l[r]={...o[r],...a},u({labels:l})}function J(a){if(!o)return;const r=o.filter((l,w)=>w!==a);u({labels:r})}return e.jsxs(_,{expanded:p.expanded,onToggle:p.onToggle,header:e.jsxs(c,{style:n.row,children:[e.jsx(E,{style:n.accordionHeader,children:O}),e.jsx(s,{size:i.xSmall_8}),e.jsx(te,{color:m,lineStyle:y})]}),children:[e.jsxs(c,{style:[n.row,n.spaceUnder],children:[e.jsx(ne,{selectedValue:m,onChange:U}),e.jsx(s,{size:i.small_12}),e.jsx(re,{selectedValue:y,onChange:a=>{h("strokeStyle",a)}})]}),e.jsxs(c,{style:[n.row,n.rowSpace],children:[e.jsxs(M,{selectedValue:x,onChange:a=>{h("directionalAxis",a)},"aria-label":"equation prefix",style:[n.dropdownLabel,n.axisMenu],placeholder:"",children:[e.jsx(C,{value:"x",label:"y ="}),e.jsx(C,{value:"y",label:"x ="})]}),e.jsx(s,{size:i.xSmall_8}),e.jsx(q,{type:"text","aria-label":"equation",value:g,onChange:a=>{h("equation",a)},style:[n.textField]})]}),e.jsxs(c,{style:[n.row,n.rowSpace],children:[e.jsxs(v,{tag:"label",style:[n.dropdownLabel,n.domainMin],children:["domain min",e.jsx(s,{size:i.xxSmall_6}),e.jsx(q,{type:"number",style:n.domainMinField,value:j[0],onChange:a=>{I(0,a)}})]}),e.jsx(s,{size:i.medium_16}),e.jsxs(v,{tag:"label","aria-label":"domain max",style:[n.dropdownLabel,n.domainMax],children:["max",e.jsx(s,{size:i.xxSmall_6}),e.jsx(q,{type:"number",style:n.domainMaxField,value:j[1],onChange:a=>{I(1,a)}})]})]}),e.jsxs(_,{header:e.jsx(E,{children:"Example Functions"}),expanded:!1,containerStyle:n.exampleWorkspace,panelStyle:n.exampleAccordionPanel,children:[e.jsxs(v,{tag:"label",style:n.dropdownLabel,children:["Choose a category",e.jsx(s,{size:i.xxSmall_6}),e.jsx(M,{selectedValue:b,onChange:H,placeholder:"examples",children:X.map(a=>e.jsx(C,{value:a,label:a},a))})]}),P&&e.jsx("ul",{className:S.css(n.exampleContainer),children:G.map((a,r)=>e.jsx(me,{category:b,example:a,index:r,pasteEquationFn:h},r))})]}),((z=d==null?void 0:d.mafs)==null?void 0:z["locked-figures-aria"])&&e.jsxs(e.Fragment,{children:[e.jsx(s,{size:i.small_12}),e.jsx(c,{style:n.horizontalRule}),e.jsx(ee,{ariaLabel:D,getPrepopulatedAriaLabel:V,onChangeProps:a=>{u(a)}})]}),((A=d==null?void 0:d.mafs)==null?void 0:A["locked-function-labels"])&&e.jsxs(e.Fragment,{children:[e.jsx(s,{size:i.xxxSmall_4}),e.jsx(c,{style:n.horizontalRule}),e.jsx(s,{size:i.small_12}),e.jsx(v,{children:"Visible labels"}),o==null?void 0:o.map((a,r)=>e.jsx(Q,{...a,expanded:!0,onChangeProps:l=>{Y(l,r)},onRemove:()=>{J(r)},containerStyle:n.labelContainer},r)),e.jsx(K,{kind:"tertiary",startIcon:ae,onClick:()=>{const a={...oe("label"),coord:[0,-((o==null?void 0:o.length)??0)],color:m};u({labels:[...o??[],a]})},style:n.addButton,children:"Add visible label"})]}),e.jsx(Z,{figureType:p.type,onMove:N,onRemove:W})]})},me=p=>{const{category:d,example:m,index:y,pasteEquationFn:g}=p,x=k.useId();return e.jsxs("li",{className:S.css(n.exampleRow),children:[e.jsx(R,{icon:de,"aria-label":"paste example","aria-describedby":x,onClick:()=>g("equation",m),size:"medium",style:n.copyPasteButton}),e.jsx(R,{icon:se,"aria-label":"copy example","aria-describedby":x,onClick:()=>navigator.clipboard.writeText(m),size:"medium",style:n.copyPasteButton}),e.jsx(s,{size:i.xxxSmall_4}),e.jsx(c,{style:n.exampleContent,id:x,children:m})]},`${d}-${y}`)},n=S.StyleSheet.create({accordionHeader:{textOverflow:"ellipsis",maxWidth:"calc(100% - 64px)",overflow:"hidden",whiteSpace:"nowrap"},axisMenu:{minWidth:"auto"},copyPasteButton:{flexShrink:"0",margin:"0 2px"},domainMin:{justifyContent:"space-between",width:"calc(((100% - 141px) / 2) + 88.7px)",textWrap:"nowrap"},domainMinField:{width:"calc(100% - 88.7px)"},domainMax:{width:"calc(((100% - 141px) / 2) + 36.2px)"},domainMaxField:{width:"calc(100% - 36.2px)"},dropdownLabel:{alignItems:"center",display:"flex"},exampleAccordionPanel:{alignItems:"start",paddingBottom:"12px",flexDirection:"row",flexWrap:"wrap"},exampleContainer:{background:"white",border:`1px solid ${f.fadedOffBlack16}`,borderRadius:"4px",flexGrow:"1",listStyleType:"none",maxHeight:"88px",margin:"8px 0 0 0",overflowY:"scroll",padding:"4px 12px 4px 4px"},exampleContent:{fontFamily:'"Lato", sans-serif',flexGrow:"1",color:f.offBlack},exampleRow:{alignItems:"center",display:"flex",flexDirection:"row",minHeight:"44px"},exampleWorkspace:{background:f.white50},rowSpace:{marginTop:i.xSmall_8},row:{display:"flex",flexDirection:"row",alignItems:"center"},textField:{flexGrow:"1"},addButton:{alignSelf:"start"},horizontalRule:{height:1,backgroundColor:f.offBlack16},labelContainer:{backgroundColor:f.white}}),Se=$;$.__docgenInfo={description:"",methods:[],displayName:"LockedFunctionSettings",props:{type:{required:!0,tsType:{name:"literal",value:'"function"'},description:""},color:{required:!0,tsType:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},description:""},strokeStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""},equation:{required:!0,tsType:{name:"string"},description:""},directionalAxis:{required:!0,tsType:{name:"union",raw:'"x" | "y"',elements:[{name:"literal",value:'"x"'},{name:"literal",value:'"y"'}]},description:""},domain:{required:!1,tsType:{name:"Interval"},description:""},labels:{required:!1,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:`{ type: "label"; coord: Coord; // TeX-supported string diff --git a/assets/locked-function-settings.stories-av4xBHlQ.js b/assets/locked-function-settings.stories-ITXwf9Ir.js similarity index 79% rename from assets/locked-function-settings.stories-av4xBHlQ.js rename to assets/locked-function-settings.stories-ITXwf9Ir.js index 4b634f29e0..6d425f1d33 100644 --- a/assets/locked-function-settings.stories-av4xBHlQ.js +++ b/assets/locked-function-settings.stories-ITXwf9Ir.js @@ -1,4 +1,4 @@ -import{j as d}from"./jsx-runtime-63Ea5SlK.js";import{r as P}from"./index-6oxdNXpR.js";import{L as t}from"./locked-function-settings--UMM0ipk.js";import{g as x}from"./util-x8Ikjhfh.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./answer-choices-lVeJkx-U.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-1DxKQj1_.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./index-J2t_5nK1.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-V5gl6frG.js";import"./locked-label-settings-lVE0HwhW.js";import"./article-renderer-mU-6RWLp.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-4NqU465A.js";import"./locked-figure-aria-wRg9cB39.js";import"./line-stroke-select-Kn8DFI_S.js";import"./line-swatch-qqHDCIz5.js";const ur={title:"PerseusEditor/Components/Locked Function Settings",component:t},o=p=>d.jsx(t,{...p}),u={...x("function"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};o.args=u;const r={render:function(){const[i,g]=P.useState(u),l=f=>{g({...i,...f})};return d.jsx(t,{...i,expanded:!0,onChangeProps:l})}};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var m,e,n;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as d}from"./jsx-runtime-63Ea5SlK.js";import{r as P}from"./index-6oxdNXpR.js";import{L as t}from"./locked-function-settings-FK0x4ZxG.js";import{g as x}from"./util-ZotWJxjO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./answer-choices-iyIz6W_C.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-L37a98D_.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./index-J2t_5nK1.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-V5gl6frG.js";import"./locked-label-settings-CnylHQl6.js";import"./article-renderer-HEYBK15c.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-javI8CkK.js";import"./locked-figure-aria-1k3pfy3U.js";import"./line-stroke-select-H15MLZYg.js";import"./line-swatch-9TD4hiwz.js";const ur={title:"PerseusEditor/Components/Locked Function Settings",component:t},o=p=>d.jsx(t,{...p}),u={...x("function"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};o.args=u;const r={render:function(){const[i,g]=P.useState(u),l=f=>{g({...i,...f})};return d.jsx(t,{...i,expanded:!0,onChangeProps:l})}};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var m,e,n;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(n=(e=o.parameters)==null?void 0:e.docs)==null?void 0:n.source}}};var s,a,c;r.parameters={...r.parameters,docs:{...(s=r.parameters)==null?void 0:s.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/locked-functions.stories-gfFa5QC4.js b/assets/locked-functions.stories-Qyms8YQ_.js similarity index 91% rename from assets/locked-functions.stories-gfFa5QC4.js rename to assets/locked-functions.stories-Qyms8YQ_.js index 20b332a450..15dca3b27a 100644 --- a/assets/locked-functions.stories-gfFa5QC4.js +++ b/assets/locked-functions.stories-Qyms8YQ_.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{R as t}from"./renderer-with-debug-ui-75hBDQJk.js";import{h as o}from"./interactive-graph.testdata--LRl7_OC.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";import"./interactive-graph-question-builder-VBdpjz9Z.js";const zt={title:"Perseus/Widgets/Interactive Graph/Locked Functions"},r={apiOptions:{flags:{mafs:{segment:!0}}}},i=s=>e.jsx(t,{...r,question:o()}),a=s=>e.jsx(t,{...r,question:o("x^2",{color:"green",strokeStyle:"dashed"})}),n=s=>e.jsx(t,{...r,question:o("y^2",{directionalAxis:"y"})}),m=s=>e.jsx(t,{...r,question:o("sin(x)",{domain:[-5,1/0]})}),c=s=>e.jsx(t,{...r,question:o("sin(x)",{domain:[-1/0,5]})}),p=s=>e.jsx(t,{...r,question:o("sin(x)",{domain:[-5,5]})}),d=s=>e.jsx(t,{...r,question:o("x^2 + 2x + 3")}),u=s=>e.jsx(t,{...r,question:o("(1/3)x^3 - 2x^2 + 3x - 4")}),g=s=>e.jsx(t,{...r,question:o("tan(x)")}),l=s=>e.jsx(t,{...r,question:o("arctan(x)")}),x=s=>e.jsx(t,{...r,question:o("log(x)")}),h=s=>e.jsx(t,{...r,question:o("e^x")}),R=s=>e.jsx(t,{...r,question:o("abs(x)")});i.__docgenInfo={description:"",methods:[],displayName:"DefaultSettings"};a.__docgenInfo={description:"",methods:[],displayName:"StyledSettings"};n.__docgenInfo={description:"",methods:[],displayName:"FunctionOfY"};m.__docgenInfo={description:"",methods:[],displayName:"DomainRestrictedMin"};c.__docgenInfo={description:"",methods:[],displayName:"DomainRestrictedMax"};p.__docgenInfo={description:"",methods:[],displayName:"DomainRestrictedBoth"};d.__docgenInfo={description:"",methods:[],displayName:"Quadratic"};u.__docgenInfo={description:"",methods:[],displayName:"QubicPolynomial"};g.__docgenInfo={description:"",methods:[],displayName:"Tangent"};l.__docgenInfo={description:"",methods:[],displayName:"ArcTangent"};x.__docgenInfo={description:"",methods:[],displayName:"Logarithmic"};h.__docgenInfo={description:"",methods:[],displayName:"Exponent"};R.__docgenInfo={description:"",methods:[],displayName:"AbsoluteValue"};var f,y,S;i.parameters={...i.parameters,docs:{...(f=i.parameters)==null?void 0:f.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(S=(y=i.parameters)==null?void 0:y.docs)==null?void 0:S.source}}};var I,W,_;a.parameters={...a.parameters,docs:{...(I=a.parameters)==null?void 0:I.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => e.jsx(t,{...r,question:o()}),a=s=>e.jsx(t,{...r,question:o("x^2",{color:"green",strokeStyle:"dashed"})}),n=s=>e.jsx(t,{...r,question:o("y^2",{directionalAxis:"y"})}),m=s=>e.jsx(t,{...r,question:o("sin(x)",{domain:[-5,1/0]})}),c=s=>e.jsx(t,{...r,question:o("sin(x)",{domain:[-1/0,5]})}),p=s=>e.jsx(t,{...r,question:o("sin(x)",{domain:[-5,5]})}),d=s=>e.jsx(t,{...r,question:o("x^2 + 2x + 3")}),u=s=>e.jsx(t,{...r,question:o("(1/3)x^3 - 2x^2 + 3x - 4")}),g=s=>e.jsx(t,{...r,question:o("tan(x)")}),l=s=>e.jsx(t,{...r,question:o("arctan(x)")}),x=s=>e.jsx(t,{...r,question:o("log(x)")}),h=s=>e.jsx(t,{...r,question:o("e^x")}),R=s=>e.jsx(t,{...r,question:o("abs(x)")});i.__docgenInfo={description:"",methods:[],displayName:"DefaultSettings"};a.__docgenInfo={description:"",methods:[],displayName:"StyledSettings"};n.__docgenInfo={description:"",methods:[],displayName:"FunctionOfY"};m.__docgenInfo={description:"",methods:[],displayName:"DomainRestrictedMin"};c.__docgenInfo={description:"",methods:[],displayName:"DomainRestrictedMax"};p.__docgenInfo={description:"",methods:[],displayName:"DomainRestrictedBoth"};d.__docgenInfo={description:"",methods:[],displayName:"Quadratic"};u.__docgenInfo={description:"",methods:[],displayName:"QubicPolynomial"};g.__docgenInfo={description:"",methods:[],displayName:"Tangent"};l.__docgenInfo={description:"",methods:[],displayName:"ArcTangent"};x.__docgenInfo={description:"",methods:[],displayName:"Logarithmic"};h.__docgenInfo={description:"",methods:[],displayName:"Exponent"};R.__docgenInfo={description:"",methods:[],displayName:"AbsoluteValue"};var f,y,S;i.parameters={...i.parameters,docs:{...(f=i.parameters)==null?void 0:f.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(S=(y=i.parameters)==null?void 0:y.docs)==null?void 0:S.source}}};var I,W,_;a.parameters={...a.parameters,docs:{...(I=a.parameters)==null?void 0:I.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => `,...(_=(W=a.parameters)==null?void 0:W.docs)==null?void 0:_.source}}};var q,D,b;n.parameters={...n.parameters,docs:{...(q=n.parameters)==null?void 0:q.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => {const{coord:e,labels:t,error:r,style:n,onChange:a}=o,[d,s]=i.useState([e[0].toString(),e[1].toString()]);i.useEffect(()=>{s([e[0].toString(),e[1].toString()])},[e]);function p(u,y){const v=[...d];if(v[y]=u,s(v),isNaN(+u)||u==="")return;const f=[...e];f[y]=+u,a(f)}return c.jsxs(N,{style:[P.row,n],children:[c.jsxs(te,{tag:"label",style:P.row,children:[t?t[0]:"x coord",c.jsx(O,{size:m.xxSmall_6}),c.jsx(fe,{value:d[0],onChange:u=>p(u,0),style:[P.textField,r?P.errorField:void 0]})]}),c.jsx(O,{size:m.medium_16}),c.jsxs(te,{tag:"label",style:P.row,children:[t?t[1]:"y coord",c.jsx(O,{size:m.xxSmall_6}),c.jsx(fe,{value:d[1],onChange:u=>p(u,1),style:[P.textField,r?P.errorField:void 0]})]})]})},P=T.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},textField:{width:m.xxxLarge_64},errorField:{borderColor:l.red,backgroundColor:l.fadedRed8}}),Ke=Se;Se.__docgenInfo={description:"",methods:[],displayName:"CoordinatePairInput",props:{coord:{required:!0,tsType:{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},description:""},labels:{required:!1,tsType:{name:"tuple",raw:"[string, string]",elements:[{name:"string"},{name:"string"}]},description:""},error:{required:!1,tsType:{name:"boolean"},description:""},style:{required:!1,tsType:{name:"StyleType"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newCoord: Coord) => void",signature:{arguments:[{type:{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},name:"newCoord"}],return:{name:"void"}}},description:""}}};function X(){return X=Object.assign?Object.assign.bind():function(o){for(var e=1;e=0)&&(t[n]=o[n]);return t}const He=["children","id","initialExpandedIndex","allowMultipleExpanded","caretPosition","cornerKind","animated","style"],Ve=re("ul"),Xe=6;i.forwardRef(function(e,t){const{children:r,id:n,initialExpandedIndex:a,allowMultipleExpanded:d=!0,caretPosition:s,cornerKind:p="rounded",animated:u,style:y}=e,v=xe(e,He),f=Array(r.length).fill(!1);a!==void 0&&(f[a]=!0);const[w,k]=i.useState(f),h=Array(r.length).fill(null),S=r.length<=Xe,L=(x,b)=>{const C=d?[...w]:Array(r.length).fill(!1),E=!w[x];C[x]=E,k(C),b&&b(E)},_=x=>{var b,C,E,F;const $=h.findIndex(I=>I.current===document.activeElement);if($!==-1)switch(x.key){case"ArrowUp":x.preventDefault();const I=($+r.length-1)%r.length;(b=h[I].current)==null||b.focus();break;case"ArrowDown":x.preventDefault();const j=($+1)%r.length;(C=h[j].current)==null||C.focus();break;case"Home":x.preventDefault(),(E=h[0].current)==null||E.focus();break;case"End":x.preventDefault(),(F=h[r.length-1].current)==null||F.focus();break}};return i.createElement(Ve,X({style:[Ge.wrapper,y],onKeyDown:_},v,{ref:t}),r.map((x,b)=>{const{caretPosition:C,cornerKind:E,onToggle:F,animated:$}=x.props,I=i.createRef();h[b]=I;const q=b===0,j=b===r.length-1;return i.createElement("li",{key:b,id:n},i.cloneElement(x,{animated:$??u,caretPosition:C??s,cornerKind:E??p,expanded:w[b],onToggle:()=>L(b,F),isFirstSection:q,isLastSection:j,isRegion:S,ref:I}))}))});const Ge=T.StyleSheet.create({wrapper:{boxSizing:"border-box",listStyle:"none",padding:0,width:"100%"}});function Qe(o,e,t,r){switch(o){case"rounded-per-section":return{roundedTop:!0,roundedBottom:!r};case"rounded":return{roundedTop:e,roundedBottom:t&&!r};default:return{roundedTop:!1,roundedBottom:!1}}}const Je=i.forwardRef(function(e,t){const{id:r,header:n,caretPosition:a,cornerKind:d,collapsible:s=!0,expanded:p,animated:u,onClick:y,sectionContentUniqueId:v,headerStyle:f,tag:w="h2",testId:k,isFirstSection:h,isLastSection:S}=e,L=typeof n=="string",{roundedTop:_,roundedBottom:x}=Qe(d,h,S,p);return i.createElement(je,{tag:w,style:R.heading},i.createElement(Ae,{id:r,"aria-expanded":p,"aria-controls":v,onClick:y,disabled:!s,testId:k?`${k}-header`:void 0,style:[R.headerWrapper,u&&R.headerWrapperWithAnimation,a==="start"&&R.headerWrapperCaretStart,_&&R.roundedTop,x&&R.roundedBottom,f,!s&&R.disabled],ref:t},()=>i.createElement(i.Fragment,null,i.createElement(N,{style:[R.headerContent,L&&R.headerString]},L?i.createElement(N,{style:[a==="end"?R.headerStringCaretEnd:R.headerStringCaretStart]},n):n),s&&i.createElement(le,{icon:ve,color:l.offBlack64,size:"small",style:[u&&R.iconWithAnimation,a==="start"?R.iconStart:R.iconEnd,p&&R.iconExpanded],testId:k?`${k}-caret-icon`:void 0}))))}),Q=m.small_12-1,he="300ms",R=T.StyleSheet.create({heading:{minWidth:0,marginTop:0},headerWrapper:{display:"flex",flexDirection:"row",alignItems:"center",overflow:"hidden",minWidth:"auto",width:"100%",position:"relative",zIndex:1,":active":{outline:`2px solid ${l.activeBlue}`},":hover":{outline:`2px solid ${l.blue}`},":focus":{boxShadow:`0 0 0 2px ${l.blue}`},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":{outline:`2px solid ${l.blue}`}},headerWrapperWithAnimation:{transition:`border-radius ${he}`},headerWrapperCaretStart:{flexDirection:"row-reverse"},roundedTop:{borderStartStartRadius:Q,borderStartEndRadius:Q},roundedBottom:{borderEndStartRadius:Q,borderEndEndRadius:Q},headerContent:{flexGrow:1,textAlign:"start"},headerString:{paddingTop:m.medium_16,paddingBottom:m.medium_16},headerStringCaretEnd:{paddingInlineEnd:m.small_12,paddingInlineStart:m.medium_16},headerStringCaretStart:{paddingInlineEnd:m.medium_16,paddingInlineStart:m.small_12},iconWithAnimation:{transition:`transform ${he}`},iconExpanded:{transform:"rotate(180deg)"},iconStart:{marginInlineStart:m.medium_16},iconEnd:{marginInlineEnd:m.medium_16},disabled:{pointerEvents:"none",color:"inherit",":focus":{boxShadow:`0 0 0 2px ${l.offBlack32}`},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":{outline:`2px solid ${l.offBlack32}`}}}),Ye=["children","id","header","collapsible","expanded","animated","onToggle","caretPosition","cornerKind","style","headerStyle","tag","testId","isFirstSection","isLastSection","isRegion"],Ze=i.forwardRef(function(e,t){const{children:r,id:n,header:a,collapsible:d,expanded:s,animated:p=!1,onToggle:u,caretPosition:y="end",cornerKind:v="rounded",style:f,headerStyle:w,tag:k,testId:h,isFirstSection:S=!0,isLastSection:L=!0,isRegion:_=!0}=e,x=xe(e,Ye),[b,C]=i.useState(s??!1),E=s!==void 0&&u,F=_e(),$=n??F.get("accordion-section"),I=n?`${n}-header`:F.get("accordion-section-header"),q=F.get("accordion-section-content"),j=et(v,S,L),me=()=>{E?u(!s):(C(!b),u&&u(!b))};let W;return d===!1?W=!0:W=E?s:b,i.createElement(N,X({id:$,style:[A.wrapper,p&&A.wrapperWithAnimation,j.wrapper,W?A.wrapperExpanded:A.wrapperCollapsed,f],testId:h},x),i.createElement(Je,{id:I,header:a,caretPosition:y,cornerKind:v,collapsible:d,expanded:W,animated:p,onClick:me,sectionContentUniqueId:q,headerStyle:w,tag:k,testId:h,isFirstSection:S,isLastSection:L,ref:t}),i.createElement(N,{id:q,role:_?"region":void 0,"aria-labelledby":I,style:[A.contentWrapper,W?A.contentWrapperExpanded:A.conentWrapperCollapsed,j.contentWrapper],testId:h?`${h}-content-panel`:void 0},typeof r=="string"?i.createElement(Be,{style:A.stringContent},r):r))}),A=T.StyleSheet.create({wrapper:{display:"grid",position:"static",boxSizing:"border-box",backgroundColor:l.white},wrapperWithAnimation:{transition:"grid-template-rows 300ms"},wrapperCollapsed:{gridTemplateRows:"min-content 0fr"},wrapperExpanded:{gridTemplateRows:"min-content 1fr"},contentWrapper:{overflow:"hidden"},conentWrapperCollapsed:{visibility:"hidden"},contentWrapperExpanded:{visibility:"visible"},stringContent:{padding:m.medium_16}}),J={},et=(o,e,t)=>{const r=`${o}-${e.toString()}-${t.toString()}`;if(J[r])return J[r];let n=Object.freeze({}),a=Object.freeze({}),d=Object.freeze({}),s=Object.freeze({});o==="square"&&(n={border:`1px solid ${l.offBlack16}`,borderBottom:"none",borderRadius:0},t&&(s={borderBottom:`1px solid ${l.offBlack16}`})),o==="rounded"&&(n={border:`1px solid ${l.offBlack16}`,borderBottom:"none"},e&&(d={borderStartStartRadius:m.small_12,borderStartEndRadius:m.small_12}),t&&(s={borderBottom:`1px solid ${l.offBlack16}`,borderEndStartRadius:m.small_12,borderEndEndRadius:m.small_12},a={borderEndEndRadius:m.small_12,borderEndStartRadius:m.small_12})),o==="rounded-per-section"&&(n={border:`1px solid ${l.offBlack16}`,borderRadius:m.small_12,marginBottom:m.medium_16},a={borderEndEndRadius:m.small_12,borderEndStartRadius:m.small_12});const p={wrapper:X({},n,d,s),contentWrapper:a};return J[r]=T.StyleSheet.create(p),J[r]},Ce=o=>{const{children:e,header:t,expanded:r,containerStyle:n,panelStyle:a,onToggle:d}=o;return c.jsx(N,{className:"perseus-editor-accordion",children:c.jsx(Ze,{expanded:r,onToggle:d,style:[ie.container,n],headerStyle:ie.accordionHeader,header:t,children:c.jsx(N,{style:[ie.accordionPanel,a],children:e})})})},ie=T.StyleSheet.create({container:{backgroundColor:l.fadedBlue8,marginTop:m.xSmall_8},accordionHeader:{padding:m.small_12,paddingInlineEnd:0,height:m.xxLarge_48},accordionPanel:{paddingTop:m.xxSmall_6,paddingBottom:m.xxxSmall_4,paddingLeft:m.small_12,paddingRight:m.small_12}}),tt=Ce;Ce.__docgenInfo={description:"",methods:[],displayName:"PerseusEditorAccordion",props:{children:{required:!0,tsType:{name:"union",raw:"React.ReactNode | React.ReactNode[]",elements:[{name:"ReactReactNode",raw:"React.ReactNode"},{name:"Array",elements:[{name:"ReactReactNode",raw:"React.ReactNode"}],raw:"React.ReactNode[]"}]},description:""},header:{required:!0,tsType:{name:"union",raw:"string | React.ReactElement",elements:[{name:"string"},{name:"ReactReactElement",raw:"React.ReactElement"}]},description:""},expanded:{required:!1,tsType:{name:"boolean"},description:""},containerStyle:{required:!1,tsType:{name:"StyleType"},description:""},panelStyle:{required:!1,tsType:{name:"StyleType"},description:""},onToggle:{required:!1,tsType:{name:"signature",type:"function",raw:"(expanded: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"expanded"}],return:{name:"void"}}},description:""}}};function Te(o){const e=[];if(o)if(Array.isArray(o))for(const t of o)e.push(...Te(t));else e.push(o);else return e;return e}function Re(o){const e=[],t=[];if(!o)return{style:{},className:""};const r=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;Te(o).forEach(a=>{const d=a._definition;if(d!=null)if(r){const s={};for(const[p,u]of Object.entries(d))s[p.replace(/-[a-z]/g,y=>y[1].toUpperCase())]=u;t.push(s)}else e.push(a);else t.push(a)});const n=Object.assign({},...t);if(t.length>0&&!r){const a=T.StyleSheet.create({inlineStyles:n});e.push(a.inlineStyles)}return{style:r?n:{},className:T.css(...e)}}const rt=["children","style","tag","testId"],nt=/^h[1-6]$/,ye=T.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}});i.forwardRef(function(e,t){let{children:r,style:n,tag:a="span",testId:d}=e,s=H(e,rt);const p=nt.test(a),u=Re([ye.text,p&&ye.header,n]),y=s.className?[s.className,u.className].join(" "):u.className;return i.createElement(a,g({},s,{style:u.style,className:y,"data-testid":d,ref:t}),r)});const at=["className","style"];function D(o,e){return i.forwardRef((t,r)=>{const{className:n,style:a}=t,d=H(t,at),s=typeof o=="string"?ot[o]:null,{className:p,style:u}=Re([s,e,a]);return i.createElement(o,g({},d,{ref:r,className:[p,n].filter(Boolean).join(" "),style:u}))})}const ot=T.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),it=["testId","tag"],G=T.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),lt=D("div",G.default),st=D("article",G.default),dt=D("aside",G.default),ut=D("nav",G.default),ct=D("section",G.default);i.forwardRef(function(e,t){const{testId:r,tag:n="div"}=e,a=H(e,it),d=g({},a,{"data-testid":r});switch(n){case"article":return i.createElement(st,g({},d,{ref:t}));case"aside":return i.createElement(dt,g({},d,{ref:t}));case"nav":return i.createElement(ut,g({},d,{ref:t}));case"section":return i.createElement(ct,g({},d,{ref:t}));case"div":return i.createElement(lt,g({},d,{ref:t}));default:throw Error(`${n} is not an allowed value for the 'tag' prop`)}});let z=function(o){return o.Root="root",o.Initial="initial",o.Standard="standard",o}({});const ee=i.createContext(z.Root);ee.displayName="RenderStateContext";class mt extends i.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:r}=this.props;return this._isTheRootComponent=!0,e?i.createElement(ee.Provider,{value:z.Standard},t()):r?i.createElement(ee.Provider,{value:z.Initial},r()):null}_maybeRender(e){const{children:t,fallback:r}=this.props;switch(e){case z.Root:return this._renderAsRootComponent();case z.Initial:return r?r():null;case z.Standard:return t()}{var n;return console.log(`We got a render state we don't understand: "${(n=JSON.stringify(e))!=null?n:""}"`),this._maybeRender(z.Root)}}render(){return i.createElement(ee.Consumer,null,e=>this._maybeRender(e))}}class ne{constructor(e){this._uniqueFactoryName=void 0,this.get=r=>{const n=r.toLowerCase();if(!this._hasValidIdChars(r))throw new Error(`Invalid identifier key: ${r}`);return`${this._uniqueFactoryName}-${n}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${ne._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}}ne._factoryUniquenessCounter=0;class se{get(e){return e}}se.Default=new se;var pt=se.Default;class ft extends i.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:r,scope:n}=this.props;return e?r?t(pt):null:(this._idFactory||(this._idFactory=new ne(n)),t(this._idFactory))}render(){return i.createElement(mt,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}}class de extends i.Component{renderChildren(e){const{id:t,children:r}=this.props,n=e?e.get(de.defaultId):t;if(!n)throw new Error("Did not get an identifier factory nor a id prop");return r(n)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():i.createElement(ft,{scope:t,mockOnFirstRender:!0},r=>this.renderChildren(r))}}de.defaultId="wb-id";const ge=o=>{switch(o){case"link":return{triggerOnEnter:!0,triggerOnSpace:!1};case"checkbox":case"radio":case"listbox":return{triggerOnEnter:!1,triggerOnSpace:!0};case"button":case"menuitem":case"menu":case"option":default:return{triggerOnEnter:!0,triggerOnSpace:!0}}},ht={onClick:()=>{},onMouseEnter:()=>{},onMouseLeave:()=>{},onMouseDown:()=>{},onMouseUp:()=>{},onTouchStart:()=>{},onTouchEnd:()=>{},onTouchCancel:()=>{},onKeyDown:()=>{},onKeyUp:()=>{}},U={enter:13,space:32},be={hovered:!1,focused:!1,pressed:!1,waiting:!1};class ue extends i.Component{static getDerivedStateFromProps(e,t){return e.disabled?g({},be,{focused:t.focused}):null}constructor(e){super(e),this.waitingForClick=void 0,this.enterClick=void 0,this.handleClick=t=>{const{onClick:r=void 0,beforeNav:n=void 0,safeWithNav:a=void 0}=this.props;this.enterClick||((r||n||a)&&(this.waitingForClick=!1),this.runCallbackAndMaybeNavigate(t))},this.handleMouseEnter=t=>{this.waitingForClick||this.setState({hovered:!0})},this.handleMouseLeave=()=>{this.waitingForClick||this.setState({hovered:!1,pressed:!1,focused:!1})},this.handleMouseDown=t=>{this.props.onMouseDown&&this.props.onMouseDown(t),this.setState({pressed:!0})},this.handleMouseUp=t=>{this.props.onMouseUp&&this.props.onMouseUp(t),this.setState({pressed:!1,focused:!1})},this.handleTouchStart=()=>{this.setState({pressed:!0})},this.handleTouchEnd=()=>{this.setState({pressed:!1}),this.waitingForClick=!0},this.handleTouchCancel=()=>{this.setState({pressed:!1}),this.waitingForClick=!0},this.handleKeyDown=t=>{const{onKeyDown:r,role:n}=this.props;r&&r(t);const a=t.which||t.keyCode,{triggerOnEnter:d,triggerOnSpace:s}=ge(n);d&&a===U.enter||s&&a===U.space?(t.preventDefault(),this.setState({pressed:!0})):!d&&a===U.enter&&(this.enterClick=!0)},this.handleKeyUp=t=>{const{onKeyUp:r,role:n}=this.props;r&&r(t);const a=t.which||t.keyCode,{triggerOnEnter:d,triggerOnSpace:s}=ge(n);d&&a===U.enter||s&&a===U.space?(this.setState({pressed:!1,focused:!0}),this.runCallbackAndMaybeNavigate(t)):!d&&a===U.enter&&(this.enterClick=!1)},this.handleFocus=t=>{const{onFocus:r}=this.props;this.setState({focused:!0},()=>{r&&r(t)})},this.handleBlur=t=>{this.setState({focused:!1,pressed:!1})},this.state=be,this.waitingForClick=!1,this.enterClick=!1}navigateOrReset(e){if(e){const{history:t,href:r,skipClientNav:n,target:a=void 0}=this.props;r&&(a==="_blank"?(window.open(r,"_blank"),this.setState({waiting:!1})):t&&!n?(t.push(r),this.setState({waiting:!1})):window.location.assign(r))}else this.setState({waiting:!1})}handleSafeWithNav(e,t){const{skipClientNav:r,history:n}=this.props;return n&&!r||this.props.target==="_blank"?(e(),this.navigateOrReset(t),Promise.resolve()):(this.state.waiting||this.setState({waiting:!0}),e().then(()=>{this.state.waiting||this.setState({waiting:!0})}).catch(a=>{}).finally(()=>{this.navigateOrReset(t)}))}runCallbackAndMaybeNavigate(e){const{onClick:t=void 0,beforeNav:r=void 0,safeWithNav:n=void 0,href:a,type:d}=this.props;let s=!0,p=!0;if(t&&t(e),e.defaultPrevented&&(s=!1,p=!1),e.preventDefault(),!a&&d==="submit"&&p){let u=e.currentTarget;for(;u;){if(u instanceof window.HTMLFormElement){const y=new window.Event("submit",{bubbles:!0,cancelable:!0});u.dispatchEvent(y);break}u=u.parentElement}}if(r)this.setState({waiting:!0}),r().then(()=>n?this.handleSafeWithNav(n,s):this.navigateOrReset(s)).catch(()=>{});else{if(n)return this.handleSafeWithNav(n,s);this.navigateOrReset(s)}}render(){const e=this.props.rel||(this.props.target==="_blank"?"noopener noreferrer":void 0),t=this.props.disabled?g({},ht,{onFocus:this.handleFocus,onBlur:this.handleBlur,tabIndex:this.props.tabIndex,rel:e}):{onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onTouchCancel:this.handleTouchCancel,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onFocus:this.handleFocus,onBlur:this.handleBlur,tabIndex:this.props.tabIndex,rel:e},{children:r}=this.props;return r&&r(this.state,t)}}ue.defaultProps={disabled:!1};const ce=o=>typeof o!="string"?!1:!/^(https?:)?\/\//i.test(o)&&!/^([^#]*#[\w-]*|[\w\-.]+:)/.test(o),yt=ze(ue);function gt(o,e,t){return t&&e!==!0&&o&&ce(o)?yt:ue}const bt=["href","onClick","skipClientNav","beforeNav","safeWithNav","style","target","testId","onFocus","onKeyDown","onKeyUp","onMouseDown","onMouseUp","hideDefaultFocusRing","light","disabled","tabIndex"],vt=D("a"),kt=D("button"),wt=D(we),St=i.forwardRef(function(e,t){const r=(a,d,s)=>{const p=e.href&&!e.disabled,u=d&&!e.skipClientNav&&ce(e.href||"");return p&&u&&e.href?i.createElement(wt,g({},s,{to:e.href,role:e.role,target:e.target||void 0,"aria-disabled":e.disabled?"true":"false",ref:t}),e.children(a)):p&&!u?i.createElement(vt,g({},s,{href:e.href,role:e.role,target:e.target||void 0,"aria-disabled":e.disabled?"true":"false",ref:t}),e.children(a)):i.createElement(kt,g({},s,{type:"button","aria-disabled":e.disabled,ref:t}),e.children(a))},n=a=>{const{href:d,onClick:s,skipClientNav:p,beforeNav:u=void 0,safeWithNav:y=void 0,style:v,target:f=void 0,testId:w,onFocus:k,onKeyDown:h,onKeyUp:S,onMouseDown:L,onMouseUp:_,hideDefaultFocusRing:x,light:b,disabled:C,tabIndex:E}=e,F=H(e,bt),$=gt(d,p,a),I=q=>[V.reset,V.link,!x&&q.focused&&(b?V.focusedLight:V.focused),C&&V.disabled,v];return u?i.createElement($,{href:d,onClick:s,beforeNav:u,safeWithNav:y,onFocus:k,onKeyDown:h,onKeyUp:S,onMouseDown:L,onMouseUp:_,disabled:C,tabIndex:E},(q,j)=>r(q,a,g({},F,{"data-testid":w,style:I(q)},j))):i.createElement($,{href:d,onClick:s,safeWithNav:y,onFocus:k,onKeyDown:h,onKeyUp:S,onMouseDown:L,onMouseUp:_,target:f,disabled:C,tabIndex:E},(q,j)=>r(q,a,g({},F,{"data-testid":w,style:I(q)},j)))};return i.createElement(ke.Consumer,null,a=>n(a))});St.defaultProps={light:!1,disabled:!1};const V=T.StyleSheet.create({reset:{border:"none",margin:0,padding:0,width:"auto",overflow:"visible",background:"transparent",textDecoration:"none",color:"inherit",font:"inherit",boxSizing:"border-box",touchAction:"manipulation",userSelect:"none",outline:"none",lineHeight:"normal",WebkitFontSmoothing:"inherit",MozOsxFontSmoothing:"inherit"},link:{cursor:"pointer"},focused:{":focus":{outline:`solid 2px ${l.blue}`}},focusedLight:{outline:`solid 2px ${l.white}`},disabled:{color:l.offBlack32,cursor:"not-allowed",":focus":{outline:"none"},":focus-visible":{outline:`solid 2px ${l.blue}`}}}),xt=o=>{switch(o){case"xsmall":return"small";case"small":return"medium";case"medium":return"medium";case"large":return"medium"}},Ct=o=>({xsmall:24,small:32,medium:40,large:48})[o],ae={color:{bg:{hovered:"transparent",active:"transparent",disabled:"transparent",filled:{action:{hovered:"transparent",active:"transparent"},critical:{hovered:"transparent",active:"transparent"}}},stroke:{disabled:{default:l.offBlack32,inverse:l.white50},inverse:l.white,action:{default:l.blue,active:l.activeBlue,inverse:l.fadedBlue},critical:{default:l.red,active:l.activeRed,inverse:l.fadedRed},primary:{action:{hovered:l.blue,active:l.activeBlue},critical:{hovered:l.red,active:l.activeRed},inverse:{default:l.white,hovered:l.white}},secondary:{default:l.offBlack},tertiary:{default:l.offBlack64},filled:{action:{hovered:l.blue,active:l.activeBlue},critical:{hovered:l.red,active:l.activeRed}}}},border:{width:{default:M.width.thin,active:M.width.none,hovered:M.width.thin,hoveredInverse:M.width.thin},radius:{default:M.radius.medium_4}}},Tt=Me(ae,{color:{bg:{hovered:l.white,active:l.white64,filled:{action:{hovered:l.blue,active:l.activeBlue},critical:{hovered:l.red,active:l.activeRed}}},stroke:{action:{inverse:l.eggplant},critical:{inverse:l.eggplant},primary:{action:{hovered:l.eggplant,active:l.eggplant},critical:{hovered:l.eggplant,active:l.eggplant},inverse:{hovered:l.eggplant}},filled:{action:{hovered:l.white,active:l.white},critical:{hovered:l.white,active:l.white}}}},border:{width:{hovered:M.width.none,hoveredInverse:M.width.none}}}),Rt={default:ae,khanmigo:Tt},Le=Oe(ae);function Lt(o){var e;const t=i.useContext(Ue),r=(e=Rt[t])!=null?e:ae;return i.createElement(Le.Provider,{value:r},o.children)}const Et=["color","disabled","href","icon","kind","light","size","skipClientNav","style","testId"];function qt({icon:o,size:e}){switch(xt(e)){case"small":return i.createElement(le,{size:"small",color:"currentColor",icon:o});case"medium":default:return i.createElement(le,{size:"medium",color:"currentColor",icon:o})}}const It=re("a"),_t=re("button"),Ft=re(we),$t=i.forwardRef(function(e,t){const{color:r,disabled:n,href:a,icon:d,kind:s="primary",light:p=!1,size:u="medium",skipClientNav:y,style:v,testId:f}=e,w=H(e,Et),{theme:k,themeName:h}=We(Le),S=L=>{const _=Bt(r,s,p,u,k,h),x=[Nt.shared,_.default,n&&_.disabled],b=i.createElement(qt,{size:u,icon:d}),C=g({"data-testid":f,style:[x,v]},w);return a&&!n?L&&!y&&ce(a)?i.createElement(Ft,g({},C,{to:a,ref:t}),b):i.createElement(It,g({},C,{href:a,ref:t}),b):i.createElement(_t,g({type:"button"},C,{onClick:n?void 0:w.onClick,"aria-disabled":n,ref:t}),b)};return i.createElement(ke.Consumer,null,L=>S(L))}),Nt=T.StyleSheet.create({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",padding:0,cursor:"pointer",border:"none",outline:"none",textDecoration:"none",background:"none",margin:-8,touchAction:"manipulation"}}),Y={};function jt(o,e,t,r,n){switch(o){case"primary":const a=n==="destructive"?e.color.stroke.primary.critical.hovered:e.color.stroke.primary.action.hovered;return{":hover":{backgroundColor:e.color.bg.hovered,color:r?e.color.stroke.primary.inverse.hovered:a,outlineColor:r?e.color.stroke.inverse:t,outlineOffset:1,outlineStyle:"solid",outlineWidth:r?e.border.width.hoveredInverse:e.border.width.hovered},":active":{backgroundColor:e.color.bg.active}};case"secondary":case"tertiary":return{":hover":{backgroundColor:n==="destructive"?e.color.bg.filled.critical.hovered:e.color.bg.filled.action.hovered,color:n==="destructive"?e.color.stroke.filled.critical.hovered:e.color.stroke.filled.action.hovered,outlineWidth:e.border.width.active},":active":{backgroundColor:n==="destructive"?e.color.bg.filled.critical.active:e.color.bg.filled.action.active,color:n==="destructive"?e.color.stroke.filled.critical.active:e.color.stroke.filled.action.active,outlineWidth:e.border.width.active}};default:return{":focus-visible":{},":hover":{},":active":{}}}}const Bt=(o="default",e,t,r,n,a)=>{const d=o==="destructive"?n.color.stroke.critical.default:n.color.stroke.action.default,s=`${d}-${e}-${t}-${r}-${a}`;if(Y[s])return Y[s];if(t&&e!=="primary")throw new Error("Light is only supported for primary IconButtons");const p=(()=>{switch(e){case"primary":return t?n.color.stroke.primary.inverse.default:d;case"secondary":return n.color.stroke.secondary.default;case"tertiary":return n.color.stroke.tertiary.default;default:throw new Error("IconButton kind not recognized")}})(),u=Ct(r),y=jt(e,n,d,t,o),v=o==="destructive"?n.color.stroke.critical.inverse:n.color.stroke.action.inverse,f=o==="destructive"?n.color.stroke.critical.active:n.color.stroke.action.active,w=t?n.color.stroke.inverse:d,k=t?n.color.stroke.disabled.inverse:n.color.stroke.disabled.default,h={backgroundColor:n.color.bg.disabled,color:k,outlineColor:k},S={default:{height:u,width:u,color:p,borderRadius:n.border.radius.default,":hover":g({boxShadow:"none",color:w,borderRadius:n.border.radius.default,outlineWidth:n.border.width.default},y[":hover"]),"@media not (hover: hover)":{":hover":{boxShadow:"none",color:p,borderRadius:n.border.radius.default,outline:"none",backgroundColor:"transparent"}},":focus":{boxShadow:`0 0 0 ${n.border.width.default}px ${w}`,borderRadius:n.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":g({boxShadow:"none",outlineWidth:n.border.width.default,outlineColor:w,outlineOffset:1,outlineStyle:"solid",borderRadius:n.border.radius.default},y[":focus-visible"]),":active":g({color:t?v:f,outlineWidth:n.border.width.default,outlineColor:t?v:f,outlineOffset:1,outlineStyle:"solid",borderRadius:n.border.radius.default},y[":active"])},disabled:{color:k,cursor:"not-allowed",":hover":g({},h,{outline:"none"}),":active":g({},h,{outline:"none"}),":focus":{boxShadow:`0 0 0 ${n.border.width.default}px ${k}`,borderRadius:n.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":h}};return Y[s]=T.StyleSheet.create(S),Y[s]},At=["color","disabled","href","kind","light","size","skipClientNav","tabIndex","target"],Z=i.forwardRef(function(e,t){const{color:r="default",disabled:n=!1,href:a,kind:d="primary",light:s=!1,size:p="medium",skipClientNav:u,tabIndex:y,target:v}=e,f=H(e,At);function w(h){const S=h.key;!a&&(S==="Enter"||S==="Space")&&h.preventDefault()}function k(h){const S=h.key;!a&&(S==="Enter"||S==="Space")&&f.onClick&&f.onClick(h)}return i.createElement(Lt,null,i.createElement($t,g({},f,{color:r,disabled:n,href:a,kind:d,light:s,ref:t,skipClientNav:u,size:p,target:v,tabIndex:y,onKeyDown:w,onKeyUp:k})))}),Dt=""+new URL("caret-double-down-bold-XepWuyCn.svg",import.meta.url).href,Pt=""+new URL("caret-double-up-bold-10VQDgxI.svg",import.meta.url).href,zt=""+new URL("caret-up-bold-0QYBH_hJ.svg",import.meta.url).href,Mt=""+new URL("trash-bold-rak1tQ6r.svg",import.meta.url).href,Ee=o=>{const{figureType:e,onMove:t,onRemove:r}=o;return c.jsxs(N,{style:K.container,children:[c.jsx(Pe,{startIcon:Mt,"aria-label":`Delete locked ${e}`,onClick:r,kind:"tertiary",style:K.deleteButton,children:"Delete"}),t&&c.jsxs(c.Fragment,{children:[c.jsx(Ne,{}),c.jsx(Z,{icon:Pt,size:"small","aria-label":`Move locked ${e} to the back`,onClick:()=>t("back"),style:K.iconButton}),c.jsx(Z,{icon:zt,size:"small","aria-label":`Move locked ${e} backward`,onClick:()=>t("backward"),style:K.iconButton}),c.jsx(Z,{icon:ve,size:"small","aria-label":`Move locked ${e} forward`,onClick:()=>t("forward"),style:K.iconButton}),c.jsx(Z,{icon:Dt,size:"small","aria-label":`Move locked ${e} to the front`,onClick:()=>t("front"),style:K.iconButton})]})]})},K=T.StyleSheet.create({container:{width:"100%",flexDirection:"row",alignItems:"center",marginTop:m.xxxSmall_4},deleteButton:{marginInlineStart:-m.xxxSmall_4},iconButton:{margin:0}}),Ot=Ee;Ee.__docgenInfo={description:"",methods:[],displayName:"LockedFigureSettingsActions",props:{figureType:{required:!0,tsType:{name:'union["type"]',raw:'LockedFigure["type"]'},description:""},onMove:{required:!1,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" +import{j as c}from"./jsx-runtime-63Ea5SlK.js";import{l as qe}from"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c as Ie}from"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{V as N,b as re,u as _e,a as H,_ as g}from"./index-0DbkllkJ.js";import{c as ve,S as Fe,O as oe}from"./answer-choices-iyIz6W_C.js";import{T as $e}from"./index-V5gl6frG.js";import{S as O,a as Ne}from"./index-nqMmpXbO.js";import{s as m,c as l,b as M}from"./index-deFLJwr4.js";import{a as te,H as je,B as Be,L as pe}from"./index-18qWGOW7.js";import{l as T}from"./index-awljIyHI.js";import{r as i}from"./index-6oxdNXpR.js";import{S as fe}from"./scrollless-number-text-field-d5PK69vy.js";import{C as Ae}from"./index-i1pBWAmI.js";import{P as le}from"./index-469F30Ub.js";import{C as De}from"./color-select-javI8CkK.js";import{B as Pe}from"./choice-Xr-SKHrB.js";import{w as ze,c as ke,L as we}from"./react-router-dom-VIBHfbW6.js";import{m as Me,c as Oe,u as We,T as Ue}from"./index-f-3iKkZU.js";const Se=o=>{const{coord:e,labels:t,error:r,style:n,onChange:a}=o,[d,s]=i.useState([e[0].toString(),e[1].toString()]);i.useEffect(()=>{s([e[0].toString(),e[1].toString()])},[e]);function p(u,y){const v=[...d];if(v[y]=u,s(v),isNaN(+u)||u==="")return;const f=[...e];f[y]=+u,a(f)}return c.jsxs(N,{style:[P.row,n],children:[c.jsxs(te,{tag:"label",style:P.row,children:[t?t[0]:"x coord",c.jsx(O,{size:m.xxSmall_6}),c.jsx(fe,{value:d[0],onChange:u=>p(u,0),style:[P.textField,r?P.errorField:void 0]})]}),c.jsx(O,{size:m.medium_16}),c.jsxs(te,{tag:"label",style:P.row,children:[t?t[1]:"y coord",c.jsx(O,{size:m.xxSmall_6}),c.jsx(fe,{value:d[1],onChange:u=>p(u,1),style:[P.textField,r?P.errorField:void 0]})]})]})},P=T.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},textField:{width:m.xxxLarge_64},errorField:{borderColor:l.red,backgroundColor:l.fadedRed8}}),Ke=Se;Se.__docgenInfo={description:"",methods:[],displayName:"CoordinatePairInput",props:{coord:{required:!0,tsType:{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},description:""},labels:{required:!1,tsType:{name:"tuple",raw:"[string, string]",elements:[{name:"string"},{name:"string"}]},description:""},error:{required:!1,tsType:{name:"boolean"},description:""},style:{required:!1,tsType:{name:"StyleType"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newCoord: Coord) => void",signature:{arguments:[{type:{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},name:"newCoord"}],return:{name:"void"}}},description:""}}};function X(){return X=Object.assign?Object.assign.bind():function(o){for(var e=1;e=0)&&(t[n]=o[n]);return t}const He=["children","id","initialExpandedIndex","allowMultipleExpanded","caretPosition","cornerKind","animated","style"],Ve=re("ul"),Xe=6;i.forwardRef(function(e,t){const{children:r,id:n,initialExpandedIndex:a,allowMultipleExpanded:d=!0,caretPosition:s,cornerKind:p="rounded",animated:u,style:y}=e,v=xe(e,He),f=Array(r.length).fill(!1);a!==void 0&&(f[a]=!0);const[w,k]=i.useState(f),h=Array(r.length).fill(null),S=r.length<=Xe,L=(x,b)=>{const C=d?[...w]:Array(r.length).fill(!1),E=!w[x];C[x]=E,k(C),b&&b(E)},_=x=>{var b,C,E,F;const $=h.findIndex(I=>I.current===document.activeElement);if($!==-1)switch(x.key){case"ArrowUp":x.preventDefault();const I=($+r.length-1)%r.length;(b=h[I].current)==null||b.focus();break;case"ArrowDown":x.preventDefault();const j=($+1)%r.length;(C=h[j].current)==null||C.focus();break;case"Home":x.preventDefault(),(E=h[0].current)==null||E.focus();break;case"End":x.preventDefault(),(F=h[r.length-1].current)==null||F.focus();break}};return i.createElement(Ve,X({style:[Ge.wrapper,y],onKeyDown:_},v,{ref:t}),r.map((x,b)=>{const{caretPosition:C,cornerKind:E,onToggle:F,animated:$}=x.props,I=i.createRef();h[b]=I;const q=b===0,j=b===r.length-1;return i.createElement("li",{key:b,id:n},i.cloneElement(x,{animated:$??u,caretPosition:C??s,cornerKind:E??p,expanded:w[b],onToggle:()=>L(b,F),isFirstSection:q,isLastSection:j,isRegion:S,ref:I}))}))});const Ge=T.StyleSheet.create({wrapper:{boxSizing:"border-box",listStyle:"none",padding:0,width:"100%"}});function Qe(o,e,t,r){switch(o){case"rounded-per-section":return{roundedTop:!0,roundedBottom:!r};case"rounded":return{roundedTop:e,roundedBottom:t&&!r};default:return{roundedTop:!1,roundedBottom:!1}}}const Je=i.forwardRef(function(e,t){const{id:r,header:n,caretPosition:a,cornerKind:d,collapsible:s=!0,expanded:p,animated:u,onClick:y,sectionContentUniqueId:v,headerStyle:f,tag:w="h2",testId:k,isFirstSection:h,isLastSection:S}=e,L=typeof n=="string",{roundedTop:_,roundedBottom:x}=Qe(d,h,S,p);return i.createElement(je,{tag:w,style:R.heading},i.createElement(Ae,{id:r,"aria-expanded":p,"aria-controls":v,onClick:y,disabled:!s,testId:k?`${k}-header`:void 0,style:[R.headerWrapper,u&&R.headerWrapperWithAnimation,a==="start"&&R.headerWrapperCaretStart,_&&R.roundedTop,x&&R.roundedBottom,f,!s&&R.disabled],ref:t},()=>i.createElement(i.Fragment,null,i.createElement(N,{style:[R.headerContent,L&&R.headerString]},L?i.createElement(N,{style:[a==="end"?R.headerStringCaretEnd:R.headerStringCaretStart]},n):n),s&&i.createElement(le,{icon:ve,color:l.offBlack64,size:"small",style:[u&&R.iconWithAnimation,a==="start"?R.iconStart:R.iconEnd,p&&R.iconExpanded],testId:k?`${k}-caret-icon`:void 0}))))}),Q=m.small_12-1,he="300ms",R=T.StyleSheet.create({heading:{minWidth:0,marginTop:0},headerWrapper:{display:"flex",flexDirection:"row",alignItems:"center",overflow:"hidden",minWidth:"auto",width:"100%",position:"relative",zIndex:1,":active":{outline:`2px solid ${l.activeBlue}`},":hover":{outline:`2px solid ${l.blue}`},":focus":{boxShadow:`0 0 0 2px ${l.blue}`},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":{outline:`2px solid ${l.blue}`}},headerWrapperWithAnimation:{transition:`border-radius ${he}`},headerWrapperCaretStart:{flexDirection:"row-reverse"},roundedTop:{borderStartStartRadius:Q,borderStartEndRadius:Q},roundedBottom:{borderEndStartRadius:Q,borderEndEndRadius:Q},headerContent:{flexGrow:1,textAlign:"start"},headerString:{paddingTop:m.medium_16,paddingBottom:m.medium_16},headerStringCaretEnd:{paddingInlineEnd:m.small_12,paddingInlineStart:m.medium_16},headerStringCaretStart:{paddingInlineEnd:m.medium_16,paddingInlineStart:m.small_12},iconWithAnimation:{transition:`transform ${he}`},iconExpanded:{transform:"rotate(180deg)"},iconStart:{marginInlineStart:m.medium_16},iconEnd:{marginInlineEnd:m.medium_16},disabled:{pointerEvents:"none",color:"inherit",":focus":{boxShadow:`0 0 0 2px ${l.offBlack32}`},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":{outline:`2px solid ${l.offBlack32}`}}}),Ye=["children","id","header","collapsible","expanded","animated","onToggle","caretPosition","cornerKind","style","headerStyle","tag","testId","isFirstSection","isLastSection","isRegion"],Ze=i.forwardRef(function(e,t){const{children:r,id:n,header:a,collapsible:d,expanded:s,animated:p=!1,onToggle:u,caretPosition:y="end",cornerKind:v="rounded",style:f,headerStyle:w,tag:k,testId:h,isFirstSection:S=!0,isLastSection:L=!0,isRegion:_=!0}=e,x=xe(e,Ye),[b,C]=i.useState(s??!1),E=s!==void 0&&u,F=_e(),$=n??F.get("accordion-section"),I=n?`${n}-header`:F.get("accordion-section-header"),q=F.get("accordion-section-content"),j=et(v,S,L),me=()=>{E?u(!s):(C(!b),u&&u(!b))};let W;return d===!1?W=!0:W=E?s:b,i.createElement(N,X({id:$,style:[A.wrapper,p&&A.wrapperWithAnimation,j.wrapper,W?A.wrapperExpanded:A.wrapperCollapsed,f],testId:h},x),i.createElement(Je,{id:I,header:a,caretPosition:y,cornerKind:v,collapsible:d,expanded:W,animated:p,onClick:me,sectionContentUniqueId:q,headerStyle:w,tag:k,testId:h,isFirstSection:S,isLastSection:L,ref:t}),i.createElement(N,{id:q,role:_?"region":void 0,"aria-labelledby":I,style:[A.contentWrapper,W?A.contentWrapperExpanded:A.conentWrapperCollapsed,j.contentWrapper],testId:h?`${h}-content-panel`:void 0},typeof r=="string"?i.createElement(Be,{style:A.stringContent},r):r))}),A=T.StyleSheet.create({wrapper:{display:"grid",position:"static",boxSizing:"border-box",backgroundColor:l.white},wrapperWithAnimation:{transition:"grid-template-rows 300ms"},wrapperCollapsed:{gridTemplateRows:"min-content 0fr"},wrapperExpanded:{gridTemplateRows:"min-content 1fr"},contentWrapper:{overflow:"hidden"},conentWrapperCollapsed:{visibility:"hidden"},contentWrapperExpanded:{visibility:"visible"},stringContent:{padding:m.medium_16}}),J={},et=(o,e,t)=>{const r=`${o}-${e.toString()}-${t.toString()}`;if(J[r])return J[r];let n=Object.freeze({}),a=Object.freeze({}),d=Object.freeze({}),s=Object.freeze({});o==="square"&&(n={border:`1px solid ${l.offBlack16}`,borderBottom:"none",borderRadius:0},t&&(s={borderBottom:`1px solid ${l.offBlack16}`})),o==="rounded"&&(n={border:`1px solid ${l.offBlack16}`,borderBottom:"none"},e&&(d={borderStartStartRadius:m.small_12,borderStartEndRadius:m.small_12}),t&&(s={borderBottom:`1px solid ${l.offBlack16}`,borderEndStartRadius:m.small_12,borderEndEndRadius:m.small_12},a={borderEndEndRadius:m.small_12,borderEndStartRadius:m.small_12})),o==="rounded-per-section"&&(n={border:`1px solid ${l.offBlack16}`,borderRadius:m.small_12,marginBottom:m.medium_16},a={borderEndEndRadius:m.small_12,borderEndStartRadius:m.small_12});const p={wrapper:X({},n,d,s),contentWrapper:a};return J[r]=T.StyleSheet.create(p),J[r]},Ce=o=>{const{children:e,header:t,expanded:r,containerStyle:n,panelStyle:a,onToggle:d}=o;return c.jsx(N,{className:"perseus-editor-accordion",children:c.jsx(Ze,{expanded:r,onToggle:d,style:[ie.container,n],headerStyle:ie.accordionHeader,header:t,children:c.jsx(N,{style:[ie.accordionPanel,a],children:e})})})},ie=T.StyleSheet.create({container:{backgroundColor:l.fadedBlue8,marginTop:m.xSmall_8},accordionHeader:{padding:m.small_12,paddingInlineEnd:0,height:m.xxLarge_48},accordionPanel:{paddingTop:m.xxSmall_6,paddingBottom:m.xxxSmall_4,paddingLeft:m.small_12,paddingRight:m.small_12}}),tt=Ce;Ce.__docgenInfo={description:"",methods:[],displayName:"PerseusEditorAccordion",props:{children:{required:!0,tsType:{name:"union",raw:"React.ReactNode | React.ReactNode[]",elements:[{name:"ReactReactNode",raw:"React.ReactNode"},{name:"Array",elements:[{name:"ReactReactNode",raw:"React.ReactNode"}],raw:"React.ReactNode[]"}]},description:""},header:{required:!0,tsType:{name:"union",raw:"string | React.ReactElement",elements:[{name:"string"},{name:"ReactReactElement",raw:"React.ReactElement"}]},description:""},expanded:{required:!1,tsType:{name:"boolean"},description:""},containerStyle:{required:!1,tsType:{name:"StyleType"},description:""},panelStyle:{required:!1,tsType:{name:"StyleType"},description:""},onToggle:{required:!1,tsType:{name:"signature",type:"function",raw:"(expanded: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"expanded"}],return:{name:"void"}}},description:""}}};function Te(o){const e=[];if(o)if(Array.isArray(o))for(const t of o)e.push(...Te(t));else e.push(o);else return e;return e}function Re(o){const e=[],t=[];if(!o)return{style:{},className:""};const r=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;Te(o).forEach(a=>{const d=a._definition;if(d!=null)if(r){const s={};for(const[p,u]of Object.entries(d))s[p.replace(/-[a-z]/g,y=>y[1].toUpperCase())]=u;t.push(s)}else e.push(a);else t.push(a)});const n=Object.assign({},...t);if(t.length>0&&!r){const a=T.StyleSheet.create({inlineStyles:n});e.push(a.inlineStyles)}return{style:r?n:{},className:T.css(...e)}}const rt=["children","style","tag","testId"],nt=/^h[1-6]$/,ye=T.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}});i.forwardRef(function(e,t){let{children:r,style:n,tag:a="span",testId:d}=e,s=H(e,rt);const p=nt.test(a),u=Re([ye.text,p&&ye.header,n]),y=s.className?[s.className,u.className].join(" "):u.className;return i.createElement(a,g({},s,{style:u.style,className:y,"data-testid":d,ref:t}),r)});const at=["className","style"];function D(o,e){return i.forwardRef((t,r)=>{const{className:n,style:a}=t,d=H(t,at),s=typeof o=="string"?ot[o]:null,{className:p,style:u}=Re([s,e,a]);return i.createElement(o,g({},d,{ref:r,className:[p,n].filter(Boolean).join(" "),style:u}))})}const ot=T.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),it=["testId","tag"],G=T.StyleSheet.create({default:{alignItems:"stretch",borderWidth:0,borderStyle:"solid",boxSizing:"border-box",display:"flex",flexDirection:"column",margin:0,padding:0,position:"relative",zIndex:0,minHeight:0,minWidth:0}}),lt=D("div",G.default),st=D("article",G.default),dt=D("aside",G.default),ut=D("nav",G.default),ct=D("section",G.default);i.forwardRef(function(e,t){const{testId:r,tag:n="div"}=e,a=H(e,it),d=g({},a,{"data-testid":r});switch(n){case"article":return i.createElement(st,g({},d,{ref:t}));case"aside":return i.createElement(dt,g({},d,{ref:t}));case"nav":return i.createElement(ut,g({},d,{ref:t}));case"section":return i.createElement(ct,g({},d,{ref:t}));case"div":return i.createElement(lt,g({},d,{ref:t}));default:throw Error(`${n} is not an allowed value for the 'tag' prop`)}});let z=function(o){return o.Root="root",o.Initial="initial",o.Standard="standard",o}({});const ee=i.createContext(z.Root);ee.displayName="RenderStateContext";class mt extends i.Component{constructor(...e){super(...e),this.state={mounted:!1},this._isTheRootComponent=!1}componentDidMount(){this._isTheRootComponent&&this.setState({mounted:!0})}_renderAsRootComponent(){const{mounted:e}=this.state,{children:t,fallback:r}=this.props;return this._isTheRootComponent=!0,e?i.createElement(ee.Provider,{value:z.Standard},t()):r?i.createElement(ee.Provider,{value:z.Initial},r()):null}_maybeRender(e){const{children:t,fallback:r}=this.props;switch(e){case z.Root:return this._renderAsRootComponent();case z.Initial:return r?r():null;case z.Standard:return t()}{var n;return console.log(`We got a render state we don't understand: "${(n=JSON.stringify(e))!=null?n:""}"`),this._maybeRender(z.Root)}}render(){return i.createElement(ee.Consumer,null,e=>this._maybeRender(e))}}class ne{constructor(e){this._uniqueFactoryName=void 0,this.get=r=>{const n=r.toLowerCase();if(!this._hasValidIdChars(r))throw new Error(`Invalid identifier key: ${r}`);return`${this._uniqueFactoryName}-${n}`},e=typeof e=="string"?e:"";const t=e.toLowerCase();if(!this._hasValidIdChars(t))throw new Error(`Invalid factory scope: ${e}`);this._uniqueFactoryName=`uid-${t}-${ne._factoryUniquenessCounter++}`}_hasValidIdChars(e){return typeof e=="string"?!/\s/.test(e):!1}}ne._factoryUniquenessCounter=0;class se{get(e){return e}}se.Default=new se;var pt=se.Default;class ft extends i.Component{constructor(...e){super(...e),this._idFactory=void 0}_performRender(e){const{children:t,mockOnFirstRender:r,scope:n}=this.props;return e?r?t(pt):null:(this._idFactory||(this._idFactory=new ne(n)),t(this._idFactory))}render(){return i.createElement(mt,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}}class de extends i.Component{renderChildren(e){const{id:t,children:r}=this.props,n=e?e.get(de.defaultId):t;if(!n)throw new Error("Did not get an identifier factory nor a id prop");return r(n)}render(){const{id:e,scope:t}=this.props;return e?this.renderChildren():i.createElement(ft,{scope:t,mockOnFirstRender:!0},r=>this.renderChildren(r))}}de.defaultId="wb-id";const ge=o=>{switch(o){case"link":return{triggerOnEnter:!0,triggerOnSpace:!1};case"checkbox":case"radio":case"listbox":return{triggerOnEnter:!1,triggerOnSpace:!0};case"button":case"menuitem":case"menu":case"option":default:return{triggerOnEnter:!0,triggerOnSpace:!0}}},ht={onClick:()=>{},onMouseEnter:()=>{},onMouseLeave:()=>{},onMouseDown:()=>{},onMouseUp:()=>{},onTouchStart:()=>{},onTouchEnd:()=>{},onTouchCancel:()=>{},onKeyDown:()=>{},onKeyUp:()=>{}},U={enter:13,space:32},be={hovered:!1,focused:!1,pressed:!1,waiting:!1};class ue extends i.Component{static getDerivedStateFromProps(e,t){return e.disabled?g({},be,{focused:t.focused}):null}constructor(e){super(e),this.waitingForClick=void 0,this.enterClick=void 0,this.handleClick=t=>{const{onClick:r=void 0,beforeNav:n=void 0,safeWithNav:a=void 0}=this.props;this.enterClick||((r||n||a)&&(this.waitingForClick=!1),this.runCallbackAndMaybeNavigate(t))},this.handleMouseEnter=t=>{this.waitingForClick||this.setState({hovered:!0})},this.handleMouseLeave=()=>{this.waitingForClick||this.setState({hovered:!1,pressed:!1,focused:!1})},this.handleMouseDown=t=>{this.props.onMouseDown&&this.props.onMouseDown(t),this.setState({pressed:!0})},this.handleMouseUp=t=>{this.props.onMouseUp&&this.props.onMouseUp(t),this.setState({pressed:!1,focused:!1})},this.handleTouchStart=()=>{this.setState({pressed:!0})},this.handleTouchEnd=()=>{this.setState({pressed:!1}),this.waitingForClick=!0},this.handleTouchCancel=()=>{this.setState({pressed:!1}),this.waitingForClick=!0},this.handleKeyDown=t=>{const{onKeyDown:r,role:n}=this.props;r&&r(t);const a=t.which||t.keyCode,{triggerOnEnter:d,triggerOnSpace:s}=ge(n);d&&a===U.enter||s&&a===U.space?(t.preventDefault(),this.setState({pressed:!0})):!d&&a===U.enter&&(this.enterClick=!0)},this.handleKeyUp=t=>{const{onKeyUp:r,role:n}=this.props;r&&r(t);const a=t.which||t.keyCode,{triggerOnEnter:d,triggerOnSpace:s}=ge(n);d&&a===U.enter||s&&a===U.space?(this.setState({pressed:!1,focused:!0}),this.runCallbackAndMaybeNavigate(t)):!d&&a===U.enter&&(this.enterClick=!1)},this.handleFocus=t=>{const{onFocus:r}=this.props;this.setState({focused:!0},()=>{r&&r(t)})},this.handleBlur=t=>{this.setState({focused:!1,pressed:!1})},this.state=be,this.waitingForClick=!1,this.enterClick=!1}navigateOrReset(e){if(e){const{history:t,href:r,skipClientNav:n,target:a=void 0}=this.props;r&&(a==="_blank"?(window.open(r,"_blank"),this.setState({waiting:!1})):t&&!n?(t.push(r),this.setState({waiting:!1})):window.location.assign(r))}else this.setState({waiting:!1})}handleSafeWithNav(e,t){const{skipClientNav:r,history:n}=this.props;return n&&!r||this.props.target==="_blank"?(e(),this.navigateOrReset(t),Promise.resolve()):(this.state.waiting||this.setState({waiting:!0}),e().then(()=>{this.state.waiting||this.setState({waiting:!0})}).catch(a=>{}).finally(()=>{this.navigateOrReset(t)}))}runCallbackAndMaybeNavigate(e){const{onClick:t=void 0,beforeNav:r=void 0,safeWithNav:n=void 0,href:a,type:d}=this.props;let s=!0,p=!0;if(t&&t(e),e.defaultPrevented&&(s=!1,p=!1),e.preventDefault(),!a&&d==="submit"&&p){let u=e.currentTarget;for(;u;){if(u instanceof window.HTMLFormElement){const y=new window.Event("submit",{bubbles:!0,cancelable:!0});u.dispatchEvent(y);break}u=u.parentElement}}if(r)this.setState({waiting:!0}),r().then(()=>n?this.handleSafeWithNav(n,s):this.navigateOrReset(s)).catch(()=>{});else{if(n)return this.handleSafeWithNav(n,s);this.navigateOrReset(s)}}render(){const e=this.props.rel||(this.props.target==="_blank"?"noopener noreferrer":void 0),t=this.props.disabled?g({},ht,{onFocus:this.handleFocus,onBlur:this.handleBlur,tabIndex:this.props.tabIndex,rel:e}):{onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onTouchCancel:this.handleTouchCancel,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onFocus:this.handleFocus,onBlur:this.handleBlur,tabIndex:this.props.tabIndex,rel:e},{children:r}=this.props;return r&&r(this.state,t)}}ue.defaultProps={disabled:!1};const ce=o=>typeof o!="string"?!1:!/^(https?:)?\/\//i.test(o)&&!/^([^#]*#[\w-]*|[\w\-.]+:)/.test(o),yt=ze(ue);function gt(o,e,t){return t&&e!==!0&&o&&ce(o)?yt:ue}const bt=["href","onClick","skipClientNav","beforeNav","safeWithNav","style","target","testId","onFocus","onKeyDown","onKeyUp","onMouseDown","onMouseUp","hideDefaultFocusRing","light","disabled","tabIndex"],vt=D("a"),kt=D("button"),wt=D(we),St=i.forwardRef(function(e,t){const r=(a,d,s)=>{const p=e.href&&!e.disabled,u=d&&!e.skipClientNav&&ce(e.href||"");return p&&u&&e.href?i.createElement(wt,g({},s,{to:e.href,role:e.role,target:e.target||void 0,"aria-disabled":e.disabled?"true":"false",ref:t}),e.children(a)):p&&!u?i.createElement(vt,g({},s,{href:e.href,role:e.role,target:e.target||void 0,"aria-disabled":e.disabled?"true":"false",ref:t}),e.children(a)):i.createElement(kt,g({},s,{type:"button","aria-disabled":e.disabled,ref:t}),e.children(a))},n=a=>{const{href:d,onClick:s,skipClientNav:p,beforeNav:u=void 0,safeWithNav:y=void 0,style:v,target:f=void 0,testId:w,onFocus:k,onKeyDown:h,onKeyUp:S,onMouseDown:L,onMouseUp:_,hideDefaultFocusRing:x,light:b,disabled:C,tabIndex:E}=e,F=H(e,bt),$=gt(d,p,a),I=q=>[V.reset,V.link,!x&&q.focused&&(b?V.focusedLight:V.focused),C&&V.disabled,v];return u?i.createElement($,{href:d,onClick:s,beforeNav:u,safeWithNav:y,onFocus:k,onKeyDown:h,onKeyUp:S,onMouseDown:L,onMouseUp:_,disabled:C,tabIndex:E},(q,j)=>r(q,a,g({},F,{"data-testid":w,style:I(q)},j))):i.createElement($,{href:d,onClick:s,safeWithNav:y,onFocus:k,onKeyDown:h,onKeyUp:S,onMouseDown:L,onMouseUp:_,target:f,disabled:C,tabIndex:E},(q,j)=>r(q,a,g({},F,{"data-testid":w,style:I(q)},j)))};return i.createElement(ke.Consumer,null,a=>n(a))});St.defaultProps={light:!1,disabled:!1};const V=T.StyleSheet.create({reset:{border:"none",margin:0,padding:0,width:"auto",overflow:"visible",background:"transparent",textDecoration:"none",color:"inherit",font:"inherit",boxSizing:"border-box",touchAction:"manipulation",userSelect:"none",outline:"none",lineHeight:"normal",WebkitFontSmoothing:"inherit",MozOsxFontSmoothing:"inherit"},link:{cursor:"pointer"},focused:{":focus":{outline:`solid 2px ${l.blue}`}},focusedLight:{outline:`solid 2px ${l.white}`},disabled:{color:l.offBlack32,cursor:"not-allowed",":focus":{outline:"none"},":focus-visible":{outline:`solid 2px ${l.blue}`}}}),xt=o=>{switch(o){case"xsmall":return"small";case"small":return"medium";case"medium":return"medium";case"large":return"medium"}},Ct=o=>({xsmall:24,small:32,medium:40,large:48})[o],ae={color:{bg:{hovered:"transparent",active:"transparent",disabled:"transparent",filled:{action:{hovered:"transparent",active:"transparent"},critical:{hovered:"transparent",active:"transparent"}}},stroke:{disabled:{default:l.offBlack32,inverse:l.white50},inverse:l.white,action:{default:l.blue,active:l.activeBlue,inverse:l.fadedBlue},critical:{default:l.red,active:l.activeRed,inverse:l.fadedRed},primary:{action:{hovered:l.blue,active:l.activeBlue},critical:{hovered:l.red,active:l.activeRed},inverse:{default:l.white,hovered:l.white}},secondary:{default:l.offBlack},tertiary:{default:l.offBlack64},filled:{action:{hovered:l.blue,active:l.activeBlue},critical:{hovered:l.red,active:l.activeRed}}}},border:{width:{default:M.width.thin,active:M.width.none,hovered:M.width.thin,hoveredInverse:M.width.thin},radius:{default:M.radius.medium_4}}},Tt=Me(ae,{color:{bg:{hovered:l.white,active:l.white64,filled:{action:{hovered:l.blue,active:l.activeBlue},critical:{hovered:l.red,active:l.activeRed}}},stroke:{action:{inverse:l.eggplant},critical:{inverse:l.eggplant},primary:{action:{hovered:l.eggplant,active:l.eggplant},critical:{hovered:l.eggplant,active:l.eggplant},inverse:{hovered:l.eggplant}},filled:{action:{hovered:l.white,active:l.white},critical:{hovered:l.white,active:l.white}}}},border:{width:{hovered:M.width.none,hoveredInverse:M.width.none}}}),Rt={default:ae,khanmigo:Tt},Le=Oe(ae);function Lt(o){var e;const t=i.useContext(Ue),r=(e=Rt[t])!=null?e:ae;return i.createElement(Le.Provider,{value:r},o.children)}const Et=["color","disabled","href","icon","kind","light","size","skipClientNav","style","testId"];function qt({icon:o,size:e}){switch(xt(e)){case"small":return i.createElement(le,{size:"small",color:"currentColor",icon:o});case"medium":default:return i.createElement(le,{size:"medium",color:"currentColor",icon:o})}}const It=re("a"),_t=re("button"),Ft=re(we),$t=i.forwardRef(function(e,t){const{color:r,disabled:n,href:a,icon:d,kind:s="primary",light:p=!1,size:u="medium",skipClientNav:y,style:v,testId:f}=e,w=H(e,Et),{theme:k,themeName:h}=We(Le),S=L=>{const _=Bt(r,s,p,u,k,h),x=[Nt.shared,_.default,n&&_.disabled],b=i.createElement(qt,{size:u,icon:d}),C=g({"data-testid":f,style:[x,v]},w);return a&&!n?L&&!y&&ce(a)?i.createElement(Ft,g({},C,{to:a,ref:t}),b):i.createElement(It,g({},C,{href:a,ref:t}),b):i.createElement(_t,g({type:"button"},C,{onClick:n?void 0:w.onClick,"aria-disabled":n,ref:t}),b)};return i.createElement(ke.Consumer,null,L=>S(L))}),Nt=T.StyleSheet.create({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",padding:0,cursor:"pointer",border:"none",outline:"none",textDecoration:"none",background:"none",margin:-8,touchAction:"manipulation"}}),Y={};function jt(o,e,t,r,n){switch(o){case"primary":const a=n==="destructive"?e.color.stroke.primary.critical.hovered:e.color.stroke.primary.action.hovered;return{":hover":{backgroundColor:e.color.bg.hovered,color:r?e.color.stroke.primary.inverse.hovered:a,outlineColor:r?e.color.stroke.inverse:t,outlineOffset:1,outlineStyle:"solid",outlineWidth:r?e.border.width.hoveredInverse:e.border.width.hovered},":active":{backgroundColor:e.color.bg.active}};case"secondary":case"tertiary":return{":hover":{backgroundColor:n==="destructive"?e.color.bg.filled.critical.hovered:e.color.bg.filled.action.hovered,color:n==="destructive"?e.color.stroke.filled.critical.hovered:e.color.stroke.filled.action.hovered,outlineWidth:e.border.width.active},":active":{backgroundColor:n==="destructive"?e.color.bg.filled.critical.active:e.color.bg.filled.action.active,color:n==="destructive"?e.color.stroke.filled.critical.active:e.color.stroke.filled.action.active,outlineWidth:e.border.width.active}};default:return{":focus-visible":{},":hover":{},":active":{}}}}const Bt=(o="default",e,t,r,n,a)=>{const d=o==="destructive"?n.color.stroke.critical.default:n.color.stroke.action.default,s=`${d}-${e}-${t}-${r}-${a}`;if(Y[s])return Y[s];if(t&&e!=="primary")throw new Error("Light is only supported for primary IconButtons");const p=(()=>{switch(e){case"primary":return t?n.color.stroke.primary.inverse.default:d;case"secondary":return n.color.stroke.secondary.default;case"tertiary":return n.color.stroke.tertiary.default;default:throw new Error("IconButton kind not recognized")}})(),u=Ct(r),y=jt(e,n,d,t,o),v=o==="destructive"?n.color.stroke.critical.inverse:n.color.stroke.action.inverse,f=o==="destructive"?n.color.stroke.critical.active:n.color.stroke.action.active,w=t?n.color.stroke.inverse:d,k=t?n.color.stroke.disabled.inverse:n.color.stroke.disabled.default,h={backgroundColor:n.color.bg.disabled,color:k,outlineColor:k},S={default:{height:u,width:u,color:p,borderRadius:n.border.radius.default,":hover":g({boxShadow:"none",color:w,borderRadius:n.border.radius.default,outlineWidth:n.border.width.default},y[":hover"]),"@media not (hover: hover)":{":hover":{boxShadow:"none",color:p,borderRadius:n.border.radius.default,outline:"none",backgroundColor:"transparent"}},":focus":{boxShadow:`0 0 0 ${n.border.width.default}px ${w}`,borderRadius:n.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":g({boxShadow:"none",outlineWidth:n.border.width.default,outlineColor:w,outlineOffset:1,outlineStyle:"solid",borderRadius:n.border.radius.default},y[":focus-visible"]),":active":g({color:t?v:f,outlineWidth:n.border.width.default,outlineColor:t?v:f,outlineOffset:1,outlineStyle:"solid",borderRadius:n.border.radius.default},y[":active"])},disabled:{color:k,cursor:"not-allowed",":hover":g({},h,{outline:"none"}),":active":g({},h,{outline:"none"}),":focus":{boxShadow:`0 0 0 ${n.border.width.default}px ${k}`,borderRadius:n.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":h}};return Y[s]=T.StyleSheet.create(S),Y[s]},At=["color","disabled","href","kind","light","size","skipClientNav","tabIndex","target"],Z=i.forwardRef(function(e,t){const{color:r="default",disabled:n=!1,href:a,kind:d="primary",light:s=!1,size:p="medium",skipClientNav:u,tabIndex:y,target:v}=e,f=H(e,At);function w(h){const S=h.key;!a&&(S==="Enter"||S==="Space")&&h.preventDefault()}function k(h){const S=h.key;!a&&(S==="Enter"||S==="Space")&&f.onClick&&f.onClick(h)}return i.createElement(Lt,null,i.createElement($t,g({},f,{color:r,disabled:n,href:a,kind:d,light:s,ref:t,skipClientNav:u,size:p,target:v,tabIndex:y,onKeyDown:w,onKeyUp:k})))}),Dt=""+new URL("caret-double-down-bold-XepWuyCn.svg",import.meta.url).href,Pt=""+new URL("caret-double-up-bold-10VQDgxI.svg",import.meta.url).href,zt=""+new URL("caret-up-bold-0QYBH_hJ.svg",import.meta.url).href,Mt=""+new URL("trash-bold-rak1tQ6r.svg",import.meta.url).href,Ee=o=>{const{figureType:e,onMove:t,onRemove:r}=o;return c.jsxs(N,{style:K.container,children:[c.jsx(Pe,{startIcon:Mt,"aria-label":`Delete locked ${e}`,onClick:r,kind:"tertiary",style:K.deleteButton,children:"Delete"}),t&&c.jsxs(c.Fragment,{children:[c.jsx(Ne,{}),c.jsx(Z,{icon:Pt,size:"small","aria-label":`Move locked ${e} to the back`,onClick:()=>t("back"),style:K.iconButton}),c.jsx(Z,{icon:zt,size:"small","aria-label":`Move locked ${e} backward`,onClick:()=>t("backward"),style:K.iconButton}),c.jsx(Z,{icon:ve,size:"small","aria-label":`Move locked ${e} forward`,onClick:()=>t("forward"),style:K.iconButton}),c.jsx(Z,{icon:Dt,size:"small","aria-label":`Move locked ${e} to the front`,onClick:()=>t("front"),style:K.iconButton})]})]})},K=T.StyleSheet.create({container:{width:"100%",flexDirection:"row",alignItems:"center",marginTop:m.xxxSmall_4},deleteButton:{marginInlineStart:-m.xxxSmall_4},iconButton:{margin:0}}),Ot=Ee;Ee.__docgenInfo={description:"",methods:[],displayName:"LockedFigureSettingsActions",props:{figureType:{required:!0,tsType:{name:'union["type"]',raw:'LockedFigure["type"]'},description:""},onMove:{required:!1,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" | "backward" | "forward" | "front"`,elements:[{name:"literal",value:'"back"'},{name:"literal",value:'"backward"'},{name:"literal",value:'"forward"'},{name:"literal",value:'"front"'}]},name:"movement"}],return:{name:"void"}}},description:""},onRemove:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""}}};const{InfoTip:Wt}=Ie;function Ut(o){const{type:e,coord:t,color:r,size:n,text:a,expanded:d,onChangeProps:s,onMove:p,onRemove:u,onToggle:y,containerStyle:v}=o;return c.jsxs(tt,{expanded:d,onToggle:y,header:c.jsxs(N,{style:[B.row,B.accordionHeaderContainer],children:[c.jsxs(pe,{children:["Label (",t[0],", ",t[1],")"]}),c.jsx(O,{size:m.xSmall_8}),a!==""&&c.jsx(pe,{style:[{backgroundColor:l.white,color:qe[r]},B.accordionHeader],children:a})]}),containerStyle:v,children:[c.jsx(Ke,{coord:t,onChange:f=>{s({coord:f})},style:B.spaceUnder}),c.jsxs(N,{style:B.row,children:[c.jsxs(te,{tag:"label",style:[B.row,B.spaceUnder,{flexGrow:1}],children:["text",c.jsx(O,{size:m.xSmall_8}),c.jsx($e,{value:a,placeholder:"ex. x^2 or \\frac{1}{2}",onChange:f=>s({text:f})})]}),c.jsxs(Wt,{children:["Surround your text with $ for TeX.",c.jsx("br",{}),"Example: ","This circle has radius $\\frac{1}{2}$ units.",c.jsx("br",{}),c.jsx("br",{}),'It is important to use TeX when appropriate for accessibility. The above example would be read as "This circle has radius one-half units" by screen readers.']})]}),c.jsxs(N,{style:B.row,children:[c.jsx(De,{selectedValue:r,onChange:f=>{s({color:f})},style:B.spaceUnder}),c.jsx(O,{size:m.medium_16}),c.jsxs(te,{tag:"label",style:B.row,children:["size",c.jsx(O,{size:m.xSmall_8}),c.jsxs(Fe,{selectedValue:n,onChange:f=>s({size:f}),placeholder:"",children:[c.jsx(oe,{value:"small",label:"small"}),c.jsx(oe,{value:"medium",label:"medium"}),c.jsx(oe,{value:"large",label:"large"})]})]})]}),c.jsx(Ot,{figureType:e,onMove:p,onRemove:u})]})}const B=T.StyleSheet.create({accordionHeaderContainer:{whiteSpace:"nowrap"},accordionHeader:{padding:m.xxxSmall_4,marginInlineEnd:m.xSmall_8,borderRadius:m.xxxSmall_4,textOverflow:"ellipsis",overflow:"hidden"},row:{display:"flex",flexDirection:"row",alignItems:"center",minWidth:0},spaceUnder:{marginBottom:m.xSmall_8}});Ut.__docgenInfo={description:"",methods:[],displayName:"LockedLabelSettings",props:{type:{required:!0,tsType:{name:"literal",value:'"label"'},description:""},coord:{required:!0,tsType:{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},description:""},text:{required:!0,tsType:{name:"string"},description:""},color:{required:!0,tsType:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},description:""},size:{required:!0,tsType:{name:"union",raw:'"small" | "medium" | "large"',elements:[{name:"literal",value:'"small"'},{name:"literal",value:'"medium"'},{name:"literal",value:'"large"'}]},description:""},onChangeProps:{required:!0,tsType:{name:"signature",type:"function",raw:"(newProps: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"union",raw:`| LockedPointType diff --git a/assets/locked-label-settings.stories-5243600u.js b/assets/locked-label-settings.stories-ib43xfLg.js similarity index 81% rename from assets/locked-label-settings.stories-5243600u.js rename to assets/locked-label-settings.stories-ib43xfLg.js index 91afc62ba8..c0589c456d 100644 --- a/assets/locked-label-settings.stories-5243600u.js +++ b/assets/locked-label-settings.stories-ib43xfLg.js @@ -1,4 +1,4 @@ -import{j as c}from"./jsx-runtime-63Ea5SlK.js";import{r as P}from"./index-6oxdNXpR.js";import{L as t}from"./locked-label-settings-lVE0HwhW.js";import{g as x}from"./util-x8Ikjhfh.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-4NqU465A.js";const so={title:"PerseusEditor/Components/Locked Label Settings",component:t},r=p=>c.jsx(t,{...p}),u={...x("label"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};r.args=u;const o={render:function(){const[m,l]=P.useState(u),g=f=>{l({...m,...f})};return c.jsx(t,{...m,expanded:!0,onChangeProps:g})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,e,s;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as c}from"./jsx-runtime-63Ea5SlK.js";import{r as P}from"./index-6oxdNXpR.js";import{L as t}from"./locked-label-settings-CnylHQl6.js";import{g as x}from"./util-ZotWJxjO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-javI8CkK.js";const so={title:"PerseusEditor/Components/Locked Label Settings",component:t},r=p=>c.jsx(t,{...p}),u={...x("label"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};r.args=u;const o={render:function(){const[m,l]=P.useState(u),g=f=>{l({...m,...f})};return c.jsx(t,{...m,expanded:!0,onChangeProps:g})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,e,s;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(s=(e=r.parameters)==null?void 0:e.docs)==null?void 0:s.source}}};var n,a,d;o.parameters={...o.parameters,docs:{...(n=o.parameters)==null?void 0:n.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/locked-line-settings-0UTK3Vo6.js b/assets/locked-line-settings-JSySSneX.js similarity index 97% rename from assets/locked-line-settings-0UTK3Vo6.js rename to assets/locked-line-settings-JSySSneX.js index ea86c2208b..85e99d22aa 100644 --- a/assets/locked-line-settings-0UTK3Vo6.js +++ b/assets/locked-line-settings-JSySSneX.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-63Ea5SlK.js";import"./util-AYeX86gl.js";import{e as K}from"./svg-image-7aOK05RI.js";import{B as W}from"./choice-Xr-SKHrB.js";import{V as v}from"./index-0DbkllkJ.js";import{S as Z,O as h}from"./answer-choices-lVeJkx-U.js";import{S as y}from"./index-nqMmpXbO.js";import{s as c,c as x}from"./index-deFLJwr4.js";import{L as G,a as C}from"./index-18qWGOW7.js";import{L as H,p as J}from"./locked-figure-aria-wRg9cB39.js";import{l as Q}from"./index-awljIyHI.js";import{v as b}from"./index-smZ6iCr_.js";import{P as Y,L as ee,a as re}from"./locked-label-settings-lVE0HwhW.js";import{C as ne}from"./color-select-4NqU465A.js";import{L as ae}from"./line-stroke-select-Kn8DFI_S.js";import{L as le}from"./line-swatch-qqHDCIz5.js";import{L as N}from"./locked-point-settings-HQeaTYKF.js";import{g as te,j as T,a as oe}from"./util-x8Ikjhfh.js";const j="The line cannot have length 0.",$=g=>{var P,z;const{flags:d,kind:w,points:p,color:k,lineStyle:L="solid",showPoint1:R,showPoint2:V,labels:n,ariaLabel:_,onChangeProps:t,onMove:X,onRemove:I}=g,[u,s]=p,F=w.charAt(0).toUpperCase()+w.slice(1),M=`${F} (${u.coord[0]}, +import{j as r}from"./jsx-runtime-63Ea5SlK.js";import"./util-AYeX86gl.js";import{e as K}from"./svg-image-7aOK05RI.js";import{B as W}from"./choice-Xr-SKHrB.js";import{V as v}from"./index-0DbkllkJ.js";import{S as Z,O as h}from"./answer-choices-iyIz6W_C.js";import{S as y}from"./index-nqMmpXbO.js";import{s as c,c as x}from"./index-deFLJwr4.js";import{L as G,a as C}from"./index-18qWGOW7.js";import{L as H,p as J}from"./locked-figure-aria-1k3pfy3U.js";import{l as Q}from"./index-awljIyHI.js";import{v as b}from"./index-smZ6iCr_.js";import{P as Y,L as ee,a as re}from"./locked-label-settings-CnylHQl6.js";import{C as ne}from"./color-select-javI8CkK.js";import{L as ae}from"./line-stroke-select-H15MLZYg.js";import{L as le}from"./line-swatch-9TD4hiwz.js";import{L as N}from"./locked-point-settings-q-YHpFjG.js";import{g as te,j as T,a as oe}from"./util-ZotWJxjO.js";const j="The line cannot have length 0.",$=g=>{var P,z;const{flags:d,kind:w,points:p,color:k,lineStyle:L="solid",showPoint1:R,showPoint2:V,labels:n,ariaLabel:_,onChangeProps:t,onMove:X,onRemove:I}=g,[u,s]=p,F=w.charAt(0).toUpperCase()+w.slice(1),M=`${F} (${u.coord[0]}, ${u.coord[1]}), (${s.coord[0]}, ${s.coord[1]})`,q=K(u.coord,s.coord);async function B(){const e=await T(n),l=await T(u.labels),a=await T(s.labels);let o=`${F}${e} from point${l} at (${u.coord[0]}, ${u.coord[1]}) to point${a} at (${s.coord[0]}, ${s.coord[1]})`;const i=oe(k,L);return o+=i,o}function S(e,l){const a=[...p];a[l]={...p[l],...e};const o=b.midpoint(p[0].coord,p[1].coord),i=b.midpoint(a[0].coord,a[1].coord),A=[i[0]-o[0],i[1]-o[1]],U=n==null?void 0:n.map((f,ie)=>({...f,coord:[f.coord[0]+A[0],f.coord[1]+A[1]]}));t({points:a,labels:U})}function E(e){var a,o;const l=n==null?void 0:n.map(i=>({...i,color:e}));t({color:e,points:[{...u,color:e,labels:(a=u.labels)==null?void 0:a.map(i=>({...i,color:e}))},{...s,color:e,labels:(o=s.labels)==null?void 0:o.map(i=>({...i,color:e}))}],labels:l})}function D(e,l){if(!n)return;const a=[...n];a[l]={...n[l],...e},t({labels:a})}function O(e){if(!n)return;const l=n.filter((a,o)=>o!==e);t({labels:l})}return r.jsxs(Y,{expanded:g.expanded,onToggle:g.onToggle,header:r.jsxs(v,{style:m.row,children:[r.jsx(G,{children:M}),r.jsx(y,{size:c.xSmall_8}),r.jsx(le,{color:k,lineStyle:L})]}),children:[r.jsxs(C,{tag:"label",style:[m.row,m.spaceUnder],children:["kind",r.jsx(y,{size:c.xxxSmall_4}),r.jsxs(Z,{selectedValue:w,onChange:e=>t({kind:e}),placeholder:"",children:[r.jsx(h,{value:"line",label:"line"}),r.jsx(h,{value:"ray",label:"ray"}),r.jsx(h,{value:"segment",label:"segment"})]})]}),r.jsxs(v,{style:m.row,children:[r.jsx(ne,{selectedValue:k,onChange:E}),r.jsx(y,{size:c.small_12}),r.jsx(ae,{selectedValue:L,onChange:e=>t({lineStyle:e})})]}),q&&r.jsx(C,{style:m.errorText,children:j}),r.jsx(N,{flags:d,headerLabel:"Point 1",expanded:!0,showPoint:R,error:q?j:null,...u,onTogglePoint:e=>t({showPoint1:e}),onChangeProps:e=>S(e,0)}),r.jsx(N,{flags:d,headerLabel:"Point 2",expanded:!0,showPoint:V,error:q?j:null,...s,onTogglePoint:e=>t({showPoint2:e}),onChangeProps:e=>S(e,1)}),((P=d==null?void 0:d.mafs)==null?void 0:P["locked-figures-aria"])&&r.jsxs(r.Fragment,{children:[r.jsx(y,{size:c.small_12}),r.jsx(v,{style:m.horizontalRule}),r.jsx(H,{ariaLabel:_,getPrepopulatedAriaLabel:B,onChangeProps:e=>{t(e)}})]}),((z=d==null?void 0:d.mafs)==null?void 0:z["locked-line-labels"])&&r.jsxs(r.Fragment,{children:[r.jsx(y,{size:c.xxxSmall_4}),r.jsx(v,{style:m.horizontalRule}),r.jsx(y,{size:c.small_12}),r.jsx(C,{children:"Visible labels"}),n==null?void 0:n.map((e,l)=>r.jsx(ee,{...e,expanded:!0,onChangeProps:a=>{D(a,l)},onRemove:()=>{O(l)},containerStyle:m.labelContainer})),r.jsx(W,{kind:"tertiary",startIcon:J,onClick:()=>{const e=[0,-1],l=b.add(b.scale(e,(n==null?void 0:n.length)??0),b.midpoint(p[0].coord,p[1].coord)),a={...te("label"),coord:l,color:k};t({labels:[...n??[],a]})},style:m.addButton,children:"Add visible label"})]}),r.jsx(re,{figureType:g.type,onMove:X,onRemove:I})]})},m=Q.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},spaceUnder:{marginBottom:c.xSmall_8},errorText:{color:x.red},addButton:{alignSelf:"start"},horizontalRule:{height:1,backgroundColor:x.offBlack16},labelContainer:{backgroundColor:x.white}}),Te=$;$.__docgenInfo={description:"",methods:[],displayName:"LockedLineSettings",props:{type:{required:!0,tsType:{name:"literal",value:'"line"'},description:""},kind:{required:!0,tsType:{name:"union",raw:'"line" | "ray" | "segment"',elements:[{name:"literal",value:'"line"'},{name:"literal",value:'"ray"'},{name:"literal",value:'"segment"'}]},description:""},points:{required:!0,tsType:{name:"tuple",raw:"[point1: LockedPointType, point2: LockedPointType]",elements:[{name:"unknown"},{name:"unknown"}]},description:""},color:{required:!0,tsType:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},description:""},lineStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""},showPoint1:{required:!0,tsType:{name:"boolean"},description:""},showPoint2:{required:!0,tsType:{name:"boolean"},description:""},labels:{required:!1,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:`{ type: "label"; coord: Coord; diff --git a/assets/locked-line-settings.stories-b7Mj-x5V.js b/assets/locked-line-settings.stories-y7BFUqhH.js similarity index 84% rename from assets/locked-line-settings.stories-b7Mj-x5V.js rename to assets/locked-line-settings.stories-y7BFUqhH.js index 03bd3007b9..2eebd28388 100644 --- a/assets/locked-line-settings.stories-b7Mj-x5V.js +++ b/assets/locked-line-settings.stories-y7BFUqhH.js @@ -1,4 +1,4 @@ -import{j as d}from"./jsx-runtime-63Ea5SlK.js";import{r as n}from"./index-6oxdNXpR.js";import{L as s}from"./locked-line-settings-0UTK3Vo6.js";import{g as h}from"./util-x8Ikjhfh.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./svg-image-7aOK05RI.js";import"./index-awljIyHI.js";import"./index-0DbkllkJ.js";import"./index-dnMhQZ-1.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-J2t_5nK1.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./index-9gkyvru-.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./choice-Xr-SKHrB.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./media-queries-gbofTbz-.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./answer-choices-lVeJkx-U.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./locked-figure-aria-wRg9cB39.js";import"./article-renderer-mU-6RWLp.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./locked-label-settings-lVE0HwhW.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-4NqU465A.js";import"./line-stroke-select-Kn8DFI_S.js";import"./line-swatch-qqHDCIz5.js";import"./locked-point-settings-HQeaTYKF.js";import"./labeled-switch-7da7Bmzh.js";const Tt={title:"PerseusEditor/Components/Locked Line Settings",component:s},p=i=>d.jsx(s,{...i}),c={...h("line"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};p.args=c;const m={render:function(){const[e,r]=n.useState(c),t=o=>{r({...e,...o})};return d.jsx(s,{...e,onChangeProps:t})}};m.parameters={chromatic:{disableSnapshot:!0}};const a={render:function(){const[e,r]=n.useState(c),t=o=>{r({...e,...o})};return d.jsx(s,{...e,points:[h("point"),h("point")],expanded:!0,onChangeProps:t})}},u={render:function(){const[e,r]=n.useState(!0),[t,o]=n.useState(c),P=g=>{o({...t,...g})};return d.jsx(s,{...t,expanded:e,onToggle:r,onChangeProps:P})}},l={render:function(){const[e,r]=n.useState(!0),[t,o]=n.useState({...c,kind:"segment",color:"green",lineStyle:"dashed"}),P=g=>{o({...t,...g})};return d.jsx(s,{...t,expanded:e,onToggle:r,onChangeProps:P})}};p.__docgenInfo={description:"",methods:[],displayName:"Default"};var f,x,S;p.parameters={...p.parameters,docs:{...(f=p.parameters)==null?void 0:f.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as d}from"./jsx-runtime-63Ea5SlK.js";import{r as n}from"./index-6oxdNXpR.js";import{L as s}from"./locked-line-settings-JSySSneX.js";import{g as h}from"./util-ZotWJxjO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./svg-image-7aOK05RI.js";import"./index-awljIyHI.js";import"./index-0DbkllkJ.js";import"./index-dnMhQZ-1.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-J2t_5nK1.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./index-9gkyvru-.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./choice-Xr-SKHrB.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./media-queries-gbofTbz-.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./answer-choices-iyIz6W_C.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./locked-figure-aria-1k3pfy3U.js";import"./article-renderer-HEYBK15c.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./locked-label-settings-CnylHQl6.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-javI8CkK.js";import"./line-stroke-select-H15MLZYg.js";import"./line-swatch-9TD4hiwz.js";import"./locked-point-settings-q-YHpFjG.js";import"./labeled-switch-_gGF8eh_.js";const Tt={title:"PerseusEditor/Components/Locked Line Settings",component:s},p=i=>d.jsx(s,{...i}),c={...h("line"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};p.args=c;const m={render:function(){const[e,r]=n.useState(c),t=o=>{r({...e,...o})};return d.jsx(s,{...e,onChangeProps:t})}};m.parameters={chromatic:{disableSnapshot:!0}};const a={render:function(){const[e,r]=n.useState(c),t=o=>{r({...e,...o})};return d.jsx(s,{...e,points:[h("point"),h("point")],expanded:!0,onChangeProps:t})}},u={render:function(){const[e,r]=n.useState(!0),[t,o]=n.useState(c),P=g=>{o({...t,...g})};return d.jsx(s,{...t,expanded:e,onToggle:r,onChangeProps:P})}},l={render:function(){const[e,r]=n.useState(!0),[t,o]=n.useState({...c,kind:"segment",color:"green",lineStyle:"dashed"}),P=g=>{o({...t,...g})};return d.jsx(s,{...t,expanded:e,onToggle:r,onChangeProps:P})}};p.__docgenInfo={description:"",methods:[],displayName:"Default"};var f,x,S;p.parameters={...p.parameters,docs:{...(f=p.parameters)==null?void 0:f.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(S=(x=p.parameters)==null?void 0:x.docs)==null?void 0:S.source}}};var R,L,E;m.parameters={...m.parameters,docs:{...(R=m.parameters)==null?void 0:R.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/locked-point-settings-HQeaTYKF.js b/assets/locked-point-settings-q-YHpFjG.js similarity index 96% rename from assets/locked-point-settings-HQeaTYKF.js rename to assets/locked-point-settings-q-YHpFjG.js index 3c6a1fa8e5..a74643395f 100644 --- a/assets/locked-point-settings-HQeaTYKF.js +++ b/assets/locked-point-settings-q-YHpFjG.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{B as D}from"./choice-Xr-SKHrB.js";import{V as f}from"./index-0DbkllkJ.js";import{S as c}from"./index-nqMmpXbO.js";import{s,c as h}from"./index-deFLJwr4.js";import{L as M,a as N}from"./index-18qWGOW7.js";import{L as V,p as U}from"./locked-figure-aria-wRg9cB39.js";import{l as E}from"./index-awljIyHI.js";import{P as I,C as W,L as X,a as G}from"./locked-label-settings-lVE0HwhW.js";import{C as H}from"./color-select-4NqU465A.js";import{C as J,g as K,j as Q,a as Y}from"./util-x8Ikjhfh.js";import{L as q}from"./labeled-switch-7da7Bmzh.js";const T=k=>{var L,C,P;const{flags:i,headerLabel:j,coord:l,color:m,filled:v=!0,labels:n,ariaLabel:S,onChangeProps:u,onMove:w,onRemove:g,showPoint:y,error:F,expanded:_,onTogglePoint:x,onToggle:z}=k,d=!w&&!g;async function A(){let a=`Point${await Q(n)} at (${l[0]}, ${l[1]})`;const o=Y(m);return a+=o,a}function R(r){const a={color:r};n&&(a.labels=n.map(o=>({...o,color:r}))),u(a)}function B(r){const a=r[0]-l[0],o=r[1]-l[1],p={coord:r};n&&(p.labels=n.map(b=>({...b,coord:[b.coord[0]+a,b.coord[1]+o]}))),u(p)}function $(r,a){if(!n)return;const o=[...n];o[a]={...n[a],...r},u({labels:o})}function O(r){if(!n)return;const a=n.filter((o,p)=>p!==r);u({labels:a})}return e.jsxs(I,{expanded:_,onToggle:z,containerStyle:d?t.definingContainer:void 0,panelStyle:d?t.definingPanel:void 0,header:e.jsxs(f,{style:t.row,children:[e.jsx(M,{children:`${j||"Point"} (${l[0]}, ${l[1]})`}),e.jsx(c,{size:s.xSmall_8}),e.jsx(J,{color:m,filled:v})]}),children:[e.jsx(W,{coord:l,style:t.spaceUnder,onChange:B,error:!!F}),x&&e.jsx(q,{label:"show point on graph",checked:!!y,style:y&&t.spaceUnder,onChange:x}),(!d||y)&&e.jsxs(e.Fragment,{children:[e.jsx(H,{selectedValue:m,onChange:R,style:t.spaceUnder}),e.jsx(q,{label:"open point",checked:!v,onChange:r=>{u({filled:!r})}})]}),!d&&((L=i==null?void 0:i.mafs)==null?void 0:L["locked-figures-aria"])&&e.jsxs(e.Fragment,{children:[e.jsx(c,{size:s.small_12}),e.jsx(f,{style:t.horizontalRule}),e.jsx(V,{ariaLabel:S,getPrepopulatedAriaLabel:A,onChangeProps:r=>{u(r)}})]}),(!d&&((C=i==null?void 0:i.mafs)==null?void 0:C["locked-point-labels"])||d&&((P=i==null?void 0:i.mafs)==null?void 0:P["locked-line-labels"]))&&e.jsxs(e.Fragment,{children:[e.jsx(c,{size:s.xxxSmall_4}),e.jsx(f,{style:t.horizontalRule}),e.jsx(c,{size:s.small_12}),e.jsx(N,{children:"Visible labels"}),n==null?void 0:n.map((r,a)=>e.jsx(X,{...r,containerStyle:!d&&t.lockedPointLabelContainer,expanded:!0,onChangeProps:o=>{$(o,a)},onRemove:()=>{O(a)}})),e.jsx(D,{kind:"tertiary",startIcon:U,onClick:()=>{const r={...K("label"),coord:[l[0]+.5,l[1]-1*((n==null?void 0:n.length)??0)],color:m};u({labels:[...n??[],r]})},style:t.addButton,children:"Add visible label"})]}),g&&e.jsx(G,{figureType:k.type,onMove:w,onRemove:g})]})},t=E.StyleSheet.create({definingContainer:{marginTop:s.xSmall_8,marginBottom:0,marginLeft:-s.xxxSmall_4,marginRight:-s.xxxSmall_4,backgroundColor:h.white},definingPanel:{paddingBottom:s.xxSmall_6},lockedPointLabelContainer:{backgroundColor:h.white},row:{flexDirection:"row",alignItems:"center"},spaceUnder:{marginBottom:s.xSmall_8},addButton:{alignSelf:"start"},horizontalRule:{height:1,backgroundColor:h.offBlack16}}),me=T;T.__docgenInfo={description:"",methods:[],displayName:"LockedPointSettings",props:{type:{required:!0,tsType:{name:"literal",value:'"point"'},description:""},coord:{required:!0,tsType:{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},description:""},color:{required:!0,tsType:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},description:""},filled:{required:!0,tsType:{name:"boolean"},description:""},labels:{required:!1,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:`{ +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{B as D}from"./choice-Xr-SKHrB.js";import{V as f}from"./index-0DbkllkJ.js";import{S as c}from"./index-nqMmpXbO.js";import{s,c as h}from"./index-deFLJwr4.js";import{L as M,a as N}from"./index-18qWGOW7.js";import{L as V,p as U}from"./locked-figure-aria-1k3pfy3U.js";import{l as E}from"./index-awljIyHI.js";import{P as I,C as W,L as X,a as G}from"./locked-label-settings-CnylHQl6.js";import{C as H}from"./color-select-javI8CkK.js";import{C as J,g as K,j as Q,a as Y}from"./util-ZotWJxjO.js";import{L as q}from"./labeled-switch-_gGF8eh_.js";const T=k=>{var L,C,P;const{flags:i,headerLabel:j,coord:l,color:m,filled:v=!0,labels:n,ariaLabel:S,onChangeProps:u,onMove:w,onRemove:g,showPoint:y,error:F,expanded:_,onTogglePoint:x,onToggle:z}=k,d=!w&&!g;async function A(){let a=`Point${await Q(n)} at (${l[0]}, ${l[1]})`;const o=Y(m);return a+=o,a}function R(r){const a={color:r};n&&(a.labels=n.map(o=>({...o,color:r}))),u(a)}function B(r){const a=r[0]-l[0],o=r[1]-l[1],p={coord:r};n&&(p.labels=n.map(b=>({...b,coord:[b.coord[0]+a,b.coord[1]+o]}))),u(p)}function $(r,a){if(!n)return;const o=[...n];o[a]={...n[a],...r},u({labels:o})}function O(r){if(!n)return;const a=n.filter((o,p)=>p!==r);u({labels:a})}return e.jsxs(I,{expanded:_,onToggle:z,containerStyle:d?t.definingContainer:void 0,panelStyle:d?t.definingPanel:void 0,header:e.jsxs(f,{style:t.row,children:[e.jsx(M,{children:`${j||"Point"} (${l[0]}, ${l[1]})`}),e.jsx(c,{size:s.xSmall_8}),e.jsx(J,{color:m,filled:v})]}),children:[e.jsx(W,{coord:l,style:t.spaceUnder,onChange:B,error:!!F}),x&&e.jsx(q,{label:"show point on graph",checked:!!y,style:y&&t.spaceUnder,onChange:x}),(!d||y)&&e.jsxs(e.Fragment,{children:[e.jsx(H,{selectedValue:m,onChange:R,style:t.spaceUnder}),e.jsx(q,{label:"open point",checked:!v,onChange:r=>{u({filled:!r})}})]}),!d&&((L=i==null?void 0:i.mafs)==null?void 0:L["locked-figures-aria"])&&e.jsxs(e.Fragment,{children:[e.jsx(c,{size:s.small_12}),e.jsx(f,{style:t.horizontalRule}),e.jsx(V,{ariaLabel:S,getPrepopulatedAriaLabel:A,onChangeProps:r=>{u(r)}})]}),(!d&&((C=i==null?void 0:i.mafs)==null?void 0:C["locked-point-labels"])||d&&((P=i==null?void 0:i.mafs)==null?void 0:P["locked-line-labels"]))&&e.jsxs(e.Fragment,{children:[e.jsx(c,{size:s.xxxSmall_4}),e.jsx(f,{style:t.horizontalRule}),e.jsx(c,{size:s.small_12}),e.jsx(N,{children:"Visible labels"}),n==null?void 0:n.map((r,a)=>e.jsx(X,{...r,containerStyle:!d&&t.lockedPointLabelContainer,expanded:!0,onChangeProps:o=>{$(o,a)},onRemove:()=>{O(a)}})),e.jsx(D,{kind:"tertiary",startIcon:U,onClick:()=>{const r={...K("label"),coord:[l[0]+.5,l[1]-1*((n==null?void 0:n.length)??0)],color:m};u({labels:[...n??[],r]})},style:t.addButton,children:"Add visible label"})]}),g&&e.jsx(G,{figureType:k.type,onMove:w,onRemove:g})]})},t=E.StyleSheet.create({definingContainer:{marginTop:s.xSmall_8,marginBottom:0,marginLeft:-s.xxxSmall_4,marginRight:-s.xxxSmall_4,backgroundColor:h.white},definingPanel:{paddingBottom:s.xxSmall_6},lockedPointLabelContainer:{backgroundColor:h.white},row:{flexDirection:"row",alignItems:"center"},spaceUnder:{marginBottom:s.xSmall_8},addButton:{alignSelf:"start"},horizontalRule:{height:1,backgroundColor:h.offBlack16}}),me=T;T.__docgenInfo={description:"",methods:[],displayName:"LockedPointSettings",props:{type:{required:!0,tsType:{name:"literal",value:'"point"'},description:""},coord:{required:!0,tsType:{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},description:""},color:{required:!0,tsType:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},description:""},filled:{required:!0,tsType:{name:"boolean"},description:""},labels:{required:!1,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:`{ type: "label"; coord: Coord; // TeX-supported string diff --git a/assets/locked-point-settings.stories-NB6zBF3d.js b/assets/locked-point-settings.stories-T_vBfd8j.js similarity index 84% rename from assets/locked-point-settings.stories-NB6zBF3d.js rename to assets/locked-point-settings.stories-T_vBfd8j.js index 718e150d5e..1a20014811 100644 --- a/assets/locked-point-settings.stories-NB6zBF3d.js +++ b/assets/locked-point-settings.stories-T_vBfd8j.js @@ -1,4 +1,4 @@ -import{j as c}from"./jsx-runtime-63Ea5SlK.js";import{r as s}from"./index-6oxdNXpR.js";import{L as i}from"./locked-point-settings-HQeaTYKF.js";import{g as w}from"./util-x8Ikjhfh.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./locked-figure-aria-wRg9cB39.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./locked-label-settings-lVE0HwhW.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-4NqU465A.js";import"./labeled-switch-7da7Bmzh.js";const Rt={title:"PerseusEditor/Components/Locked Point Settings",component:i},r=m=>c.jsx(i,{...m}),u={...w("point"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};r.args=u;const n={render:function(){const[t,e]=s.useState(u),o=p=>{e({...t,...p})};return c.jsx(i,{...t,onChangeProps:o})}};n.parameters={chromatic:{disableSnapshot:!0}};const a={render:function(){const[t,e]=s.useState(!0),[o,p]=s.useState(u),P=l=>{p({...o,...l})};return c.jsx(i,{...o,expanded:t,onToggle:e,onChangeProps:P})}},d={render:function(){const[t,e]=s.useState(!0),[o,p]=s.useState(u),P=l=>{p({...o,...l})};return c.jsx(i,{...o,expanded:t,onToggle:e,onChangeProps:P})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var g,x,f;r.parameters={...r.parameters,docs:{...(g=r.parameters)==null?void 0:g.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as c}from"./jsx-runtime-63Ea5SlK.js";import{r as s}from"./index-6oxdNXpR.js";import{L as i}from"./locked-point-settings-q-YHpFjG.js";import{g as w}from"./util-ZotWJxjO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./locked-figure-aria-1k3pfy3U.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./locked-label-settings-CnylHQl6.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-javI8CkK.js";import"./labeled-switch-_gGF8eh_.js";const Rt={title:"PerseusEditor/Components/Locked Point Settings",component:i},r=m=>c.jsx(i,{...m}),u={...w("point"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};r.args=u;const n={render:function(){const[t,e]=s.useState(u),o=p=>{e({...t,...p})};return c.jsx(i,{...t,onChangeProps:o})}};n.parameters={chromatic:{disableSnapshot:!0}};const a={render:function(){const[t,e]=s.useState(!0),[o,p]=s.useState(u),P=l=>{p({...o,...l})};return c.jsx(i,{...o,expanded:t,onToggle:e,onChangeProps:P})}},d={render:function(){const[t,e]=s.useState(!0),[o,p]=s.useState(u),P=l=>{p({...o,...l})};return c.jsx(i,{...o,expanded:t,onToggle:e,onChangeProps:P})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var g,x,f;r.parameters={...r.parameters,docs:{...(g=r.parameters)==null?void 0:g.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(f=(x=r.parameters)==null?void 0:x.docs)==null?void 0:f.source}}};var S,h,E;n.parameters={...n.parameters,docs:{...(S=n.parameters)==null?void 0:S.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/locked-polygon-settings-1jqOktRr.js b/assets/locked-polygon-settings-U6JpAVC_.js similarity index 94% rename from assets/locked-polygon-settings-1jqOktRr.js rename to assets/locked-polygon-settings-U6JpAVC_.js index 16bf83c1a5..3cfb942402 100644 --- a/assets/locked-polygon-settings-1jqOktRr.js +++ b/assets/locked-polygon-settings-U6JpAVC_.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{l as j,a as F}from"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{B as L}from"./choice-Xr-SKHrB.js";import{V as u}from"./index-0DbkllkJ.js";import{S as E,O}from"./answer-choices-lVeJkx-U.js";import{P as S,C as X,I as g,L as G,a as H}from"./locked-label-settings-lVE0HwhW.js";import{S as y,a as J}from"./index-nqMmpXbO.js";import{c as h,s}from"./index-deFLJwr4.js";import{L as v,a as q}from"./index-18qWGOW7.js";import{p as P,L as K}from"./locked-figure-aria-wRg9cB39.js";import{l as A}from"./index-awljIyHI.js";import{C as Q}from"./color-select-4NqU465A.js";import{L as Y}from"./labeled-switch-7da7Bmzh.js";import{L as Z}from"./line-stroke-select-Kn8DFI_S.js";import{g as ee,j as re,a as ne}from"./util-x8Ikjhfh.js";const oe=""+new URL("arrow-fat-down-X5ut-FGw.svg",import.meta.url).href,te=""+new URL("arrow-fat-left-LxuHjYfJ.svg",import.meta.url).href,ae=""+new URL("arrow-fat-right-CxkbbISx.svg",import.meta.url).href,le=""+new URL("arrow-fat-up-ah2eaaIR.svg",import.meta.url).href,ie=""+new URL("minus-circle-9EKbQa8X.svg",import.meta.url).href,R=c=>{const{color:m,fillStyle:l,strokeStyle:p}=c;return e.jsx(u,{"aria-label":`${m}, stroke ${p}, fill ${l}`,style:[T.container,{border:`4px ${p} ${j[m]}`}],children:e.jsx(u,{style:[T.innerSquare,{backgroundColor:j[m],opacity:l==="white"?0:F[l]}]})})},T=A.StyleSheet.create({container:{outline:`2px solid ${h.offWhite}`,width:s.large_24,height:s.large_24,backgroundColor:h.white,alignItems:"center",justifyContent:"center"},innerSquare:{width:20,height:20}});R.__docgenInfo={description:"",methods:[],displayName:"PolygonSwatch",props:{color:{required:!0,tsType:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},description:""},fillStyle:{required:!0,tsType:{name:"union",raw:'"none" | "white" | "translucent" | "solid"',elements:[{name:"literal",value:'"none"'},{name:"literal",value:'"white"'},{name:"literal",value:'"translucent"'},{name:"literal",value:'"solid"'}]},description:""},strokeStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""}}};const z=c=>{var x,C;const{flags:m,points:l,color:p,showVertices:_,fillStyle:f,strokeStyle:k,labels:n,ariaLabel:$,expanded:B,onToggle:I,onChangeProps:i,onMove:M,onRemove:U}=c;async function V(){let r=`Polygon${await re(n)} with ${l.length} sides, vertices at `;r+=l.map(([d,b])=>`(${d}, ${b})`).join(", ");const a=ne(p,k,f);return r+=a,r}function N(o){const r={color:o};r.labels=n==null?void 0:n.map(a=>({...a,color:o})),i(r)}function w(o){switch(o){case"up":i({points:l.map(([r,a])=>[r,a+1]),labels:n==null?void 0:n.map(r=>({...r,coord:[r.coord[0],r.coord[1]+1]}))});break;case"down":i({points:l.map(([r,a])=>[r,a-1]),labels:n==null?void 0:n.map(r=>({...r,coord:[r.coord[0],r.coord[1]-1]}))});break;case"left":i({points:l.map(([r,a])=>[r-1,a]),labels:n==null?void 0:n.map(r=>({...r,coord:[r.coord[0]-1,r.coord[1]]}))});break;case"right":i({points:l.map(([r,a])=>[r+1,a]),labels:n==null?void 0:n.map(r=>({...r,coord:[r.coord[0]+1,r.coord[1]]}))});break}}function D(o,r){if(!n)return;const a=[...n];a[r]={...n[r],...o},i({labels:a})}function W(o){if(!n)return;const r=n.filter((a,d)=>d!==o);i({labels:r})}return e.jsxs(S,{expanded:B,onToggle:I,header:e.jsxs(u,{style:t.row,children:[e.jsx(v,{children:`Polygon, ${l.length} sides`}),e.jsx(y,{size:s.xSmall_8}),e.jsx(R,{color:p,fillStyle:f,strokeStyle:k})]}),children:[e.jsxs(u,{style:[t.row,t.spaceUnder],children:[e.jsx(Q,{selectedValue:p,onChange:N}),e.jsx(y,{size:s.medium_16}),e.jsxs(q,{tag:"label",style:[t.row,t.truncatedWidth],children:["fill",e.jsx(y,{size:s.xxSmall_6}),e.jsx(E,{selectedValue:f,onChange:o=>i({fillStyle:o}),placeholder:"",children:Object.keys(F).map(o=>e.jsx(O,{value:o,label:o},o))})]})]}),e.jsx(Z,{selectedValue:k,onChange:o=>i({strokeStyle:o})}),e.jsx(Y,{label:"show vertices",checked:_,onChange:o=>i({showVertices:o}),style:t.spaceUnder}),e.jsxs(S,{header:e.jsx(v,{children:"Points"}),expanded:!0,containerStyle:t.pointAccordionContainer,panelStyle:t.pointAccordionPanel,children:[l.map((o,r)=>{const a=String.fromCharCode(65+r);return e.jsxs(u,{style:[t.row,t.spaceUnder],children:[e.jsx(v,{children:`${a}:`}),e.jsx(y,{size:s.medium_16}),e.jsx(X,{coord:o,labels:["x","y"],onChange:d=>{const b=[...l];b[r]=d,c.onChangeProps({points:b})}}),l.length>3&&e.jsx(g,{"aria-label":`Delete polygon point ${a}`,icon:ie,color:"destructive",onClick:()=>{const d=[...l];d.splice(r,1),c.onChangeProps({points:d})},style:t.icon})]},`locked-polygon-point-index-${r}`)}),e.jsxs(u,{style:[t.row,t.polygonActionsContainer],children:[e.jsx(L,{kind:"tertiary",startIcon:P,onClick:()=>{c.onChangeProps({points:[...l,[0,0]]})},children:"Add point"}),e.jsx(J,{}),e.jsxs(u,{style:t.movementButtonsContainer,children:[e.jsx(g,{"aria-label":"Move polygon up",style:t.iconButton,size:"small",icon:le,onClick:()=>w("up")}),e.jsxs(u,{style:t.row,children:[e.jsx(g,{"aria-label":"Move polygon left",style:t.iconButton,size:"small",icon:te,onClick:()=>w("left")}),e.jsx(g,{"aria-label":"Move polygon down",style:t.iconButton,size:"small",icon:oe,onClick:()=>w("down")}),e.jsx(g,{"aria-label":"Move polygon right",style:t.iconButton,size:"small",icon:ae,onClick:()=>w("right")})]})]})]})]}),((x=m==null?void 0:m.mafs)==null?void 0:x["locked-figures-aria"])&&e.jsxs(e.Fragment,{children:[e.jsx(y,{size:s.small_12}),e.jsx(u,{style:t.horizontalRule}),e.jsx(K,{ariaLabel:$,getPrepopulatedAriaLabel:V,onChangeProps:o=>{i(o)}})]}),((C=m==null?void 0:m.mafs)==null?void 0:C["locked-polygon-labels"])&&e.jsxs(e.Fragment,{children:[e.jsx(y,{size:s.xxxSmall_4}),e.jsx(u,{style:t.horizontalRule}),e.jsx(y,{size:s.small_12}),e.jsx(q,{children:"Visible labels"}),n==null?void 0:n.map((o,r)=>e.jsx(G,{...o,expanded:!0,onChangeProps:a=>{D(a,r)},onRemove:()=>{W(r)},containerStyle:t.labelContainer})),e.jsx(L,{kind:"tertiary",startIcon:P,onClick:()=>{const o={...ee("label"),coord:[l[0][0],l[0][1]-((n==null?void 0:n.length)??0)],color:p};i({labels:[...n??[],o]})},style:t.addButton,children:"Add visible label"})]}),e.jsx(H,{figureType:c.type,onMove:M,onRemove:U})]})},t=A.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},pointAccordionContainer:{backgroundColor:h.white},pointAccordionPanel:{alignItems:"start"},icon:{marginInlineStart:s.xxxSmall_4},polygonActionsContainer:{width:"100%"},iconButton:{margin:0},movementButtonsContainer:{display:"flex",flexDirection:"column",alignItems:"center",minWidth:"fit-content"},spaceUnder:{marginBottom:s.xSmall_8},truncatedWidth:{minWidth:0},addButton:{alignSelf:"start"},labelContainer:{backgroundColor:h.white},horizontalRule:{height:1,backgroundColor:h.offBlack16}}),Je=z;z.__docgenInfo={description:"",methods:[],displayName:"LockedPolygonSettings",props:{flags:{required:!1,tsType:{name:'Readonly["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{l as j,a as F}from"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{B as L}from"./choice-Xr-SKHrB.js";import{V as u}from"./index-0DbkllkJ.js";import{S as E,O}from"./answer-choices-iyIz6W_C.js";import{P as S,C as X,I as g,L as G,a as H}from"./locked-label-settings-CnylHQl6.js";import{S as y,a as J}from"./index-nqMmpXbO.js";import{c as h,s}from"./index-deFLJwr4.js";import{L as v,a as q}from"./index-18qWGOW7.js";import{p as P,L as K}from"./locked-figure-aria-1k3pfy3U.js";import{l as A}from"./index-awljIyHI.js";import{C as Q}from"./color-select-javI8CkK.js";import{L as Y}from"./labeled-switch-_gGF8eh_.js";import{L as Z}from"./line-stroke-select-H15MLZYg.js";import{g as ee,j as re,a as ne}from"./util-ZotWJxjO.js";const oe=""+new URL("arrow-fat-down-X5ut-FGw.svg",import.meta.url).href,te=""+new URL("arrow-fat-left-LxuHjYfJ.svg",import.meta.url).href,ae=""+new URL("arrow-fat-right-CxkbbISx.svg",import.meta.url).href,le=""+new URL("arrow-fat-up-ah2eaaIR.svg",import.meta.url).href,ie=""+new URL("minus-circle-9EKbQa8X.svg",import.meta.url).href,R=c=>{const{color:m,fillStyle:l,strokeStyle:p}=c;return e.jsx(u,{"aria-label":`${m}, stroke ${p}, fill ${l}`,style:[T.container,{border:`4px ${p} ${j[m]}`}],children:e.jsx(u,{style:[T.innerSquare,{backgroundColor:j[m],opacity:l==="white"?0:F[l]}]})})},T=A.StyleSheet.create({container:{outline:`2px solid ${h.offWhite}`,width:s.large_24,height:s.large_24,backgroundColor:h.white,alignItems:"center",justifyContent:"center"},innerSquare:{width:20,height:20}});R.__docgenInfo={description:"",methods:[],displayName:"PolygonSwatch",props:{color:{required:!0,tsType:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},description:""},fillStyle:{required:!0,tsType:{name:"union",raw:'"none" | "white" | "translucent" | "solid"',elements:[{name:"literal",value:'"none"'},{name:"literal",value:'"white"'},{name:"literal",value:'"translucent"'},{name:"literal",value:'"solid"'}]},description:""},strokeStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""}}};const z=c=>{var x,C;const{flags:m,points:l,color:p,showVertices:_,fillStyle:f,strokeStyle:k,labels:n,ariaLabel:$,expanded:B,onToggle:I,onChangeProps:i,onMove:M,onRemove:U}=c;async function V(){let r=`Polygon${await re(n)} with ${l.length} sides, vertices at `;r+=l.map(([d,b])=>`(${d}, ${b})`).join(", ");const a=ne(p,k,f);return r+=a,r}function N(o){const r={color:o};r.labels=n==null?void 0:n.map(a=>({...a,color:o})),i(r)}function w(o){switch(o){case"up":i({points:l.map(([r,a])=>[r,a+1]),labels:n==null?void 0:n.map(r=>({...r,coord:[r.coord[0],r.coord[1]+1]}))});break;case"down":i({points:l.map(([r,a])=>[r,a-1]),labels:n==null?void 0:n.map(r=>({...r,coord:[r.coord[0],r.coord[1]-1]}))});break;case"left":i({points:l.map(([r,a])=>[r-1,a]),labels:n==null?void 0:n.map(r=>({...r,coord:[r.coord[0]-1,r.coord[1]]}))});break;case"right":i({points:l.map(([r,a])=>[r+1,a]),labels:n==null?void 0:n.map(r=>({...r,coord:[r.coord[0]+1,r.coord[1]]}))});break}}function D(o,r){if(!n)return;const a=[...n];a[r]={...n[r],...o},i({labels:a})}function W(o){if(!n)return;const r=n.filter((a,d)=>d!==o);i({labels:r})}return e.jsxs(S,{expanded:B,onToggle:I,header:e.jsxs(u,{style:t.row,children:[e.jsx(v,{children:`Polygon, ${l.length} sides`}),e.jsx(y,{size:s.xSmall_8}),e.jsx(R,{color:p,fillStyle:f,strokeStyle:k})]}),children:[e.jsxs(u,{style:[t.row,t.spaceUnder],children:[e.jsx(Q,{selectedValue:p,onChange:N}),e.jsx(y,{size:s.medium_16}),e.jsxs(q,{tag:"label",style:[t.row,t.truncatedWidth],children:["fill",e.jsx(y,{size:s.xxSmall_6}),e.jsx(E,{selectedValue:f,onChange:o=>i({fillStyle:o}),placeholder:"",children:Object.keys(F).map(o=>e.jsx(O,{value:o,label:o},o))})]})]}),e.jsx(Z,{selectedValue:k,onChange:o=>i({strokeStyle:o})}),e.jsx(Y,{label:"show vertices",checked:_,onChange:o=>i({showVertices:o}),style:t.spaceUnder}),e.jsxs(S,{header:e.jsx(v,{children:"Points"}),expanded:!0,containerStyle:t.pointAccordionContainer,panelStyle:t.pointAccordionPanel,children:[l.map((o,r)=>{const a=String.fromCharCode(65+r);return e.jsxs(u,{style:[t.row,t.spaceUnder],children:[e.jsx(v,{children:`${a}:`}),e.jsx(y,{size:s.medium_16}),e.jsx(X,{coord:o,labels:["x","y"],onChange:d=>{const b=[...l];b[r]=d,c.onChangeProps({points:b})}}),l.length>3&&e.jsx(g,{"aria-label":`Delete polygon point ${a}`,icon:ie,color:"destructive",onClick:()=>{const d=[...l];d.splice(r,1),c.onChangeProps({points:d})},style:t.icon})]},`locked-polygon-point-index-${r}`)}),e.jsxs(u,{style:[t.row,t.polygonActionsContainer],children:[e.jsx(L,{kind:"tertiary",startIcon:P,onClick:()=>{c.onChangeProps({points:[...l,[0,0]]})},children:"Add point"}),e.jsx(J,{}),e.jsxs(u,{style:t.movementButtonsContainer,children:[e.jsx(g,{"aria-label":"Move polygon up",style:t.iconButton,size:"small",icon:le,onClick:()=>w("up")}),e.jsxs(u,{style:t.row,children:[e.jsx(g,{"aria-label":"Move polygon left",style:t.iconButton,size:"small",icon:te,onClick:()=>w("left")}),e.jsx(g,{"aria-label":"Move polygon down",style:t.iconButton,size:"small",icon:oe,onClick:()=>w("down")}),e.jsx(g,{"aria-label":"Move polygon right",style:t.iconButton,size:"small",icon:ae,onClick:()=>w("right")})]})]})]})]}),((x=m==null?void 0:m.mafs)==null?void 0:x["locked-figures-aria"])&&e.jsxs(e.Fragment,{children:[e.jsx(y,{size:s.small_12}),e.jsx(u,{style:t.horizontalRule}),e.jsx(K,{ariaLabel:$,getPrepopulatedAriaLabel:V,onChangeProps:o=>{i(o)}})]}),((C=m==null?void 0:m.mafs)==null?void 0:C["locked-polygon-labels"])&&e.jsxs(e.Fragment,{children:[e.jsx(y,{size:s.xxxSmall_4}),e.jsx(u,{style:t.horizontalRule}),e.jsx(y,{size:s.small_12}),e.jsx(q,{children:"Visible labels"}),n==null?void 0:n.map((o,r)=>e.jsx(G,{...o,expanded:!0,onChangeProps:a=>{D(a,r)},onRemove:()=>{W(r)},containerStyle:t.labelContainer})),e.jsx(L,{kind:"tertiary",startIcon:P,onClick:()=>{const o={...ee("label"),coord:[l[0][0],l[0][1]-((n==null?void 0:n.length)??0)],color:p};i({labels:[...n??[],o]})},style:t.addButton,children:"Add visible label"})]}),e.jsx(H,{figureType:c.type,onMove:M,onRemove:U})]})},t=A.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},pointAccordionContainer:{backgroundColor:h.white},pointAccordionPanel:{alignItems:"start"},icon:{marginInlineStart:s.xxxSmall_4},polygonActionsContainer:{width:"100%"},iconButton:{margin:0},movementButtonsContainer:{display:"flex",flexDirection:"column",alignItems:"center",minWidth:"fit-content"},spaceUnder:{marginBottom:s.xSmall_8},truncatedWidth:{minWidth:0},addButton:{alignSelf:"start"},labelContainer:{backgroundColor:h.white},horizontalRule:{height:1,backgroundColor:h.offBlack16}}),Je=z;z.__docgenInfo={description:"",methods:[],displayName:"LockedPolygonSettings",props:{flags:{required:!1,tsType:{name:'Readonly["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" | "backward" | "forward" | "front"`,elements:[{name:"literal",value:'"back"'},{name:"literal",value:'"backward"'},{name:"literal",value:'"forward"'},{name:"literal",value:'"front"'}]},name:"movement"}],return:{name:"void"}}},description:"Called when a movement button (top, up, down, bottom) is pressed."},onRemove:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"Called when the delete button is pressed."},expanded:{required:!1,tsType:{name:"boolean"},description:"Whether this accordion is expanded."},onToggle:{required:!1,tsType:{name:"signature",type:"function",raw:"(expanded: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"expanded"}],return:{name:"void"}}},description:"Called when the accordion is expanded or collapsed."},type:{required:!0,tsType:{name:"literal",value:'"polygon"'},description:""},points:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]}],raw:"ReadonlyArray"},description:""},color:{required:!0,tsType:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},description:""},showVertices:{required:!0,tsType:{name:"boolean"},description:""},fillStyle:{required:!0,tsType:{name:"union",raw:'"none" | "white" | "translucent" | "solid"',elements:[{name:"literal",value:'"none"'},{name:"literal",value:'"white"'},{name:"literal",value:'"translucent"'},{name:"literal",value:'"solid"'}]},description:""},strokeStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""},labels:{required:!1,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:`{ diff --git a/assets/locked-polygon-settings.stories-eghhomPB.js b/assets/locked-polygon-settings.stories-LMEDNOR-.js similarity index 82% rename from assets/locked-polygon-settings.stories-eghhomPB.js rename to assets/locked-polygon-settings.stories-LMEDNOR-.js index b9449512e2..af3b1de456 100644 --- a/assets/locked-polygon-settings.stories-eghhomPB.js +++ b/assets/locked-polygon-settings.stories-LMEDNOR-.js @@ -1,4 +1,4 @@ -import{j as d}from"./jsx-runtime-63Ea5SlK.js";import{r as a}from"./index-6oxdNXpR.js";import{L as i}from"./locked-polygon-settings-1jqOktRr.js";import{g as C}from"./util-x8Ikjhfh.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./locked-label-settings-lVE0HwhW.js";import"./components-ODdjt0Ld.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-4NqU465A.js";import"./locked-figure-aria-wRg9cB39.js";import"./labeled-switch-7da7Bmzh.js";import"./line-stroke-select-Kn8DFI_S.js";const Sr={title:"PerseusEditor/Components/Locked Polygon Settings",component:i},o=m=>d.jsx(i,{...m}),c={...C("polygon"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};o.args=c;const r={render:function(){const[t,n]=a.useState(c),p=s=>{n({...t,...s})};return d.jsx(i,{...t,onChangeProps:p})}};r.parameters={chromatic:{disableSnapshot:!0}};const e={render:function(){const[t,n]=a.useState(!0),[p,s]=a.useState(c),E=y=>{s({...p,...y})};return d.jsx(i,{...p,expanded:t,onToggle:n,onChangeProps:E})}};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var u,l,g;o.parameters={...o.parameters,docs:{...(u=o.parameters)==null?void 0:u.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as d}from"./jsx-runtime-63Ea5SlK.js";import{r as a}from"./index-6oxdNXpR.js";import{L as i}from"./locked-polygon-settings-U6JpAVC_.js";import{g as C}from"./util-ZotWJxjO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./locked-label-settings-CnylHQl6.js";import"./components-ODdjt0Ld.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-javI8CkK.js";import"./locked-figure-aria-1k3pfy3U.js";import"./labeled-switch-_gGF8eh_.js";import"./line-stroke-select-H15MLZYg.js";const Sr={title:"PerseusEditor/Components/Locked Polygon Settings",component:i},o=m=>d.jsx(i,{...m}),c={...C("polygon"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};o.args=c;const r={render:function(){const[t,n]=a.useState(c),p=s=>{n({...t,...s})};return d.jsx(i,{...t,onChangeProps:p})}};r.parameters={chromatic:{disableSnapshot:!0}};const e={render:function(){const[t,n]=a.useState(!0),[p,s]=a.useState(c),E=y=>{s({...p,...y})};return d.jsx(i,{...p,expanded:t,onToggle:n,onChangeProps:E})}};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var u,l,g;o.parameters={...o.parameters,docs:{...(u=o.parameters)==null?void 0:u.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(g=(l=o.parameters)==null?void 0:l.docs)==null?void 0:g.source}}};var P,f,x;r.parameters={...r.parameters,docs:{...(P=r.parameters)==null?void 0:P.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/locked-vector-settings-1A9eQa19.js b/assets/locked-vector-settings-UVt2s9by.js similarity index 98% rename from assets/locked-vector-settings-1A9eQa19.js rename to assets/locked-vector-settings-UVt2s9by.js index 7af58ff9ae..2b4066a45c 100644 --- a/assets/locked-vector-settings-1A9eQa19.js +++ b/assets/locked-vector-settings-UVt2s9by.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./util-AYeX86gl.js";import{e as B}from"./svg-image-7aOK05RI.js";import{B as I}from"./choice-Xr-SKHrB.js";import{V as c}from"./index-0DbkllkJ.js";import{S as g}from"./index-nqMmpXbO.js";import{s as u,c as k}from"./index-deFLJwr4.js";import{L as w,a as T}from"./index-18qWGOW7.js";import{L as E,p as D}from"./locked-figure-aria-wRg9cB39.js";import{l as O}from"./index-awljIyHI.js";import{v as m}from"./index-smZ6iCr_.js";import{P as L,C as j,L as U,a as W}from"./locked-label-settings-lVE0HwhW.js";import{C as G}from"./color-select-4NqU465A.js";import{L as H}from"./line-swatch-qqHDCIz5.js";import{g as J,j as K,a as Q}from"./util-x8Ikjhfh.js";const Y="The vector cannot have length 0.",F=p=>{var h,x;const{flags:s,points:q,color:y,labels:n,ariaLabel:S,onChangeProps:d,onMove:P,onRemove:z}=p,[o,i]=q,A=`Vector (${o[0]}, ${o[1]}), (${i[0]}, ${i[1]})`,b=B(o,i);async function N(){let a=`Vector${await K(n)} from (${o[0]}, ${o[1]}) to (${i[0]}, ${i[1]})`;const l=Q(y);return a+=l,a}function f(r,a){if(typeof r<"u"){const l=[...q];l[a]=[...r];const v=m.midpoint(o,i),_=m.midpoint(l[0],l[1]),M=m.sub(_,v),X=n==null?void 0:n.map(C=>({...C,coord:m.add(C.coord,M)}));d({points:l,labels:X})}}function $(r){const a={color:r};a.labels=n==null?void 0:n.map(l=>({...l,color:r})),d(a)}function R(r,a){if(!n)return;const l=[...n];l[a]={...n[a],...r},d({labels:l})}function V(r){if(!n)return;const a=n.filter((l,v)=>v!==r);d({labels:a})}return e.jsxs(L,{expanded:p.expanded,onToggle:p.onToggle,header:e.jsxs(c,{style:t.row,children:[e.jsx(w,{children:A}),e.jsx(g,{size:u.xSmall_8}),e.jsx(H,{color:y,lineStyle:"solid"})]}),children:[e.jsx(c,{style:[t.row,t.spaceUnder],children:e.jsx(G,{selectedValue:y,onChange:$})}),b&&e.jsx(T,{style:t.errorText,children:Y}),e.jsx(L,{expanded:!0,containerStyle:t.container,panelStyle:t.accordionPanel,header:e.jsx(c,{style:t.row,children:e.jsx(w,{children:`Tail (${o[0]}, ${o[1]})`})}),children:e.jsx(j,{coord:o,error:b,onChange:r=>{f(r,0)}})}),e.jsx(L,{expanded:!0,containerStyle:t.container,panelStyle:t.accordionPanel,header:e.jsx(c,{style:t.row,children:e.jsx(w,{children:`Tip (${i[0]}, ${i[1]})`})}),children:e.jsx(j,{coord:i,error:b,onChange:r=>{f(r,1)}})}),((h=s==null?void 0:s.mafs)==null?void 0:h["locked-figures-aria"])&&e.jsxs(e.Fragment,{children:[e.jsx(g,{size:u.small_12}),e.jsx(c,{style:t.horizontalRule}),e.jsx(E,{ariaLabel:S,getPrepopulatedAriaLabel:N,onChangeProps:r=>{d(r)}})]}),((x=s==null?void 0:s.mafs)==null?void 0:x["locked-vector-labels"])&&e.jsxs(e.Fragment,{children:[e.jsx(g,{size:u.xxxSmall_4}),e.jsx(c,{style:t.horizontalRule}),e.jsx(g,{size:u.small_12}),e.jsx(T,{children:"Visible labels"}),n==null?void 0:n.map((r,a)=>e.jsx(U,{...r,expanded:!0,onChangeProps:l=>{R(l,a)},onRemove:()=>{V(a)},containerStyle:t.labelContainer})),e.jsx(I,{kind:"tertiary",startIcon:D,onClick:()=>{const r=[0,-1],a=m.add(m.scale(r,(n==null?void 0:n.length)??0),m.midpoint(o,i)),l={...J("label"),coord:a,color:y};d({labels:[...n??[],l]})},style:t.addButton,children:"Add visible label"})]}),e.jsx(W,{figureType:p.type,onMove:P,onRemove:z})]})},t=O.StyleSheet.create({accordionPanel:{paddingBottom:u.medium_16},container:{marginTop:u.xSmall_8,marginBottom:0,marginLeft:-u.xxxSmall_4,marginRight:-u.xxxSmall_4,backgroundColor:k.white},errorText:{color:k.red,marginTop:u.xSmall_8},row:{flexDirection:"row",alignItems:"center"},addButton:{alignSelf:"start"},horizontalRule:{height:1,backgroundColor:k.offBlack16},labelContainer:{backgroundColor:k.white}}),ye=F;F.__docgenInfo={description:"",methods:[],displayName:"LockedVectorSettings",props:{type:{required:!0,tsType:{name:"literal",value:'"vector"'},description:""},points:{required:!0,tsType:{name:"tuple",raw:"[tail: Coord, tip: Coord]",elements:[{name:"unknown"},{name:"unknown"}]},description:""},color:{required:!0,tsType:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},description:""},labels:{required:!1,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:`{ +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./util-AYeX86gl.js";import{e as B}from"./svg-image-7aOK05RI.js";import{B as I}from"./choice-Xr-SKHrB.js";import{V as c}from"./index-0DbkllkJ.js";import{S as g}from"./index-nqMmpXbO.js";import{s as u,c as k}from"./index-deFLJwr4.js";import{L as w,a as T}from"./index-18qWGOW7.js";import{L as E,p as D}from"./locked-figure-aria-1k3pfy3U.js";import{l as O}from"./index-awljIyHI.js";import{v as m}from"./index-smZ6iCr_.js";import{P as L,C as j,L as U,a as W}from"./locked-label-settings-CnylHQl6.js";import{C as G}from"./color-select-javI8CkK.js";import{L as H}from"./line-swatch-9TD4hiwz.js";import{g as J,j as K,a as Q}from"./util-ZotWJxjO.js";const Y="The vector cannot have length 0.",F=p=>{var h,x;const{flags:s,points:q,color:y,labels:n,ariaLabel:S,onChangeProps:d,onMove:P,onRemove:z}=p,[o,i]=q,A=`Vector (${o[0]}, ${o[1]}), (${i[0]}, ${i[1]})`,b=B(o,i);async function N(){let a=`Vector${await K(n)} from (${o[0]}, ${o[1]}) to (${i[0]}, ${i[1]})`;const l=Q(y);return a+=l,a}function f(r,a){if(typeof r<"u"){const l=[...q];l[a]=[...r];const v=m.midpoint(o,i),_=m.midpoint(l[0],l[1]),M=m.sub(_,v),X=n==null?void 0:n.map(C=>({...C,coord:m.add(C.coord,M)}));d({points:l,labels:X})}}function $(r){const a={color:r};a.labels=n==null?void 0:n.map(l=>({...l,color:r})),d(a)}function R(r,a){if(!n)return;const l=[...n];l[a]={...n[a],...r},d({labels:l})}function V(r){if(!n)return;const a=n.filter((l,v)=>v!==r);d({labels:a})}return e.jsxs(L,{expanded:p.expanded,onToggle:p.onToggle,header:e.jsxs(c,{style:t.row,children:[e.jsx(w,{children:A}),e.jsx(g,{size:u.xSmall_8}),e.jsx(H,{color:y,lineStyle:"solid"})]}),children:[e.jsx(c,{style:[t.row,t.spaceUnder],children:e.jsx(G,{selectedValue:y,onChange:$})}),b&&e.jsx(T,{style:t.errorText,children:Y}),e.jsx(L,{expanded:!0,containerStyle:t.container,panelStyle:t.accordionPanel,header:e.jsx(c,{style:t.row,children:e.jsx(w,{children:`Tail (${o[0]}, ${o[1]})`})}),children:e.jsx(j,{coord:o,error:b,onChange:r=>{f(r,0)}})}),e.jsx(L,{expanded:!0,containerStyle:t.container,panelStyle:t.accordionPanel,header:e.jsx(c,{style:t.row,children:e.jsx(w,{children:`Tip (${i[0]}, ${i[1]})`})}),children:e.jsx(j,{coord:i,error:b,onChange:r=>{f(r,1)}})}),((h=s==null?void 0:s.mafs)==null?void 0:h["locked-figures-aria"])&&e.jsxs(e.Fragment,{children:[e.jsx(g,{size:u.small_12}),e.jsx(c,{style:t.horizontalRule}),e.jsx(E,{ariaLabel:S,getPrepopulatedAriaLabel:N,onChangeProps:r=>{d(r)}})]}),((x=s==null?void 0:s.mafs)==null?void 0:x["locked-vector-labels"])&&e.jsxs(e.Fragment,{children:[e.jsx(g,{size:u.xxxSmall_4}),e.jsx(c,{style:t.horizontalRule}),e.jsx(g,{size:u.small_12}),e.jsx(T,{children:"Visible labels"}),n==null?void 0:n.map((r,a)=>e.jsx(U,{...r,expanded:!0,onChangeProps:l=>{R(l,a)},onRemove:()=>{V(a)},containerStyle:t.labelContainer})),e.jsx(I,{kind:"tertiary",startIcon:D,onClick:()=>{const r=[0,-1],a=m.add(m.scale(r,(n==null?void 0:n.length)??0),m.midpoint(o,i)),l={...J("label"),coord:a,color:y};d({labels:[...n??[],l]})},style:t.addButton,children:"Add visible label"})]}),e.jsx(W,{figureType:p.type,onMove:P,onRemove:z})]})},t=O.StyleSheet.create({accordionPanel:{paddingBottom:u.medium_16},container:{marginTop:u.xSmall_8,marginBottom:0,marginLeft:-u.xxxSmall_4,marginRight:-u.xxxSmall_4,backgroundColor:k.white},errorText:{color:k.red,marginTop:u.xSmall_8},row:{flexDirection:"row",alignItems:"center"},addButton:{alignSelf:"start"},horizontalRule:{height:1,backgroundColor:k.offBlack16},labelContainer:{backgroundColor:k.white}}),ye=F;F.__docgenInfo={description:"",methods:[],displayName:"LockedVectorSettings",props:{type:{required:!0,tsType:{name:"literal",value:'"vector"'},description:""},points:{required:!0,tsType:{name:"tuple",raw:"[tail: Coord, tip: Coord]",elements:[{name:"unknown"},{name:"unknown"}]},description:""},color:{required:!0,tsType:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},description:""},labels:{required:!1,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:`{ type: "label"; coord: Coord; // TeX-supported string diff --git a/assets/locked-vector-settings.stories---K4kjTt.js b/assets/locked-vector-settings.stories-aYj2riJ4.js similarity index 81% rename from assets/locked-vector-settings.stories---K4kjTt.js rename to assets/locked-vector-settings.stories-aYj2riJ4.js index 282e00606f..f3a752d72f 100644 --- a/assets/locked-vector-settings.stories---K4kjTt.js +++ b/assets/locked-vector-settings.stories-aYj2riJ4.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{r as E}from"./index-6oxdNXpR.js";import{L as e}from"./locked-vector-settings-1A9eQa19.js";import{g as k}from"./util-x8Ikjhfh.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./svg-image-7aOK05RI.js";import"./index-awljIyHI.js";import"./index-0DbkllkJ.js";import"./index-dnMhQZ-1.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-J2t_5nK1.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./index-9gkyvru-.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./choice-Xr-SKHrB.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./media-queries-gbofTbz-.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./locked-figure-aria-wRg9cB39.js";import"./article-renderer-mU-6RWLp.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./locked-label-settings-lVE0HwhW.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-4NqU465A.js";import"./line-swatch-qqHDCIz5.js";const ht={title:"PerseusEditor/Components/Locked Vector Settings",component:e},r=i=>a.jsx(e,{...i}),d={...k("vector"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};r.args=d;const p={render:function(){const[t,s]=E.useState(d),m=n=>{s({...t,...n})};return a.jsx(e,{...t,expanded:!0,onChangeProps:m})}},o={render:function(){const[t,s]=E.useState(d),m=n=>{s({...t,...n})};return a.jsx(e,{...t,points:[[0,0],[0,0]],expanded:!0,onChangeProps:m})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var c,u,l;r.parameters={...r.parameters,docs:{...(c=r.parameters)==null?void 0:c.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{r as E}from"./index-6oxdNXpR.js";import{L as e}from"./locked-vector-settings-UVt2s9by.js";import{g as k}from"./util-ZotWJxjO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./svg-image-7aOK05RI.js";import"./index-awljIyHI.js";import"./index-0DbkllkJ.js";import"./index-dnMhQZ-1.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-J2t_5nK1.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./index-9gkyvru-.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./choice-Xr-SKHrB.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./media-queries-gbofTbz-.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./locked-figure-aria-1k3pfy3U.js";import"./article-renderer-HEYBK15c.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./locked-label-settings-CnylHQl6.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-javI8CkK.js";import"./line-swatch-9TD4hiwz.js";const ht={title:"PerseusEditor/Components/Locked Vector Settings",component:e},r=i=>a.jsx(e,{...i}),d={...k("vector"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};r.args=d;const p={render:function(){const[t,s]=E.useState(d),m=n=>{s({...t,...n})};return a.jsx(e,{...t,expanded:!0,onChangeProps:m})}},o={render:function(){const[t,s]=E.useState(d),m=n=>{s({...t,...n})};return a.jsx(e,{...t,points:[[0,0],[0,0]],expanded:!0,onChangeProps:m})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var c,u,l;r.parameters={...r.parameters,docs:{...(c=r.parameters)==null?void 0:c.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(l=(u=r.parameters)==null?void 0:u.docs)==null?void 0:l.source}}};var P,g,h;p.parameters={...p.parameters,docs:{...(P=p.parameters)==null?void 0:P.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/marker-0QGNq-GT.js b/assets/marker-ecL5IfPZ.js similarity index 99% rename from assets/marker-0QGNq-GT.js rename to assets/marker-ecL5IfPZ.js index 3b1c84a8d5..1ff334175a 100644 --- a/assets/marker-0QGNq-GT.js +++ b/assets/marker-ecL5IfPZ.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-63Ea5SlK.js";import{V as w}from"./index-0DbkllkJ.js";import{c as r}from"./index-Dfd6auV6.js";import{l as h}from"./index-awljIyHI.js";import{r as k}from"./index-6oxdNXpR.js";import{P as b}from"./i18n-context-fsWEgybQ.js";import{I as f}from"./icon-7RFbyLiL.js";import{a as T,b as A,c as V}from"./icon-paths-5JCXzGsq.js";import{A as q}from"./answer-pill-cmLXoo3T.js";function I(){if(typeof window.matchMedia!="function")return!0;const v=window.matchMedia("(prefers-reduced-motion: reduce)");return!v||v.matches}const n=24,p=class p extends k.Component{constructor(){super(...arguments),this._mounted=!1}componentDidMount(){this._mounted=!0}componentWillUnmount(){this._mounted=!1}renderIcon(){const{selected:d,showCorrectness:i,showSelected:c,showPulsate:o}=this.props,l=c,u=d;let t;const m={path:"",height:1,width:1};let a={size:n,color:r.white,icon:m};return i?(t=[e.markerGraded,i==="correct"?e.markerCorrect:e.markerIncorrect,l&&e.markerSelected],a={...a,icon:i==="correct"?T:A}):u&&u.length>0?t=[e.markerFilled,l&&e.markerSelected]:l?(t=[e.markerSelected],a={...a,icon:V,size:8}):o&&(t=[e.markerPulsateBase,this._mounted&&I()?o&&e.markerUnfilledPulsateOnce:o&&e.markerUnfilledPulsateInfinite]),s.jsx(w,{style:[e.markerIcon,t],ref:y=>this._icon=y,children:s.jsx(f,{...a})})}render(){const{showCorrectness:d,selected:i,showAnswer:c,answerSide:o,answerStyles:l,hovered:u,focused:t,label:m}=this.props,a=d==="correct",y=u||t;return s.jsxs(s.Fragment,{children:[s.jsx(w,{style:[e.marker,y&&!a&&e.markerActive],"aria-label":a?this.context.strings.correctExcited:m,children:this.renderIcon()}),!!i&&c&&s.jsx(q,{selectedAnswers:i,showCorrectness:d,side:o,style:l,markerRef:this._icon??void 0,hovered:u,focused:t})]})}};p.contextType=b,p.defaultProps={selected:[]};let g=p;const e=h.StyleSheet.create({marker:{position:"absolute",backgroundColor:r.white,borderRadius:n,width:n,height:n,marginLeft:n/-2,marginTop:n/-2,boxShadow:`0 8px 8px ${r.offBlack8}`},markerIcon:{display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:n,height:n,border:`2px solid ${r.offBlack64}`,borderRadius:n},markerPulsateBase:{animationName:{"0%":{transform:"scale(1)",backgroundColor:r.blue},"100%":{transform:"scale(1.3)",backgroundColor:r.blue}},animationDirection:"alternate",animationDuration:"0.8s",animationTimingFunction:"ease-in",transformOrigin:"50% 50%",animationIterationCount:"0"},markerUnfilledPulsateInfinite:{animationIterationCount:"infinite"},markerUnfilledPulsateOnce:{animationIterationCount:"2"},markerActive:{outline:`2px solid ${r.blue}`,outlineOffset:2},markerSelected:{boxShadow:`0 8px 8px ${r.offBlack8}`,border:`solid 4px ${r.white}`,backgroundColor:r.blue,borderRadius:n,transform:"rotate(180deg)"},markerFilled:{backgroundColor:"#ECF3FE",border:`4px solid ${r.blue}`},markerGraded:{width:n,height:n,justifyContent:"center",alignItems:"center",border:`2px solid ${r.white}`},markerCorrect:{background:"#00880b"},markerIncorrect:{background:r.offBlack64}});g.__docgenInfo={description:"",methods:[{name:"renderIcon",docblock:null,modifiers:[],params:[],returns:null}],displayName:"Marker",props:{answers:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:""},label:{required:!0,tsType:{name:"string"},description:""},x:{required:!0,tsType:{name:"number"},description:""},y:{required:!0,tsType:{name:"number"},description:""},selected:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[]",computed:!1}},showCorrectness:{required:!1,tsType:{name:"union",raw:'"correct" | "incorrect"',elements:[{name:"literal",value:'"correct"'},{name:"literal",value:'"incorrect"'}]},description:""},focused:{required:!0,tsType:{name:"boolean"},description:""},showSelected:{required:!0,tsType:{name:"boolean"},description:""},showPulsate:{required:!0,tsType:{name:"boolean"},description:""},answerSide:{required:!0,tsType:{name:"union",raw:'"top" | "bottom" | "left" | "right"',elements:[{name:"literal",value:'"top"'},{name:"literal",value:'"bottom"'},{name:"literal",value:'"left"'},{name:"literal",value:'"right"'}]},description:""},answerStyles:{required:!1,tsType:{name:"CSSProperties"},description:""},showAnswer:{required:!1,tsType:{name:"boolean"},description:""},analytics:{required:!1,tsType:{name:"signature",type:"object",raw:`{ +import{j as s}from"./jsx-runtime-63Ea5SlK.js";import{V as w}from"./index-0DbkllkJ.js";import{c as r}from"./index-Dfd6auV6.js";import{l as h}from"./index-awljIyHI.js";import{r as k}from"./index-6oxdNXpR.js";import{P as b}from"./i18n-context-fsWEgybQ.js";import{I as f}from"./icon-7RFbyLiL.js";import{a as T,b as A,c as V}from"./icon-paths-5JCXzGsq.js";import{A as q}from"./answer-pill-Rz7_ywTY.js";function I(){if(typeof window.matchMedia!="function")return!0;const v=window.matchMedia("(prefers-reduced-motion: reduce)");return!v||v.matches}const n=24,p=class p extends k.Component{constructor(){super(...arguments),this._mounted=!1}componentDidMount(){this._mounted=!0}componentWillUnmount(){this._mounted=!1}renderIcon(){const{selected:d,showCorrectness:i,showSelected:c,showPulsate:o}=this.props,l=c,u=d;let t;const m={path:"",height:1,width:1};let a={size:n,color:r.white,icon:m};return i?(t=[e.markerGraded,i==="correct"?e.markerCorrect:e.markerIncorrect,l&&e.markerSelected],a={...a,icon:i==="correct"?T:A}):u&&u.length>0?t=[e.markerFilled,l&&e.markerSelected]:l?(t=[e.markerSelected],a={...a,icon:V,size:8}):o&&(t=[e.markerPulsateBase,this._mounted&&I()?o&&e.markerUnfilledPulsateOnce:o&&e.markerUnfilledPulsateInfinite]),s.jsx(w,{style:[e.markerIcon,t],ref:y=>this._icon=y,children:s.jsx(f,{...a})})}render(){const{showCorrectness:d,selected:i,showAnswer:c,answerSide:o,answerStyles:l,hovered:u,focused:t,label:m}=this.props,a=d==="correct",y=u||t;return s.jsxs(s.Fragment,{children:[s.jsx(w,{style:[e.marker,y&&!a&&e.markerActive],"aria-label":a?this.context.strings.correctExcited:m,children:this.renderIcon()}),!!i&&c&&s.jsx(q,{selectedAnswers:i,showCorrectness:d,side:o,style:l,markerRef:this._icon??void 0,hovered:u,focused:t})]})}};p.contextType=b,p.defaultProps={selected:[]};let g=p;const e=h.StyleSheet.create({marker:{position:"absolute",backgroundColor:r.white,borderRadius:n,width:n,height:n,marginLeft:n/-2,marginTop:n/-2,boxShadow:`0 8px 8px ${r.offBlack8}`},markerIcon:{display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:n,height:n,border:`2px solid ${r.offBlack64}`,borderRadius:n},markerPulsateBase:{animationName:{"0%":{transform:"scale(1)",backgroundColor:r.blue},"100%":{transform:"scale(1.3)",backgroundColor:r.blue}},animationDirection:"alternate",animationDuration:"0.8s",animationTimingFunction:"ease-in",transformOrigin:"50% 50%",animationIterationCount:"0"},markerUnfilledPulsateInfinite:{animationIterationCount:"infinite"},markerUnfilledPulsateOnce:{animationIterationCount:"2"},markerActive:{outline:`2px solid ${r.blue}`,outlineOffset:2},markerSelected:{boxShadow:`0 8px 8px ${r.offBlack8}`,border:`solid 4px ${r.white}`,backgroundColor:r.blue,borderRadius:n,transform:"rotate(180deg)"},markerFilled:{backgroundColor:"#ECF3FE",border:`4px solid ${r.blue}`},markerGraded:{width:n,height:n,justifyContent:"center",alignItems:"center",border:`2px solid ${r.white}`},markerCorrect:{background:"#00880b"},markerIncorrect:{background:r.offBlack64}});g.__docgenInfo={description:"",methods:[{name:"renderIcon",docblock:null,modifiers:[],params:[],returns:null}],displayName:"Marker",props:{answers:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:""},label:{required:!0,tsType:{name:"string"},description:""},x:{required:!0,tsType:{name:"number"},description:""},y:{required:!0,tsType:{name:"number"},description:""},selected:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[]",computed:!1}},showCorrectness:{required:!1,tsType:{name:"union",raw:'"correct" | "incorrect"',elements:[{name:"literal",value:'"correct"'},{name:"literal",value:'"incorrect"'}]},description:""},focused:{required:!0,tsType:{name:"boolean"},description:""},showSelected:{required:!0,tsType:{name:"boolean"},description:""},showPulsate:{required:!0,tsType:{name:"boolean"},description:""},answerSide:{required:!0,tsType:{name:"union",raw:'"top" | "bottom" | "left" | "right"',elements:[{name:"literal",value:'"top"'},{name:"literal",value:'"bottom"'},{name:"literal",value:'"left"'},{name:"literal",value:'"right"'}]},description:""},answerStyles:{required:!1,tsType:{name:"CSSProperties"},description:""},showAnswer:{required:!1,tsType:{name:"boolean"},description:""},analytics:{required:!1,tsType:{name:"signature",type:"object",raw:`{ onAnalyticsEvent: AnalyticsEventHandlerFn; }`,signature:{properties:[{key:"onAnalyticsEvent",value:{name:"signature",type:"function",raw:`( event: PerseusAnalyticsEvent, diff --git a/assets/marker-qF2kRuTF.js b/assets/marker-l6CMdFr_.js similarity index 96% rename from assets/marker-qF2kRuTF.js rename to assets/marker-l6CMdFr_.js index 96cd14ef98..cf7d4e2ec1 100644 --- a/assets/marker-qF2kRuTF.js +++ b/assets/marker-l6CMdFr_.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-63Ea5SlK.js";import{l as i}from"./index-awljIyHI.js";import{r as u}from"./index-6oxdNXpR.js";import"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import{c as x}from"./components-ODdjt0Ld.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{F as C}from"./index-9gkyvru-.js";import{a as b,c as g,d as S,e as y,f as T}from"./global-colors-VIVU4Od4.js";import{f as R}from"./util-qk2aeK8X.js";import{F as D}from"./form-wrapped-text-field-NbyiOLVb.js";const{Icon:A}=x,q=h=>{const e=C.findDOMNode(h);e.focus&&R(e)},M=`M10,3.8C10,4,9.9,4.2,9.8,4.3L5.1,8.9L4.3,9.8C4.2,9.9,4,10,3.8,10 +import{j as o}from"./jsx-runtime-63Ea5SlK.js";import{l as i}from"./index-awljIyHI.js";import{r as u}from"./index-6oxdNXpR.js";import"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c as x}from"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{F as C}from"./index-9gkyvru-.js";import{a as b,c as g,d as S,e as y,f as T}from"./global-colors-VIVU4Od4.js";import{f as R}from"./util-qk2aeK8X.js";import{F as D}from"./form-wrapped-text-field-NbyiOLVb.js";const{Icon:A}=x,q=h=>{const e=C.findDOMNode(h);e.focus&&R(e)},M=`M10,3.8C10,4,9.9,4.2,9.8,4.3L5.1,8.9L4.3,9.8C4.2,9.9,4,10,3.8,10 S3.5,9.9,3.4,9.8L2.5,8.9L0.2,6.6C0.1,6.5,0,6.3,0,6.2s0.1-0.3,0.2-0.4 l0.9-0.9c0.1-0.1,0.3-0.2,0.4-0.2s0.3,0.1,0.4,0.2l1.9,1.9l4.2-4.2c0.1 -0.1,0.3-0.2,0.4-0.2c0.2,0,0.3,0.1,0.4,0.2l0.9,0.9C9.9,3.5,10,3.7, diff --git a/assets/marker.stories-fFV5Lwnb.js b/assets/marker.stories-AoHhxc3f.js similarity index 86% rename from assets/marker.stories-fFV5Lwnb.js rename to assets/marker.stories-AoHhxc3f.js index 7f2bff2af6..dacd681708 100644 --- a/assets/marker.stories-fFV5Lwnb.js +++ b/assets/marker.stories-AoHhxc3f.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-63Ea5SlK.js";import{a as p}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{l}from"./index-awljIyHI.js";import{M as u}from"./marker-qF2kRuTF.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./global-colors-VIVU4Od4.js";import"./util-qk2aeK8X.js";import"./form-wrapped-text-field-NbyiOLVb.js";const no={title:"PerseusEditor/Widgets/Label Image/Marker"},x=l.StyleSheet.create({wrapper:{marginTop:150,position:"relative",width:32,height:32}}),d=m=>i.jsx("div",{className:l.css(x.wrapper),children:i.jsx(u,{...m})}),o=m=>{const e={answers:[],choices:[],label:"",onChange:(...r)=>{p("onChange")(...r)},onRemove:(...r)=>{p("onRemove")(...r)},x:50,y:50};return i.jsx(d,{...e})},t=m=>{const e={answers:["BMW","Ferrari"],choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],label:"Automotive",onChange:(...r)=>{p("onChange")(...r)},onRemove:(...r)=>{p("onRemove")(...r)},x:50,y:50};return i.jsx(d,{...e})};o.__docgenInfo={description:"",methods:[],displayName:"Empty"};t.__docgenInfo={description:"",methods:[],displayName:"WithAnswers"};var s,n,a;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as i}from"./jsx-runtime-63Ea5SlK.js";import{a as p}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{l}from"./index-awljIyHI.js";import{M as u}from"./marker-l6CMdFr_.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./global-colors-VIVU4Od4.js";import"./util-qk2aeK8X.js";import"./form-wrapped-text-field-NbyiOLVb.js";const no={title:"PerseusEditor/Widgets/Label Image/Marker"},x=l.StyleSheet.create({wrapper:{marginTop:150,position:"relative",width:32,height:32}}),d=m=>i.jsx("div",{className:l.css(x.wrapper),children:i.jsx(u,{...m})}),o=m=>{const e={answers:[],choices:[],label:"",onChange:(...r)=>{p("onChange")(...r)},onRemove:(...r)=>{p("onRemove")(...r)},x:50,y:50};return i.jsx(d,{...e})},t=m=>{const e={answers:["BMW","Ferrari"],choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],label:"Automotive",onChange:(...r)=>{p("onChange")(...r)},onRemove:(...r)=>{p("onRemove")(...r)},x:50,y:50};return i.jsx(d,{...e})};o.__docgenInfo={description:"",methods:[],displayName:"Empty"};t.__docgenInfo={description:"",methods:[],displayName:"WithAnswers"};var s,n,a;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const props = { answers: [], choices: [], diff --git a/assets/marker.stories-Cm9Xu6q2.js b/assets/marker.stories-eoF7qx0l.js similarity index 97% rename from assets/marker.stories-Cm9Xu6q2.js rename to assets/marker.stories-eoF7qx0l.js index 038ad108c6..90fa945b10 100644 --- a/assets/marker.stories-Cm9Xu6q2.js +++ b/assets/marker.stories-eoF7qx0l.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{l as L}from"./index-awljIyHI.js";import{M as O}from"./marker-0QGNq-GT.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-0DbkllkJ.js";import"./index-Dfd6auV6.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./icon-paths-5JCXzGsq.js";import"./answer-pill-cmLXoo3T.js";import"./index-i1pBWAmI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./index-9gkyvru-.js";import"./renderer-1DxKQj1_.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";const be={title:"Perseus/Widgets/Label Image/Marker"},q=L.StyleSheet.create({wrapper:{position:"relative",width:32,height:32}}),o=s=>r.jsx("div",{className:L.css(q.wrapper),children:r.jsx(O,{...s})}),t=s=>{const e={answers:["BMW","Ferrari"],selected:[],label:"Automotive",x:50,y:50,showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}};return r.jsx(o,{...e})},n=s=>{const e={answers:["BMW","Ferrari"],selected:[],label:"Automotive",x:50,y:50,showSelected:!1,showPulsate:!0,onClick:()=>{},onKeyDown:()=>{}};return r.jsx(o,{...e})},a=s=>{const e={answers:["BMW","Ferrari"],selected:[],label:"Automotive",x:50,y:50,showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}};return r.jsx(o,{...e})},c=s=>{const e={answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}};return r.jsx(o,{...e})},l=s=>{const e={answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}};return r.jsx(o,{...e})},i=s=>{const e={answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showCorrectness:"incorrect",showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}};return r.jsx(o,{...e})},p=s=>{const e={answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showCorrectness:"incorrect",showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}};return r.jsx(o,{...e})},d=s=>{const e={answers:["BMW","Ferrari"],selected:["BMW","Ferrari"],label:"Automotive",x:50,y:50,showCorrectness:"correct",showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}};return r.jsx(o,{...e})},m=s=>{const e={answers:["BMW","Ferrari"],selected:["BMW","Ferrari"],label:"Automotive",x:50,y:50,showCorrectness:"correct",showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}};return r.jsx(o,{...e})};t.__docgenInfo={description:"",methods:[],displayName:"Unfilled"};n.__docgenInfo={description:"",methods:[],displayName:"UnfilledPulsate"};a.__docgenInfo={description:"",methods:[],displayName:"UnfilledSelected"};c.__docgenInfo={description:"",methods:[],displayName:"Filled"};l.__docgenInfo={description:"",methods:[],displayName:"FilledSelected"};i.__docgenInfo={description:"",methods:[],displayName:"Incorrect"};p.__docgenInfo={description:"",methods:[],displayName:"IncorrectSelected"};d.__docgenInfo={description:"",methods:[],displayName:"Correct"};m.__docgenInfo={description:"",methods:[],displayName:"CorrectSelected"};var u,w,h;t.parameters={...t.parameters,docs:{...(u=t.parameters)==null?void 0:u.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{l as L}from"./index-awljIyHI.js";import{M as O}from"./marker-ecL5IfPZ.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-0DbkllkJ.js";import"./index-Dfd6auV6.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./icon-paths-5JCXzGsq.js";import"./answer-pill-Rz7_ywTY.js";import"./index-i1pBWAmI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./index-9gkyvru-.js";import"./renderer-L37a98D_.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";const be={title:"Perseus/Widgets/Label Image/Marker"},q=L.StyleSheet.create({wrapper:{position:"relative",width:32,height:32}}),o=s=>r.jsx("div",{className:L.css(q.wrapper),children:r.jsx(O,{...s})}),t=s=>{const e={answers:["BMW","Ferrari"],selected:[],label:"Automotive",x:50,y:50,showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}};return r.jsx(o,{...e})},n=s=>{const e={answers:["BMW","Ferrari"],selected:[],label:"Automotive",x:50,y:50,showSelected:!1,showPulsate:!0,onClick:()=>{},onKeyDown:()=>{}};return r.jsx(o,{...e})},a=s=>{const e={answers:["BMW","Ferrari"],selected:[],label:"Automotive",x:50,y:50,showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}};return r.jsx(o,{...e})},c=s=>{const e={answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}};return r.jsx(o,{...e})},l=s=>{const e={answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}};return r.jsx(o,{...e})},i=s=>{const e={answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showCorrectness:"incorrect",showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}};return r.jsx(o,{...e})},p=s=>{const e={answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showCorrectness:"incorrect",showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}};return r.jsx(o,{...e})},d=s=>{const e={answers:["BMW","Ferrari"],selected:["BMW","Ferrari"],label:"Automotive",x:50,y:50,showCorrectness:"correct",showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}};return r.jsx(o,{...e})},m=s=>{const e={answers:["BMW","Ferrari"],selected:["BMW","Ferrari"],label:"Automotive",x:50,y:50,showCorrectness:"correct",showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}};return r.jsx(o,{...e})};t.__docgenInfo={description:"",methods:[],displayName:"Unfilled"};n.__docgenInfo={description:"",methods:[],displayName:"UnfilledPulsate"};a.__docgenInfo={description:"",methods:[],displayName:"UnfilledSelected"};c.__docgenInfo={description:"",methods:[],displayName:"Filled"};l.__docgenInfo={description:"",methods:[],displayName:"FilledSelected"};i.__docgenInfo={description:"",methods:[],displayName:"Incorrect"};p.__docgenInfo={description:"",methods:[],displayName:"IncorrectSelected"};d.__docgenInfo={description:"",methods:[],displayName:"Correct"};m.__docgenInfo={description:"",methods:[],displayName:"CorrectSelected"};var u,w,h;t.parameters={...t.parameters,docs:{...(u=t.parameters)==null?void 0:u.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const props = { answers: ["BMW", "Ferrari"], selected: [], diff --git a/assets/matcher-editor-rnK8ooee.js b/assets/matcher-editor-S8mz5e0T.js similarity index 90% rename from assets/matcher-editor-rnK8ooee.js rename to assets/matcher-editor-S8mz5e0T.js index adc94c8377..9ce17767b2 100644 --- a/assets/matcher-editor-rnK8ooee.js +++ b/assets/matcher-editor-S8mz5e0T.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-mU-6RWLp.js";import{_ as l}from"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import{c as h}from"./components-ODdjt0Ld.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{C as p}from"./index-V5gl6frG.js";import{P as s}from"./index-0C4KXdeC.js";import{r as c}from"./index-6oxdNXpR.js";const{InfoTip:i,TextListEditor:d}=h,a=class a extends c.Component{constructor(){super(...arguments),this.onLabelChange=(t,r)=>{const n=l.clone(this.props.labels);n[t]=r.target.value,this.props.onChange({labels:n})},this.getSaveWarnings=()=>this.props.left.length!==this.props.right.length?["The two halves of the matcher have different numbers of cards."]:[],this.serialize=()=>l.pick(this.props,"left","right","labels","orderMatters","padding")}render(){return e.jsxs("div",{className:"perseus-matcher-editor",children:[e.jsxs("div",{children:[" ","Correct answer:"," ",e.jsx(i,{children:e.jsx("p",{children:"Enter the correct answers here. The preview on the right will show the cards in a randomized order, which is how the student will see them."})})]}),e.jsxs("div",{className:"perseus-clearfix",children:[e.jsx(d,{options:this.props.left,onChange:(t,r)=>{this.props.onChange({left:t},r)},layout:"vertical"}),e.jsx(d,{options:this.props.right,onChange:(t,r)=>{this.props.onChange({right:t},r)},layout:"vertical"})]}),e.jsxs("span",{children:[" ","Labels:"," ",e.jsx(i,{children:e.jsx("p",{children:"These are entirely optional."})})]}),e.jsxs("div",{children:[e.jsx("input",{type:"text",defaultValue:this.props.labels[0],onChange:this.onLabelChange.bind(this,0)}),e.jsx("input",{type:"text",defaultValue:this.props.labels[1],onChange:this.onLabelChange.bind(this,1)})]}),e.jsxs("div",{children:[e.jsx(p,{label:"Order of the matched pairs matters:",checked:this.props.orderMatters,onChange:t=>{this.props.onChange({orderMatters:t})}}),e.jsxs(i,{children:[e.jsx("p",{children:"With this option enabled, only the order provided above will be treated as correct. This is useful when ordering is significant, such as in the context of a proof."}),e.jsx("p",{children:"If disabled, pairwise matching is sufficient. To make this clear, the left column becomes fixed in the provided order and only the cards in the right column can be moved."})]})]}),e.jsxs("div",{children:[e.jsx(p,{label:"Padding:",checked:this.props.padding,onChange:t=>{this.props.onChange({padding:t})}}),e.jsx(i,{children:e.jsx("p",{children:"Padding is good for text, but not needed for images."})})]})]})}};a.propTypes={left:s.array,right:s.array,labels:s.array,orderMatters:s.bool,padding:s.bool},a.widgetName="matcher",a.defaultProps={left:["$x$","$y$","$z$"],right:["$1$","$2$","$3$"],labels:["test","label"],orderMatters:!1,padding:!0};let o=a;o.__docgenInfo={description:"",methods:[{name:"onLabelChange",docblock:null,modifiers:[],params:[{name:"index",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MatcherEditor",props:{left:{defaultValue:{value:'["$x$", "$y$", "$z$"]',computed:!1},description:"",type:{name:"array"},required:!1},right:{defaultValue:{value:'["$1$", "$2$", "$3$"]',computed:!1},description:"",type:{name:"array"},required:!1},labels:{defaultValue:{value:'["test", "label"]',computed:!1},description:"",type:{name:"array"},required:!1},orderMatters:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},padding:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1}}};export{o as M}; +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-HEYBK15c.js";import{_ as l}from"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c as h}from"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{C as p}from"./index-V5gl6frG.js";import{P as s}from"./index-k-0mNqHS.js";import{r as c}from"./index-6oxdNXpR.js";const{InfoTip:i,TextListEditor:d}=h,a=class a extends c.Component{constructor(){super(...arguments),this.onLabelChange=(t,r)=>{const n=l.clone(this.props.labels);n[t]=r.target.value,this.props.onChange({labels:n})},this.getSaveWarnings=()=>this.props.left.length!==this.props.right.length?["The two halves of the matcher have different numbers of cards."]:[],this.serialize=()=>l.pick(this.props,"left","right","labels","orderMatters","padding")}render(){return e.jsxs("div",{className:"perseus-matcher-editor",children:[e.jsxs("div",{children:[" ","Correct answer:"," ",e.jsx(i,{children:e.jsx("p",{children:"Enter the correct answers here. The preview on the right will show the cards in a randomized order, which is how the student will see them."})})]}),e.jsxs("div",{className:"perseus-clearfix",children:[e.jsx(d,{options:this.props.left,onChange:(t,r)=>{this.props.onChange({left:t},r)},layout:"vertical"}),e.jsx(d,{options:this.props.right,onChange:(t,r)=>{this.props.onChange({right:t},r)},layout:"vertical"})]}),e.jsxs("span",{children:[" ","Labels:"," ",e.jsx(i,{children:e.jsx("p",{children:"These are entirely optional."})})]}),e.jsxs("div",{children:[e.jsx("input",{type:"text",defaultValue:this.props.labels[0],onChange:this.onLabelChange.bind(this,0)}),e.jsx("input",{type:"text",defaultValue:this.props.labels[1],onChange:this.onLabelChange.bind(this,1)})]}),e.jsxs("div",{children:[e.jsx(p,{label:"Order of the matched pairs matters:",checked:this.props.orderMatters,onChange:t=>{this.props.onChange({orderMatters:t})}}),e.jsxs(i,{children:[e.jsx("p",{children:"With this option enabled, only the order provided above will be treated as correct. This is useful when ordering is significant, such as in the context of a proof."}),e.jsx("p",{children:"If disabled, pairwise matching is sufficient. To make this clear, the left column becomes fixed in the provided order and only the cards in the right column can be moved."})]})]}),e.jsxs("div",{children:[e.jsx(p,{label:"Padding:",checked:this.props.padding,onChange:t=>{this.props.onChange({padding:t})}}),e.jsx(i,{children:e.jsx("p",{children:"Padding is good for text, but not needed for images."})})]})]})}};a.propTypes={left:s.array,right:s.array,labels:s.array,orderMatters:s.bool,padding:s.bool},a.widgetName="matcher",a.defaultProps={left:["$x$","$y$","$z$"],right:["$1$","$2$","$3$"],labels:["test","label"],orderMatters:!1,padding:!0};let o=a;o.__docgenInfo={description:"",methods:[{name:"onLabelChange",docblock:null,modifiers:[],params:[{name:"index",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MatcherEditor",props:{left:{defaultValue:{value:'["$x$", "$y$", "$z$"]',computed:!1},description:"",type:{name:"array"},required:!1},right:{defaultValue:{value:'["$1$", "$2$", "$3$"]',computed:!1},description:"",type:{name:"array"},required:!1},labels:{defaultValue:{value:'["test", "label"]',computed:!1},description:"",type:{name:"array"},required:!1},orderMatters:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},padding:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1}}};export{o as M}; diff --git a/assets/matcher-editor.stories-F1l9Wl96.js b/assets/matcher-editor.stories-3y2hDgKU.js similarity index 77% rename from assets/matcher-editor.stories-F1l9Wl96.js rename to assets/matcher-editor.stories-3y2hDgKU.js index 097274244d..e5f3382a13 100644 --- a/assets/matcher-editor.stories-F1l9Wl96.js +++ b/assets/matcher-editor.stories-3y2hDgKU.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{a as p}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{M as e}from"./matcher-editor-rnK8ooee.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";const Yr={title:"PerseusEditor/Widgets/Matcher Editor"},r=a=>m.jsx(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{a as p}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{M as e}from"./matcher-editor-S8mz5e0T.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./index-k-0mNqHS.js";const Yr={title:"PerseusEditor/Widgets/Matcher Editor"},r=a=>m.jsx(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(o=r.parameters)==null?void 0:o.docs)==null?void 0:i.source}}};const Zr=["Default"];export{r as Default,Zr as __namedExportsOrder,Yr as default}; diff --git a/assets/matcher.stories-n2yFzFDY.js b/assets/matcher.stories-pcC_ewKn.js similarity index 81% rename from assets/matcher.stories-n2yFzFDY.js rename to assets/matcher.stories-pcC_ewKn.js index fa85edf607..aca9682f34 100644 --- a/assets/matcher.stories-n2yFzFDY.js +++ b/assets/matcher.stories-pcC_ewKn.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{R as m}from"./renderer-with-debug-ui-75hBDQJk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const p={content:`**Match each claim with its supporting evidence.** +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{R as m}from"./renderer-with-debug-ui-Jq91P-PK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const p={content:`**Match each claim with its supporting evidence.** [[☃ matcher 1]]`,images:{},widgets:{"matcher 1":{version:{major:0,minor:0},type:"matcher",graded:!0,options:{labels:["**Claims**","**Evidence**"],padding:!0,orderMatters:!1,right:["Medium-sized stars typically exist for roughly 10 billion years","The current trajectory of the Earth’s tectonic plate movement","The life cycle of medium-sized stars includes a red giant stage and ends in a whimper as a white dwarf","Rapid escalation of greenhouse gas emissions","The current trajectory of the Milky Way galaxy and those in its immediate proximity"],left:["Our Sun will run out of fuel and die in around 5 billion years ","Plate tectonics will rearrange the continents: the Pacific will narrow, bringing Australia closer to the Americas, and the Atlantic will expand to form the largest of the oceans ","Our Sun will run out of hydrogen, swell into a red giant, gobble up the inner rocky planets, and then collapse and die ","Average global temperatures will rise ","In 3 to 4 billion years, our galaxy will begin a slow collision with its closest large neighbor, Andromeda "]}}}},Vt={title:"Perseus/Widgets/Matcher"},t=a=>e.jsx(m,{question:p});t.__docgenInfo={description:"",methods:[],displayName:"Question1"};var r,i,o;t.parameters={...t.parameters,docs:{...(r=t.parameters)==null?void 0:r.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/matrix.stories-rGSiOthd.js b/assets/matrix.stories-b81D4JI6.js similarity index 78% rename from assets/matrix.stories-rGSiOthd.js rename to assets/matrix.stories-b81D4JI6.js index cd7b603f84..226d67ac04 100644 --- a/assets/matrix.stories-rGSiOthd.js +++ b/assets/matrix.stories-b81D4JI6.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{R as p}from"./renderer-with-debug-ui-75hBDQJk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const e={content:`**Perform the row operation, $R_3 \\leftrightarrow R_2$, on the following matrix.** +import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{R as p}from"./renderer-with-debug-ui-Jq91P-PK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const e={content:`**Perform the row operation, $R_3 \\leftrightarrow R_2$, on the following matrix.** $\\left[\\begin{array} {ccc} 5 & -2 & 1 & 1 \\\\ diff --git a/assets/multi-items-SEqLFgxB.js b/assets/multi-items-TymZv1Bp.js similarity index 82% rename from assets/multi-items-SEqLFgxB.js rename to assets/multi-items-TymZv1Bp.js index e71664d606..0e31b21130 100644 --- a/assets/multi-items-SEqLFgxB.js +++ b/assets/multi-items-TymZv1Bp.js @@ -1 +1 @@ -import{M as s,s as p,b as a,f,a as u,i as y}from"./perseus-item-CWRjfKXr.js";import"./version-akiLXZts.js";import{P as c,E as m}from"./perseus-error-l3K_anoI.js";import{P as e}from"./index-k-0mNqHS.js";function d(t){return e.oneOfType([e.shape({_multi:n(t)}),e.oneOf([null,void 0])])}function n(t){if(t.type==="content")return e.shape({__type:e.oneOf(["content","item"]).isRequired,content:e.string,images:e.objectOf(e.any),widgets:e.objectOf(e.any)});if(t.type==="hint")return e.shape({__type:e.oneOf(["hint"]).isRequired,content:e.string,images:e.objectOf(e.any),widgets:e.objectOf(e.any),replace:e.bool});if(t.type==="tags")return e.arrayOf(e.string.isRequired);if(t.type==="array"){const r=n(t.elementShape);return e.arrayOf(r.isRequired)}if(t.type==="object"){const r=t.shape,o={};return Object.keys(r).forEach(i=>{o[i]=n(r[i]).isRequired}),e.shape(o)}throw new c(`unexpected shape type ${t.type}`,m.InvalidInput)}const I={MultiRenderer:s,shapes:p,buildPropTypeForShape:d,buildEmptyItemForShape:a,findContentNodesInItem:f,findHintNodesInItem:u,inferItemShape:y};export{I as M}; +import{M as s,s as p,b as a,f,a as u,i as y}from"./perseus-item-C-BdPaPl.js";import"./version-akiLXZts.js";import{P as c,E as m}from"./perseus-error-l3K_anoI.js";import{P as e}from"./index-0C4KXdeC.js";function d(t){return e.oneOfType([e.shape({_multi:n(t)}),e.oneOf([null,void 0])])}function n(t){if(t.type==="content")return e.shape({__type:e.oneOf(["content","item"]).isRequired,content:e.string,images:e.objectOf(e.any),widgets:e.objectOf(e.any)});if(t.type==="hint")return e.shape({__type:e.oneOf(["hint"]).isRequired,content:e.string,images:e.objectOf(e.any),widgets:e.objectOf(e.any),replace:e.bool});if(t.type==="tags")return e.arrayOf(e.string.isRequired);if(t.type==="array"){const r=n(t.elementShape);return e.arrayOf(r.isRequired)}if(t.type==="object"){const r=t.shape,o={};return Object.keys(r).forEach(i=>{o[i]=n(r[i]).isRequired}),e.shape(o)}throw new c(`unexpected shape type ${t.type}`,m.InvalidInput)}const I={MultiRenderer:s,shapes:p,buildPropTypeForShape:d,buildEmptyItemForShape:a,findContentNodesInItem:f,findHintNodesInItem:u,inferItemShape:y};export{I as M}; diff --git a/assets/multi-renderer.stories-qKnFkrxo.js b/assets/multi-renderer.stories-kf0pRGET.js similarity index 99% rename from assets/multi-renderer.stories-qKnFkrxo.js rename to assets/multi-renderer.stories-kf0pRGET.js index 8aa8a32bd9..e85d4d08dc 100644 --- a/assets/multi-renderer.stories-qKnFkrxo.js +++ b/assets/multi-renderer.stories-kf0pRGET.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{V as t}from"./index-0DbkllkJ.js";import{H as u}from"./index-18qWGOW7.js";import{l as w}from"./index-awljIyHI.js";import{B as f}from"./choice-Xr-SKHrB.js";import{r as m}from"./index-6oxdNXpR.js";import"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import{s as o}from"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import{M as k}from"./multi-items-SEqLFgxB.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{K as q}from"./ke-score-ui-AQ1XUyPU.js";import{S as T}from"./side-by-side-MBJuyilC.js";import{s as R}from"./test-dependencies-8Mfke9yn.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./perseus-error-l3K_anoI.js";import"./index-k-0mNqHS.js";import"./input-with-examples-YO5BCgg1.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./shared-4TdECMLk.js";import"./answer-choices-lVeJkx-U.js";import"./minus-bold-ONmDo3Ve.js";import"./asset-context-H6Iqp7Gi.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./fixed-to-responsive-for_tVF1.js";import"./video-transcript-link-_gpkjmR8.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-qMhJW4bS.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./choice-none-above-dRu7sfJj.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const A=o.shape({blurb:o.content,question:o.content,hints:o.hints}),g={_multi:{blurb:{__type:"content",content:"",images:{},widgets:{}},hints:[{__type:"hint",content:"If two triangles are congruent, then they have the same side lengths and angle measures.",images:{},replace:!1,widgets:{}},{__type:"hint",content:"A triangle congruent to triangle $ABC$ must also have side lengths of $12$, $14$ and $20$.",images:{},replace:!1,widgets:{}},{__type:"hint",content:`The following triangle is congruent to triangle $ABC$: +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{V as t}from"./index-0DbkllkJ.js";import{H as u}from"./index-18qWGOW7.js";import{l as w}from"./index-awljIyHI.js";import{B as f}from"./choice-Xr-SKHrB.js";import{r as m}from"./index-6oxdNXpR.js";import"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import{s as o}from"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import{M as k}from"./multi-items-TymZv1Bp.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{K as q}from"./ke-score-ui-AQ1XUyPU.js";import{S as T}from"./side-by-side-MBJuyilC.js";import{s as R}from"./test-dependencies-1Svp3QCw.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./perseus-error-l3K_anoI.js";import"./index-0C4KXdeC.js";import"./input-with-examples-PaWkADGr.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./shared-4TdECMLk.js";import"./answer-choices-iyIz6W_C.js";import"./minus-bold-ONmDo3Ve.js";import"./asset-context-H6Iqp7Gi.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./fixed-to-responsive-for_tVF1.js";import"./video-transcript-link-_gpkjmR8.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-qMhJW4bS.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./choice-none-above-vDwffTnk.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./register-all-widgets-for-testing-vNa20up7.js";const A=o.shape({blurb:o.content,question:o.content,hints:o.hints}),g={_multi:{blurb:{__type:"content",content:"",images:{},widgets:{}},hints:[{__type:"hint",content:"If two triangles are congruent, then they have the same side lengths and angle measures.",images:{},replace:!1,widgets:{}},{__type:"hint",content:"A triangle congruent to triangle $ABC$ must also have side lengths of $12$, $14$ and $20$.",images:{},replace:!1,widgets:{}},{__type:"hint",content:`The following triangle is congruent to triangle $ABC$: * A triangle with side lengths of $12$, $14$, and $20$`,images:{},replace:!1,widgets:{}}],question:{__type:"content",content:`Triangle $ABC$ has side lengths of $12$, $14$, and $20$. Which of the following triangles is congruent to triangle $ABC$ ? diff --git a/assets/number-input-ogh82yD8.js b/assets/number-input-ogh82yD8.js index 57dc15ecf2..ba2ea73cd0 100644 --- a/assets/number-input-ogh82yD8.js +++ b/assets/number-input-ogh82yD8.js @@ -1 +1 @@ -import{j as h}from"./jsx-runtime-63Ea5SlK.js";import{e as d,U as f,K as c}from"./util-AYeX86gl.js";import"./version-akiLXZts.js";import{P as y,E as g}from"./perseus-error-l3K_anoI.js";import{c as v}from"./index-dnMhQZ-1.js";import{P as n}from"./index-k-0mNqHS.js";import{r as i}from"./index-6oxdNXpR.js";import{_ as r}from"./jquery-yG1GhClm.js";import{P as k}from"./i18n-context-fsWEgybQ.js";const{firstNumericalParse:u,captureScratchpadTouchStart:_}=f,p=c.toNumericString,V=c.getNumericFormat,l=class l extends i.Component{constructor(){super(...arguments),this.inputRef=i.createRef(),this.state={format:this.props.format},this._getInput=()=>{if(!this.inputRef.current)throw new y("Input ref accessed before set",g.Internal);return this.inputRef.current},this.getValue=()=>this.parseInputValue(this._getInput().value),this.getStringValue=()=>this._getInput().toString(),this.parseInputValue=e=>{if(e===""){const s=this.props.placeholder;return r.isFinite(s)?+s:null}const t=u(e,this.context.strings);return r.isFinite(t)?t:this.props.value},this.focus=()=>{this._getInput().focus(),this._handleFocus()},this.blur=()=>{this._getInput().blur(),this._handleBlur()},this.setSelectionRange=(e,t)=>{this._getInput().setSelectionRange(e,t)},this.getSelectionStart=()=>this._getInput().selectionStart,this.getSelectionEnd=()=>this._getInput().selectionEnd,this._checkValidity=e=>{if(e==null)return!0;const t=u(e,this.context.strings),s=this.props.checkValidity;return r.isFinite(t)&&s(t)},this._handleChange=e=>{const t=e.target.value,s=this.parseInputValue(t),a=V(t);this.props.onChange(s),a&&(this.props.onFormatChange(s,a),this.setState({format:a}))},this._handleFocus=()=>{this.props.onFocus&&this.props.onFocus()},this._handleBlur=e=>{e&&e.type==="keypress"&&e.keyCode!==13||(this._setValue(this.props.value,this.state.format),this.props.onBlur&&this.props.onBlur())},this._onKeyDown=e=>{if(this.props.onKeyDown&&this.props.onKeyDown(e),!this.props.useArrowKeys||!r.contains(["ArrowUp","ArrowDown"],e.key))return;let t=this.getValue();t===Math.floor(t)&&(e.key==="ArrowUp"?t=t+1:e.key==="ArrowDown"&&(t=t-1),this._checkValidity(t)&&this.props.onChange(t))},this._setValue=(e,t)=>{this._getInput().value=p(e,t)}}componentDidUpdate(e){d(this.getValue(),this.props.value)||this._setValue(this.props.value,this.state.format)}render(){let e=v({"number-input":!0,"invalid-input":!this._checkValidity(this.props.value),mini:this.props.size==="mini",small:this.props.size==="small",normal:this.props.size==="normal"});this.props.className!=null&&(e=e+" "+this.props.className);const{onFormatChange:t,checkValidity:s,useArrowKeys:a,...m}=this.props;return h.jsx("input",{...m,className:e,type:"text",ref:this.inputRef,onChange:this._handleChange,onFocus:this._handleFocus,onBlur:this._handleBlur,onKeyPress:this._handleBlur,onKeyDown:this._onKeyDown,onTouchStart:_,defaultValue:p(this.props.value,this.state.format),value:void 0})}};l.contextType=k,l.propTypes={value:n.number,format:n.string,placeholder:n.oneOfType([n.string,n.number]),onChange:n.func.isRequired,onFormatChange:n.func,checkValidity:n.func,size:n.oneOf(["mini","small","normal"]),label:n.oneOf(["put your labels outside your inputs!"])},l.defaultProps={value:null,placeholder:null,format:null,onFormatChange:()=>null,checkValidity:()=>!0,useArrowKeys:!1};let o=l;o.__docgenInfo={description:'An input box that accepts only numeric strings\n\nCalls `onChange(value, format)` for valid numbers.\n\nReverts to the current value `onBlur` or on [ENTER],\n but maintains the format (i.e. 3/2, 1 1/2, 150%)\n\nAccepts empty input and sends it to `onChange` as `null` if no numeric\nplaceholder is set.\n\nIf given a `checkValidity` function, will turn the background/outline red\nwhen invalid.\n\nIf `useArrowKeys` is set to `true`, up/down arrows will increment/decrement\nintegers.\n\nOptionally takes a `size` (`"mini"`, `"small"`,` `"normal"`)',methods:[{name:"_getInput",docblock:null,modifiers:[],params:[],returns:null},{name:"getValue",docblock:null,modifiers:[],params:[],returns:null},{name:"getStringValue",docblock:null,modifiers:[],params:[],returns:null},{name:"parseInputValue",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"blur",docblock:null,modifiers:[],params:[],returns:null},{name:"setSelectionRange",docblock:null,modifiers:[],params:[{name:"selectionStart",optional:!1,type:null},{name:"selectionEnd",optional:!1,type:null}],returns:null},{name:"getSelectionStart",docblock:null,modifiers:[],params:[],returns:null},{name:"getSelectionEnd",docblock:null,modifiers:[],params:[],returns:null},{name:"_checkValidity",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"_handleChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"_handleFocus",docblock:null,modifiers:[],params:[],returns:null},{name:"_handleBlur",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"_onKeyDown",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"_setValue",docblock:null,modifiers:[],params:[{name:"val",optional:!1,type:null},{name:"format",optional:!1,type:null}],returns:null}],displayName:"NumberInput",props:{value:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},placeholder:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"union",value:[{name:"string"},{name:"number"}]},required:!1},format:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},onFormatChange:{defaultValue:{value:"() => null",computed:!1},description:"",type:{name:"func"},required:!1},checkValidity:{defaultValue:{value:"() => true",computed:!1},description:"",type:{name:"func"},required:!1},useArrowKeys:{defaultValue:{value:"false",computed:!1},required:!1},onChange:{description:"",type:{name:"func"},required:!0},size:{description:"",type:{name:"enum",value:[{value:'"mini"',computed:!1},{value:'"small"',computed:!1},{value:'"normal"',computed:!1}]},required:!1},label:{description:"",type:{name:"enum",value:[{value:'"put your labels outside your inputs!"',computed:!1}]},required:!1}}};export{o as N}; +import{j as h}from"./jsx-runtime-63Ea5SlK.js";import{e as d,U as f,K as c}from"./util-AYeX86gl.js";import"./version-akiLXZts.js";import{P as y,E as g}from"./perseus-error-l3K_anoI.js";import{c as v}from"./index-dnMhQZ-1.js";import{P as n}from"./index-0C4KXdeC.js";import{r as i}from"./index-6oxdNXpR.js";import{_ as r}from"./jquery-yG1GhClm.js";import{P as k}from"./i18n-context-fsWEgybQ.js";const{firstNumericalParse:u,captureScratchpadTouchStart:_}=f,p=c.toNumericString,V=c.getNumericFormat,l=class l extends i.Component{constructor(){super(...arguments),this.inputRef=i.createRef(),this.state={format:this.props.format},this._getInput=()=>{if(!this.inputRef.current)throw new y("Input ref accessed before set",g.Internal);return this.inputRef.current},this.getValue=()=>this.parseInputValue(this._getInput().value),this.getStringValue=()=>this._getInput().toString(),this.parseInputValue=e=>{if(e===""){const s=this.props.placeholder;return r.isFinite(s)?+s:null}const t=u(e,this.context.strings);return r.isFinite(t)?t:this.props.value},this.focus=()=>{this._getInput().focus(),this._handleFocus()},this.blur=()=>{this._getInput().blur(),this._handleBlur()},this.setSelectionRange=(e,t)=>{this._getInput().setSelectionRange(e,t)},this.getSelectionStart=()=>this._getInput().selectionStart,this.getSelectionEnd=()=>this._getInput().selectionEnd,this._checkValidity=e=>{if(e==null)return!0;const t=u(e,this.context.strings),s=this.props.checkValidity;return r.isFinite(t)&&s(t)},this._handleChange=e=>{const t=e.target.value,s=this.parseInputValue(t),a=V(t);this.props.onChange(s),a&&(this.props.onFormatChange(s,a),this.setState({format:a}))},this._handleFocus=()=>{this.props.onFocus&&this.props.onFocus()},this._handleBlur=e=>{e&&e.type==="keypress"&&e.keyCode!==13||(this._setValue(this.props.value,this.state.format),this.props.onBlur&&this.props.onBlur())},this._onKeyDown=e=>{if(this.props.onKeyDown&&this.props.onKeyDown(e),!this.props.useArrowKeys||!r.contains(["ArrowUp","ArrowDown"],e.key))return;let t=this.getValue();t===Math.floor(t)&&(e.key==="ArrowUp"?t=t+1:e.key==="ArrowDown"&&(t=t-1),this._checkValidity(t)&&this.props.onChange(t))},this._setValue=(e,t)=>{this._getInput().value=p(e,t)}}componentDidUpdate(e){d(this.getValue(),this.props.value)||this._setValue(this.props.value,this.state.format)}render(){let e=v({"number-input":!0,"invalid-input":!this._checkValidity(this.props.value),mini:this.props.size==="mini",small:this.props.size==="small",normal:this.props.size==="normal"});this.props.className!=null&&(e=e+" "+this.props.className);const{onFormatChange:t,checkValidity:s,useArrowKeys:a,...m}=this.props;return h.jsx("input",{...m,className:e,type:"text",ref:this.inputRef,onChange:this._handleChange,onFocus:this._handleFocus,onBlur:this._handleBlur,onKeyPress:this._handleBlur,onKeyDown:this._onKeyDown,onTouchStart:_,defaultValue:p(this.props.value,this.state.format),value:void 0})}};l.contextType=k,l.propTypes={value:n.number,format:n.string,placeholder:n.oneOfType([n.string,n.number]),onChange:n.func.isRequired,onFormatChange:n.func,checkValidity:n.func,size:n.oneOf(["mini","small","normal"]),label:n.oneOf(["put your labels outside your inputs!"])},l.defaultProps={value:null,placeholder:null,format:null,onFormatChange:()=>null,checkValidity:()=>!0,useArrowKeys:!1};let o=l;o.__docgenInfo={description:'An input box that accepts only numeric strings\n\nCalls `onChange(value, format)` for valid numbers.\n\nReverts to the current value `onBlur` or on [ENTER],\n but maintains the format (i.e. 3/2, 1 1/2, 150%)\n\nAccepts empty input and sends it to `onChange` as `null` if no numeric\nplaceholder is set.\n\nIf given a `checkValidity` function, will turn the background/outline red\nwhen invalid.\n\nIf `useArrowKeys` is set to `true`, up/down arrows will increment/decrement\nintegers.\n\nOptionally takes a `size` (`"mini"`, `"small"`,` `"normal"`)',methods:[{name:"_getInput",docblock:null,modifiers:[],params:[],returns:null},{name:"getValue",docblock:null,modifiers:[],params:[],returns:null},{name:"getStringValue",docblock:null,modifiers:[],params:[],returns:null},{name:"parseInputValue",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"blur",docblock:null,modifiers:[],params:[],returns:null},{name:"setSelectionRange",docblock:null,modifiers:[],params:[{name:"selectionStart",optional:!1,type:null},{name:"selectionEnd",optional:!1,type:null}],returns:null},{name:"getSelectionStart",docblock:null,modifiers:[],params:[],returns:null},{name:"getSelectionEnd",docblock:null,modifiers:[],params:[],returns:null},{name:"_checkValidity",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"_handleChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"_handleFocus",docblock:null,modifiers:[],params:[],returns:null},{name:"_handleBlur",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"_onKeyDown",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"_setValue",docblock:null,modifiers:[],params:[{name:"val",optional:!1,type:null},{name:"format",optional:!1,type:null}],returns:null}],displayName:"NumberInput",props:{value:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},placeholder:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"union",value:[{name:"string"},{name:"number"}]},required:!1},format:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},onFormatChange:{defaultValue:{value:"() => null",computed:!1},description:"",type:{name:"func"},required:!1},checkValidity:{defaultValue:{value:"() => true",computed:!1},description:"",type:{name:"func"},required:!1},useArrowKeys:{defaultValue:{value:"false",computed:!1},required:!1},onChange:{description:"",type:{name:"func"},required:!0},size:{description:"",type:{name:"enum",value:[{value:'"mini"',computed:!1},{value:'"small"',computed:!1},{value:'"normal"',computed:!1}]},required:!1},label:{description:"",type:{name:"enum",value:[{value:'"put your labels outside your inputs!"',computed:!1}]},required:!1}}};export{o as N}; diff --git a/assets/number-input.stories-408TlbwR.js b/assets/number-input.stories-408TlbwR.js index 1611df5807..e1cb4e4de6 100644 --- a/assets/number-input.stories-408TlbwR.js +++ b/assets/number-input.stories-408TlbwR.js @@ -1,4 +1,4 @@ -import{a as l}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{N as j}from"./number-input-ogh82yD8.js";import"./v4-yQnnJER4.js";import"./jsx-runtime-63Ea5SlK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./index-dnMhQZ-1.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./i18n-context-fsWEgybQ.js";const G={title:"Perseus/Components/Number Input",component:j,args:{onChange:l("onChange"),onFormatChange:l("onFormatChange")}},e={},r={args:{value:1234567890}},a={args:{placeholder:"Sample placeholder"}},o={args:{size:"mini",placeholder:"Sample placeholder"}},s={args:{size:"small",placeholder:"Sample placeholder"}},p={args:{size:"normal",placeholder:"Sample placeholder"}};var m,c,t;e.parameters={...e.parameters,docs:{...(m=e.parameters)==null?void 0:m.docs,source:{originalSource:"{}",...(t=(c=e.parameters)==null?void 0:c.docs)==null?void 0:t.source}}};var n,i,d;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:`{ +import{a as l}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{N as j}from"./number-input-ogh82yD8.js";import"./v4-yQnnJER4.js";import"./jsx-runtime-63Ea5SlK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./index-dnMhQZ-1.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./i18n-context-fsWEgybQ.js";const G={title:"Perseus/Components/Number Input",component:j,args:{onChange:l("onChange"),onFormatChange:l("onFormatChange")}},e={},r={args:{value:1234567890}},a={args:{placeholder:"Sample placeholder"}},o={args:{size:"mini",placeholder:"Sample placeholder"}},s={args:{size:"small",placeholder:"Sample placeholder"}},p={args:{size:"normal",placeholder:"Sample placeholder"}};var m,c,t;e.parameters={...e.parameters,docs:{...(m=e.parameters)==null?void 0:m.docs,source:{originalSource:"{}",...(t=(c=e.parameters)==null?void 0:c.docs)==null?void 0:t.source}}};var n,i,d;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:`{ args: { value: 1234567890 } diff --git a/assets/number-line-editor-KKCgA0P-.js b/assets/number-line-editor-eS_UHnpw.js similarity index 96% rename from assets/number-line-editor-KKCgA0P-.js rename to assets/number-line-editor-eS_UHnpw.js index c53958aa2e..2e75ac6fe2 100644 --- a/assets/number-line-editor-KKCgA0P-.js +++ b/assets/number-line-editor-eS_UHnpw.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{i as v}from"./util-AYeX86gl.js";import"./article-renderer-mU-6RWLp.js";import{_ as x}from"./jquery-yG1GhClm.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import{c as j}from"./components-ODdjt0Ld.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{E as k}from"./editor-jsonify-g-bIiSIM.js";import{C as d}from"./index-V5gl6frG.js";import{P as n}from"./index-0C4KXdeC.js";import{r as C}from"./index-6oxdNXpR.js";const{ButtonGroup:w,InfoTip:r,NumberInput:o,RangeInput:R}=j,S=(g,s,t)=>Math.min(Math.max(g,s),t),q="–",p=class p extends C.Component{constructor(){super(...arguments),this.onRangeChange=s=>{this.props.onChange({range:s})},this.onLabelRangeChange=(s,t)=>{let l=this.props.labelRange.slice();const a=l[1-s];t==null||a==null?l[s]=t:l=[Math.min(t,a),Math.max(t,a)],this.props.onChange({labelRange:l})},this.onDivisionRangeChange=s=>{let t=this.props.numDivisions;t=S(t,s[0],s[1]),this.props.onChange({divisionRange:s,numDivisions:t})},this.onNumChange=(s,t)=>{const l={};l[s]=t,this.props.onChange(l)},this.onNumDivisionsChange=s=>{const t=this.props.divisionRange.slice();s=x.isFinite(s)?Math.round(s):0,s=s<0?s*-1:s,s&&(s=Math.min(t[1],Math.max(t[0],s)),this.props.onChange({tickStep:null,divisionRange:t,numDivisions:s}))},this.onTickStepChange=s=>{this.props.onChange({numDivisions:null,tickStep:s})},this.onChangeRelation=s=>{const t=s.target.value;this.props.onChange({correctRel:t,isInequality:t!=="eq"})},this.onLabelStyleChange=s=>{this.props.onChange({labelStyle:s})},this.serialize=()=>k.serialize.call(this)}render(){const s=this.props.range,t=this.props.labelRange,l=this.props.divisionRange;s[0]=+s[0],s[1]=+s[1];const a=s[1]-s[0],b=this.props.numDivisions,h=this.props.snapDivisions,f=this.props.tickStep,u=this.props.isTickCtrl;let c;u?c=null:c=f?f/h:a/b/h;const y=[{value:"decimal",content:"0.75",title:"Decimals"},{value:"improper",content:"⁷⁄₄",title:"Improper fractions"},{value:"mixed",content:"1¾",title:"Mixed numbers"},{value:"non-reduced",content:"⁸⁄₄",title:"Non-reduced"}];return e.jsxs("div",{className:"perseus-widget-number-line-editor",children:[e.jsxs("div",{className:"perseus-widget-row",children:["Correct x"," ",e.jsxs("select",{value:this.props.correctRel,onChange:this.onChangeRelation,"aria-label":"Select relationship",children:[e.jsx("option",{value:"eq","aria-label":"Equal",children:"="}),e.jsx("option",{value:"lt","aria-label":"Less than",children:"<"}),e.jsx("option",{value:"gt","aria-label":"Greater than",children:">"}),e.jsx("option",{value:"le","aria-label":"Less than or equal",children:"≤"}),e.jsx("option",{value:"ge","aria-label":"Greater than or equal",children:"≥"})]})," ",e.jsx(o,{value:this.props.correctX,format:this.props.labelStyle,onChange:this.onNumChange.bind(this,"correctX"),checkValidity:i=>i>=s[0]&&i<=s[1]&&(!c||v((i-s[0])/c)),placeholder:"answer",size:"normal",useArrowKeys:!0}),e.jsx(r,{children:e.jsx("p",{children:"This is the correct answer. The answer is validated (as right or wrong) by using only the end position of the point and the relation (=, <, >, ≤, ≥)."})})]}),e.jsxs("div",{className:"perseus-widget-row",children:[this.props.static?e.jsx("label",{children:"Range:"}):e.jsxs("label",{children:["Position:"," ",e.jsx(o,{value:this.props.initialX,format:this.props.labelStyle,onChange:this.onNumChange.bind(this,"initialX"),placeholder:s[0],checkValidity:i=>i>=s[0]&&i<=s[1],useArrowKeys:!0})," ∈ "]}),e.jsx(R,{value:s,onChange:this.onRangeChange,format:this.props.labelStyle,useArrowKeys:!0}),e.jsxs(r,{children:[e.jsxs("p",{children:["This controls the initial position of the point along the number line and the",e.jsx("strong",{children:"range"}),", the position of the endpoints of the number line. Setting the range constrains the position of the answer and the labels."]}),e.jsx("p",{children:"In static mode, the initial position of the point is determined by Correct x instead of position."})]})]}),e.jsx("div",{className:"perseus-widget-row",children:e.jsxs("div",{className:"perseus-widget-left-col",children:["Labels:"," ",e.jsx(o,{value:t[0],placeholder:s[0],format:this.props.labelStyle,checkValidity:i=>i>=s[0]&&i<=s[1],onChange:this.onLabelRangeChange.bind(this,0),useArrowKeys:!0}),e.jsx("span",{children:" & "}),e.jsx(o,{value:t[1],placeholder:s[1],format:this.props.labelStyle,checkValidity:i=>i>=s[0]&&i<=s[1],onChange:this.onLabelRangeChange.bind(this,1),useArrowKeys:!0}),e.jsx(r,{children:e.jsxs("p",{children:["This controls the position of the left / right labels. By default, the labels are set by the range ",e.jsx("br",{}),e.jsx("strong",{children:"Note:"})," Ensure that the labels line up with the tick marks, or it may be confusing for users."]})})]})}),e.jsxs("div",{className:"perseus-widget-row",children:["Style:"," ",e.jsx(w,{allowEmpty:!1,value:this.props.labelStyle,buttons:y,onChange:this.onLabelStyleChange}),e.jsx(r,{children:e.jsx("p",{children:"This controls the styling of the labels for the two main labels as well as all the tick mark labels, if applicable. Your choices are decimal, improper fractions, mixed fractions, and non-reduced fractions."})})]}),e.jsxs("div",{className:"perseus-widget-row",children:[!this.props.static&&e.jsx("div",{className:"perseus-widget-left-col",children:e.jsx(d,{label:"Show tick controller",checked:this.props.isTickCtrl,onChange:i=>{this.props.onChange({isTickCtrl:i})}})}),e.jsx("div",{className:"perseus-widget-right-col",children:e.jsx(d,{label:"Show label ticks",checked:this.props.labelTicks,onChange:i=>{this.props.onChange({labelTicks:i})}})})]}),e.jsx("div",{className:"perseus-widget-row",children:!this.props.static&&e.jsx(d,{label:"Show tooltips",checked:this.props.showTooltips,onChange:i=>{this.props.onChange({showTooltips:i})}})}),e.jsxs("div",{className:"perseus-widget-row",children:[u&&e.jsxs("span",{children:[e.jsxs("label",{children:["Start num divisions at"," ",e.jsx(o,{value:this.props.numDivisions||null,format:"decimal",onChange:this.onNumDivisionsChange,checkValidity:i=>i>=l[0]&&i<=l[1],placeholder:a/this.props.tickStep,useArrowKeys:!0})]}),e.jsx(r,{children:e.jsxs("p",{children:["This controls the number (and position) of the tick marks. The number of divisions is constrained to"," "+l[0]+q+l[1],".",e.jsx("br",{}),e.jsx("strong",{children:"Note:"})," The user will be able to specify the number of divisions in a number input."]})})]}),!u&&e.jsxs("span",{children:[e.jsxs("label",{children:["Num divisions:"," ",e.jsx(o,{value:this.props.numDivisions||null,format:"decimal",onChange:this.onNumDivisionsChange,checkValidity:i=>i>=l[0]&&i<=l[1],placeholder:a/this.props.tickStep,useArrowKeys:!0})]})," ",e.jsxs("label",{children:["or tick step:"," ",e.jsx(o,{value:this.props.tickStep||null,format:this.props.labelStyle,onChange:this.onTickStepChange,checkValidity:i=>i>0&&i<=a,placeholder:a/this.props.numDivisions,useArrowKeys:!0})]}),e.jsx(r,{children:e.jsxs("p",{children:["This controls the number (and position) of the tick marks; you can either set the number of divisions (2 divisions would split the entire range in two halves), or the tick step (the distance between ticks) and the other value will be updated accordingly."," ",e.jsx("br",{}),e.jsx("strong",{children:"Note:"})," There is no check to see if labels coordinate with the tick marks, which may be confusing for users if the blue labels and black ticks are off-step."]})})]})]}),e.jsxs("div",{className:"perseus-widget-row",children:[e.jsxs("label",{children:["Snap increments per tick:"," ",e.jsx(o,{value:h,checkValidity:i=>i>0,format:this.props.labelStyle,onChange:this.onNumChange.bind(this,"snapDivisions"),useArrowKeys:!0})]}),e.jsx(r,{children:e.jsxs("p",{children:["This determines the number of different places the point will snap between two adjacent tick marks."," ",e.jsx("br",{}),e.jsx("strong",{children:"Note:"}),"Ensure the required number of snap increments is provided to answer the question."]})})]})]})}};p.propTypes={range:n.arrayOf(n.number).isRequired,labelRange:n.arrayOf(n.number).isRequired,labelStyle:n.string.isRequired,labelTicks:n.bool,divisionRange:n.arrayOf(n.number).isRequired,numDivisions:n.number.isRequired,snapDivisions:n.number,tickStep:n.number,correctRel:n.oneOf(["lt","gt","le","ge","eq"]),correctX:n.number,initialX:n.number,isTickCtrl:n.bool,onChange:n.func.isRequired,static:n.bool,showTooltips:n.bool},p.widgetName="number-line",p.defaultProps={range:[0,10],labelRange:[null,null],labelStyle:"decimal",labelTicks:!0,divisionRange:[1,12],numDivisions:5,snapDivisions:2,tickStep:null,correctRel:"eq",correctX:null,initialX:null,showTooltips:!1};let m=p;m.__docgenInfo={description:"",methods:[{name:"onRangeChange",docblock:null,modifiers:[],params:[{name:"range",optional:!1,type:null}],returns:null},{name:"onLabelRangeChange",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null},{name:"num",optional:!1,type:null}],returns:null},{name:"onDivisionRangeChange",docblock:null,modifiers:[],params:[{name:"divisionRange",optional:!1,type:null}],returns:null},{name:"onNumChange",docblock:null,modifiers:[],params:[{name:"key",optional:!1,type:null},{name:"value",optional:!1,type:null}],returns:null},{name:"onNumDivisionsChange",docblock:null,modifiers:[],params:[{name:"numDivisions",optional:!1,type:null}],returns:null},{name:"onTickStepChange",docblock:null,modifiers:[],params:[{name:"tickStep",optional:!1,type:null}],returns:null},{name:"onChangeRelation",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"onLabelStyleChange",docblock:null,modifiers:[],params:[{name:"labelStyle",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"NumberLineEditor",props:{range:{defaultValue:{value:"[0, 10]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},labelRange:{defaultValue:{value:"[null, null]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},labelStyle:{defaultValue:{value:'"decimal"',computed:!1},description:"",type:{name:"string"},required:!1},labelTicks:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},divisionRange:{defaultValue:{value:"[1, 12]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},numDivisions:{defaultValue:{value:"5",computed:!1},description:"",type:{name:"number"},required:!1},snapDivisions:{defaultValue:{value:"2",computed:!1},description:"",type:{name:"number"},required:!1},tickStep:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},correctRel:{defaultValue:{value:'"eq"',computed:!1},description:"",type:{name:"enum",value:[{value:'"lt"',computed:!1},{value:'"gt"',computed:!1},{value:'"le"',computed:!1},{value:'"ge"',computed:!1},{value:'"eq"',computed:!1}]},required:!1},correctX:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},initialX:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},showTooltips:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},isTickCtrl:{description:"",type:{name:"bool"},required:!1},onChange:{description:"",type:{name:"func"},required:!0},static:{description:"",type:{name:"bool"},required:!1}}};export{m as N}; +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{i as v}from"./util-AYeX86gl.js";import"./article-renderer-HEYBK15c.js";import{_ as x}from"./jquery-yG1GhClm.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c as j}from"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{E as k}from"./editor-jsonify-mta12v4L.js";import{C as d}from"./index-V5gl6frG.js";import{P as n}from"./index-k-0mNqHS.js";import{r as C}from"./index-6oxdNXpR.js";const{ButtonGroup:w,InfoTip:r,NumberInput:o,RangeInput:R}=j,S=(g,s,t)=>Math.min(Math.max(g,s),t),q="–",p=class p extends C.Component{constructor(){super(...arguments),this.onRangeChange=s=>{this.props.onChange({range:s})},this.onLabelRangeChange=(s,t)=>{let l=this.props.labelRange.slice();const a=l[1-s];t==null||a==null?l[s]=t:l=[Math.min(t,a),Math.max(t,a)],this.props.onChange({labelRange:l})},this.onDivisionRangeChange=s=>{let t=this.props.numDivisions;t=S(t,s[0],s[1]),this.props.onChange({divisionRange:s,numDivisions:t})},this.onNumChange=(s,t)=>{const l={};l[s]=t,this.props.onChange(l)},this.onNumDivisionsChange=s=>{const t=this.props.divisionRange.slice();s=x.isFinite(s)?Math.round(s):0,s=s<0?s*-1:s,s&&(s=Math.min(t[1],Math.max(t[0],s)),this.props.onChange({tickStep:null,divisionRange:t,numDivisions:s}))},this.onTickStepChange=s=>{this.props.onChange({numDivisions:null,tickStep:s})},this.onChangeRelation=s=>{const t=s.target.value;this.props.onChange({correctRel:t,isInequality:t!=="eq"})},this.onLabelStyleChange=s=>{this.props.onChange({labelStyle:s})},this.serialize=()=>k.serialize.call(this)}render(){const s=this.props.range,t=this.props.labelRange,l=this.props.divisionRange;s[0]=+s[0],s[1]=+s[1];const a=s[1]-s[0],b=this.props.numDivisions,h=this.props.snapDivisions,f=this.props.tickStep,u=this.props.isTickCtrl;let c;u?c=null:c=f?f/h:a/b/h;const y=[{value:"decimal",content:"0.75",title:"Decimals"},{value:"improper",content:"⁷⁄₄",title:"Improper fractions"},{value:"mixed",content:"1¾",title:"Mixed numbers"},{value:"non-reduced",content:"⁸⁄₄",title:"Non-reduced"}];return e.jsxs("div",{className:"perseus-widget-number-line-editor",children:[e.jsxs("div",{className:"perseus-widget-row",children:["Correct x"," ",e.jsxs("select",{value:this.props.correctRel,onChange:this.onChangeRelation,"aria-label":"Select relationship",children:[e.jsx("option",{value:"eq","aria-label":"Equal",children:"="}),e.jsx("option",{value:"lt","aria-label":"Less than",children:"<"}),e.jsx("option",{value:"gt","aria-label":"Greater than",children:">"}),e.jsx("option",{value:"le","aria-label":"Less than or equal",children:"≤"}),e.jsx("option",{value:"ge","aria-label":"Greater than or equal",children:"≥"})]})," ",e.jsx(o,{value:this.props.correctX,format:this.props.labelStyle,onChange:this.onNumChange.bind(this,"correctX"),checkValidity:i=>i>=s[0]&&i<=s[1]&&(!c||v((i-s[0])/c)),placeholder:"answer",size:"normal",useArrowKeys:!0}),e.jsx(r,{children:e.jsx("p",{children:"This is the correct answer. The answer is validated (as right or wrong) by using only the end position of the point and the relation (=, <, >, ≤, ≥)."})})]}),e.jsxs("div",{className:"perseus-widget-row",children:[this.props.static?e.jsx("label",{children:"Range:"}):e.jsxs("label",{children:["Position:"," ",e.jsx(o,{value:this.props.initialX,format:this.props.labelStyle,onChange:this.onNumChange.bind(this,"initialX"),placeholder:s[0],checkValidity:i=>i>=s[0]&&i<=s[1],useArrowKeys:!0})," ∈ "]}),e.jsx(R,{value:s,onChange:this.onRangeChange,format:this.props.labelStyle,useArrowKeys:!0}),e.jsxs(r,{children:[e.jsxs("p",{children:["This controls the initial position of the point along the number line and the",e.jsx("strong",{children:"range"}),", the position of the endpoints of the number line. Setting the range constrains the position of the answer and the labels."]}),e.jsx("p",{children:"In static mode, the initial position of the point is determined by Correct x instead of position."})]})]}),e.jsx("div",{className:"perseus-widget-row",children:e.jsxs("div",{className:"perseus-widget-left-col",children:["Labels:"," ",e.jsx(o,{value:t[0],placeholder:s[0],format:this.props.labelStyle,checkValidity:i=>i>=s[0]&&i<=s[1],onChange:this.onLabelRangeChange.bind(this,0),useArrowKeys:!0}),e.jsx("span",{children:" & "}),e.jsx(o,{value:t[1],placeholder:s[1],format:this.props.labelStyle,checkValidity:i=>i>=s[0]&&i<=s[1],onChange:this.onLabelRangeChange.bind(this,1),useArrowKeys:!0}),e.jsx(r,{children:e.jsxs("p",{children:["This controls the position of the left / right labels. By default, the labels are set by the range ",e.jsx("br",{}),e.jsx("strong",{children:"Note:"})," Ensure that the labels line up with the tick marks, or it may be confusing for users."]})})]})}),e.jsxs("div",{className:"perseus-widget-row",children:["Style:"," ",e.jsx(w,{allowEmpty:!1,value:this.props.labelStyle,buttons:y,onChange:this.onLabelStyleChange}),e.jsx(r,{children:e.jsx("p",{children:"This controls the styling of the labels for the two main labels as well as all the tick mark labels, if applicable. Your choices are decimal, improper fractions, mixed fractions, and non-reduced fractions."})})]}),e.jsxs("div",{className:"perseus-widget-row",children:[!this.props.static&&e.jsx("div",{className:"perseus-widget-left-col",children:e.jsx(d,{label:"Show tick controller",checked:this.props.isTickCtrl,onChange:i=>{this.props.onChange({isTickCtrl:i})}})}),e.jsx("div",{className:"perseus-widget-right-col",children:e.jsx(d,{label:"Show label ticks",checked:this.props.labelTicks,onChange:i=>{this.props.onChange({labelTicks:i})}})})]}),e.jsx("div",{className:"perseus-widget-row",children:!this.props.static&&e.jsx(d,{label:"Show tooltips",checked:this.props.showTooltips,onChange:i=>{this.props.onChange({showTooltips:i})}})}),e.jsxs("div",{className:"perseus-widget-row",children:[u&&e.jsxs("span",{children:[e.jsxs("label",{children:["Start num divisions at"," ",e.jsx(o,{value:this.props.numDivisions||null,format:"decimal",onChange:this.onNumDivisionsChange,checkValidity:i=>i>=l[0]&&i<=l[1],placeholder:a/this.props.tickStep,useArrowKeys:!0})]}),e.jsx(r,{children:e.jsxs("p",{children:["This controls the number (and position) of the tick marks. The number of divisions is constrained to"," "+l[0]+q+l[1],".",e.jsx("br",{}),e.jsx("strong",{children:"Note:"})," The user will be able to specify the number of divisions in a number input."]})})]}),!u&&e.jsxs("span",{children:[e.jsxs("label",{children:["Num divisions:"," ",e.jsx(o,{value:this.props.numDivisions||null,format:"decimal",onChange:this.onNumDivisionsChange,checkValidity:i=>i>=l[0]&&i<=l[1],placeholder:a/this.props.tickStep,useArrowKeys:!0})]})," ",e.jsxs("label",{children:["or tick step:"," ",e.jsx(o,{value:this.props.tickStep||null,format:this.props.labelStyle,onChange:this.onTickStepChange,checkValidity:i=>i>0&&i<=a,placeholder:a/this.props.numDivisions,useArrowKeys:!0})]}),e.jsx(r,{children:e.jsxs("p",{children:["This controls the number (and position) of the tick marks; you can either set the number of divisions (2 divisions would split the entire range in two halves), or the tick step (the distance between ticks) and the other value will be updated accordingly."," ",e.jsx("br",{}),e.jsx("strong",{children:"Note:"})," There is no check to see if labels coordinate with the tick marks, which may be confusing for users if the blue labels and black ticks are off-step."]})})]})]}),e.jsxs("div",{className:"perseus-widget-row",children:[e.jsxs("label",{children:["Snap increments per tick:"," ",e.jsx(o,{value:h,checkValidity:i=>i>0,format:this.props.labelStyle,onChange:this.onNumChange.bind(this,"snapDivisions"),useArrowKeys:!0})]}),e.jsx(r,{children:e.jsxs("p",{children:["This determines the number of different places the point will snap between two adjacent tick marks."," ",e.jsx("br",{}),e.jsx("strong",{children:"Note:"}),"Ensure the required number of snap increments is provided to answer the question."]})})]})]})}};p.propTypes={range:n.arrayOf(n.number).isRequired,labelRange:n.arrayOf(n.number).isRequired,labelStyle:n.string.isRequired,labelTicks:n.bool,divisionRange:n.arrayOf(n.number).isRequired,numDivisions:n.number.isRequired,snapDivisions:n.number,tickStep:n.number,correctRel:n.oneOf(["lt","gt","le","ge","eq"]),correctX:n.number,initialX:n.number,isTickCtrl:n.bool,onChange:n.func.isRequired,static:n.bool,showTooltips:n.bool},p.widgetName="number-line",p.defaultProps={range:[0,10],labelRange:[null,null],labelStyle:"decimal",labelTicks:!0,divisionRange:[1,12],numDivisions:5,snapDivisions:2,tickStep:null,correctRel:"eq",correctX:null,initialX:null,showTooltips:!1};let m=p;m.__docgenInfo={description:"",methods:[{name:"onRangeChange",docblock:null,modifiers:[],params:[{name:"range",optional:!1,type:null}],returns:null},{name:"onLabelRangeChange",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null},{name:"num",optional:!1,type:null}],returns:null},{name:"onDivisionRangeChange",docblock:null,modifiers:[],params:[{name:"divisionRange",optional:!1,type:null}],returns:null},{name:"onNumChange",docblock:null,modifiers:[],params:[{name:"key",optional:!1,type:null},{name:"value",optional:!1,type:null}],returns:null},{name:"onNumDivisionsChange",docblock:null,modifiers:[],params:[{name:"numDivisions",optional:!1,type:null}],returns:null},{name:"onTickStepChange",docblock:null,modifiers:[],params:[{name:"tickStep",optional:!1,type:null}],returns:null},{name:"onChangeRelation",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"onLabelStyleChange",docblock:null,modifiers:[],params:[{name:"labelStyle",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"NumberLineEditor",props:{range:{defaultValue:{value:"[0, 10]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},labelRange:{defaultValue:{value:"[null, null]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},labelStyle:{defaultValue:{value:'"decimal"',computed:!1},description:"",type:{name:"string"},required:!1},labelTicks:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},divisionRange:{defaultValue:{value:"[1, 12]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},numDivisions:{defaultValue:{value:"5",computed:!1},description:"",type:{name:"number"},required:!1},snapDivisions:{defaultValue:{value:"2",computed:!1},description:"",type:{name:"number"},required:!1},tickStep:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},correctRel:{defaultValue:{value:'"eq"',computed:!1},description:"",type:{name:"enum",value:[{value:'"lt"',computed:!1},{value:'"gt"',computed:!1},{value:'"le"',computed:!1},{value:'"ge"',computed:!1},{value:'"eq"',computed:!1}]},required:!1},correctX:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},initialX:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},showTooltips:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},isTickCtrl:{description:"",type:{name:"bool"},required:!1},onChange:{description:"",type:{name:"func"},required:!0},static:{description:"",type:{name:"bool"},required:!1}}};export{m as N}; diff --git a/assets/number-line-editor.stories-mspSh-dG.js b/assets/number-line-editor.stories-WZ-TbfCq.js similarity index 74% rename from assets/number-line-editor.stories-mspSh-dG.js rename to assets/number-line-editor.stories-WZ-TbfCq.js index 5046e7ccee..fc08638780 100644 --- a/assets/number-line-editor.stories-mspSh-dG.js +++ b/assets/number-line-editor.stories-WZ-TbfCq.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{a as p}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{N as e}from"./number-line-editor-KKCgA0P-.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./article-renderer-mU-6RWLp.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./editor-jsonify-g-bIiSIM.js";import"./index-0C4KXdeC.js";const Zr={title:"PerseusEditor/Widgets/Number Line Editor"},r=a=>m.jsx(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{a as p}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{N as e}from"./number-line-editor-eS_UHnpw.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./article-renderer-HEYBK15c.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./editor-jsonify-mta12v4L.js";import"./index-k-0mNqHS.js";const Zr={title:"PerseusEditor/Widgets/Number Line Editor"},r=a=>m.jsx(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(o=r.parameters)==null?void 0:o.docs)==null?void 0:i.source}}};const $r=["Default"];export{r as Default,$r as __namedExportsOrder,Zr as default}; diff --git a/assets/number-line.stories-RfJVKqZT.js b/assets/number-line.stories-OPOlSgkX.js similarity index 86% rename from assets/number-line.stories-RfJVKqZT.js rename to assets/number-line.stories-OPOlSgkX.js index 3cf697af3e..8f72037ecb 100644 --- a/assets/number-line.stories-RfJVKqZT.js +++ b/assets/number-line.stories-OPOlSgkX.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{a as q}from"./mobile-keypad-Muuas9zV.js";import{R as m}from"./renderer-with-debug-ui-75hBDQJk.js";import{S as x}from"./server-item-renderer-with-debug-ui-jjme8wR5.js";import{T as C}from"./test-keypad-context-wrapper-qNJz2rBH.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./choice-Xr-SKHrB.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";import"./ke-score-ui-AQ1XUyPU.js";import"./test-dependencies-8Mfke9yn.js";import"./chunk-D5ZWXAHU-vR62DWf0.js";import"./v4-yQnnJER4.js";const k={content:`$E=2.5$ +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{a as q}from"./mobile-keypad-Muuas9zV.js";import{R as m}from"./renderer-with-debug-ui-Jq91P-PK.js";import{S as x}from"./server-item-renderer-with-debug-ui-Tcs9zCKY.js";import{T as C}from"./test-keypad-context-wrapper-qNJz2rBH.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./choice-Xr-SKHrB.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";import"./ke-score-ui-AQ1XUyPU.js";import"./test-dependencies-1Svp3QCw.js";import"./chunk-D5ZWXAHU-vR62DWf0.js";import"./v4-yQnnJER4.js";const k={content:`$E=2.5$ **Move the dot to $-E$ on the number line.** diff --git a/assets/numeric-input-editor-sonkoQhn.js b/assets/numeric-input-editor-SLlVbwKu.js similarity index 99% rename from assets/numeric-input-editor-sonkoQhn.js rename to assets/numeric-input-editor-SLlVbwKu.js index edd80e6b43..2ef8061e54 100644 --- a/assets/numeric-input-editor-sonkoQhn.js +++ b/assets/numeric-input-editor-SLlVbwKu.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{c as N}from"./article-renderer-mU-6RWLp.js";import{_ as o}from"./jquery-yG1GhClm.js";import{U as W}from"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import{c as I}from"./components-ODdjt0Ld.js";import{i as P}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import{P as E}from"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{E as C}from"./editor-jsonify-g-bIiSIM.js";import{C as b}from"./index-V5gl6frG.js";import{r as z}from"./index-6oxdNXpR.js";import{E as L}from"./editor-Mb85oHy5.js";import{c as F}from"./icon-paths-EoBkHOLI.js";const{ButtonGroup:k,InfoTip:m,InlineIcon:q,MultiButtonGroup:_,NumberInput:w,TextInput:$}=I,{firstNumericalParse:A}=W,M=[{title:"Integers",value:"integer",content:"6"},{title:"Decimals",value:"decimal",content:"0.75"},{title:"Proper fractions",value:"proper",content:"⅗"},{title:"Improper fractions",value:"improper",content:"⁷⁄₄"},{title:"Mixed numbers",value:"mixed",content:"1¾"},{title:"Numbers with π",value:"pi",content:"π"}],v=T=>({value:null,status:T,message:"",simplify:"required",answerForms:[],strict:!1,maxError:null}),y=class y extends z.Component{constructor(l){super(l),this.change=(...r)=>N.apply(this,r),this.onToggleOptions=r=>{const n=this.state.showOptions.slice();n[r]=!n[r],this.setState({showOptions:n})},this.onTrashAnswer=r=>{if(r>=0&&r{r.key===" "&&(r.preventDefault(),n.apply(this,s))},this.onStatusChange=r=>{const n=["wrong","ungraded","correct"],s=this.props.answers,u=o.indexOf(n,s[r].status),d=n[(u+1)%n.length];this.updateAnswer(r,{status:d,simplify:d==="correct"?"required":"accepted"})},this.updateAnswer=(r,n)=>{if(!o.isObject(n))return o.partial((u,d,c)=>{const h={};h[d]=c,this.updateAnswer(u,h)},r,n);let s=[...this.props.answers];if(r===s.length){const u=v(this.state.lastStatus);s=s.concat(u)}s[r]=o.extend({},s[r],n),this.props.onChange({answers:s})},this.addAnswer=()=>{const r=v(this.state.lastStatus),n=this.props.answers.concat(r);this.props.onChange({answers:n})},this.getSaveWarnings=()=>{const r=[];return o.contains(o.pluck(this.props.answers,"value"),"")&&r.push("One or more answers is empty"),this.props.answers.forEach((n,s)=>{n.strict&&(!n.answerForms||n.answerForms.length===0)&&r.push(`Answer ${s+1} is set to string format matching, but no format was selected`)}),r},this.serialize=()=>C.serialize.call(this),this.state={lastStatus:"wrong",showOptions:o.map(this.props.answers,()=>!1)}}render(){const l=this.props.answers,r=t=>e.jsxs("div",{className:"perseus-widget-row",children:[e.jsx("label",{children:"Unsimplified answers are"}),e.jsx(k,{value:l[t].simplify,allowEmpty:!1,buttons:[{value:"required",content:"ungraded"},{value:"optional",content:"accepted"},{value:"enforced",content:"wrong"}],onChange:this.updateAnswer(t,"simplify")||(()=>{})}),e.jsxs(m,{children:[e.jsx("p",{children:'Normally select "ungraded". This will give the user a message saying the answer is correct but not simplified. The user will then have to simplify it and re-enter, but will not be penalized. (5th grade and after)'}),e.jsx("p",{children:'Select "accepted" only if the user is not expected to know how to simplify fractions yet. (Anything prior to 5th grade)'}),e.jsxs("p",{children:['Select "wrong" ',e.jsx("em",{children:"only"})," if we are specifically assessing the ability to simplify."]})]})]}),n=t=>e.jsxs("div",{children:[e.jsxs("div",{className:"perseus-widget-row",children:[e.jsx("label",{children:"Choose the suggested answer formats"}),e.jsx(_,{buttons:M,values:l[t].answerForms,onChange:this.updateAnswer(t,"answerForms")||(()=>{})}),e.jsxs(m,{children:[e.jsx("p",{children:'Formats will be autoselected for you based on the given answer; to show no suggested formats and accept all types, simply have a decimal/integer be the answer. Values with π will have format "pi", and values that are fractions will have some subset (mixed will be "mixed" and "proper"; improper/proper will both be "improper" and "proper"). If you would like to specify that it is only a proper fraction (or only a mixed/improper fraction), deselect the other format. Except for specific cases, you should not need to change the autoselected formats.'}),e.jsxs("p",{children:["To restrict the answer to ",e.jsx("em",{children:"only"}),' an improper fraction (i.e. 7/4), select the improper fraction and toggle "strict" to true. This ',e.jsx("b",{children:"will not"})," ","accept 1.75 as an answer."," "]}),e.jsx("p",{children:"Unless you are testing that specific skill, please do not restrict the answer format."})]})]}),e.jsx("div",{className:"perseus-widget-row",children:e.jsx(b,{label:"Strictly match only these formats",checked:l[t].strict,onChange:i=>{this.updateAnswer.bind(this,t)({strict:i})}})})]}),s=t=>e.jsx("div",{className:"perseus-widget-row",children:e.jsxs("label",{children:["Max error"," ",e.jsx(w,{className:"max-error",value:l[t].maxError,onChange:this.updateAnswer(t,"maxError"),placeholder:"0"})]})}),u=e.jsxs("div",{className:"perseus-widget-row",children:[e.jsx("label",{children:"Width: "}),e.jsx(k,{value:this.props.size,allowEmpty:!1,buttons:[{value:"normal",content:"Normal (80px)"},{value:"small",content:"Small (40px)"}],onChange:this.change("size")}),e.jsx(m,{children:e.jsx("p",{children:'Use size "Normal" for all text boxes, unless there are multiple text boxes in one line and the answer area is too narrow to fit them.'})})]}),d=e.jsx("div",{className:"perseus-widget-row",children:e.jsx(b,{label:"Right alignment",checked:this.props.rightAlign,onChange:t=>{this.props.onChange({rightAlign:t})}})}),c=e.jsxs("div",{className:"perseus-widget-row",children:[e.jsxs("label",{children:["Aria label",e.jsx($,{value:this.props.labelText,onChange:this.change("labelText")})]}),e.jsx(m,{children:e.jsx("p",{children:"Text to describe this input. This will be shown to users using screenreaders."})})]}),h=e.jsx("div",{children:e.jsxs("div",{className:"perseus-widget-row",children:[e.jsx(b,{label:"Coefficient",checked:this.props.coefficient,onChange:t=>{this.props.onChange({coefficient:t})}}),e.jsx(m,{children:e.jsx("p",{children:"A coefficient style number allows the student to use - for -1 and an empty string to mean 1."})})]})}),R=e.jsx("div",{children:e.jsx("a",{href:"#",className:"simple-button orange",onClick:t=>{t.preventDefault(),this.addAnswer()},onKeyDown:t=>this.onSpace(t,this.addAnswer),children:e.jsx("span",{children:"Add new answer"})})}),O={wrong:"(address the mistake/misconception)",ungraded:"(explain in detail to avoid confusion)",correct:"(reinforce the user's understanding)"},x=()=>l.map((t,i)=>{const j=e.jsx(L,{apiOptions:this.props.apiOptions,content:t.message||"",placeholder:"Why is this answer "+t.status+"? "+O[t.status],widgetEnabled:!1,onChange:a=>{"content"in a&&this.updateAnswer(i,{message:a.content})}});return e.jsxs("div",{className:"perseus-widget-row",children:[e.jsxs("div",{className:"input-answer-editor-value-container"+(t.maxError?" with-max-error":""),children:[e.jsx(w,{value:t.value,className:"numeric-input-value",placeholder:"answer",format:o.last(t.answerForms||[]),onFormatChange:(a,g)=>{let p;g==="pi"?p=["pi"]:g==="mixed"?p=["proper","mixed"]:(g==="proper"||g==="improper")&&(p=["proper","improper"]),this.updateAnswer(i,{value:A(a,this.context.strings),answerForms:p})},onChange:a=>{this.updateAnswer(i,{value:A(a,this.context.strings)})}}),t.strict&&e.jsx("div",{className:"is-strict-indicator",title:"strictly equivalent to",children:"≡"}),t.simplify!=="required"&&t.status==="correct"&&e.jsx("div",{className:"simplify-indicator "+t.simplify,title:"accepts unsimplified answers",children:"‰"}),t.maxError?e.jsxs("div",{className:"max-error-container",children:[e.jsx("div",{className:"max-error-plusmn",children:"±"}),e.jsx(w,{placeholder:0,value:l[i].maxError,format:o.last(t.answerForms||[]),onChange:this.updateAnswer(i,"maxError")})]}):null,e.jsx("div",{className:"value-divider"}),e.jsx("a",{href:"#",className:"answer-status "+t.status,onClick:a=>{a.preventDefault(),this.onStatusChange(i)},onKeyDown:a=>this.onSpace(a,this.onStatusChange),children:t.status}),e.jsx("a",{href:"#",className:"answer-trash","aria-label":"Delete answer",onClick:a=>{a.preventDefault(),this.onTrashAnswer(i)},onKeyDown:a=>this.onSpace(a,this.onTrashAnswer),children:e.jsx(q,{...P})}),e.jsx("a",{href:"#",className:"options-toggle","aria-label":"Toggle options",onClick:a=>{a.preventDefault(),this.onToggleOptions(i)},onKeyDown:a=>this.onSpace(a,this.onToggleOptions),children:e.jsx(q,{...F})})]}),e.jsx("div",{className:"input-answer-editor-message",children:j}),this.state.showOptions[i]&&e.jsxs("div",{className:"options-container",children:[s(i),t.status==="correct"&&r(i),n(i)]})]},i)});return e.jsxs("div",{className:"perseus-input-number-editor",children:[e.jsx("div",{className:"ui-title",children:"User input"}),e.jsx("div",{className:"msg-title",children:"Message shown to user on attempt"}),x(),R,u,d,h,c]})}};y.contextType=E,y.widgetName="numeric-input",y.displayName="NumericInputEditor",y.defaultProps={answers:[v("correct")],size:"normal",coefficient:!1,labelText:"",rightAlign:!1};let f=y;f.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"onToggleOptions",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"onTrashAnswer",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"onSpace",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null},{name:"callback",optional:!1,type:null},{name:"...args",optional:!1,type:null}],returns:null},{name:"onStatusChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"updateAnswer",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"update",optional:!1,type:null}],returns:null},{name:"addAnswer",docblock:null,modifiers:[],params:[],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"NumericInputEditor",props:{answers:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{c as N}from"./article-renderer-HEYBK15c.js";import{_ as o}from"./jquery-yG1GhClm.js";import{U as W}from"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c as I}from"./components-ODdjt0Ld.js";import{i as P}from"./icon-paths-5JCXzGsq.js";import"./index-0C4KXdeC.js";import{P as E}from"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{E as C}from"./editor-jsonify-mta12v4L.js";import{C as b}from"./index-V5gl6frG.js";import{r as z}from"./index-6oxdNXpR.js";import{E as L}from"./editor-Gp3Qu6_d.js";import{c as F}from"./icon-paths-EoBkHOLI.js";const{ButtonGroup:k,InfoTip:m,InlineIcon:q,MultiButtonGroup:_,NumberInput:w,TextInput:$}=I,{firstNumericalParse:A}=W,M=[{title:"Integers",value:"integer",content:"6"},{title:"Decimals",value:"decimal",content:"0.75"},{title:"Proper fractions",value:"proper",content:"⅗"},{title:"Improper fractions",value:"improper",content:"⁷⁄₄"},{title:"Mixed numbers",value:"mixed",content:"1¾"},{title:"Numbers with π",value:"pi",content:"π"}],v=T=>({value:null,status:T,message:"",simplify:"required",answerForms:[],strict:!1,maxError:null}),y=class y extends z.Component{constructor(l){super(l),this.change=(...r)=>N.apply(this,r),this.onToggleOptions=r=>{const n=this.state.showOptions.slice();n[r]=!n[r],this.setState({showOptions:n})},this.onTrashAnswer=r=>{if(r>=0&&r{r.key===" "&&(r.preventDefault(),n.apply(this,s))},this.onStatusChange=r=>{const n=["wrong","ungraded","correct"],s=this.props.answers,u=o.indexOf(n,s[r].status),d=n[(u+1)%n.length];this.updateAnswer(r,{status:d,simplify:d==="correct"?"required":"accepted"})},this.updateAnswer=(r,n)=>{if(!o.isObject(n))return o.partial((u,d,c)=>{const h={};h[d]=c,this.updateAnswer(u,h)},r,n);let s=[...this.props.answers];if(r===s.length){const u=v(this.state.lastStatus);s=s.concat(u)}s[r]=o.extend({},s[r],n),this.props.onChange({answers:s})},this.addAnswer=()=>{const r=v(this.state.lastStatus),n=this.props.answers.concat(r);this.props.onChange({answers:n})},this.getSaveWarnings=()=>{const r=[];return o.contains(o.pluck(this.props.answers,"value"),"")&&r.push("One or more answers is empty"),this.props.answers.forEach((n,s)=>{n.strict&&(!n.answerForms||n.answerForms.length===0)&&r.push(`Answer ${s+1} is set to string format matching, but no format was selected`)}),r},this.serialize=()=>C.serialize.call(this),this.state={lastStatus:"wrong",showOptions:o.map(this.props.answers,()=>!1)}}render(){const l=this.props.answers,r=t=>e.jsxs("div",{className:"perseus-widget-row",children:[e.jsx("label",{children:"Unsimplified answers are"}),e.jsx(k,{value:l[t].simplify,allowEmpty:!1,buttons:[{value:"required",content:"ungraded"},{value:"optional",content:"accepted"},{value:"enforced",content:"wrong"}],onChange:this.updateAnswer(t,"simplify")||(()=>{})}),e.jsxs(m,{children:[e.jsx("p",{children:'Normally select "ungraded". This will give the user a message saying the answer is correct but not simplified. The user will then have to simplify it and re-enter, but will not be penalized. (5th grade and after)'}),e.jsx("p",{children:'Select "accepted" only if the user is not expected to know how to simplify fractions yet. (Anything prior to 5th grade)'}),e.jsxs("p",{children:['Select "wrong" ',e.jsx("em",{children:"only"})," if we are specifically assessing the ability to simplify."]})]})]}),n=t=>e.jsxs("div",{children:[e.jsxs("div",{className:"perseus-widget-row",children:[e.jsx("label",{children:"Choose the suggested answer formats"}),e.jsx(_,{buttons:M,values:l[t].answerForms,onChange:this.updateAnswer(t,"answerForms")||(()=>{})}),e.jsxs(m,{children:[e.jsx("p",{children:'Formats will be autoselected for you based on the given answer; to show no suggested formats and accept all types, simply have a decimal/integer be the answer. Values with π will have format "pi", and values that are fractions will have some subset (mixed will be "mixed" and "proper"; improper/proper will both be "improper" and "proper"). If you would like to specify that it is only a proper fraction (or only a mixed/improper fraction), deselect the other format. Except for specific cases, you should not need to change the autoselected formats.'}),e.jsxs("p",{children:["To restrict the answer to ",e.jsx("em",{children:"only"}),' an improper fraction (i.e. 7/4), select the improper fraction and toggle "strict" to true. This ',e.jsx("b",{children:"will not"})," ","accept 1.75 as an answer."," "]}),e.jsx("p",{children:"Unless you are testing that specific skill, please do not restrict the answer format."})]})]}),e.jsx("div",{className:"perseus-widget-row",children:e.jsx(b,{label:"Strictly match only these formats",checked:l[t].strict,onChange:i=>{this.updateAnswer.bind(this,t)({strict:i})}})})]}),s=t=>e.jsx("div",{className:"perseus-widget-row",children:e.jsxs("label",{children:["Max error"," ",e.jsx(w,{className:"max-error",value:l[t].maxError,onChange:this.updateAnswer(t,"maxError"),placeholder:"0"})]})}),u=e.jsxs("div",{className:"perseus-widget-row",children:[e.jsx("label",{children:"Width: "}),e.jsx(k,{value:this.props.size,allowEmpty:!1,buttons:[{value:"normal",content:"Normal (80px)"},{value:"small",content:"Small (40px)"}],onChange:this.change("size")}),e.jsx(m,{children:e.jsx("p",{children:'Use size "Normal" for all text boxes, unless there are multiple text boxes in one line and the answer area is too narrow to fit them.'})})]}),d=e.jsx("div",{className:"perseus-widget-row",children:e.jsx(b,{label:"Right alignment",checked:this.props.rightAlign,onChange:t=>{this.props.onChange({rightAlign:t})}})}),c=e.jsxs("div",{className:"perseus-widget-row",children:[e.jsxs("label",{children:["Aria label",e.jsx($,{value:this.props.labelText,onChange:this.change("labelText")})]}),e.jsx(m,{children:e.jsx("p",{children:"Text to describe this input. This will be shown to users using screenreaders."})})]}),h=e.jsx("div",{children:e.jsxs("div",{className:"perseus-widget-row",children:[e.jsx(b,{label:"Coefficient",checked:this.props.coefficient,onChange:t=>{this.props.onChange({coefficient:t})}}),e.jsx(m,{children:e.jsx("p",{children:"A coefficient style number allows the student to use - for -1 and an empty string to mean 1."})})]})}),R=e.jsx("div",{children:e.jsx("a",{href:"#",className:"simple-button orange",onClick:t=>{t.preventDefault(),this.addAnswer()},onKeyDown:t=>this.onSpace(t,this.addAnswer),children:e.jsx("span",{children:"Add new answer"})})}),O={wrong:"(address the mistake/misconception)",ungraded:"(explain in detail to avoid confusion)",correct:"(reinforce the user's understanding)"},x=()=>l.map((t,i)=>{const j=e.jsx(L,{apiOptions:this.props.apiOptions,content:t.message||"",placeholder:"Why is this answer "+t.status+"? "+O[t.status],widgetEnabled:!1,onChange:a=>{"content"in a&&this.updateAnswer(i,{message:a.content})}});return e.jsxs("div",{className:"perseus-widget-row",children:[e.jsxs("div",{className:"input-answer-editor-value-container"+(t.maxError?" with-max-error":""),children:[e.jsx(w,{value:t.value,className:"numeric-input-value",placeholder:"answer",format:o.last(t.answerForms||[]),onFormatChange:(a,g)=>{let p;g==="pi"?p=["pi"]:g==="mixed"?p=["proper","mixed"]:(g==="proper"||g==="improper")&&(p=["proper","improper"]),this.updateAnswer(i,{value:A(a,this.context.strings),answerForms:p})},onChange:a=>{this.updateAnswer(i,{value:A(a,this.context.strings)})}}),t.strict&&e.jsx("div",{className:"is-strict-indicator",title:"strictly equivalent to",children:"≡"}),t.simplify!=="required"&&t.status==="correct"&&e.jsx("div",{className:"simplify-indicator "+t.simplify,title:"accepts unsimplified answers",children:"‰"}),t.maxError?e.jsxs("div",{className:"max-error-container",children:[e.jsx("div",{className:"max-error-plusmn",children:"±"}),e.jsx(w,{placeholder:0,value:l[i].maxError,format:o.last(t.answerForms||[]),onChange:this.updateAnswer(i,"maxError")})]}):null,e.jsx("div",{className:"value-divider"}),e.jsx("a",{href:"#",className:"answer-status "+t.status,onClick:a=>{a.preventDefault(),this.onStatusChange(i)},onKeyDown:a=>this.onSpace(a,this.onStatusChange),children:t.status}),e.jsx("a",{href:"#",className:"answer-trash","aria-label":"Delete answer",onClick:a=>{a.preventDefault(),this.onTrashAnswer(i)},onKeyDown:a=>this.onSpace(a,this.onTrashAnswer),children:e.jsx(q,{...P})}),e.jsx("a",{href:"#",className:"options-toggle","aria-label":"Toggle options",onClick:a=>{a.preventDefault(),this.onToggleOptions(i)},onKeyDown:a=>this.onSpace(a,this.onToggleOptions),children:e.jsx(q,{...F})})]}),e.jsx("div",{className:"input-answer-editor-message",children:j}),this.state.showOptions[i]&&e.jsxs("div",{className:"options-container",children:[s(i),t.status==="correct"&&r(i),n(i)]})]},i)});return e.jsxs("div",{className:"perseus-input-number-editor",children:[e.jsx("div",{className:"ui-title",children:"User input"}),e.jsx("div",{className:"msg-title",children:"Message shown to user on attempt"}),x(),R,u,d,h,c]})}};y.contextType=E,y.widgetName="numeric-input",y.displayName="NumericInputEditor",y.defaultProps={answers:[v("correct")],size:"normal",coefficient:!1,labelText:"",rightAlign:!1};let f=y;f.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"onToggleOptions",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"onTrashAnswer",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"onSpace",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null},{name:"callback",optional:!1,type:null},{name:"...args",optional:!1,type:null}],returns:null},{name:"onStatusChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"updateAnswer",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"update",optional:!1,type:null}],returns:null},{name:"addAnswer",docblock:null,modifiers:[],params:[],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"NumericInputEditor",props:{answers:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ message: string; value: number; status: string; diff --git a/assets/numeric-input-editor.stories-FLoeN7y0.js b/assets/numeric-input-editor.stories-Y3RDrT8y.js similarity index 75% rename from assets/numeric-input-editor.stories-FLoeN7y0.js rename to assets/numeric-input-editor.stories-Y3RDrT8y.js index 0d2c2da6c6..ff497c26a1 100644 --- a/assets/numeric-input-editor.stories-FLoeN7y0.js +++ b/assets/numeric-input-editor.stories-Y3RDrT8y.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{a as p}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{N as e}from"./numeric-input-editor-sonkoQhn.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./editor-jsonify-g-bIiSIM.js";import"./editor-Mb85oHy5.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-qbKF8qYC.js";import"./index-wzSCRJFK.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";const it={title:"PerseusEditor/Widgets/NumericInput Editor"},r=a=>m.jsx(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{a as p}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{N as e}from"./numeric-input-editor-SLlVbwKu.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./editor-jsonify-mta12v4L.js";import"./editor-Gp3Qu6_d.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-XMME9ave.js";import"./index-wzSCRJFK.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";const it={title:"PerseusEditor/Widgets/NumericInput Editor"},r=a=>m.jsx(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(o=r.parameters)==null?void 0:o.docs)==null?void 0:i.source}}};const mt=["Default"];export{r as Default,mt as __namedExportsOrder,it as default}; diff --git a/assets/numeric-input.stories-YRCREnZ4.js b/assets/numeric-input.stories-TjXmqjKa.js similarity index 91% rename from assets/numeric-input.stories-YRCREnZ4.js rename to assets/numeric-input.stories-TjXmqjKa.js index 7e0daab49c..28ccdb212b 100644 --- a/assets/numeric-input.stories-YRCREnZ4.js +++ b/assets/numeric-input.stories-TjXmqjKa.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{a as i}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{R as q}from"./renderer-with-debug-ui-75hBDQJk.js";import{N as a}from"./article-renderer-mU-6RWLp.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./side-by-side-MBJuyilC.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-item-CWRjfKXr.js";import"./renderer-1DxKQj1_.js";import"./index-J2t_5nK1.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./hints-renderer-alc4yvsU.js";import"./shared-4TdECMLk.js";import"./base-radio-9_hKye4B.js";import"./choice-none-above-dRu7sfJj.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./hud-ifw9Ofbw.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./enums-x5qaTru7.js";import"./input-with-examples-YO5BCgg1.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./answer-choices-lVeJkx-U.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";const T={content:"$5008 \\div 4 =$ [[☃ numeric-input 1]] ",images:{},widgets:{"numeric-input 1":{graded:!0,version:{major:0,minor:0},static:!1,type:"numeric-input",options:{coefficient:!1,static:!1,answers:[{status:"correct",maxError:null,strict:!1,value:1252,simplify:"required",message:""}],labelText:"",size:"normal"},alignment:"default"}}};function p(e){return{...{alignment:"",answers:[],containerSizeClass:"medium",isLastUsedWidget:!0,coefficient:!1,currentValue:"",problemNum:0,rightAlign:!1,size:"normal",static:!1,widgetId:"widgetId",findWidgets:i("findWidgets"),onBlur:i("onBlur"),onChange:i("onChange"),onFocus:i("onFocus"),trackInteraction:i("trackInteraction")},...e}}const ge={title:"Perseus/Widgets/NumericInput",args:{coefficient:!1,currentValue:"8675309",rightAlign:!1},argTypes:{size:{options:["normal","small"],control:{type:"radio"},defaultValue:"normal"}}},o=()=>r.jsx(q,{question:T}),n=e=>{const t=p(e);return r.jsx(a,{...t})},s=e=>{const t=p({...e,size:"small"}),l=p({...e,size:"normal"});return r.jsxs("div",{children:[r.jsxs("label",{children:["Small:",r.jsx(a,{...t})]}),r.jsxs("label",{children:["Normal:",r.jsx(a,{...l})]})]})},m=e=>{const t=p({...e,rightAlign:!1}),l=p({...e,rightAlign:!0});return r.jsxs("div",{children:[r.jsxs("label",{children:["Left:",r.jsx(a,{...t})]}),r.jsxs("label",{children:["Right:",r.jsx(a,{...l})]})]})};o.__docgenInfo={description:"",methods:[],displayName:"Question1"};n.__docgenInfo={description:"",methods:[],displayName:"Interactive",props:{coefficient:{required:!0,tsType:{name:"boolean"},description:""},currentValue:{required:!0,tsType:{name:"string"},description:""},rightAlign:{required:!0,tsType:{name:"boolean"},description:""},size:{required:!0,tsType:{name:"union",raw:'"normal" | "small"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"small"'}]},description:""}}};s.__docgenInfo={description:"",methods:[],displayName:"Sizes",props:{coefficient:{required:!0,tsType:{name:"boolean"},description:""},currentValue:{required:!0,tsType:{name:"string"},description:""},rightAlign:{required:!0,tsType:{name:"boolean"},description:""},size:{required:!0,tsType:{name:"union",raw:'"normal" | "small"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"small"'}]},description:""}}};m.__docgenInfo={description:"",methods:[],displayName:"TextAlignment",props:{coefficient:{required:!0,tsType:{name:"boolean"},description:""},currentValue:{required:!0,tsType:{name:"string"},description:""},rightAlign:{required:!0,tsType:{name:"boolean"},description:""},size:{required:!0,tsType:{name:"union",raw:'"normal" | "small"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"small"'}]},description:""}}};var c,u,d;o.parameters={...o.parameters,docs:{...(c=o.parameters)==null?void 0:c.docs,source:{originalSource:`(): React.ReactElement => { +import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{a as i}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{R as q}from"./renderer-with-debug-ui-Jq91P-PK.js";import{N as a}from"./article-renderer-HEYBK15c.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./side-by-side-MBJuyilC.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-item-C-BdPaPl.js";import"./renderer-L37a98D_.js";import"./index-J2t_5nK1.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./hints-renderer-zzse9ai2.js";import"./shared-4TdECMLk.js";import"./base-radio-kypcKNEK.js";import"./choice-none-above-vDwffTnk.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./hud-ifw9Ofbw.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./register-all-widgets-for-testing-vNa20up7.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./enums-x5qaTru7.js";import"./input-with-examples-PaWkADGr.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./answer-choices-iyIz6W_C.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";const T={content:"$5008 \\div 4 =$ [[☃ numeric-input 1]] ",images:{},widgets:{"numeric-input 1":{graded:!0,version:{major:0,minor:0},static:!1,type:"numeric-input",options:{coefficient:!1,static:!1,answers:[{status:"correct",maxError:null,strict:!1,value:1252,simplify:"required",message:""}],labelText:"",size:"normal"},alignment:"default"}}};function p(e){return{...{alignment:"",answers:[],containerSizeClass:"medium",isLastUsedWidget:!0,coefficient:!1,currentValue:"",problemNum:0,rightAlign:!1,size:"normal",static:!1,widgetId:"widgetId",findWidgets:i("findWidgets"),onBlur:i("onBlur"),onChange:i("onChange"),onFocus:i("onFocus"),trackInteraction:i("trackInteraction")},...e}}const ge={title:"Perseus/Widgets/NumericInput",args:{coefficient:!1,currentValue:"8675309",rightAlign:!1},argTypes:{size:{options:["normal","small"],control:{type:"radio"},defaultValue:"normal"}}},o=()=>r.jsx(q,{question:T}),n=e=>{const t=p(e);return r.jsx(a,{...t})},s=e=>{const t=p({...e,size:"small"}),l=p({...e,size:"normal"});return r.jsxs("div",{children:[r.jsxs("label",{children:["Small:",r.jsx(a,{...t})]}),r.jsxs("label",{children:["Normal:",r.jsx(a,{...l})]})]})},m=e=>{const t=p({...e,rightAlign:!1}),l=p({...e,rightAlign:!0});return r.jsxs("div",{children:[r.jsxs("label",{children:["Left:",r.jsx(a,{...t})]}),r.jsxs("label",{children:["Right:",r.jsx(a,{...l})]})]})};o.__docgenInfo={description:"",methods:[],displayName:"Question1"};n.__docgenInfo={description:"",methods:[],displayName:"Interactive",props:{coefficient:{required:!0,tsType:{name:"boolean"},description:""},currentValue:{required:!0,tsType:{name:"string"},description:""},rightAlign:{required:!0,tsType:{name:"boolean"},description:""},size:{required:!0,tsType:{name:"union",raw:'"normal" | "small"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"small"'}]},description:""}}};s.__docgenInfo={description:"",methods:[],displayName:"Sizes",props:{coefficient:{required:!0,tsType:{name:"boolean"},description:""},currentValue:{required:!0,tsType:{name:"string"},description:""},rightAlign:{required:!0,tsType:{name:"boolean"},description:""},size:{required:!0,tsType:{name:"union",raw:'"normal" | "small"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"small"'}]},description:""}}};m.__docgenInfo={description:"",methods:[],displayName:"TextAlignment",props:{coefficient:{required:!0,tsType:{name:"boolean"},description:""},currentValue:{required:!0,tsType:{name:"string"},description:""},rightAlign:{required:!0,tsType:{name:"boolean"},description:""},size:{required:!0,tsType:{name:"union",raw:'"normal" | "small"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"small"'}]},description:""}}};var c,u,d;o.parameters={...o.parameters,docs:{...(c=o.parameters)==null?void 0:c.docs,source:{originalSource:`(): React.ReactElement => { return ; }`,...(d=(u=o.parameters)==null?void 0:u.docs)==null?void 0:d.source}}};var g,f,h;n.parameters={...n.parameters,docs:{...(g=n.parameters)==null?void 0:g.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const props = generateProps(args); diff --git a/assets/orderer.stories-FX3NncwV.js b/assets/orderer.stories-I0xjRDqz.js similarity index 84% rename from assets/orderer.stories-FX3NncwV.js rename to assets/orderer.stories-I0xjRDqz.js index 62aa3c868c..90cb2f7c1e 100644 --- a/assets/orderer.stories-FX3NncwV.js +++ b/assets/orderer.stories-I0xjRDqz.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{R as n}from"./renderer-with-debug-ui-75hBDQJk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const g={content:`**Without using a calculator, put the numbers in order from least to greatest.** +import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{R as n}from"./renderer-with-debug-ui-Jq91P-PK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const g={content:`**Without using a calculator, put the numbers in order from least to greatest.** [[☃ orderer 1]]`,images:{},widgets:{"orderer 1":{version:{major:0,minor:0},type:"orderer",graded:!0,options:{otherOptions:[],layout:"horizontal",options:[{content:"$10.9$",images:{},widgets:{}},{content:"$11$",images:{},widgets:{}},{content:"$\\sqrt{120}$",images:{},widgets:{}}],correctOptions:[{content:"$10.9$",images:{},widgets:{}},{content:"$\\sqrt{120}$",images:{},widgets:{}},{content:"$11$",images:{},widgets:{}}],height:"normal"}}}},c={content:`**Put $6$ flowers in the box.** diff --git a/assets/passage-ref.stories-AqKP_bbn.js b/assets/passage-ref.stories-zSAonG1e.js similarity index 91% rename from assets/passage-ref.stories-AqKP_bbn.js rename to assets/passage-ref.stories-zSAonG1e.js index 130702a6e1..868a8999c7 100644 --- a/assets/passage-ref.stories-AqKP_bbn.js +++ b/assets/passage-ref.stories-zSAonG1e.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-63Ea5SlK.js";import{V as d}from"./index-0DbkllkJ.js";import{R as l}from"./renderer-with-debug-ui-75hBDQJk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./choice-Xr-SKHrB.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const u={content:`[[☃ passage 1]] +import{j as o}from"./jsx-runtime-63Ea5SlK.js";import{V as d}from"./index-0DbkllkJ.js";import{R as l}from"./renderer-with-debug-ui-Jq91P-PK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./choice-Xr-SKHrB.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const u={content:`[[☃ passage 1]] We can see the word “promotes” is used in [[☃ passage-ref 1]] diff --git a/assets/passage.stories-ILaTIGpn.js b/assets/passage.stories-XjBiRvfn.js similarity index 93% rename from assets/passage.stories-ILaTIGpn.js rename to assets/passage.stories-XjBiRvfn.js index adb6ee447d..2ba12959f2 100644 --- a/assets/passage.stories-ILaTIGpn.js +++ b/assets/passage.stories-XjBiRvfn.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{V as g}from"./index-0DbkllkJ.js";import{R as f}from"./renderer-with-debug-ui-75hBDQJk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./choice-Xr-SKHrB.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const y={content:`[[☃ passage 1]] +import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{V as g}from"./index-0DbkllkJ.js";import{R as f}from"./renderer-with-debug-ui-Jq91P-PK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./choice-Xr-SKHrB.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const y={content:`[[☃ passage 1]] `,images:{},widgets:{"passage 1":{alignment:"default",graded:!0,options:{footnotes:"",passageText:`Sociologists study folktales because they provide a means of understanding the distinctive values of a culture. However, the folktales in almost all cultures are adaptations of the same ancient narratives to the local milieu. `,passageTitle:"",showLineNumbers:!1,static:!1},static:!1,type:"passage",version:{major:0,minor:0}}}},v={content:`>Select text to highlight it. *(Laptop/desktop only)* diff --git a/assets/perseus-api-1-ethIrW.js b/assets/perseus-api-1-ethIrW.js index 6f1d4b21e3..b1f8da7e83 100644 --- a/assets/perseus-api-1-ethIrW.js +++ b/assets/perseus-api-1-ethIrW.js @@ -1 +1 @@ -import{j as s}from"./jsx-runtime-63Ea5SlK.js";import{P as e}from"./index-k-0mNqHS.js";import{S as o}from"./stub-tag-editor-qMhJW4bS.js";const t={propTypes:e.shape({isArticle:e.bool.isRequired,onFocusChange:e.func.isRequired,GroupMetadataEditor:e.func.isRequired,showAlignmentOptions:e.bool.isRequired,readOnly:e.bool.isRequired,answerableCallback:e.func,getAnotherHint:e.func,interactionCallback:e.func,groupAnnotator:e.func.isRequired,imagePlaceholder:e.node,widgetPlaceholder:e.node,baseElements:e.shape({Link:e.func}),imagePreloader:e.func,trackInteraction:e.func,customKeypad:e.bool,nativeKeypadProxy:e.func,isMobile:e.bool,setDrawingAreaAvailable:e.func,hintProgressColor:e.string,canScrollPage:e.bool,crossOutEnabled:e.bool,editorChangeDelay:e.number}).isRequired,defaults:{isArticle:!1,isMobile:!1,onFocusChange:function(){},GroupMetadataEditor:o,showAlignmentOptions:!1,readOnly:!1,groupAnnotator:function(){return null},baseElements:{Link:r=>s.jsx("a",{...r})},setDrawingAreaAvailable:function(){},canScrollPage:!1,crossOutEnabled:!1,editorChangeDelay:0}},u={RENDERER:"perseus-renderer",TWO_COLUMN_RENDERER:"perseus-renderer-two-columns",RESPONSIVE_RENDERER:"perseus-renderer-responsive",INPUT:"perseus-input",FOCUSED:"perseus-focused",RADIO:{OPTION:"perseus-radio-option",SELECTED:"perseus-radio-selected",OPTION_CONTENT:"perseus-radio-option-content"},INTERACTIVE:"perseus-interactive",CORRECT:"perseus-correct",INCORRECT:"perseus-incorrect",UNANSWERED:"perseus-unanswered",MOBILE:"perseus-mobile"};export{t as A,u as C}; +import{j as s}from"./jsx-runtime-63Ea5SlK.js";import{P as e}from"./index-0C4KXdeC.js";import{S as o}from"./stub-tag-editor-qMhJW4bS.js";const t={propTypes:e.shape({isArticle:e.bool.isRequired,onFocusChange:e.func.isRequired,GroupMetadataEditor:e.func.isRequired,showAlignmentOptions:e.bool.isRequired,readOnly:e.bool.isRequired,answerableCallback:e.func,getAnotherHint:e.func,interactionCallback:e.func,groupAnnotator:e.func.isRequired,imagePlaceholder:e.node,widgetPlaceholder:e.node,baseElements:e.shape({Link:e.func}),imagePreloader:e.func,trackInteraction:e.func,customKeypad:e.bool,nativeKeypadProxy:e.func,isMobile:e.bool,setDrawingAreaAvailable:e.func,hintProgressColor:e.string,canScrollPage:e.bool,crossOutEnabled:e.bool,editorChangeDelay:e.number}).isRequired,defaults:{isArticle:!1,isMobile:!1,onFocusChange:function(){},GroupMetadataEditor:o,showAlignmentOptions:!1,readOnly:!1,groupAnnotator:function(){return null},baseElements:{Link:r=>s.jsx("a",{...r})},setDrawingAreaAvailable:function(){},canScrollPage:!1,crossOutEnabled:!1,editorChangeDelay:0}},u={RENDERER:"perseus-renderer",TWO_COLUMN_RENDERER:"perseus-renderer-two-columns",RESPONSIVE_RENDERER:"perseus-renderer-responsive",INPUT:"perseus-input",FOCUSED:"perseus-focused",RADIO:{OPTION:"perseus-radio-option",SELECTED:"perseus-radio-selected",OPTION_CONTENT:"perseus-radio-option-content"},INTERACTIVE:"perseus-interactive",CORRECT:"perseus-correct",INCORRECT:"perseus-incorrect",UNANSWERED:"perseus-unanswered",MOBILE:"perseus-mobile"};export{t as A,u as C}; diff --git a/assets/perseus-item-CWRjfKXr.js b/assets/perseus-item-C-BdPaPl.js similarity index 99% rename from assets/perseus-item-CWRjfKXr.js rename to assets/perseus-item-C-BdPaPl.js index 857f2e3c0e..fd48497f18 100644 --- a/assets/perseus-item-CWRjfKXr.js +++ b/assets/perseus-item-C-BdPaPl.js @@ -1,4 +1,4 @@ -import{a as Ne}from"./version-akiLXZts.js";import{w as Ee,F as Le,B as _e,I as Pe}from"./article-renderer-mU-6RWLp.js";import{r as $e,o as Fe,l as Ue,s as Se,R as fe,p as ce,q as Me}from"./renderer-1DxKQj1_.js";import{j as T}from"./jsx-runtime-63Ea5SlK.js";import{l as B}from"./index-awljIyHI.js";import{r as X}from"./index-6oxdNXpR.js";import{_ as re}from"./jquery-yG1GhClm.js";import{c as De}from"./asset-context-H6Iqp7Gi.js";import{P as ke}from"./i18n-context-fsWEgybQ.js";import{D as qe}from"./dependencies-CP7Uh8Kq.js";import{H as ae}from"./hints-renderer-alc4yvsU.js";import{A as He}from"./perseus-api-1-ethIrW.js";import{U as _}from"./util-AYeX86gl.js";import{P as I,E as z}from"./perseus-error-l3K_anoI.js";import{L as Ve}from"./svg-image-7aOK05RI.js";const Ge="@khanacademy/perseus",Ke="__lib_version__";Ne(Ge,Ke);const Je={major:0,minor:1};$e(Ee);const Be=Fe();Be["::renderer::"]=Je;const Xe={onRendered:r=>{}},Ye=X.createContext(Xe),J=class J extends X.Component{constructor(e){super(e),this._handleFocusChange=(t,i)=>{t!=null?this._setCurrentFocus(t):this._onRendererBlur(i)},this.handleInteractWithWidget=t=>{var s,h;const i=re.difference(this.state.questionHighlightedWidgets,[t]);this.setState({questionCompleted:!1,questionHighlightedWidgets:i}),(h=(s=this.props.apiOptions)==null?void 0:s.interactionCallback)==null||h.call(s,this.questionRenderer.getUserInputMap())},this.setAssetStatus=(t,i)=>{const s={...this.state.assetStatuses,[t]:i};this.setState({assetStatuses:s})},this.state={questionCompleted:!1,questionHighlightedWidgets:[],assetStatuses:{}},this._fullyRendered=!1}componentDidMount(){this._currentFocus=null,this._fullyRendered=!1}UNSAFE_componentWillReceiveProps(e){this.setState({questionHighlightedWidgets:[]})}componentDidUpdate(e,t){if(this.props.apiOptions.answerableCallback){const i=this.questionRenderer.emptyWidgets().length===0,{answerableCallback:s}=this.props.apiOptions;s&&s(i)}if(this._fullyRendered||Object.values(this.state.assetStatuses).every(Boolean)&&(this._fullyRendered=!0,this.props.onRendered(!0)),this.props.score&&this.props.score!==e.score){const i=this.questionRenderer.emptyWidgets();this.setState({questionCompleted:this.props.score.correct,questionHighlightedWidgets:i})}}componentWillUnmount(){this.blurTimeoutID!=null&&(clearTimeout(this.blurTimeoutID),this.blurTimeoutID=null)}_setCurrentFocus(e){const{apiOptions:{isMobile:t,onFocusChange:i},keypadElement:s}=this.props,h=this._currentFocus;this._currentFocus=e;const g=this.getInputPaths(),m=this._currentFocus&&g.some(q=>_.inputPathsEqual(q,this._currentFocus));i!=null&&setTimeout(()=>{const q=s==null?void 0:s.getDOMNode(),A=q&&m?q.getBoundingClientRect().height:0;i(this._currentFocus,h,A,m&&this.questionRenderer.getDOMNodeForPath(e))},0),s&&t&&(m?s.activate():s.dismiss())}_onRendererBlur(e){const t=this._currentFocus;re.isEqual(e,t)&&(this.blurTimeoutID=setTimeout(()=>{re.isEqual(this._currentFocus,t)&&this._setCurrentFocus(null)},0))}_setWidgetProps(e,t,i){this.questionRenderer._setWidgetProps(e,t,i)}setInputValue(e,t,i){return this.questionRenderer.setInputValue(e,t,i)}focusPath(e){return this.questionRenderer.focusPath(e)}blurPath(e){return this.questionRenderer.blurPath(e)}getDOMNodeForPath(e){return this.questionRenderer.getDOMNodeForPath(e)}getInputPaths(){return this.questionRenderer.getInputPaths()}focus(){return this.questionRenderer.focus()}blur(){this._currentFocus&&this.blurPath(this._currentFocus)}getNumHints(){return this.props.item.hints.length}getPromptJSON(){return this.questionRenderer.getPromptJSON()}getUserInputLegacy(){return this.questionRenderer.getUserInput()}getUserInput(){return this.questionRenderer.getUserInputMap()}scoreInput(){const e=this.getUserInput(),t=Se(this.props.item.question,e,this.context.strings,this.context.locale),i=[this.questionRenderer.getUserInput(),[]],s=_.keScoreFromPerseusScore(t,i,this.questionRenderer.getSerializedState()),h=this.questionRenderer.emptyWidgets();return this.setState({questionCompleted:s.correct,questionHighlightedWidgets:h}),s}getWidgetIds(){return this.questionRenderer.getWidgetIds()}getSerializedState(){return{question:this.questionRenderer.getSerializedState(),hints:this.hintsRenderer.getSerializedState()}}restoreSerializedState(e,t){let i=2;const s=()=>{--i,t&&i===0&&t()};this.questionRenderer.restoreSerializedState(e.question,s),this.hintsRenderer.restoreSerializedState(e.hints,s)}showRationalesForCurrentlySelectedChoices(){this.questionRenderer.showRationalesForCurrentlySelectedChoices()}deselectIncorrectSelectedChoices(){this.questionRenderer.deselectIncorrectSelectedChoices()}render(){const e={...He.defaults,...this.props.apiOptions,onFocusChange:this._handleFocusChange},t={assetStatuses:this.state.assetStatuses,setAssetStatus:this.setAssetStatus},i=T.jsx(De.Provider,{value:t,children:T.jsx(fe,{keypadElement:this.props.keypadElement,problemNum:this.props.problemNum,onInteractWithWidget:this.handleInteractWithWidget,highlightedWidgets:this.state.questionHighlightedWidgets,apiOptions:e,questionCompleted:this.state.questionCompleted,reviewMode:this.props.reviewMode,showSolutions:this.props.showSolutions,ref:h=>{h!=null&&(this.questionRenderer=h)},content:this.props.item.question.content,widgets:this.props.item.question.widgets,images:this.props.item.question.images,linterContext:ce(this.props.linterContext,"question"),strings:this.context.strings,...this.props.dependencies})}),s=T.jsx(ae,{hints:this.props.item.hints,hintsVisible:this.props.hintsVisible,apiOptions:e,ref:h=>this.hintsRenderer=h,linterContext:ce(this.props.linterContext,"hints"),strings:this.context.strings});return T.jsx(qe.Provider,{value:this.props.dependencies,children:T.jsxs("div",{children:[T.jsx("div",{children:i}),T.jsx("div",{className:e.isMobile?void 0:B.css(Qe.hintsContainer),children:s})]})})}};J.contextType=ke,J.defaultProps={apiOptions:{},linterContext:Ue,onRendered:e=>{}};let H=J;const Qe=B.StyleSheet.create({hintsContainer:{marginLeft:50}}),Ze=X.forwardRef((r,e)=>T.jsx(Ye.Consumer,{children:({onRendered:t})=>T.jsx(H,{...r,onRendered:t,ref:e})}));H.__docgenInfo={description:"",methods:[{name:"_handleFocusChange",docblock:null,modifiers:[],params:[{name:"newFocus",optional:!1,type:{name:"union",raw:"ReadonlyArray | null | undefined",elements:[{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},{name:"null"},{name:"undefined"}],alias:"FocusPath"}},{name:"oldFocus",optional:!1,type:{name:"union",raw:"ReadonlyArray | null | undefined",elements:[{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},{name:"null"},{name:"undefined"}],alias:"FocusPath"}}],returns:null},{name:"_setCurrentFocus",docblock:null,modifiers:[],params:[{name:"newFocus",optional:!1,type:{name:"union",raw:"ReadonlyArray | null | undefined",elements:[{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},{name:"null"},{name:"undefined"}],alias:"FocusPath"}}],returns:null},{name:"_onRendererBlur",docblock:null,modifiers:[],params:[{name:"blurPath",optional:!1,type:{name:"union",raw:"ReadonlyArray | null | undefined",elements:[{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},{name:"null"},{name:"undefined"}],alias:"FocusPath"}}],returns:null},{name:"_setWidgetProps",docblock:`Accepts a question area widgetId, or an answer area widgetId of +import{a as Ne}from"./version-akiLXZts.js";import{w as Ee,F as Le,B as _e,I as Pe}from"./article-renderer-HEYBK15c.js";import{r as $e,o as Fe,l as Ue,s as Se,R as fe,p as ce,q as Me}from"./renderer-L37a98D_.js";import{j as T}from"./jsx-runtime-63Ea5SlK.js";import{l as B}from"./index-awljIyHI.js";import{r as X}from"./index-6oxdNXpR.js";import{_ as re}from"./jquery-yG1GhClm.js";import{c as De}from"./asset-context-H6Iqp7Gi.js";import{P as ke}from"./i18n-context-fsWEgybQ.js";import{D as qe}from"./dependencies-CP7Uh8Kq.js";import{H as ae}from"./hints-renderer-zzse9ai2.js";import{A as He}from"./perseus-api-1-ethIrW.js";import{U as _}from"./util-AYeX86gl.js";import{P as I,E as z}from"./perseus-error-l3K_anoI.js";import{L as Ve}from"./svg-image-7aOK05RI.js";const Ge="@khanacademy/perseus",Ke="__lib_version__";Ne(Ge,Ke);const Je={major:0,minor:1};$e(Ee);const Be=Fe();Be["::renderer::"]=Je;const Xe={onRendered:r=>{}},Ye=X.createContext(Xe),J=class J extends X.Component{constructor(e){super(e),this._handleFocusChange=(t,i)=>{t!=null?this._setCurrentFocus(t):this._onRendererBlur(i)},this.handleInteractWithWidget=t=>{var s,h;const i=re.difference(this.state.questionHighlightedWidgets,[t]);this.setState({questionCompleted:!1,questionHighlightedWidgets:i}),(h=(s=this.props.apiOptions)==null?void 0:s.interactionCallback)==null||h.call(s,this.questionRenderer.getUserInputMap())},this.setAssetStatus=(t,i)=>{const s={...this.state.assetStatuses,[t]:i};this.setState({assetStatuses:s})},this.state={questionCompleted:!1,questionHighlightedWidgets:[],assetStatuses:{}},this._fullyRendered=!1}componentDidMount(){this._currentFocus=null,this._fullyRendered=!1}UNSAFE_componentWillReceiveProps(e){this.setState({questionHighlightedWidgets:[]})}componentDidUpdate(e,t){if(this.props.apiOptions.answerableCallback){const i=this.questionRenderer.emptyWidgets().length===0,{answerableCallback:s}=this.props.apiOptions;s&&s(i)}if(this._fullyRendered||Object.values(this.state.assetStatuses).every(Boolean)&&(this._fullyRendered=!0,this.props.onRendered(!0)),this.props.score&&this.props.score!==e.score){const i=this.questionRenderer.emptyWidgets();this.setState({questionCompleted:this.props.score.correct,questionHighlightedWidgets:i})}}componentWillUnmount(){this.blurTimeoutID!=null&&(clearTimeout(this.blurTimeoutID),this.blurTimeoutID=null)}_setCurrentFocus(e){const{apiOptions:{isMobile:t,onFocusChange:i},keypadElement:s}=this.props,h=this._currentFocus;this._currentFocus=e;const g=this.getInputPaths(),m=this._currentFocus&&g.some(q=>_.inputPathsEqual(q,this._currentFocus));i!=null&&setTimeout(()=>{const q=s==null?void 0:s.getDOMNode(),A=q&&m?q.getBoundingClientRect().height:0;i(this._currentFocus,h,A,m&&this.questionRenderer.getDOMNodeForPath(e))},0),s&&t&&(m?s.activate():s.dismiss())}_onRendererBlur(e){const t=this._currentFocus;re.isEqual(e,t)&&(this.blurTimeoutID=setTimeout(()=>{re.isEqual(this._currentFocus,t)&&this._setCurrentFocus(null)},0))}_setWidgetProps(e,t,i){this.questionRenderer._setWidgetProps(e,t,i)}setInputValue(e,t,i){return this.questionRenderer.setInputValue(e,t,i)}focusPath(e){return this.questionRenderer.focusPath(e)}blurPath(e){return this.questionRenderer.blurPath(e)}getDOMNodeForPath(e){return this.questionRenderer.getDOMNodeForPath(e)}getInputPaths(){return this.questionRenderer.getInputPaths()}focus(){return this.questionRenderer.focus()}blur(){this._currentFocus&&this.blurPath(this._currentFocus)}getNumHints(){return this.props.item.hints.length}getPromptJSON(){return this.questionRenderer.getPromptJSON()}getUserInputLegacy(){return this.questionRenderer.getUserInput()}getUserInput(){return this.questionRenderer.getUserInputMap()}scoreInput(){const e=this.getUserInput(),t=Se(this.props.item.question,e,this.context.strings,this.context.locale),i=[this.questionRenderer.getUserInput(),[]],s=_.keScoreFromPerseusScore(t,i,this.questionRenderer.getSerializedState()),h=this.questionRenderer.emptyWidgets();return this.setState({questionCompleted:s.correct,questionHighlightedWidgets:h}),s}getWidgetIds(){return this.questionRenderer.getWidgetIds()}getSerializedState(){return{question:this.questionRenderer.getSerializedState(),hints:this.hintsRenderer.getSerializedState()}}restoreSerializedState(e,t){let i=2;const s=()=>{--i,t&&i===0&&t()};this.questionRenderer.restoreSerializedState(e.question,s),this.hintsRenderer.restoreSerializedState(e.hints,s)}showRationalesForCurrentlySelectedChoices(){this.questionRenderer.showRationalesForCurrentlySelectedChoices()}deselectIncorrectSelectedChoices(){this.questionRenderer.deselectIncorrectSelectedChoices()}render(){const e={...He.defaults,...this.props.apiOptions,onFocusChange:this._handleFocusChange},t={assetStatuses:this.state.assetStatuses,setAssetStatus:this.setAssetStatus},i=T.jsx(De.Provider,{value:t,children:T.jsx(fe,{keypadElement:this.props.keypadElement,problemNum:this.props.problemNum,onInteractWithWidget:this.handleInteractWithWidget,highlightedWidgets:this.state.questionHighlightedWidgets,apiOptions:e,questionCompleted:this.state.questionCompleted,reviewMode:this.props.reviewMode,showSolutions:this.props.showSolutions,ref:h=>{h!=null&&(this.questionRenderer=h)},content:this.props.item.question.content,widgets:this.props.item.question.widgets,images:this.props.item.question.images,linterContext:ce(this.props.linterContext,"question"),strings:this.context.strings,...this.props.dependencies})}),s=T.jsx(ae,{hints:this.props.item.hints,hintsVisible:this.props.hintsVisible,apiOptions:e,ref:h=>this.hintsRenderer=h,linterContext:ce(this.props.linterContext,"hints"),strings:this.context.strings});return T.jsx(qe.Provider,{value:this.props.dependencies,children:T.jsxs("div",{children:[T.jsx("div",{children:i}),T.jsx("div",{className:e.isMobile?void 0:B.css(Qe.hintsContainer),children:s})]})})}};J.contextType=ke,J.defaultProps={apiOptions:{},linterContext:Ue,onRendered:e=>{}};let H=J;const Qe=B.StyleSheet.create({hintsContainer:{marginLeft:50}}),Ze=X.forwardRef((r,e)=>T.jsx(Ye.Consumer,{children:({onRendered:t})=>T.jsx(H,{...r,onRendered:t,ref:e})}));H.__docgenInfo={description:"",methods:[{name:"_handleFocusChange",docblock:null,modifiers:[],params:[{name:"newFocus",optional:!1,type:{name:"union",raw:"ReadonlyArray | null | undefined",elements:[{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},{name:"null"},{name:"undefined"}],alias:"FocusPath"}},{name:"oldFocus",optional:!1,type:{name:"union",raw:"ReadonlyArray | null | undefined",elements:[{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},{name:"null"},{name:"undefined"}],alias:"FocusPath"}}],returns:null},{name:"_setCurrentFocus",docblock:null,modifiers:[],params:[{name:"newFocus",optional:!1,type:{name:"union",raw:"ReadonlyArray | null | undefined",elements:[{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},{name:"null"},{name:"undefined"}],alias:"FocusPath"}}],returns:null},{name:"_onRendererBlur",docblock:null,modifiers:[],params:[{name:"blurPath",optional:!1,type:{name:"union",raw:"ReadonlyArray | null | undefined",elements:[{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},{name:"null"},{name:"undefined"}],alias:"FocusPath"}}],returns:null},{name:"_setWidgetProps",docblock:`Accepts a question area widgetId, or an answer area widgetId of the form "answer-input-number 1", or the string "answer-area" for the whole answer area (if the answer area is a single widget).`,modifiers:[],params:[{name:"widgetId",optional:!1,type:{name:"string"}},{name:"newProps",optional:!1,type:{name:"intersection",raw:"SharedRendererProps & OwnProps & HOCProps",elements:[{name:"signature",type:"object",raw:`{ apiOptions: APIOptions; @@ -1865,22 +1865,34 @@ the available choices.`}]}}],raw:`Readonly<{ */ answer: any; }`,signature:{properties:[{key:"question",value:{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -3332,14 +3344,15 @@ the available choices.`}]}}],raw:`Readonly<{ major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]},required:!0}},{key:"hints",value:{name:"ReadonlyArray",elements:[{name:"intersection",raw:`PerseusRenderer & { +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]},required:!0}},{key:"hints",value:{name:"ReadonlyArray",elements:[{name:"intersection",raw:`PerseusRenderer & { /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one @@ -3347,22 +3360,34 @@ the available choices.`}]}}],raw:`Readonly<{ */ replace?: boolean; }`,elements:[{name:"signature",type:"object",raw:`{ - // Translatable Markdown content to be rendered. May include references to - // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). - // For each image found in this content, there can be an entry in the - // \`images\` dict (below) with the key being the image's url which defines - // additional attributes for the image. + /** + * Translatable Markdown content to be rendered. May include references to + * widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). + * For each image found in this content, there can be an entry in the + * \`images\` dict (below) with the key being the image's url which defines + * additional attributes for the image. + */ content: string; - // A dictionary of {[widgetName]: Widget} to be referenced from the content field + /** + * A dictionary of {[widgetName]: Widget} to be referenced from the content + * field. + */ widgets: PerseusWidgetsMap; - // Used in the PerseusGradedGroup widget. A list of "tags" that are keys that represent other content in the system. Not rendered to the user. + // Used in the PerseusGradedGroup widget. A list of "tags" that are keys + // that represent other content in the system. Not rendered to the user. // NOTE: perseus_data.go says this is required even though it isn't necessary. metadata?: ReadonlyArray; - // A dictionary of {[imageUrl]: PerseusImageDetail}. + /** + * A dictionary of {[imageUrl]: PerseusImageDetail}. + */ images: { - [key: string]: PerseusImageDetail; + [imageUrl: string]: PerseusImageDetail; }; -}`,signature:{properties:[{key:"content",value:{name:"string",required:!0}},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"content",value:{name:"string",required:!0},description:`Translatable Markdown content to be rendered. May include references to +widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). +For each image found in this content, there can be an entry in the +\`images\` dict (below) with the key being the image's url which defines +additional attributes for the image.`},{key:"widgets",value:{name:"intersection",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n} & {\n [key in `cs-program ${number}`]: CSProgramWidget;\n} & {\n [key in `definition ${number}`]: DefinitionWidget;\n} & {\n [key in `dropdown ${number}`]: DropdownWidget;\n} & {\n [key in `explanation ${number}`]: ExplanationWidget;\n} & {\n [key in `expression ${number}`]: ExpressionWidget;\n} & {\n [key in `grapher ${number}`]: GrapherWidget;\n} & {\n [key in `group ${number}`]: GroupWidget;\n} & {\n [key in `graded-group ${number}`]: GradedGroupWidget;\n} & {\n [key in `graded-group-set ${number}`]: GradedGroupSetWidget;\n} & {\n [key in `iframe ${number}`]: IFrameWidget;\n} & {\n [key in `image ${number}`]: ImageWidget;\n} & {\n [key in `input-number ${number}`]: InputNumberWidget;\n} & {\n [key in `interaction ${number}`]: InteractionWidget;\n} & {\n [key in `interactive-graph ${number}`]: InteractiveGraphWidget;\n} & {\n [key in `label-image ${number}`]: LabelImageWidget;\n} & {\n [key in `matcher ${number}`]: MatcherWidget;\n} & {\n [key in `matrix ${number}`]: MatrixWidget;\n} & {\n [key in `measurer ${number}`]: MeasurerWidget;\n} & {\n [key in `molecule-renderer ${number}`]: MoleculeRendererWidget;\n} & {\n [key in `number-line ${number}`]: NumberLineWidget;\n} & {\n [key in `numeric-input ${number}`]: NumericInputWidget;\n} & {\n [key in `orderer ${number}`]: OrdererWidget;\n} & {\n [key in `passage ${number}`]: PassageWidget;\n} & {\n [key in `passage-ref ${number}`]: PassageRefWidget;\n} & {\n [key in `passage-ref-target ${number}`]: PassageRefWidget;\n} & {\n [key in `phet-simulation ${number}`]: PhetSimulationWidget;\n} & {\n [key in `plotter ${number}`]: PlotterWidget;\n} & {\n [key in `python-program ${number}`]: PythonProgramWidget;\n} & {\n [key in `radio ${number}`]: RadioWidget;\n} & {\n [key in `sorter ${number}`]: SorterWidget;\n} & {\n [key in `table ${number}`]: TableWidget;\n} & {\n [key in `video ${number}`]: VideoWidget;\n}",elements:[{name:"signature",type:"object",raw:"{\n [key in `categorizer ${number}`]: CategorizerWidget;\n}",signature:{properties:[{key:{name:"literal",value:"`categorizer ${number}`",required:!0},value:{name:"signature",type:"object",raw:`{ // The "type" of widget which will define what the Options field looks like type: Type; // Whether this widget is displayed with the values and is immutable. For display only @@ -4814,14 +4839,15 @@ the available choices.`}]}}],raw:`Readonly<{ major: number; // The minor part of the version minor: number; -}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0}},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ - [key: string]: PerseusImageDetail; +}`,signature:{properties:[{key:"major",value:{name:"number",required:!0}},{key:"minor",value:{name:"number",required:!0}}]},required:!1}}]}}}]}}],required:!0},description:`A dictionary of {[widgetName]: Widget} to be referenced from the content +field.`},{key:"metadata",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!1}},{key:"images",value:{name:"signature",type:"object",raw:`{ + [imageUrl: string]: PerseusImageDetail; }`,signature:{properties:[{key:{name:"string"},value:{name:"signature",type:"object",raw:`{ // The width of the image width: number; // the height of the image height: number; -}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0}}]},required:!0},{name:"signature",type:"object",raw:`{ +}`,signature:{properties:[{key:"width",value:{name:"number",required:!0}},{key:"height",value:{name:"number",required:!0}}]},required:!0}}]},required:!0},description:"A dictionary of {[imageUrl]: PerseusImageDetail}."}]},required:!0},{name:"signature",type:"object",raw:`{ /** * When \`true\`, causes the previous hint to be replaced with this hint when * displayed. When \`false\`, the previous hint remains visible when this one diff --git a/assets/phet-simulation-editor-33ykehAu.js b/assets/phet-simulation-editor-O5PngvYE.js similarity index 89% rename from assets/phet-simulation-editor-33ykehAu.js rename to assets/phet-simulation-editor-O5PngvYE.js index 0c54b6e455..3cf3d9d6b3 100644 --- a/assets/phet-simulation-editor-33ykehAu.js +++ b/assets/phet-simulation-editor-O5PngvYE.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import{m as o}from"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{l as s}from"./index-V5gl6frG.js";import{s as n}from"./index-deFLJwr4.js";import{r as p}from"./index-6oxdNXpR.js";const r=class r extends p.Component{constructor(){super(...arguments),this.getSaveWarnings=()=>o(this.props.url,"en")===null?["Please enter a URL from the PhET domain."]:[]}serialize(){return{url:this.props.url,description:this.props.description}}render(){return t.jsxs("div",{children:[t.jsx(s,{label:"URL",value:this.props.url,onChange:e=>this.props.onChange({url:e}),style:{marginBottom:n.large_24}}),t.jsx(s,{label:"Description",value:this.props.description,onChange:e=>this.props.onChange({description:e})})]})}};r.defaultProps={url:"",description:""},r.widgetName="phet-simulation";let i=r;i.__docgenInfo={description:"",methods:[{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"signature",type:"object",raw:`{ +import{j as t}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import{m as o}from"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{l as s}from"./index-V5gl6frG.js";import{s as n}from"./index-deFLJwr4.js";import{r as p}from"./index-6oxdNXpR.js";const r=class r extends p.Component{constructor(){super(...arguments),this.getSaveWarnings=()=>o(this.props.url,"en")===null?["Please enter a URL from the PhET domain."]:[]}serialize(){return{url:this.props.url,description:this.props.description}}render(){return t.jsxs("div",{children:[t.jsx(s,{label:"URL",value:this.props.url,onChange:e=>this.props.onChange({url:e}),style:{marginBottom:n.large_24}}),t.jsx(s,{label:"Description",value:this.props.description,onChange:e=>this.props.onChange({description:e})})]})}};r.defaultProps={url:"",description:""},r.widgetName="phet-simulation";let i=r;i.__docgenInfo={description:"",methods:[{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"signature",type:"object",raw:`{ // A URL to display, must start with https://phet.colorado.edu/ url: string; // Translatable Text; Description of the sim for Khanmigo and alt text diff --git a/assets/phet-simulation-editor.stories-yDj0B-wt.js b/assets/phet-simulation-editor.stories-lf-pScPa.js similarity index 80% rename from assets/phet-simulation-editor.stories-yDj0B-wt.js rename to assets/phet-simulation-editor.stories-lf-pScPa.js index 20d5192fd1..503acc48dc 100644 --- a/assets/phet-simulation-editor.stories-yDj0B-wt.js +++ b/assets/phet-simulation-editor.stories-lf-pScPa.js @@ -1,4 +1,4 @@ -import{a as m}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{P as p}from"./phet-simulation-editor-33ykehAu.js";import"./v4-yQnnJER4.js";import"./jsx-runtime-63Ea5SlK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";const Rr={component:p,title:"PerseusEditor/Widgets/PhET Simulation Editor"},r={args:{onChange:m("onChange")}};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`{ +import{a as m}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{P as p}from"./phet-simulation-editor-O5PngvYE.js";import"./v4-yQnnJER4.js";import"./jsx-runtime-63Ea5SlK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";const Rr={component:p,title:"PerseusEditor/Widgets/PhET Simulation Editor"},r={args:{onChange:m("onChange")}};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`{ args: { onChange: action("onChange") } diff --git a/assets/plotter.stories-3f3jnoY4.js b/assets/plotter.stories-NTW2gVcH.js similarity index 82% rename from assets/plotter.stories-3f3jnoY4.js rename to assets/plotter.stories-NTW2gVcH.js index 5dff0c2cb7..bd685af1b8 100644 --- a/assets/plotter.stories-3f3jnoY4.js +++ b/assets/plotter.stories-NTW2gVcH.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{V as m}from"./index-0DbkllkJ.js";import{R as s}from"./renderer-with-debug-ui-75hBDQJk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./choice-Xr-SKHrB.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const n={content:`The elementary school principal asked teachers to report the number of students absent in each grade during the past week. +import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{V as m}from"./index-0DbkllkJ.js";import{R as s}from"./renderer-with-debug-ui-Jq91P-PK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./choice-Xr-SKHrB.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const n={content:`The elementary school principal asked teachers to report the number of students absent in each grade during the past week. **Create a bar graph to show how many students were absent in each grade.** diff --git a/assets/preview-XhkJC14Q.js b/assets/preview-01T2A3H0.js similarity index 74% rename from assets/preview-XhkJC14Q.js rename to assets/preview-01T2A3H0.js index 279886e74a..421a3d6639 100644 --- a/assets/preview-XhkJC14Q.js +++ b/assets/preview-01T2A3H0.js @@ -1,7 +1,7 @@ -import{_ as a}from"./iframe-7Gh6p0LC.js";import"../sb-preview/runtime.js";var i=Object.entries(globalThis.TAGS_OPTIONS??{}).reduce((e,r)=>{let[t,o]=r;return o.excludeFromDocsStories&&(e[t]=!0),e},{}),d={docs:{renderer:async()=>{let{DocsRenderer:e}=await a(()=>import("./DocsRenderer-CFRXHY34-FMg1UtII.js").then(r=>r.ak),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url);return new e},stories:{filter:e=>{var r;return(e.tags||[]).filter(t=>i[t]).length===0&&!((r=e.parameters.docs)!=null&&r.disable)}}}};export{d as parameters}; +import{_ as a}from"./iframe-8qXcTeqo.js";import"../sb-preview/runtime.js";var i=Object.entries(globalThis.TAGS_OPTIONS??{}).reduce((e,r)=>{let[t,o]=r;return o.excludeFromDocsStories&&(e[t]=!0),e},{}),d={docs:{renderer:async()=>{let{DocsRenderer:e}=await a(()=>import("./DocsRenderer-CFRXHY34-9NOLoDuI.js").then(r=>r.ak),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url);return new e},stories:{filter:e=>{var r;return(e.tags||[]).filter(t=>i[t]).length===0&&!((r=e.parameters.docs)!=null&&r.disable)}}}};export{d as parameters}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./DocsRenderer-CFRXHY34-FMg1UtII.js","./iframe-7Gh6p0LC.js","./index-6oxdNXpR.js","./_commonjsHelpers-4gQjN7DL.js","./jsx-runtime-63Ea5SlK.js","./index-9gkyvru-.js","./index-4FLvW62B.js","./index-mQRHDdot.js","./index-PPLHz8o0.js","./react-18-8FLnVqma.js","./client-Rb4DelHy.js"] + __vite__mapDeps.viteFileDeps = ["./DocsRenderer-CFRXHY34-9NOLoDuI.js","./iframe-8qXcTeqo.js","./index-6oxdNXpR.js","./_commonjsHelpers-4gQjN7DL.js","./jsx-runtime-63Ea5SlK.js","./index-9gkyvru-.js","./index-4FLvW62B.js","./index-mQRHDdot.js","./index-PPLHz8o0.js","./react-18-8FLnVqma.js","./client-Rb4DelHy.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } diff --git a/assets/preview-zNCj1UwK.js b/assets/preview-5Dzz1ByX.js similarity index 94% rename from assets/preview-zNCj1UwK.js rename to assets/preview-5Dzz1ByX.js index 852c6d760c..46a7597f18 100644 --- a/assets/preview-zNCj1UwK.js +++ b/assets/preview-5Dzz1ByX.js @@ -1,4 +1,4 @@ -import{_ as S}from"./iframe-7Gh6p0LC.js";import"../sb-preview/runtime.js";const{addons:f}=__STORYBOOK_MODULE_PREVIEW_API__,{global:U}=__STORYBOOK_MODULE_GLOBAL__;var o="storybook/a11y",y=`${o}/result`,L=`${o}/request`,d=`${o}/running`,A=`${o}/error`,T=`${o}/manual`,r={RESULT:y,REQUEST:L,RUNNING:d,ERROR:A,MANUAL:T},{document:g}=U,a=f.getChannel(),l=!1,_,R={config:{},options:{}},v=async(n,e)=>{e!=null&&e.manual||await i(n,e??R)},i=async(n,e=R)=>{_=n;try{if(!l){l=!0,a.emit(r.RUNNING);let{default:t}=await S(()=>import("./axe-5GIt4bd5.js").then(N=>N.a),__vite__mapDeps([0,1]),import.meta.url),{element:m="#storybook-root",config:s,options:O={}}=e,E=g.querySelector(m);if(!E)return;t.reset(),s&&t.configure(s);let c=await t.run(E,O),u=JSON.parse(JSON.stringify(c));_===n?a.emit(r.RESULT,u):(l=!1,i(_))}}catch(t){a.emit(r.ERROR,t)}finally{l=!1}};a.on(r.REQUEST,v);a.on(r.MANUAL,i); +import{_ as S}from"./iframe-8qXcTeqo.js";import"../sb-preview/runtime.js";const{addons:f}=__STORYBOOK_MODULE_PREVIEW_API__,{global:U}=__STORYBOOK_MODULE_GLOBAL__;var o="storybook/a11y",y=`${o}/result`,L=`${o}/request`,d=`${o}/running`,A=`${o}/error`,T=`${o}/manual`,r={RESULT:y,REQUEST:L,RUNNING:d,ERROR:A,MANUAL:T},{document:g}=U,a=f.getChannel(),l=!1,_,R={config:{},options:{}},v=async(n,e)=>{e!=null&&e.manual||await i(n,e??R)},i=async(n,e=R)=>{_=n;try{if(!l){l=!0,a.emit(r.RUNNING);let{default:t}=await S(()=>import("./axe-5GIt4bd5.js").then(N=>N.a),__vite__mapDeps([0,1]),import.meta.url),{element:m="#storybook-root",config:s,options:O={}}=e,E=g.querySelector(m);if(!E)return;t.reset(),s&&t.configure(s);let c=await t.run(E,O),u=JSON.parse(JSON.stringify(c));_===n?a.emit(r.RESULT,u):(l=!1,i(_))}}catch(t){a.emit(r.ERROR,t)}finally{l=!1}};a.on(r.REQUEST,v);a.on(r.MANUAL,i); function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { __vite__mapDeps.viteFileDeps = ["./axe-5GIt4bd5.js","./_commonjsHelpers-4gQjN7DL.js"] diff --git a/assets/preview-HbvAqadz.js b/assets/preview-b5Ms5gLJ.js similarity index 78% rename from assets/preview-HbvAqadz.js rename to assets/preview-b5Ms5gLJ.js index 443e1ef593..005b6c87b2 100644 --- a/assets/preview-HbvAqadz.js +++ b/assets/preview-b5Ms5gLJ.js @@ -1 +1 @@ -import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{c as i}from"./index-deFLJwr4.js";import{R as p}from"./index-0DbkllkJ.js";import"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import{D as m,s as e}from"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{s,a}from"./test-dependencies-8Mfke9yn.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-18qWGOW7.js";import"./index-dnMhQZ-1.js";import"./perseus-error-l3K_anoI.js";import"./index-Dfd6auV6.js";import"./input-with-examples-YO5BCgg1.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./icon-paths-5JCXzGsq.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./Popper-Y5KDXl-P.js";import"./answer-choices-lVeJkx-U.js";import"./index-469F30Ub.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./asset-context-H6Iqp7Gi.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./fixed-to-responsive-for_tVF1.js";import"./video-transcript-link-_gpkjmR8.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-qMhJW4bS.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./choice-none-above-dRu7sfJj.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";e(a);const Wo={decorators:[o=>r.jsx(p,{children:r.jsx(m.Provider,{value:s,children:r.jsx(o,{})})})],parameters:{options:{storySort:{order:["Perseus","PerseusEditor","Math-Input","*"],includeNames:!0}},actions:{argTypesRegex:"^on[A-Z].*"},controls:{matchers:{color:/(background|color)$/i,date:/Date$/}},backgrounds:{values:Object.entries(i).map(([o,t])=>({name:o,value:t}))}},tags:["autodocs"]};export{Wo as default}; +import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{c as i}from"./index-deFLJwr4.js";import{R as p}from"./index-0DbkllkJ.js";import"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import{D as m,s as e}from"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{s,a}from"./test-dependencies-1Svp3QCw.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-18qWGOW7.js";import"./index-dnMhQZ-1.js";import"./perseus-error-l3K_anoI.js";import"./index-Dfd6auV6.js";import"./input-with-examples-PaWkADGr.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./icon-paths-5JCXzGsq.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./shared-4TdECMLk.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./Popper-Y5KDXl-P.js";import"./answer-choices-iyIz6W_C.js";import"./index-469F30Ub.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./asset-context-H6Iqp7Gi.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./fixed-to-responsive-for_tVF1.js";import"./video-transcript-link-_gpkjmR8.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-qMhJW4bS.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./choice-none-above-vDwffTnk.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./register-all-widgets-for-testing-vNa20up7.js";e(a);const Wo={decorators:[o=>r.jsx(p,{children:r.jsx(m.Provider,{value:s,children:r.jsx(o,{})})})],parameters:{options:{storySort:{order:["Perseus","PerseusEditor","Math-Input","*"],includeNames:!0}},actions:{argTypesRegex:"^on[A-Z].*"},controls:{matchers:{color:/(background|color)$/i,date:/Date$/}},backgrounds:{values:Object.entries(i).map(([o,t])=>({name:o,value:t}))}},tags:["autodocs"]};export{Wo as default}; diff --git a/assets/python-program-editor-0ms7DDAR.js b/assets/python-program-editor-2M-li2KT.js similarity index 86% rename from assets/python-program-editor-0ms7DDAR.js rename to assets/python-program-editor-2M-li2KT.js index cc8f39fcc5..e12a8149fb 100644 --- a/assets/python-program-editor-0ms7DDAR.js +++ b/assets/python-program-editor-2M-li2KT.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{c as a}from"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import{c as p}from"./components-ODdjt0Ld.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{r as n}from"./index-6oxdNXpR.js";const{NumberInput:m,TextInput:h}=p;function l(o,t){const i=[];return t===""&&i.push("The program ID is required."),(!Number.isInteger(o)||o<1)&&i.push("The height must be a positive integer."),i}const r=class r extends n.Component{constructor(){super(...arguments),this.change=(...t)=>a.apply(this,t),this.getSaveWarnings=()=>l(this.props.height,this.props.programID)}serialize(){return{programID:this.props.programID,height:this.props.height}}render(){return e.jsxs("div",{children:[e.jsxs("label",{children:["User Program ID:"," ",e.jsx(h,{value:this.props.programID,onChange:this.change("programID"),placeholder:"123"})]}),e.jsx("br",{}),e.jsxs("label",{children:["Height:"," ",e.jsx(m,{value:this.props.height,onChange:this.change("height"),placeholder:"400"})]})]})}};r.widgetName="python-program",r.defaultProps={programID:"",height:400};let s=r;s.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"signature",type:"object",raw:`{ +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{c as a}from"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import{c as p}from"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{r as n}from"./index-6oxdNXpR.js";const{NumberInput:m,TextInput:h}=p;function l(o,t){const i=[];return t===""&&i.push("The program ID is required."),(!Number.isInteger(o)||o<1)&&i.push("The height must be a positive integer."),i}const r=class r extends n.Component{constructor(){super(...arguments),this.change=(...t)=>a.apply(this,t),this.getSaveWarnings=()=>l(this.props.height,this.props.programID)}serialize(){return{programID:this.props.programID,height:this.props.height}}render(){return e.jsxs("div",{children:[e.jsxs("label",{children:["User Program ID:"," ",e.jsx(h,{value:this.props.programID,onChange:this.change("programID"),placeholder:"123"})]}),e.jsx("br",{}),e.jsxs("label",{children:["Height:"," ",e.jsx(m,{value:this.props.height,onChange:this.change("height"),placeholder:"400"})]})]})}};r.widgetName="python-program",r.defaultProps={programID:"",height:400};let s=r;s.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"signature",type:"object",raw:`{ // The ID of the Python program to embed programID: string; // The height of the widget in pixels diff --git a/assets/python-program-editor.stories-nSXHU_jt.js b/assets/python-program-editor.stories-ASWY7Bew.js similarity index 79% rename from assets/python-program-editor.stories-nSXHU_jt.js rename to assets/python-program-editor.stories-ASWY7Bew.js index fdc29c01e3..76b158efa7 100644 --- a/assets/python-program-editor.stories-nSXHU_jt.js +++ b/assets/python-program-editor.stories-ASWY7Bew.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{a as p}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{P as e}from"./python-program-editor-0ms7DDAR.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";const Xr={title:"PerseusEditor/Widgets/Python Program Editor"},r=a=>m.jsx(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{a as p}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{P as e}from"./python-program-editor-2M-li2KT.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-awljIyHI.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";const Xr={title:"PerseusEditor/Widgets/Python Program Editor"},r=a=>m.jsx(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(t=r.parameters)==null?void 0:t.docs)==null?void 0:i.source}}};const Yr=["Default"];export{r as Default,Yr as __namedExportsOrder,Xr as default}; diff --git a/assets/python-program.stories-z_9jkw0b.js b/assets/python-program.stories-DpPAm1fn.js similarity index 76% rename from assets/python-program.stories-z_9jkw0b.js rename to assets/python-program.stories-DpPAm1fn.js index d7290e07cf..095c901b4b 100644 --- a/assets/python-program.stories-z_9jkw0b.js +++ b/assets/python-program.stories-DpPAm1fn.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{R as p}from"./renderer-with-debug-ui-75hBDQJk.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const e={content:`[[☃ python-program 1]] +import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{R as p}from"./renderer-with-debug-ui-Jq91P-PK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const e={content:`[[☃ python-program 1]] `,images:{},widgets:{"python-program 1":{version:{major:0,minor:0},static:!1,type:"python-program",options:{height:400,programID:"5207287069147136"},alignment:"block"}}},Vr={title:"Perseus/Widgets/Python Program"},r=s=>m.jsx(p,{question:e});r.__docgenInfo={description:"",methods:[],displayName:"Question1"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/question-markers-VcHdxP49.js b/assets/question-markers-vke3EOoD.js similarity index 91% rename from assets/question-markers-VcHdxP49.js rename to assets/question-markers-vke3EOoD.js index 4f21aa3242..98563736fe 100644 --- a/assets/question-markers-VcHdxP49.js +++ b/assets/question-markers-vke3EOoD.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{r as c}from"./index-6oxdNXpR.js";import{b as y}from"./article-renderer-mU-6RWLp.js";import"./jquery-yG1GhClm.js";import{U as g}from"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import{g as h}from"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{l as i}from"./index-awljIyHI.js";import{a as k,b}from"./global-colors-VIVU4Od4.js";import{M as f}from"./marker-qF2kRuTF.js";class R extends c.Component{constructor(){super(...arguments),this._markers=[],this.handleImageDoubleClick=r=>{r.preventDefault();const e=r.currentTarget.getBoundingClientRect(),n=Math.round((r.clientX-e.left)/e.width*1e3)/10,l=Math.round((r.clientY-e.top)/e.height*1e3)/10,{markers:t,onChange:o}=this.props;o([...t,{answers:[],label:"",x:n,y:l}])}}openDropdownForMarkerIndices(r){r.forEach(e=>{var n;this._markers[e]&&((n=this._markers[e])==null||n.openDropdown())})}render(){const{choices:r,imageUrl:e,imageWidth:n,imageHeight:l,markers:t,onChange:o}=this.props,u=h().staticUrl;return a.jsxs("div",{children:[a.jsx("div",{className:i.css(m.title),children:"Markers"}),a.jsx("div",{className:i.css(m.subtitle),children:e?a.jsxs("span",{children:["Double-click on the image to add a marker.",a.jsx("br",{}),a.jsx("br",{}),"Markers are read by screen readers in the order that you add them here, so add in a logical order for the learner (e.g. sequentially, clockwise). You can test order by using keyboard tabbing."]}):"Upload an image to place markers."}),e&&a.jsxs("div",{className:i.css(m.markersCanvas),style:{maxWidth:n,maxHeight:l},children:[a.jsx("img",{alt:"",className:i.css(m.image),src:u(g.getRealImageUrl(e)),onDoubleClick:this.handleImageDoubleClick}),t.map((p,s)=>c.createElement(f,{...p,choices:r,key:`${p.x}.${p.y}`,onChange:d=>o([...t.slice(0,s),d,...t.slice(s+1)]),onRemove:()=>o([...t.slice(0,s),...t.slice(s+1)]),ref:d=>this._markers[s]=d}))]})]})}}const m=i.StyleSheet.create({title:{...y,marginBottom:6,color:k},subtitle:{fontFamily:"inherit",fontSize:12,lineHeight:"14px",marginBottom:12,color:b},markersCanvas:{position:"relative",border:"solid 1px rgba(33, 36, 44, 0.16)"},image:{display:"block",maxWidth:"100%"}});R.__docgenInfo={description:"",methods:[{name:"openDropdownForMarkerIndices",docblock:null,modifiers:[],params:[{name:"indices",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:null},{name:"handleImageDoubleClick",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactMouseEvent",raw:"React.MouseEvent",alias:"React.MouseEvent"}}],returns:null}],displayName:"QuestionMarkers",props:{choices:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:""},imageUrl:{required:!0,tsType:{name:"string"},description:""},imageWidth:{required:!0,tsType:{name:"number"},description:""},imageHeight:{required:!0,tsType:{name:"number"},description:""},markers:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ +import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{r as c}from"./index-6oxdNXpR.js";import{b as y}from"./article-renderer-HEYBK15c.js";import"./jquery-yG1GhClm.js";import{U as g}from"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import{g as h}from"./dependencies-CP7Uh8Kq.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./svg-image-7aOK05RI.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{l as i}from"./index-awljIyHI.js";import{a as k,b}from"./global-colors-VIVU4Od4.js";import{M as f}from"./marker-l6CMdFr_.js";class R extends c.Component{constructor(){super(...arguments),this._markers=[],this.handleImageDoubleClick=r=>{r.preventDefault();const e=r.currentTarget.getBoundingClientRect(),n=Math.round((r.clientX-e.left)/e.width*1e3)/10,l=Math.round((r.clientY-e.top)/e.height*1e3)/10,{markers:t,onChange:o}=this.props;o([...t,{answers:[],label:"",x:n,y:l}])}}openDropdownForMarkerIndices(r){r.forEach(e=>{var n;this._markers[e]&&((n=this._markers[e])==null||n.openDropdown())})}render(){const{choices:r,imageUrl:e,imageWidth:n,imageHeight:l,markers:t,onChange:o}=this.props,u=h().staticUrl;return a.jsxs("div",{children:[a.jsx("div",{className:i.css(m.title),children:"Markers"}),a.jsx("div",{className:i.css(m.subtitle),children:e?a.jsxs("span",{children:["Double-click on the image to add a marker.",a.jsx("br",{}),a.jsx("br",{}),"Markers are read by screen readers in the order that you add them here, so add in a logical order for the learner (e.g. sequentially, clockwise). You can test order by using keyboard tabbing."]}):"Upload an image to place markers."}),e&&a.jsxs("div",{className:i.css(m.markersCanvas),style:{maxWidth:n,maxHeight:l},children:[a.jsx("img",{alt:"",className:i.css(m.image),src:u(g.getRealImageUrl(e)),onDoubleClick:this.handleImageDoubleClick}),t.map((p,s)=>c.createElement(f,{...p,choices:r,key:`${p.x}.${p.y}`,onChange:d=>o([...t.slice(0,s),d,...t.slice(s+1)]),onRemove:()=>o([...t.slice(0,s),...t.slice(s+1)]),ref:d=>this._markers[s]=d}))]})]})}}const m=i.StyleSheet.create({title:{...y,marginBottom:6,color:k},subtitle:{fontFamily:"inherit",fontSize:12,lineHeight:"14px",marginBottom:12,color:b},markersCanvas:{position:"relative",border:"solid 1px rgba(33, 36, 44, 0.16)"},image:{display:"block",maxWidth:"100%"}});R.__docgenInfo={description:"",methods:[{name:"openDropdownForMarkerIndices",docblock:null,modifiers:[],params:[{name:"indices",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:null},{name:"handleImageDoubleClick",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactMouseEvent",raw:"React.MouseEvent",alias:"React.MouseEvent"}}],returns:null}],displayName:"QuestionMarkers",props:{choices:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:""},imageUrl:{required:!0,tsType:{name:"string"},description:""},imageWidth:{required:!0,tsType:{name:"number"},description:""},imageHeight:{required:!0,tsType:{name:"number"},description:""},markers:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ // The list of correct answers expected for the marker. answers: ReadonlyArray; // The marker title or description. diff --git a/assets/question-markers.stories-QEgdudva.js b/assets/question-markers.stories-1tSOqUl5.js similarity index 85% rename from assets/question-markers.stories-QEgdudva.js rename to assets/question-markers.stories-1tSOqUl5.js index 1d97a0a38f..83ec3b7ea0 100644 --- a/assets/question-markers.stories-QEgdudva.js +++ b/assets/question-markers.stories-1tSOqUl5.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{l as p}from"./index-awljIyHI.js";import{r as y}from"./index-6oxdNXpR.js";import{Q as x}from"./question-markers-VcHdxP49.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./global-colors-VIVU4Od4.js";import"./marker-qF2kRuTF.js";import"./components-ODdjt0Ld.js";import"./util-qk2aeK8X.js";import"./form-wrapped-text-field-NbyiOLVb.js";const dt={title:"PerseusEditor/Widgets/Label Image/Question Markers"},b=p.StyleSheet.create({wrapper:{width:338}}),f=t=>r.jsx("div",{className:p.css(b.wrapper),children:r.jsx(x,{...t})});class W extends y.Component{constructor(){super(...arguments),this.state={markers:[{answers:[],label:"",x:50,y:50}]}}render(){const{markers:o}=this.state;return r.jsx("div",{className:p.css(b.wrapper),children:r.jsx(x,{choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],imageUrl:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",imageWidth:1280,imageHeight:1024,markers:o,onChange:k=>this.setState({markers:k})})})}}const e=t=>{const o={choices:[],imageUrl:"",imageWidth:0,imageHeight:0,markers:[],onChange:()=>{}};return r.jsx(f,{...o})},i=t=>{const o={choices:[],imageUrl:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",imageWidth:1280,imageHeight:1024,markers:[{answers:[],label:"",x:50,y:50}],onChange:()=>{}};return r.jsx(f,{...o})},m=t=>r.jsx(W,{});e.__docgenInfo={description:"",methods:[],displayName:"Empty"};i.__docgenInfo={description:"",methods:[],displayName:"Filled"};m.__docgenInfo={description:"",methods:[],displayName:"Interactive"};var s,a,n;e.parameters={...e.parameters,docs:{...(s=e.parameters)==null?void 0:s.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{l as p}from"./index-awljIyHI.js";import{r as y}from"./index-6oxdNXpR.js";import{Q as x}from"./question-markers-vke3EOoD.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./global-colors-VIVU4Od4.js";import"./marker-l6CMdFr_.js";import"./components-ODdjt0Ld.js";import"./util-qk2aeK8X.js";import"./form-wrapped-text-field-NbyiOLVb.js";const dt={title:"PerseusEditor/Widgets/Label Image/Question Markers"},b=p.StyleSheet.create({wrapper:{width:338}}),f=t=>r.jsx("div",{className:p.css(b.wrapper),children:r.jsx(x,{...t})});class W extends y.Component{constructor(){super(...arguments),this.state={markers:[{answers:[],label:"",x:50,y:50}]}}render(){const{markers:o}=this.state;return r.jsx("div",{className:p.css(b.wrapper),children:r.jsx(x,{choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],imageUrl:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",imageWidth:1280,imageHeight:1024,markers:o,onChange:k=>this.setState({markers:k})})})}}const e=t=>{const o={choices:[],imageUrl:"",imageWidth:0,imageHeight:0,markers:[],onChange:()=>{}};return r.jsx(f,{...o})},i=t=>{const o={choices:[],imageUrl:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",imageWidth:1280,imageHeight:1024,markers:[{answers:[],label:"",x:50,y:50}],onChange:()=>{}};return r.jsx(f,{...o})},m=t=>r.jsx(W,{});e.__docgenInfo={description:"",methods:[],displayName:"Empty"};i.__docgenInfo={description:"",methods:[],displayName:"Filled"};m.__docgenInfo={description:"",methods:[],displayName:"Interactive"};var s,a,n;e.parameters={...e.parameters,docs:{...(s=e.parameters)==null?void 0:s.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const props = { choices: [], imageUrl: "", diff --git a/assets/radio-editor.stories-vex8NVSi.js b/assets/radio-editor.stories-obh2f2mg.js similarity index 81% rename from assets/radio-editor.stories-vex8NVSi.js rename to assets/radio-editor.stories-obh2f2mg.js index 4e81af2a88..3d6314ab0c 100644 --- a/assets/radio-editor.stories-vex8NVSi.js +++ b/assets/radio-editor.stories-obh2f2mg.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{l as m}from"./index-awljIyHI.js";import{r as a}from"./index-6oxdNXpR.js";import{R as n}from"./editor-k9_TKmQw.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";import"./editor-Mb85oHy5.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-qbKF8qYC.js";import"./index-wzSCRJFK.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";const mo={title:"PerseusEditor/Widgets/Radio Editor"},l=m.StyleSheet.create({wrapper:{width:338}}),c={content:`Which of the following values of $x$ satisfies the equation $\\sqrt{64}=x$ ? +import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{l as m}from"./index-awljIyHI.js";import{r as a}from"./index-6oxdNXpR.js";import{R as n}from"./editor-l5TJAcwO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-9gkyvru-.js";import"./index-7-BESUpx.js";import"./index-J2t_5nK1.js";import"./index-0DbkllkJ.js";import"./index-deFLJwr4.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./react-router-dom-VIBHfbW6.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./constants-iPV6vHZm.js";import"./index-Dfd6auV6.js";import"./client-Rb4DelHy.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./index-469F30Ub.js";import"./index-jxhLXBHb.js";import"./index-f-3iKkZU.js";import"./index-i1pBWAmI.js";import"./index-18qWGOW7.js";import"./Popper-Y5KDXl-P.js";import"./math-input-ILg8RrvB.js";import"./index-CyYhwSUV.js";import"./index-zFNZn_u0.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./media-queries-gbofTbz-.js";import"./shared-4TdECMLk.js";import"./choice-Xr-SKHrB.js";import"./index-vITVWi7a.js";import"./index-nqMmpXbO.js";import"./icon-7RFbyLiL.js";import"./choice-icon-9x4jcq5T.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./components-ODdjt0Ld.js";import"./index-k-0mNqHS.js";import"./editor-Gp3Qu6_d.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-XMME9ave.js";import"./index-wzSCRJFK.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";const mo={title:"PerseusEditor/Widgets/Radio Editor"},l=m.StyleSheet.create({wrapper:{width:338}}),c={content:`Which of the following values of $x$ satisfies the equation $\\sqrt{64}=x$ ? [[☃ radio 1]] diff --git a/assets/radio.stories-IYaJgEu5.js b/assets/radio.stories-0qy9p9DE.js similarity index 81% rename from assets/radio.stories-IYaJgEu5.js rename to assets/radio.stories-0qy9p9DE.js index 4b0b1963bd..f2615c5cf8 100644 --- a/assets/radio.stories-IYaJgEu5.js +++ b/assets/radio.stories-0qy9p9DE.js @@ -1,4 +1,4 @@ -import{j as M}from"./jsx-runtime-63Ea5SlK.js";import{R as O}from"./renderer-with-debug-ui-75hBDQJk.js";import{q as w,c as b,m as I,a as x}from"./radio.testdata-sITJ8lxE.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-mU-6RWLp.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-1DxKQj1_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-YO5BCgg1.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-9_hKye4B.js";import"./shared-4TdECMLk.js";import"./choice-none-above-dRu7sfJj.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-lVeJkx-U.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-0QGNq-GT.js";import"./answer-pill-cmLXoo3T.js";import"./sortable-k81KAG9U.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import"./register-all-widgets-for-testing-ucxEr_N9.js";const qo={title:"Perseus/Widgets/Radio",args:{static:!1,crossOutEnabled:!1,reviewMode:!1,showSolutions:"none",question:w},argTypes:{showSolutions:{options:["none","all","selected"],control:{type:"select"}}},render:t=>M.jsx(O,{question:E(t),apiOptions:j(t),reviewMode:t.reviewMode,showSolutions:t.showSolutions})},E=t=>{const m={...t.question,widgets:{}};for(const[f,W]of Object.entries(t.question.widgets))m.widgets[f]={...W,static:t.static};return m},j=t=>({crossOutEnabled:t.crossOutEnabled}),o={args:{question:w}},i={args:{question:b}},r={args:{question:I}},e={args:{question:x}};var p,s,a;o.parameters={...o.parameters,docs:{...(p=o.parameters)==null?void 0:p.docs,source:{originalSource:`{ +import{j as M}from"./jsx-runtime-63Ea5SlK.js";import{R as O}from"./renderer-with-debug-ui-Jq91P-PK.js";import{q as w,c as b,m as I,a as x}from"./radio.testdata-sITJ8lxE.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-Xr-SKHrB.js";import"./index-0DbkllkJ.js";import"./index-awljIyHI.js";import"./react-router-dom-VIBHfbW6.js";import"./index-i1pBWAmI.js";import"./index-deFLJwr4.js";import"./index-18qWGOW7.js";import"./index-vITVWi7a.js";import"./index-f-3iKkZU.js";import"./index-469F30Ub.js";import"./index-CyYhwSUV.js";import"./index-nqMmpXbO.js";import"./index-zFNZn_u0.js";import"./index-9gkyvru-.js";import"./index-jxhLXBHb.js";import"./index-7-BESUpx.js";import"./Popper-Y5KDXl-P.js";import"./index-Dfd6auV6.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";import"./icon-7RFbyLiL.js";import"./perseus-api-1-ethIrW.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-qMhJW4bS.js";import"./text-list-editor-aj1SAzcA.js";import"./jquery-yG1GhClm.js";import"./media-queries-gbofTbz-.js";import"./constants-iPV6vHZm.js";import"./choice-icon-9x4jcq5T.js";import"./inline-icon-6fh0Wu1y.js";import"./icon-paths-5JCXzGsq.js";import"./focus-ring-qYEF-qqz.js";import"./option-status-8mB213vS.js";import"./article-renderer-HEYBK15c.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./prop-types-d_cUcR3L.js";import"./mobile-keypad-Muuas9zV.js";import"./index-J2t_5nK1.js";import"./tabbar-WEwAggnz.js";import"./item-ct0mKlsr.js";import"./index-xfryX26Z.js";import"./button-assets-ozecF1qE.js";import"./keypad-button-BlFICMi6.js";import"./operators-page-pCrK11a-.js";import"./navigation-pad-29vyLJ52.js";import"./key-translator-hixns6dh.js";import"./enums-x5qaTru7.js";import"./renderer-L37a98D_.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-7aOK05RI.js";import"./dependencies-CP7Uh8Kq.js";import"./fixed-to-responsive-for_tVF1.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./tex-MX5FPdQh.js";import"./zoomable-_uYFBX1Q.js";import"./zoomable-tex-Jjwex-Ep.js";import"./lint-CRWxUAIQ.js";import"./index-BIPwuHvF.js";import"./math-input-ILg8RrvB.js";import"./input-with-examples-PaWkADGr.js";import"./text-input-5e4vF1bl.js";import"./index-V5gl6frG.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-kypcKNEK.js";import"./shared-4TdECMLk.js";import"./choice-none-above-vDwffTnk.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-iyIz6W_C.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./hud-ifw9Ofbw.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./marker-ecL5IfPZ.js";import"./answer-pill-Rz7_ywTY.js";import"./sortable-SI3cD6Pj.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import"./register-all-widgets-for-testing-vNa20up7.js";const qo={title:"Perseus/Widgets/Radio",args:{static:!1,crossOutEnabled:!1,reviewMode:!1,showSolutions:"none",question:w},argTypes:{showSolutions:{options:["none","all","selected"],control:{type:"select"}}},render:t=>M.jsx(O,{question:E(t),apiOptions:j(t),reviewMode:t.reviewMode,showSolutions:t.showSolutions})},E=t=>{const m={...t.question,widgets:{}};for(const[f,W]of Object.entries(t.question.widgets))m.widgets[f]={...W,static:t.static};return m},j=t=>({crossOutEnabled:t.crossOutEnabled}),o={args:{question:w}},i={args:{question:b}},r={args:{question:I}},e={args:{question:x}};var p,s,a;o.parameters={...o.parameters,docs:{...(p=o.parameters)==null?void 0:p.docs,source:{originalSource:`{ args: { question: questionWithPassage } diff --git a/assets/range-input-w5Z3sPK5.js b/assets/range-input-w5Z3sPK5.js index f490cd7f8a..671d17efbc 100644 --- a/assets/range-input-w5Z3sPK5.js +++ b/assets/range-input-w5Z3sPK5.js @@ -1 +1 @@ -import{j as o}from"./jsx-runtime-63Ea5SlK.js";import{P as s}from"./index-k-0mNqHS.js";import{r as l}from"./index-6oxdNXpR.js";import{N as i}from"./number-input-ogh82yD8.js";const p=()=>!0,t=class t extends l.Component{constructor(){super(...arguments),this.onChange=(e,a)=>{const r=this.props.value;e===0?this.props.onChange([a,r[1]]):this.props.onChange([r[0],a])}}render(){const e=this.props.value,a=this.props.checkValidity||p;return o.jsxs("div",{className:"range-input",children:[o.jsx(i,{...this.props,value:e[0],checkValidity:r=>a([r,e[1]]),onChange:this.onChange.bind(this,0),placeholder:this.props.placeholder[0]}),o.jsx(i,{...this.props,value:e[1],checkValidity:r=>a([e[0],r]),onChange:this.onChange.bind(this,1),placeholder:this.props.placeholder[1]})]})}};t.propTypes={value:s.array.isRequired,onChange:s.func.isRequired,placeholder:s.array,checkValidity:s.func},t.defaultProps={placeholder:[null,null]};let n=t;n.__docgenInfo={description:"A minor abstraction on top of `NumberInput` for ranges",methods:[{name:"onChange",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null},{name:"newVal",optional:!1,type:null}],returns:null}],displayName:"RangeInput",props:{placeholder:{defaultValue:{value:"[null, null]",computed:!1},description:"",type:{name:"array"},required:!1},value:{description:"",type:{name:"array"},required:!0},onChange:{description:"",type:{name:"func"},required:!0},checkValidity:{description:"",type:{name:"func"},required:!1}}};export{n as R}; +import{j as o}from"./jsx-runtime-63Ea5SlK.js";import{P as s}from"./index-0C4KXdeC.js";import{r as l}from"./index-6oxdNXpR.js";import{N as i}from"./number-input-ogh82yD8.js";const p=()=>!0,t=class t extends l.Component{constructor(){super(...arguments),this.onChange=(e,a)=>{const r=this.props.value;e===0?this.props.onChange([a,r[1]]):this.props.onChange([r[0],a])}}render(){const e=this.props.value,a=this.props.checkValidity||p;return o.jsxs("div",{className:"range-input",children:[o.jsx(i,{...this.props,value:e[0],checkValidity:r=>a([r,e[1]]),onChange:this.onChange.bind(this,0),placeholder:this.props.placeholder[0]}),o.jsx(i,{...this.props,value:e[1],checkValidity:r=>a([e[0],r]),onChange:this.onChange.bind(this,1),placeholder:this.props.placeholder[1]})]})}};t.propTypes={value:s.array.isRequired,onChange:s.func.isRequired,placeholder:s.array,checkValidity:s.func},t.defaultProps={placeholder:[null,null]};let n=t;n.__docgenInfo={description:"A minor abstraction on top of `NumberInput` for ranges",methods:[{name:"onChange",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null},{name:"newVal",optional:!1,type:null}],returns:null}],displayName:"RangeInput",props:{placeholder:{defaultValue:{value:"[null, null]",computed:!1},description:"",type:{name:"array"},required:!1},value:{description:"",type:{name:"array"},required:!0},onChange:{description:"",type:{name:"func"},required:!0},checkValidity:{description:"",type:{name:"func"},required:!1}}};export{n as R}; diff --git a/assets/range-input.stories-nWKfQjxk.js b/assets/range-input.stories-nWKfQjxk.js index e55eb32a1d..5b964bb06f 100644 --- a/assets/range-input.stories-nWKfQjxk.js +++ b/assets/range-input.stories-nWKfQjxk.js @@ -1,4 +1,4 @@ -import{a as u}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{R as d}from"./range-input-w5Z3sPK5.js";import"./v4-yQnnJER4.js";import"./jsx-runtime-63Ea5SlK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./number-input-ogh82yD8.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";const _={title:"Perseus/Components/Range Input",component:d,args:{value:[],onChange:u("onChange")}},r={},e={args:{value:[-10,10]}},a={args:{placeholder:["?","!"]}};var o,s,t;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:"{}",...(t=(s=r.parameters)==null?void 0:s.docs)==null?void 0:t.source}}};var m,p,n;e.parameters={...e.parameters,docs:{...(m=e.parameters)==null?void 0:m.docs,source:{originalSource:`{ +import{a as u}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{R as d}from"./range-input-w5Z3sPK5.js";import"./v4-yQnnJER4.js";import"./jsx-runtime-63Ea5SlK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./number-input-ogh82yD8.js";import"./util-AYeX86gl.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./jquery-yG1GhClm.js";import"./index-dnMhQZ-1.js";import"./i18n-context-fsWEgybQ.js";const _={title:"Perseus/Components/Range Input",component:d,args:{value:[],onChange:u("onChange")}},r={},e={args:{value:[-10,10]}},a={args:{placeholder:["?","!"]}};var o,s,t;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:"{}",...(t=(s=r.parameters)==null?void 0:s.docs)==null?void 0:t.source}}};var m,p,n;e.parameters={...e.parameters,docs:{...(m=e.parameters)==null?void 0:m.docs,source:{originalSource:`{ args: { value: [-10, 10] } diff --git a/assets/register-all-widgets-and-editors-for-testing-HGbBhRa9.js b/assets/register-all-widgets-and-editors-for-testing-mH_Pw9e8.js similarity index 97% rename from assets/register-all-widgets-and-editors-for-testing-HGbBhRa9.js rename to assets/register-all-widgets-and-editors-for-testing-mH_Pw9e8.js index 9bd22cdc44..1aa4954ce0 100644 --- a/assets/register-all-widgets-and-editors-for-testing-HGbBhRa9.js +++ b/assets/register-all-widgets-and-editors-for-testing-mH_Pw9e8.js @@ -1 +1 @@ -import{j as s}from"./jsx-runtime-63Ea5SlK.js";import{c as _e,G as $e}from"./graph-settings-XR_siz2q.js";import{_ as i,$ as Fe}from"./jquery-yG1GhClm.js";import{t as We,D as He,u as Be,v as Ke,x as Ge,y as Ye,c as u,p as c,G as Je,M as Xe,z as Ze,B as Qe,T as es,w as ss}from"./article-renderer-mU-6RWLp.js";import{U as he,r as ts}from"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import{L as Me}from"./svg-image-7aOK05RI.js";import{A as be}from"./perseus-api-1-ethIrW.js";import"./perseus-item-CWRjfKXr.js";import"./hints-renderer-alc4yvsU.js";import{m as as,n as rs,r as ns,c as is,a as ls,d as os}from"./renderer-1DxKQj1_.js";import"./base-radio-9_hKye4B.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import{g as Ue}from"./dependencies-CP7Uh8Kq.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{r as p}from"./index-6oxdNXpR.js";import{C as ps}from"./categorizer-editor-d30-cizN.js";import{E as us}from"./perseus-error-l3K_anoI.js";import{c as g}from"./components-ODdjt0Ld.js";import{E as m}from"./editor-jsonify-g-bIiSIM.js";import{C as b}from"./index-V5gl6frG.js";import{P as r}from"./index-0C4KXdeC.js";import{B as f}from"./blur-input-6j4bgLwx.js";import{D as cs}from"./definition-editor-_ZvvsZ3f.js";import{D as hs}from"./dropdown-editor-ueJJ3t0p.js";import{E as ds}from"./explanation-editor-mExrX7IC.js";import{E as ms}from"./expression-editor-2aE8aBV7.js";import{i as gs}from"./icon-paths-5JCXzGsq.js";import{l as _}from"./index-awljIyHI.js";import{E as y}from"./editor-Mb85oHy5.js";import{i as fs}from"./icon-paths-EoBkHOLI.js";import{I as ys}from"./image-editor-npChmNVJ.js";import{I as xs}from"./input-number-editor-97qMf_gS.js";import{I as bs}from"./interaction-editor-2twq2tps.js";import{I as vs}from"./interactive-graph-editor-V9iZpszK.js";import{L as js}from"./label-image-editor-1k_zX52x.js";import{M as ws}from"./matcher-editor-rnK8ooee.js";import{N as Cs}from"./number-line-editor-KKCgA0P-.js";import{N as Ts}from"./numeric-input-editor-sonkoQhn.js";import{P as qs}from"./phet-simulation-editor-33ykehAu.js";import{F as le}from"./index-9gkyvru-.js";import{P as ks}from"./python-program-editor-0ms7DDAR.js";import{R as Ss}from"./editor-k9_TKmQw.js";import{S as Ns}from"./sorter-editor-MkK3kay8.js";const Is={allTypes:We,DEFAULT_GRAPHER_PROPS:He,chooseType:Be,defaultPlotProps:Ke,getEquationString:Ge,typeToButton:Ye},ga=_e({displayName:"JsonEditor",getInitialState:function(){return{currentValue:JSON.stringify(this.props.value,null,4),valid:!0}},UNSAFE_componentWillReceiveProps:function(l){(!this.state.valid||!i.isEqual(l.value,JSON.parse(this.state.currentValue)))&&this.setState(this.getInitialState())},handleKeyDown:function(l){if(l.key==="Tab"){const e=l.target.selectionStart,t=l.target.value,a=t.substring(0,e),n=t.substring(e,t.length);l.target.value=a+" "+n,l.target.selectionStart=a.length+4,l.target.selectionEnd=a.length+4,l.preventDefault(),this.handleChange(l)}},handleChange:function(l){const e=l.target.value;try{let t=JSON.parse(e);i.isString(t)&&(t=JSON.parse(t)),this.setState({currentValue:e,valid:!0},function(){this.props.onChange(t)})}catch{this.setState({currentValue:e,valid:!1})}},handleBlur:function(l){const e=l.target.value;try{let t=JSON.parse(e);i.isString(t)&&(t=JSON.parse(t)),this.setState({currentValue:JSON.stringify(t,null,4),valid:!0},function(){this.props.onChange(t)})}catch{this.setState({currentValue:JSON.stringify(this.props.value,null,4),valid:!0})}},render:function(){const l="perseus-json-editor "+(this.state.valid?"valid":"invalid");return s.jsx("textarea",{className:l,value:this.state.currentValue,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onBlur:this.handleBlur})}});let Te=0;const de={},me={};window.iframeDataStore={};window.addEventListener("message",l=>{if(typeof l.data=="string"){const e=de[l.data];e&&e()}else l.data.id&&(l.data.height!==void 0?me[l.data.id](l.data.height):l.data.lintWarnings&&Me.log("LINTER REPORT",{lintWarnings:JSON.stringify(l.data.lintWarnings)}))});class Ps extends p.Component{constructor(){super(...arguments),this.container=p.createRef()}componentDidMount(){this._isMounted=!0,this.iframeID=Te,Te++,this._prepareFrame(),de[this.iframeID]=()=>{this.sendNewData(this._lastData)},me[this.iframeID]=e=>{this._lastHeight=e,this._isMounted&&this.props.seamless&&this.container.current&&(this.container.current.style.height=e+"px")}}shouldComponentUpdate(e){return e.datasetValue!==this.props.datasetValue||e.seamless!==this.props.seamless}componentDidUpdate(e){this.container.current&&(this.props.seamless?this.container.current.style.height=this._lastHeight+"px":this.container.current.style.height="100%"),e.datasetValue!==this.props.datasetValue&&this._prepareFrame()}componentWillUnmount(){de[this.iframeID]=null,me[this.iframeID]=null,this._isMounted=!1}_prepareFrame(){var t,a;this._frame&&((t=this.container.current)==null||t.removeChild(this._frame));const e=document.createElement("iframe");e.style.width="100%",e.style.height="100%",e.src=this.props.url,this.props.datasetKey&&(e.dataset[this.props.datasetKey]=this.props.datasetValue),e.dataset.id=String(this.iframeID),this.props.seamless&&(e.dataset.lintGutter="true"),(a=this.container.current)==null||a.appendChild(e),this._frame=e}sendNewData(e){const t=this._frame;this._isMounted&&e&&(t!=null&&t.contentWindow)&&(this._lastData=e,window.iframeDataStore[this.iframeID]=e,t.contentWindow.postMessage(this.iframeID,"*"))}render(){return s.jsx("div",{ref:this.container,style:{width:"100%",height:"100%"}})}}Ps.__docgenInfo={description:"",methods:[{name:"_prepareFrame",docblock:null,modifiers:[],params:[],returns:null},{name:"sendNewData",docblock:null,modifiers:[],params:[{name:"data",optional:!1,type:{name:"any"}}],returns:null}],displayName:"IframeContentRenderer",props:{url:{required:!0,tsType:{name:"string"},description:""},datasetKey:{required:!0,tsType:{name:"string"},description:""},datasetValue:{required:!0,tsType:{name:"any"},description:""},seamless:{required:!0,tsType:{name:"boolean"},description:""}}};const{InfoTip:qe}=g,ke=400,Se=400;var j;let Os=(j=class extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.serialize=()=>m.serialize.call(this)}render(){return s.jsxs("fieldset",{className:"pair-editor",children:[s.jsxs("label",{children:["Name:"," ",s.jsx(f,{value:this.props.name,onChange:this.change("name")})]}),s.jsxs("label",{children:[" ","Value:"," ",s.jsx(f,{value:this.props.value,onChange:this.change("value")})]})]})}},j.propTypes={...c,name:r.string,value:r.string},j.defaultProps={name:"",value:""},j);var E;let As=(E=class extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.handlePairChange=(e,t)=>{const a=this.props.pairs.slice();a[e]=t;const n=a[a.length-1];n.name&&n.value&&a.push({name:"",value:""}),this.change("pairs",a)},this.serialize=()=>m.serialize.call(this)}render(){const e=i.map(this.props.pairs,(t,a)=>s.jsx(Os,{name:t.name,value:t.value,onChange:this.handlePairChange.bind(this,a)},a));return s.jsx("div",{children:e})}},E.propTypes={...c,pairs:r.arrayOf(r.shape({name:r.string,value:r.string})).isRequired},E);const Rs=/khanacademy\.org\/computer-programming\/[^\/]+\/(\d+)/;function zs(l){const e=Rs.exec(l);return e&&(l=e[1]),l}const C=class C extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this._handleSettingsChange=e=>{this.change({settings:e.pairs})},this._handleProgramIDChange=e=>{e=zs(e);const{isDevServer:t,InitialRequestUrl:a}=Ue(),o=`${t?a.origin:"https://www.khanacademy.org"}/api/internal/scratchpads/${e}`;Fe.getJSON(o).done(d=>{const h=d.userAuthoredContentType;this.change({width:d.width,height:d.height,programID:e,programType:h})}).fail((d,h,x)=>{Me.error("Error retrieving scratchpad info for program ID ",us.TransientService,{cause:x,loggedMetadata:{textStatus:h,programID:e}}),this.change({width:ke,height:Se,programID:e,programType:null})})},this.serialize=()=>m.serialize.call(this)}render(){return s.jsxs("div",{children:[s.jsxs("label",{children:["Url or Program ID:"," ",s.jsx(f,{value:this.props.programID,onChange:this._handleProgramIDChange})]}),s.jsx("br",{}),s.jsx(b,{label:"Show Editor",checked:this.props.showEditor,onChange:e=>{this.props.onChange({showEditor:e})}}),s.jsx(qe,{children:'If you show the editor, you should use the "full-width" alignment to make room for the width of the editor.'}),s.jsx("br",{}),s.jsx(b,{label:"Show Buttons",checked:this.props.showButtons,onChange:e=>{this.props.onChange({showButtons:e})}}),s.jsx("br",{}),s.jsxs("label",{children:["Settings:",s.jsx(As,{name:"settings",pairs:this.props.settings,onChange:this._handleSettingsChange}),s.jsxs(qe,{children:["Settings that you add here are available to the program as an object returned by ",s.jsx("code",{children:"Program.settings()"})]})]})]})}};C.propTypes={...c},C.widgetName="cs-program",C.defaultProps={programID:"",programType:null,settings:[{name:"",value:""}],showEditor:!1,showButtons:!1,width:ke,height:Se};let $=C;$.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"_handleSettingsChange",docblock:null,modifiers:[],params:[{name:"settings",optional:!1,type:null}],returns:null},{name:"_handleProgramIDChange",docblock:null,modifiers:[],params:[{name:"programID",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"CSProgramEditor",props:{programID:{defaultValue:{value:'""',computed:!1},required:!1},programType:{defaultValue:{value:"null",computed:!1},required:!1},settings:{defaultValue:{value:'[{name: "", value: ""}]',computed:!1},required:!1},showEditor:{defaultValue:{value:"false",computed:!1},required:!1},showButtons:{defaultValue:{value:"false",computed:!1},required:!1},width:{defaultValue:{value:"400",computed:!1},required:!1},height:{defaultValue:{value:"400",computed:!1},required:!1}},composes:["@khanacademy/perseus"]};const ve=class ve extends p.Component{serialize(){return m.serialize.call(this)}render(){return s.jsxs("div",{children:[s.jsx("p",{children:"This widget has been deprecated and removed"}),s.jsx("p",{children:"Learners will see a message and they will not be graded on this part. Please replace this widget with a supported one."})]})}};ve.widgetName="deprecated-standin";let F=ve;F.__docgenInfo={description:"",methods:[{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"any"}}}],displayName:"DeprecatedStandinEditor",props:{onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(options: any) => void",signature:{arguments:[{type:{name:"any"},name:"options"}],return:{name:"void"}}},description:""}}};const{InlineIcon:Ne,TextInput:Vs}=g,T=class T extends p.Component{constructor(){super(...arguments),this.editor=p.createRef(),this.hintEditor=p.createRef(),this.change=(...e)=>u.apply(this,e),this.handleAddHint=()=>{const e={content:""};this.props.onChange({hint:e},()=>{var t;(t=this.hintEditor.current)==null||t.focus()})},this.handleRemoveHint=e=>{this.props.onChange({hint:null})},this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=()=>{var e,t;return{title:this.props.title,...(e=this.editor.current)==null?void 0:e.serialize(),hint:(t=this.hintEditor.current)==null?void 0:t.serialize()}}}render(){return s.jsxs("div",{className:"perseus-group-editor",children:[s.jsx("div",{className:"perseus-widget-row",children:s.jsxs("label",{className:_.css(oe.title),children:["Title:"," ",s.jsx(Vs,{value:this.props.title,className:_.css(oe.input),onChange:this.change("title")})]})}),s.jsx(y,{ref:this.editor,content:this.props.content,widgets:this.props.widgets,apiOptions:this.props.apiOptions,images:this.props.images,widgetEnabled:!0,immutableWidgets:!1,onChange:this.props.onChange,warnNoPrompt:!0,warnNoWidgets:!0}),!this.props.hint&&s.jsxs("button",{type:"button",style:{marginTop:10},className:"add-hint simple-button orange",onClick:this.handleAddHint,children:[s.jsx(Ne,{...fs})," Add a hint"]}),this.props.hint&&s.jsxs("div",{className:"perseus-hint-editor",children:[s.jsx("div",{className:_.css(oe.hintsTitle),children:"Hint"}),s.jsx(y,{ref:this.hintEditor,content:this.props.hint?this.props.hint.content:"",widgets:this.props.hint?this.props.hint.widgets:{},apiOptions:this.props.apiOptions,images:this.props.hint&&this.props.hint.images,widgetEnabled:!0,immutableWidgets:!1,onChange:e=>{this.change("hint",Object.assign({},this.props.hint,e))}}),s.jsxs("button",{type:"button",className:"remove-hint simple-button orange",onClick:this.handleRemoveHint,children:[s.jsx(Ne,{...gs})," Remove this hint"]})]})]})}};T.propTypes={...c,title:r.string,content:r.string,widgets:r.object,images:r.object,apiOptions:be.propTypes},T.widgetName="graded-group",T.defaultProps={title:"",content:"",widgets:{},images:{},hint:null};let v=T;const oe=_.StyleSheet.create({title:{fontSize:18,fontWeight:"bold"},input:{fontSize:18},hintsTitle:{marginTop:10,fontSize:"110%",fontWeight:"bold"}});v.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleAddHint",docblock:null,modifiers:[],params:[],returns:null},{name:"handleRemoveHint",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GradedGroupEditor",props:{title:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},content:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},widgets:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},images:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},hint:{defaultValue:{value:"null",computed:!1},required:!1},apiOptions:{description:"",type:{name:"shape",value:{isArticle:{name:"bool",required:!0},onFocusChange:{name:"func",required:!0},GroupMetadataEditor:{name:"func",required:!0},showAlignmentOptions:{name:"bool",required:!0},readOnly:{name:"bool",required:!0},answerableCallback:{name:"func",required:!1},getAnotherHint:{name:"func",required:!1},interactionCallback:{name:"func",required:!1},groupAnnotator:{name:"func",required:!0},imagePlaceholder:{name:"node",required:!1},widgetPlaceholder:{name:"node",required:!1},baseElements:{name:"shape",value:{Link:{name:"func",required:!1}},required:!1},imagePreloader:{name:"func",required:!1},trackInteraction:{name:"func",required:!1},customKeypad:{name:"bool",required:!1},nativeKeypadProxy:{name:"func",required:!1},isMobile:{name:"bool",required:!1},setDrawingAreaAvailable:{name:"func",required:!1},hintProgressColor:{name:"string",required:!1},canScrollPage:{name:"bool",required:!1},crossOutEnabled:{name:"bool",required:!1},editorChangeDelay:{name:"number",required:!1}}},required:!0}},composes:["@khanacademy/perseus"]};const q=class q extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.getSaveWarnings=()=>[].concat(...this._editors.map(e=>e?e.getSaveWarnings():[])),this.serialize=()=>({gradedGroups:this.props.gradedGroups}),this.renderGroups=()=>this.props.gradedGroups?this.props.gradedGroups.map((e,t)=>s.jsx(v,{ref:a=>this._editors[t]=a,...e,apiOptions:this.props.apiOptions,widgetEnabled:!0,immutableWidgets:!1,onChange:a=>this.change("gradedGroups",Ls(this.props.gradedGroups,t,{...this.props.gradedGroups[t],...a}))},t)):null,this.addGroup=()=>{const e=this.props.gradedGroups||[];this.change("gradedGroups",e.concat([v.defaultProps]))}}UNSAFE_componentWillMount(){this._editors=[]}render(){return s.jsxs("div",{className:"perseus-group-editor",children:[this.renderGroups(),s.jsx("button",{onClick:this.addGroup,children:"Add group"})]})}};q.propTypes={...c,apiOptions:be.propTypes,gradedGroups:r.array,onChange:r.func.isRequired},q.widgetName="graded-group-set",q.defaultProps={gradedGroups:[]};let W=q;const Ls=(l,e,t)=>[...l.slice(0,e),t,...l.slice(e+1)];W.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null},{name:"renderGroups",docblock:null,modifiers:[],params:[],returns:null},{name:"addGroup",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GradedGroupSetEditor",props:{gradedGroups:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"array"},required:!1},apiOptions:{description:"",type:{name:"shape",value:{isArticle:{name:"bool",required:!0},onFocusChange:{name:"func",required:!0},GroupMetadataEditor:{name:"func",required:!0},showAlignmentOptions:{name:"bool",required:!0},readOnly:{name:"bool",required:!0},answerableCallback:{name:"func",required:!1},getAnotherHint:{name:"func",required:!1},interactionCallback:{name:"func",required:!1},groupAnnotator:{name:"func",required:!0},imagePlaceholder:{name:"node",required:!1},widgetPlaceholder:{name:"node",required:!1},baseElements:{name:"shape",value:{Link:{name:"func",required:!1}},required:!1},imagePreloader:{name:"func",required:!1},trackInteraction:{name:"func",required:!1},customKeypad:{name:"bool",required:!1},nativeKeypadProxy:{name:"func",required:!1},isMobile:{name:"bool",required:!1},setDrawingAreaAvailable:{name:"func",required:!1},hintProgressColor:{name:"string",required:!1},canScrollPage:{name:"bool",required:!1},crossOutEnabled:{name:"bool",required:!1},editorChangeDelay:{name:"number",required:!1}}},required:!0},onChange:{description:"",type:{name:"func"},required:!0}},composes:["@khanacademy/perseus"]};const{InfoTip:Es,MultiButtonGroup:Ds}=g,Ms=Je.widget,{DEFAULT_GRAPHER_PROPS:pe,allTypes:Us,chooseType:_s,defaultPlotProps:$s,getEquationString:Fs,typeToButton:Ws}=Is,k=class k extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.handleAvailableTypesChange=e=>{let t=this.props.correct;if(!i.contains(e,this.props.correct.type)){const a=this.props.graph,n=_s(e);t=$s(n,a)}this.props.onChange({availableTypes:e,correct:t})},this.serialize=()=>i.chain(this.props).pick("correct","availableTypes").extend({graph:i.omit(this.props.graph,"box")}).value()}render(){const e=rs.SMALL;let t,a;if(this.props.graph.valid===!0){const n={graph:this.props.graph,plot:this.props.correct,availableTypes:this.props.availableTypes,onChange:(o,d)=>{var x;let h=this.props.correct;h.type===((x=o.plot)==null?void 0:x.type)?h=i.extend({},h,o.plot):h=o.plot,this.props.onChange({correct:h},d)},trackInteraction:function(){}};a=s.jsx(Ms,{...n,apiOptions:this.props.apiOptions,containerSizeClass:e}),t=Fs(n)}else a=s.jsx("div",{className:"perseus-error",children:this.props.graph.valid});return s.jsxs("div",{children:[s.jsxs("div",{children:["Correct answer"," ",s.jsx(Es,{children:s.jsx("p",{children:"Graph the correct answer in the graph below and ensure the equation or point coordinates displayed represent the correct answer."})})," ",": ",t]}),s.jsx($e,{editableSettings:["graph","snap","image"],box:as(e),range:this.props.graph.range,labels:this.props.graph.labels,step:this.props.graph.step,gridStep:this.props.graph.gridStep,snapStep:this.props.graph.snapStep,valid:this.props.graph.valid,backgroundImage:this.props.graph.backgroundImage,markings:this.props.graph.markings,rulerLabel:this.props.graph.rulerLabel,rulerTicks:this.props.graph.rulerTicks,showTooltips:this.props.graph.showTooltips,onChange:this.change("graph")}),s.jsxs("div",{className:"perseus-widget-row",children:[s.jsx("label",{children:"Available functions: "}),s.jsx(Ds,{allowEmpty:!1,values:this.props.availableTypes,buttons:i.map(Us,Ws),onChange:this.handleAvailableTypesChange})]}),a]})}};k.propTypes={...c},k.widgetName="grapher",k.defaultProps={correct:pe.plot,graph:pe.graph,availableTypes:pe.availableTypes};let H=k;H.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleAvailableTypesChange",docblock:null,modifiers:[],params:[{name:"newAvailableTypes",optional:!1,type:{name:"Array",elements:[{name:"any"}],raw:"Array",alias:"Array"}}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GrapherEditor",props:{correct:{defaultValue:{value:"DEFAULT_GRAPHER_PROPS.plot",computed:!0},required:!1},graph:{defaultValue:{value:"DEFAULT_GRAPHER_PROPS.graph",computed:!0},required:!1},availableTypes:{defaultValue:{value:"DEFAULT_GRAPHER_PROPS.availableTypes",computed:!0},required:!1}},composes:["@khanacademy/perseus"]};const S=class S extends p.Component{constructor(){super(...arguments),this.editor=p.createRef(),this._renderMetadataEditor=()=>{const e=this.props.apiOptions.GroupMetadataEditor;return s.jsx(e,{value:this.props.metadata,onChange:this.change("metadata")})},this.change=(...e)=>u.apply(this,e),this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=()=>{var e;return i.extend({},(e=this.editor.current)==null?void 0:e.serialize(),{metadata:this.props.metadata})}}render(){return s.jsxs("div",{className:"perseus-group-editor",children:[s.jsx("div",{children:this._renderMetadataEditor()}),s.jsx(y,{ref:this.editor,content:this.props.content,widgets:this.props.widgets,apiOptions:this.props.apiOptions,images:this.props.images,widgetEnabled:!0,immutableWidgets:!1,onChange:this.props.onChange})]})}};S.propTypes={...c,content:r.string,widgets:r.object,images:r.object,metadata:r.any,apiOptions:be.propTypes},S.widgetName="group",S.defaultProps={content:"",widgets:{},images:{},metadata:void 0};let B=S;B.__docgenInfo={description:"",methods:[{name:"_renderMetadataEditor",docblock:null,modifiers:[],params:[],returns:null},{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GroupEditor",props:{content:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},widgets:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},images:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},metadata:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"any"},required:!1},apiOptions:{description:"",type:{name:"shape",value:{isArticle:{name:"bool",required:!0},onFocusChange:{name:"func",required:!0},GroupMetadataEditor:{name:"func",required:!0},showAlignmentOptions:{name:"bool",required:!0},readOnly:{name:"bool",required:!0},answerableCallback:{name:"func",required:!1},getAnotherHint:{name:"func",required:!1},interactionCallback:{name:"func",required:!1},groupAnnotator:{name:"func",required:!0},imagePlaceholder:{name:"node",required:!1},widgetPlaceholder:{name:"node",required:!1},baseElements:{name:"shape",value:{Link:{name:"func",required:!1}},required:!1},imagePreloader:{name:"func",required:!1},trackInteraction:{name:"func",required:!1},customKeypad:{name:"bool",required:!1},nativeKeypadProxy:{name:"func",required:!1},isMobile:{name:"bool",required:!1},setDrawingAreaAvailable:{name:"func",required:!1},hintProgressColor:{name:"string",required:!1},canScrollPage:{name:"bool",required:!1},crossOutEnabled:{name:"bool",required:!1},editorChangeDelay:{name:"number",required:!1}}},required:!0}},composes:["@khanacademy/perseus"]};const re=class re extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.serialize=()=>m.serialize.call(this)}render(){return s.jsxs("fieldset",{children:[s.jsxs("label",{children:["Name:",s.jsx(f,{value:this.props.name,onChange:this.change("name")})]}),s.jsxs("label",{children:["Value:",s.jsx(f,{value:this.props.value,onChange:this.change("value")})]})]})}};re.propTypes={...c,name:r.string,value:r.string},re.defaultProps={name:"",value:""};let ge=re;const je=class je extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.handlePairChange=(e,t)=>{const a=this.props.pairs.slice();a[e]=t;const n=a[a.length-1];n.name&&n.value&&a.push({name:"",value:""}),this.change("pairs",a)},this.serialize=()=>m.serialize.call(this)}render(){const e=i.map(this.props.pairs,(t,a)=>s.jsx(ge,{name:t.name,value:t.value,onChange:this.handlePairChange.bind(this,a)},a));return s.jsx("div",{children:e})}};je.propTypes={...c,pairs:r.arrayOf(r.shape({name:r.string,value:r.string})).isRequired};let fe=je;const N=class N extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.handleSettingsChange=e=>{this.change({settings:e.pairs})},this.serialize=()=>m.serialize.call(this)}render(){return s.jsxs("div",{children:[s.jsxs("div",{style:{fontWeight:"bold",textAlign:"center"},children:["This widget is deprecated! ",s.jsx("br",{}),"Try using the Video or CS Program widgets instead."]}),s.jsxs("label",{children:["Url or Program ID:",s.jsx(f,{value:this.props.url,onChange:this.change("url")})]}),s.jsx("br",{}),s.jsxs("label",{children:["Settings:",s.jsx(fe,{name:"settings",pairs:this.props.settings,onChange:this.handleSettingsChange})]}),s.jsx("br",{}),s.jsxs("label",{children:["Width:",s.jsx(f,{value:this.props.width,onChange:this.change("width")})]}),s.jsxs("label",{children:["Height:",s.jsx(f,{value:this.props.height,onChange:this.change("height")})]}),s.jsx(b,{label:"Allow full screen",checked:this.props.allowFullScreen,onChange:e=>{this.props.onChange({allowFullScreen:e})}}),s.jsx("br",{}),s.jsx(b,{label:"Allow iframe content to redirect the page",checked:this.props.allowTopNavigation,onChange:e=>{this.props.onChange({allowTopNavigation:e})}})]})}};N.propTypes={...c},N.widgetName="iframe",N.defaultProps={url:"",settings:[{name:"",value:""}],width:"400",height:"400",allowFullScreen:!1,allowTopNavigation:!1};let K=N;K.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleSettingsChange",docblock:null,modifiers:[],params:[{name:"settings",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"IframeEditor",props:{url:{defaultValue:{value:'""',computed:!1},required:!1},settings:{defaultValue:{value:'[{name: "", value: ""}]',computed:!1},required:!1},width:{defaultValue:{value:'"400"',computed:!1},required:!1},height:{defaultValue:{value:'"400"',computed:!1},required:!1},allowFullScreen:{defaultValue:{value:"false",computed:!1},required:!1},allowTopNavigation:{defaultValue:{value:"false",computed:!1},required:!1}},composes:["@khanacademy/perseus"]};const{RangeInput:Hs}=g,Bs=Xe.widget,Ie=6,Ks=function(l){const e=[1,1];return i(l).each((t,a)=>{let n=0;i(t).each((o,d)=>{o!=null&&o.toString().length&&(n=d+1)}),e[1]=Math.max(e[1],n),n>0&&(e[0]=Math.max(e[0],a+1))}),e},I=class I extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.onMatrixBoardSizeChange=e=>{const t=Ks(this.props.answers);if(e[0]!==null&&e[1]!==null){e=[Math.round(Math.min(Math.max(e[0],1),Ie)),Math.round(Math.min(Math.max(e[1],1),Ie))];const a=i(Math.min(e[0],t[0])).times(n=>i(Math.min(e[1],t[1])).times(o=>this.props.answers[n][o]));this.props.onChange({matrixBoardSize:e,answers:a})}},this.serialize=()=>m.serialize.call(this)}render(){const e=i.extend({numericInput:!0,onBlur:()=>{},onFocus:()=>{},trackInteraction:()=>{}},this.props);return s.jsxs("div",{className:"perseus-matrix-editor",children:[s.jsxs("div",{className:"perseus-widget-row",children:[" ","Max matrix size:"," ",s.jsx(Hs,{value:this.props.matrixBoardSize,onChange:this.onMatrixBoardSizeChange,format:this.props.labelStyle,useArrowKeys:!0})]}),s.jsx("div",{className:"perseus-widget-row",children:s.jsx(Bs,{...e})}),s.jsxs("div",{className:"perseus-widget-row",children:[" ","Matrix prefix:"," ",s.jsx(y,{ref:"prefix",apiOptions:this.props.apiOptions,content:this.props.prefix,widgetEnabled:!1,onChange:t=>{this.change({prefix:t.content})}})]}),s.jsxs("div",{className:"perseus-widget-row",children:[" ","Matrix suffix:"," ",s.jsx(y,{ref:"suffix",apiOptions:this.props.apiOptions,content:this.props.suffix,widgetEnabled:!1,onChange:t=>{this.change({suffix:t.content})}})]})]})}};I.propTypes={...c,matrixBoardSize:r.arrayOf(r.number).isRequired,answers:r.arrayOf(r.arrayOf(r.number)),prefix:r.string,suffix:r.string,cursorPosition:r.arrayOf(r.number)},I.widgetName="matrix",I.defaultProps={matrixBoardSize:[3,3],answers:[[]],prefix:"",suffix:"",cursorPosition:[0,0]};let G=I;G.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"onMatrixBoardSizeChange",docblock:null,modifiers:[],params:[{name:"range",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MatrixEditor",props:{matrixBoardSize:{defaultValue:{value:"[3, 3]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},answers:{defaultValue:{value:"[[]]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"arrayOf",value:{name:"number"}}},required:!1},prefix:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},suffix:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},cursorPosition:{defaultValue:{value:"[0, 0]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:Gs,NumberInput:D,RangeInput:Ys}=g,Js={url:null,top:0,left:0},P=class P extends p.Component{constructor(){super(...arguments),this.className="perseus-widget-measurer",this.change=(...e)=>u.apply(this,e),this._changeUrl=e=>{this._changeImage("url",e.target.value)},this._changeTop=e=>{this._changeImage("top",e)},this._changeLeft=e=>{this._changeImage("left",e)},this._changeImage=(e,t)=>{const a=i.clone(this.props.image);a[e]=t,this.change("image",a)},this.renderLabelChoices=e=>i.map(e,function(t){const[a,n]=t;return s.jsx("option",{value:n,children:a},n)}),this.serialize=()=>m.serialize.call(this)}render(){const e=i.extend({},Js,this.props.image);return s.jsxs("div",{className:"perseus-widget-measurer",children:[s.jsx("div",{children:"Image displayed under protractor and/or ruler:"}),s.jsxs("div",{children:["URL:"," ",s.jsx("input",{type:"text",className:"perseus-widget-measurer-url",ref:"image-url",defaultValue:e.url,onChange:this._changeUrl}),s.jsx(Gs,{children:s.jsx("p",{children:'Create an image in graphie, or use the "Add image" function to create a background.'})})]}),e.url&&s.jsxs("div",{className:"perseus-widget-row",children:[s.jsxs("label",{className:"perseus-widget-left-col",children:["Pixels from top:"," ",s.jsx(D,{placeholder:0,onChange:this._changeTop,value:e.top,useArrowKeys:!0})]}),s.jsxs("label",{className:"perseus-widget-right-col",children:["Pixels from left:"," ",s.jsx(D,{placeholder:0,onChange:this._changeLeft,value:e.left,useArrowKeys:!0})]})]}),s.jsxs("div",{children:["Containing area [width, height]:"," ",s.jsx(Ys,{onChange:this.change("box"),value:this.props.box,useArrowKeys:!0})]}),s.jsxs("div",{className:"perseus-widget-row",children:[s.jsx("div",{className:"perseus-widget-left-col",children:s.jsx(b,{label:"Show ruler",checked:this.props.showRuler,onChange:t=>{this.props.onChange({showRuler:t})}})}),s.jsx("div",{className:"perseus-widget-right-col",children:s.jsx(b,{label:"Show protractor",checked:this.props.showProtractor,onChange:t=>{this.props.onChange({showProtractor:t})}})})]}),this.props.showRuler&&s.jsxs("div",{children:[s.jsx("div",{children:s.jsxs("label",{children:[" ","Ruler label:"," ",s.jsxs("select",{onChange:t=>this.change("rulerLabel",t.target.value),value:this.props.rulerLabel,children:[s.jsx("option",{value:"",children:"None"}),s.jsx("optgroup",{label:"Metric",children:this.renderLabelChoices([["milimeters","mm"],["centimeters","cm"],["meters","m"],["kilometers","km"]])}),s.jsx("optgroup",{label:"Imperial",children:this.renderLabelChoices([["inches","in"],["feet","ft"],["yards","yd"],["miles","mi"]])})]})]})}),s.jsx("div",{children:s.jsxs("label",{children:[" ","Ruler ticks:"," ",s.jsx("select",{onChange:t=>this.change("rulerTicks",+t.target.value),value:this.props.rulerTicks,children:i.map([1,2,4,8,10,16],function(t){return s.jsx("option",{value:t,children:t},t)})})]})}),s.jsx("div",{children:s.jsxs("label",{children:["Ruler pixels per unit:"," ",s.jsx(D,{placeholder:40,onChange:this.change("rulerPixels"),value:this.props.rulerPixels,useArrowKeys:!0})]})}),s.jsx("div",{children:s.jsxs("label",{children:["Ruler length in units:"," ",s.jsx(D,{placeholder:10,onChange:this.change("rulerLength"),value:this.props.rulerLength,useArrowKeys:!0})]})})]})]})}};P.widgetName="measurer",P.propTypes={...c,box:r.arrayOf(r.number),image:r.shape({url:r.string,top:r.number,left:r.number}),showProtractor:r.bool,showRuler:r.bool,rulerLabel:r.string,rulerTicks:r.number,rulerPixels:r.number,rulerLength:r.number},P.defaultProps={box:[480,480],image:{},showProtractor:!0,showRuler:!1,rulerLabel:"",rulerTicks:10,rulerPixels:40,rulerLength:10};let Y=P;Y.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"_changeUrl",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"_changeTop",docblock:null,modifiers:[],params:[{name:"newTop",optional:!1,type:null}],returns:null},{name:"_changeLeft",docblock:null,modifiers:[],params:[{name:"newLeft",optional:!1,type:null}],returns:null},{name:"_changeImage",docblock:null,modifiers:[],params:[{name:"subProp",optional:!1,type:null},{name:"newValue",optional:!1,type:null}],returns:null},{name:"renderLabelChoices",docblock:null,modifiers:[],params:[{name:"choices",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MeasurerEditor",props:{box:{defaultValue:{value:"[480, 480]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},image:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"shape",value:{url:{name:"string",required:!1},top:{name:"number",required:!1},left:{name:"number",required:!1}}},required:!1},showProtractor:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},showRuler:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},rulerLabel:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},rulerTicks:{defaultValue:{value:"10",computed:!1},description:"",type:{name:"number"},required:!1},rulerPixels:{defaultValue:{value:"40",computed:!1},description:"",type:{name:"number"},required:!1},rulerLength:{defaultValue:{value:"10",computed:!1},description:"",type:{name:"number"},required:!1}},composes:["@khanacademy/perseus"]};const{NumberInput:Xs,TextInput:Zs}=g,ne=class ne extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.updateMolecule=e=>{this.change({smiles:e})},this.updateRotation=e=>{this.change({rotationAngle:e})},this.serialize=()=>m.serialize.call(this)}render(){return s.jsxs("div",{children:[s.jsx("div",{children:s.jsxs("label",{children:["SMILES: ",s.jsx(Zs,{onChange:this.updateMolecule,value:this.props.smiles})]})}),s.jsx("div",{children:s.jsxs("label",{children:["Rotation (deg): ",s.jsx(Xs,{onChange:this.updateRotation,value:this.props.rotationAngle})]})})]})}};ne.propTypes={...c,rotationAngle:r.number,smiles:r.string},ne.widgetName="molecule-renderer";let J=ne;J.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"updateMolecule",docblock:null,modifiers:[],params:[{name:"newValue",optional:!1,type:null}],returns:null},{name:"updateRotation",docblock:null,modifiers:[],params:[{name:"newValue",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MoleculeWidgetEditor",props:{rotationAngle:{description:"",type:{name:"number"},required:!1},smiles:{description:"",type:{name:"string"},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:M,TextListEditor:Pe}=g,ue="normal",Oe="auto",ce="horizontal",Ae="vertical",O=class O extends p.Component{constructor(){super(...arguments),this.onOptionsChange=(e,t,a)=>{const n={};n[e]=i.map(t,function(o){return{content:o}}),this.props.onChange(n,a)},this.onLayoutChange=e=>{this.props.onChange({layout:e.target.value})},this.onHeightChange=e=>{this.props.onChange({height:e.target.value})},this.serialize=()=>({options:i.chain(i.pluck(this.props.correctOptions,"content")).union(i.pluck(this.props.otherOptions,"content")).uniq().reject(function(t){return t===""}).sort().sortBy(function(t){return/\d/.test(t)?0:/^\$?[a-zA-Z]+\$?$/.test(t)?2:1}).map(function(t){return{content:t}}).value(),correctOptions:this.props.correctOptions,otherOptions:this.props.otherOptions,height:this.props.height,layout:this.props.layout})}render(){return s.jsxs("div",{className:"perseus-widget-orderer",children:[s.jsxs("div",{children:[" ","Correct answer:"," ",s.jsx(M,{children:s.jsx("p",{children:"Place the cards in the correct order. The same card can be used more than once in the answer but will only be displayed once at the top of a stack of identical cards."})})]}),s.jsx(Pe,{options:i.pluck(this.props.correctOptions,"content"),onChange:this.onOptionsChange.bind(this,"correctOptions"),layout:this.props.layout}),s.jsxs("div",{children:[" ","Other cards:"," ",s.jsx(M,{children:s.jsx("p",{children:"Create cards that are not part of the answer."})})]}),s.jsx(Pe,{options:i.pluck(this.props.otherOptions,"content"),onChange:this.onOptionsChange.bind(this,"otherOptions"),layout:this.props.layout}),s.jsxs("div",{children:[s.jsxs("label",{children:[" ","Layout:"," ",s.jsxs("select",{value:this.props.layout,onChange:this.onLayoutChange,children:[s.jsx("option",{value:ce,children:"Horizontal"}),s.jsx("option",{value:Ae,children:"Vertical"})]})]}),s.jsx(M,{children:s.jsx("p",{children:"Use the horizontal layout for short text and small images. The vertical layout is best for longer text (e.g. proofs)."})})]}),s.jsxs("div",{children:[s.jsxs("label",{children:[" ","Height:"," ",s.jsxs("select",{value:this.props.height,onChange:this.onHeightChange,children:[s.jsx("option",{value:ue,children:"Normal"}),s.jsx("option",{value:Oe,children:"Automatic"})]})]}),s.jsx(M,{children:s.jsx("p",{children:'Use "Normal" for text, "Automatic" for images.'})})]})]})}};O.propTypes={correctOptions:r.array,otherOptions:r.array,height:r.oneOf([ue,Oe]),layout:r.oneOf([ce,Ae]),onChange:r.func.isRequired},O.widgetName="orderer",O.defaultProps={correctOptions:[{content:"$x$"}],otherOptions:[{content:"$y$"}],height:ue,layout:ce};let X=O;X.__docgenInfo={description:"",methods:[{name:"onOptionsChange",docblock:null,modifiers:[],params:[{name:"whichOptions",optional:!1,type:null},{name:"options",optional:!1,type:null},{name:"cb",optional:!1,type:null}],returns:null},{name:"onLayoutChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"onHeightChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"OrdererEditor",props:{correctOptions:{defaultValue:{value:'[{content: "$x$"}]',computed:!1},description:"",type:{name:"array"},required:!1},otherOptions:{defaultValue:{value:'[{content: "$y$"}]',computed:!1},description:"",type:{name:"array"},required:!1},height:{defaultValue:{value:'"normal"',computed:!1},description:"",type:{name:"enum",value:[{value:'"normal"',computed:!1},{value:'"auto"',computed:!1}]},required:!1},layout:{defaultValue:{value:'"horizontal"',computed:!1},description:"",type:{name:"enum",value:[{value:'"horizontal"',computed:!1},{value:'"vertical"',computed:!1}]},required:!1},onChange:{description:"",type:{name:"func"},required:!0}}};const{InfoTip:Re}=g,A=class A extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.serialize=()=>m.serialize.call(this)}render(){const e=s.jsx(y,{ref:"passage-editor",apiOptions:this.props.apiOptions,content:this.props.passageText,widgetEnabled:!1,placeholder:"Type passage here...",onChange:a=>{this.change({passageText:a.content})},showWordCount:!0}),t=s.jsx(y,{ref:"passage-footnotes-editor",apiOptions:this.props.apiOptions,content:this.props.footnotes,widgetEnabled:!1,placeholder:"Type footnotes here...",onChange:a=>{this.change({footnotes:a.content})}});return s.jsxs("div",{className:"perseus-widget-passage-editor",children:[s.jsx("div",{className:"perseus-widget-row",children:s.jsx(b,{label:"Show line numbers",checked:this.props.showLineNumbers,onChange:a=>{this.props.onChange({showLineNumbers:a})}})}),s.jsxs("div",{children:["Passage title:",s.jsx(Re,{children:s.jsx("p",{children:"An optional title that will appear directly above the passage in the same font style. (E.g. Passage 1)"})}),s.jsx("div",{children:s.jsx("input",{type:"text",defaultValue:this.props.passageTitle,onChange:a=>{this.change({passageTitle:a.target.value})}})})]}),s.jsxs("div",{children:["Passage Text:",e]}),s.jsxs("div",{children:["Footnotes:",s.jsx(Re,{children:s.jsx("p",{children:"To add footnotes, add ^ characters where they belong in the passage. Then, add ^ in the footnotes area to reference the footnotes in the passage."})}),t]})]})}};A.propTypes={...c,passageTitle:r.string,passageText:r.string,footnotes:r.string,showLineNumbers:r.bool},A.widgetName="passage",A.defaultProps={passageTitle:"",passageText:"",footnotes:"",showLineNumbers:!0};let Z=A;Z.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PassageEditor",props:{passageTitle:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},passageText:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},footnotes:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},showLineNumbers:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:Qs,NumberInput:ze,TextInput:et}=g,R=class R extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.serialize=()=>m.serialize.call(this)}render(){return s.jsxs("div",{children:[s.jsx("div",{children:s.jsxs("label",{children:["Passage Number: ",s.jsx(ze,{value:this.props.passageNumber,onChange:this.change("passageNumber")})]})}),s.jsx("div",{children:s.jsxs("label",{children:["Reference Number: ",s.jsx(ze,{value:this.props.referenceNumber,onChange:this.change("referenceNumber")})]})}),s.jsx("div",{children:s.jsxs("label",{children:["Summary Text: ",s.jsx(et,{value:this.props.summaryText,onChange:this.change("summaryText")}),s.jsxs(Qs,{children:[s.jsx("p",{children:"Short summary of the referenced section. This will be included in parentheses and quotes automatically."}),s.jsx("p",{children:"Ex: The start ... the end"})]})]})})]})}};R.propTypes={...c,passageNumber:r.number,referenceNumber:r.number,summaryText:r.string},R.widgetName="passage-ref",R.defaultProps={passageNumber:1,referenceNumber:1,summaryText:""};let Q=R;Q.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PassageRefEditor",props:{passageNumber:{defaultValue:{value:"1",computed:!1},description:"",type:{name:"number"},required:!1},referenceNumber:{defaultValue:{value:"1",computed:!1},description:"",type:{name:"number"},required:!1},summaryText:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1}},composes:["@khanacademy/perseus"]};const z=class z extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.handleContentChange=e=>{this.change({content:e.target.value})},this.serialize=()=>m.serialize.call(this)}render(){return s.jsxs("div",{children:["Content:",s.jsx("input",{type:"text",value:this.props.content,onChange:this.handleContentChange})]})}};z.propTypes={...c,content:r.string},z.widgetName="passage-ref-target",z.defaultProps={content:""};let ee=z;ee.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleContentChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PassageRefTargetEditor",props:{content:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:w,NumberInput:Ve,RangeInput:st,TextListEditor:tt}=g,at=Ze.widget,ye="starting",xe="correct",rt=[ye,xe];function Le(l,e,t){const a=i.clone(l);a.length=e;for(let n=l.length;n"$"+ts(l,2)+"$",ie=class ie extends p.Component{constructor(){super(...arguments),this.state={editing:this.props.static?ye:xe,pic:null,loadedUrl:null,minX:null,maxX:null,tickStep:null},this.fetchPic=e=>{if(this.state.loadedUrl!==e){const t=new Image;t.src=e,t.onload=()=>{this.setState({pic:t,loadedUrl:e})}}},this.handleChangeTickStep=e=>{this.setState({tickStep:e})},this.handleChangeRange=e=>{this.setState({minX:e[0],maxX:e[1]})},this.changeLabelInterval=e=>{this.props.onChange({labelInterval:e})},this.handlePlotterChange=e=>{const t={};t[this.state.editing]=e.values,this.props.onChange(t)},this.changeType=e=>{let t;if(e==="histogram"?(t=[Ee(0)].concat(this.props.categories),this.props.onChange({type:e,categories:t})):this.props.type==="histogram"?(t=this.props.categories.slice(1),this.props.onChange({type:e,categories:t})):this.props.onChange({type:e}),t){const a=le.findDOMNode(this.refs.categories);a.value=t.join(", ")}},this.changeLabel=(e,t)=>{const a=i.clone(this.props.labels);a[e]=t.target.value,this.props.onChange({labels:a})},this.changePicUrl=e=>{const t=he.getRealImageUrl(e);this.props.onChange({picUrl:t})},this.changeCategories=e=>{let t=e.length;this.props.type==="histogram"&&t--;const a=this.props.scaleY;this.props.onChange({categories:e,correct:Le(this.props.correct,t,a),starting:Le(this.props.starting,t,a)})},this.changeScale=e=>{const t=this.props.scaleY,a=+e.target.value||U.scaleY,n=function(d){return d*a/t},o=n(this.props.maxY);this.props.onChange({scaleY:a,maxY:o,correct:i.map(this.props.correct,n),starting:i.map(this.props.starting,n)}),le.findDOMNode(this.refs.maxY).value=o},this.changeMax=e=>{this.props.onChange({maxY:+e.target.value||U.maxY})},this.changeSnaps=e=>{this.props.onChange({snapsPerLine:+e.target.value||U.snapsPerLine})},this.changeEditing=e=>{this.setState({editing:e})},this.setCategoriesFromScale=()=>{const e=this.state.tickStep||1,t=this.state.minX||0,a=this.state.maxX||0,n=Math.floor((a-t)/e)*e;let o;this.props.type==="histogram"||this.props.type==="dotplot"?o=i.range(0,n+e,e):o=i.range(e,n+e,e),o=i.map(o,h=>h+t),o=i.map(o,Ee),this.changeCategories(o);const d=le.findDOMNode(this.refs.categories);d.value=o.join(", ")},this.serialize=()=>{const e=i.pick(this.props,"correct","starting","type","labels","categories","scaleY","maxY","snapsPerLine","labelInterval");return this.props.type==="pic"&&(e.picUrl=this.props.picUrl),e}}UNSAFE_componentWillMount(){this.fetchPic(this.props.picUrl)}UNSAFE_componentWillReceiveProps(e){this.fetchPic(e.picUrl),e.static&&this.setState({editing:"starting"})}render(){const e=i.contains(["line","histogram","dotplot"],this.props.type),t=!i.contains(["pic","dotplot"],this.props.type),a={trackInteraction:()=>{},...this.props};return s.jsxs("div",{className:"perseus-widget-plotter-editor",children:[s.jsxs("div",{children:["Chart type:"," ",Qe.map(n=>s.jsxs("label",{children:[s.jsx("input",{type:"radio",name:"chart-type",checked:this.props.type===n,onChange:i.partial(this.changeType,n)}),n]},n),this)]}),s.jsxs("div",{children:["Labels:"," ",["x","y"].map((n,o)=>s.jsxs("label",{children:[n+":",s.jsx("input",{type:"text",onChange:i.partial(this.changeLabel,o),defaultValue:this.props.labels[o]})]},n),this)]}),e&&s.jsxs("div",{className:"set-from-scale-box",children:[s.jsx("span",{className:"categories-title",children:"Set Categories From Scale"}),s.jsxs("div",{children:[s.jsxs("label",{children:["Tick Step:"," ",s.jsx(Ve,{placeholder:1,useArrowKeys:!0,value:this.state.tickStep,onChange:this.handleChangeTickStep})]}),s.jsx(w,{children:s.jsx("p",{children:"The difference between adjacent ticks."})})]}),s.jsx("div",{children:s.jsxs("label",{children:["Range:"," ",s.jsx(st,{placeholder:[0,10],useArrowKeys:!0,value:[this.state.minX,this.state.maxX],onChange:this.handleChangeRange})]})}),s.jsx("div",{children:s.jsxs("button",{onClick:this.setCategoriesFromScale,children:["Set Categories"," "]})})]}),s.jsxs("div",{children:[s.jsxs("label",{children:["Label Interval:"," ",s.jsx(Ve,{useArrowKeys:!0,value:this.props.labelInterval,onChange:this.changeLabelInterval})]}),s.jsx(w,{children:s.jsx("p",{children:'Which ticks to display the labels for. For instance, setting this to "4" will only show every 4th label (plus the last one)'})})]}),this.props.type==="pic"&&s.jsxs("div",{children:[s.jsxs("label",{children:["Picture:"," ",s.jsx(f,{className:"pic-url",value:this.props.picUrl,onChange:this.changePicUrl}),s.jsx(w,{children:s.jsx("p",{children:'Use the default picture of Earth, or insert the URL for a different picture using the "Add image" function.'})})]}),this.state.pic&&this.state.pic.width!==this.state.pic.height&&s.jsxs("p",{className:"warning",children:[s.jsx("b",{children:"Warning"}),": You are using a picture which is not square. This means the image will get distorted. You should probably crop it to be square."]})]}),s.jsx("div",{children:s.jsxs("label",{children:["Categories:"," ",s.jsx(tt,{ref:"categories",layout:"horizontal",options:this.props.categories,onChange:this.changeCategories})]})}),s.jsx("div",{children:s.jsxs("label",{children:["Scale (y):"," ",s.jsx("input",{type:"text",onChange:this.changeScale,defaultValue:this.props.scaleY})]})}),s.jsx("div",{children:s.jsxs("label",{children:["Max y:"," ",s.jsx("input",{type:"text",ref:"maxY",onChange:this.changeMax,defaultValue:this.props.maxY})]})}),t&&s.jsxs("div",{children:[s.jsxs("label",{children:["Snaps per line:"," ",s.jsx("input",{type:"text",onChange:this.changeSnaps,defaultValue:this.props.snapsPerLine})]}),s.jsx(w,{children:s.jsx("p",{children:"Creates the specified number of divisions between the horizontal lines. Fewer snaps between lines makes the graph easier for the student to create correctly."})})]}),s.jsxs("div",{children:["Editing values:"," ",rt.map(n=>s.jsxs("label",{children:[s.jsx("input",{type:"radio",disabled:n===xe&&this.props.static,checked:this.props.static?n===ye:this.state.editing===n,onChange:o=>this.changeEditing(n)}),n]},n)),s.jsxs(w,{children:[s.jsx("p",{children:"Use this toggle to switch between editing the correct answer (what the student will be graded on) and the starting values (what the student will see plotted when they start the problem). Note: These cannot be the same."}),s.jsx("p",{children:"In static mode, the starting values are rendered out to the displayed widget."})]})]}),s.jsx(at,{...a,starting:this.props[this.state.editing],onChange:this.handlePlotterChange})]})}};ie.widgetName="plotter",ie.defaultProps={...U,correct:[1],starting:[1],type:"bar",labels:["",""],categories:[""],picSize:30,picBoxHeight:36,plotDimensions:[275,200],labelInterval:1,get picUrl(){const e=Ue().staticUrl;return e?e("/images/badges/earth-small.png"):null}};let se=ie;se.__docgenInfo={description:"",methods:[{name:"fetchPic",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:null}],returns:null},{name:"handleChangeTickStep",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"handleChangeRange",docblock:null,modifiers:[],params:[{name:"newValue",optional:!1,type:null}],returns:null},{name:"changeLabelInterval",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"handlePlotterChange",docblock:null,modifiers:[],params:[{name:"newProps",optional:!1,type:null}],returns:null},{name:"changeType",docblock:null,modifiers:[],params:[{name:"type",optional:!1,type:null}],returns:null},{name:"changeLabel",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"changePicUrl",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"changeCategories",docblock:null,modifiers:[],params:[{name:"categories",optional:!1,type:null}],returns:null},{name:"changeScale",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"changeMax",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"changeSnaps",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"changeEditing",docblock:null,modifiers:[],params:[{name:"editing",optional:!1,type:null}],returns:null},{name:"setCategoriesFromScale",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PlotterEditor",props:{type:{required:!1,tsType:{name:"unknown[number]",raw:'PerseusPlotterWidgetOptions["type"]'},description:"",defaultValue:{value:'"bar"',computed:!1}},labels:{required:!1,tsType:{name:"Array",elements:[{name:"string"}],raw:"Array"},description:"",defaultValue:{value:'["", ""]',computed:!1}},categories:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]}],raw:"ReadonlyArray"},description:"",defaultValue:{value:'[""]',computed:!1}},scaleY:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}},maxY:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"10",computed:!1}},snapsPerLine:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"2",computed:!1}},picSize:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"30",computed:!1}},picBoxHeight:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"36",computed:!1}},picUrl:{required:!0,tsType:{name:"string"},description:""},plotDimensions:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[275, 200]",computed:!1}},labelInterval:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}},starting:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[1]",computed:!1}},correct:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[1]",computed:!1}},static:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"any"},description:""}}};const{InfoTip:nt,NumberInput:De}=g,it=es.widget,V=class V extends p.Component{constructor(){super(...arguments),this.numberOfColumns=p.createRef(),this.focus=()=>{var e;(e=this.numberOfColumns.current)==null||e.focus()},this.onSizeInput=(e,t)=>{let a=+e||0,n=+t||0;a=Math.min(Math.max(1,a),30),n=Math.min(Math.max(1,n),6);const o=this.props.columns,d=this.props.rows,h=this.props.answers;a<=d?h.length=a:i(a-d).times(function(){h.push(he.stringArrayOfSize(o))});function x(Ce){n<=o?Ce.length=n:i(n-o).times(function(){Ce.push("")})}const we=this.props.headers;x(we),i.each(h,x),this.props.onChange({rows:a,columns:n,answers:h,headers:we})},this.serialize=()=>{const e=i.pick(this.props,"headers","rows","columns");return i.extend({},e,{answers:i.map(this.props.answers,i.clone)})}}render(){return s.jsxs("div",{children:[s.jsx("div",{className:"perseus-widget-row",children:s.jsxs("label",{children:["Number of columns:"," ",s.jsx(De,{ref:this.numberOfColumns,value:this.props.columns,onChange:e=>{e&&this.onSizeInput(this.props.rows,e)},useArrowKeys:!0})]})}),s.jsx("div",{className:"perseus-widget-row",children:s.jsxs("label",{children:["Number of rows:"," ",s.jsx(De,{ref:"numberOfRows",value:this.props.rows,onChange:e=>{e&&this.onSizeInput(e,this.props.columns)},useArrowKeys:!0})]})}),s.jsxs("div",{children:[" ","Table of answers:"," ",s.jsx(nt,{children:s.jsx("p",{children:"The student has to fill out all cells in the table. For partially filled tables create a table using the template, and insert text input boxes as desired."})})]}),s.jsx("div",{children:s.jsx(it,{headers:this.props.headers,answers:this.props.answers,onChange:this.props.onChange,apiOptions:this.props.apiOptions,editableHeaders:!0,onFocus:()=>{},onBlur:()=>{},trackInteraction:()=>{},Editor:y})})]})}};V.propTypes={rows:r.number,columns:r.number,headers:r.arrayOf(r.string),answers:r.arrayOf(r.arrayOf(r.string))},V.widgetName="table",V.defaultProps=function(){const a=i(4).times(function(){return he.stringArrayOfSize(1)});return{headers:[""],rows:4,columns:1,answers:a}}();let te=V;te.__docgenInfo={description:"",methods:[{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"onSizeInput",docblock:null,modifiers:[],params:[{name:"numRawRows",optional:!1,type:null},{name:"numRawColumns",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"TableEditor",props:{rows:{description:"",type:{name:"number"},required:!1},columns:{description:"",type:{name:"number"},required:!1},headers:{description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},answers:{description:"",type:{name:"arrayOf",value:{name:"arrayOf",value:{name:"string"}}},required:!1}}};const{InfoTip:lt}=g,ot=/khanacademy\.org\/.*\/v\/(.*)$/;function pt(l){const e=ot.exec(l);return e?e[1]:l}const L=class L extends p.Component{constructor(){super(...arguments),this._handleUrlChange=e=>{this.props.onChange({location:pt(e)})},this.change=(...e)=>u.apply(this,e),this.serialize=()=>m.serialize.call(this)}render(){return s.jsx("div",{children:s.jsxs("label",{children:["KA Video Slug:"," ",s.jsx(f,{value:this.props.location,style:{width:290},onChange:this._handleUrlChange}),s.jsx(lt,{children:"KA video URLs will be converted to just the slug."})]})})}};L.propTypes={...c,location:r.string,onChange:r.func},L.widgetName="video",L.defaultProps={location:""};let ae=L;ae.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"_handleUrlChange",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:null}],returns:null},{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"VideoEditor",props:{location:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},onChange:{description:"",type:{name:"func"},required:!1}},composes:["@khanacademy/perseus"]};const ut=[ps,$,cs,hs,ds,ms,v,W,H,B,K,ys,xs,bs,vs,js,ws,G,Y,J,Cs,Ts,X,Z,Q,ee,qs,se,ks,Ns,te,ae,Ss,F],fa=()=>{ns(ss),is(ut),ls(),os()};export{ut as A,Ps as I,ga as J,fa as r}; +import{j as s}from"./jsx-runtime-63Ea5SlK.js";import{c as _e,G as $e}from"./graph-settings-Pvhg8t7C.js";import{_ as i,$ as Fe}from"./jquery-yG1GhClm.js";import{t as We,D as He,u as Be,v as Ke,x as Ge,y as Ye,c as u,p as c,G as Je,M as Xe,z as Ze,B as Qe,T as es,w as ss}from"./article-renderer-HEYBK15c.js";import{U as he,r as ts}from"./util-AYeX86gl.js";import"./phet-simulation-_7qOO4_B.js";import"./version-akiLXZts.js";import{L as Me}from"./svg-image-7aOK05RI.js";import{A as be}from"./perseus-api-1-ethIrW.js";import"./perseus-item-C-BdPaPl.js";import"./hints-renderer-zzse9ai2.js";import{m as as,n as rs,r as ns,c as is,a as ls,d as os}from"./renderer-L37a98D_.js";import"./base-radio-kypcKNEK.js";import"./button-group-G5CZaedn.js";import"./graph-QfZUzUyx.js";import"./hud-ifw9Ofbw.js";import"./icon-7RFbyLiL.js";import"./index-BIPwuHvF.js";import"./inline-icon-6fh0Wu1y.js";import"./math-input-ILg8RrvB.js";import"./multi-button-group-QUVHbBcE.js";import"./number-input-ogh82yD8.js";import"./range-input-w5Z3sPK5.js";import"./text-input-5e4vF1bl.js";import"./text-list-editor-aj1SAzcA.js";import{g as Ue}from"./dependencies-CP7Uh8Kq.js";import"./index-0C4KXdeC.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{r as p}from"./index-6oxdNXpR.js";import{C as ps}from"./categorizer-editor-Ux-cs6do.js";import{E as us}from"./perseus-error-l3K_anoI.js";import{c as g}from"./components-ODdjt0Ld.js";import{E as m}from"./editor-jsonify-mta12v4L.js";import{C as b}from"./index-V5gl6frG.js";import{P as r}from"./index-k-0mNqHS.js";import{B as f}from"./blur-input-6j4bgLwx.js";import{D as cs}from"./definition-editor-j1sWsdkj.js";import{D as hs}from"./dropdown-editor-BFRSuUKm.js";import{E as ds}from"./explanation-editor-dSBU1vwr.js";import{E as ms}from"./expression-editor-UY7aPIQ1.js";import{i as gs}from"./icon-paths-5JCXzGsq.js";import{l as _}from"./index-awljIyHI.js";import{E as y}from"./editor-Gp3Qu6_d.js";import{i as fs}from"./icon-paths-EoBkHOLI.js";import{I as ys}from"./image-editor-vZOaSvdJ.js";import{I as xs}from"./input-number-editor-Zo4idrK9.js";import{I as bs}from"./interaction-editor-vi9RcfEM.js";import{I as vs}from"./interactive-graph-editor-QsKBcTl_.js";import{L as js}from"./label-image-editor-p_uxNi67.js";import{M as ws}from"./matcher-editor-S8mz5e0T.js";import{N as Cs}from"./number-line-editor-eS_UHnpw.js";import{N as Ts}from"./numeric-input-editor-SLlVbwKu.js";import{P as qs}from"./phet-simulation-editor-O5PngvYE.js";import{F as le}from"./index-9gkyvru-.js";import{P as ks}from"./python-program-editor-2M-li2KT.js";import{R as Ss}from"./editor-l5TJAcwO.js";import{S as Ns}from"./sorter-editor-AVkKlgrO.js";const Is={allTypes:We,DEFAULT_GRAPHER_PROPS:He,chooseType:Be,defaultPlotProps:Ke,getEquationString:Ge,typeToButton:Ye},ga=_e({displayName:"JsonEditor",getInitialState:function(){return{currentValue:JSON.stringify(this.props.value,null,4),valid:!0}},UNSAFE_componentWillReceiveProps:function(l){(!this.state.valid||!i.isEqual(l.value,JSON.parse(this.state.currentValue)))&&this.setState(this.getInitialState())},handleKeyDown:function(l){if(l.key==="Tab"){const e=l.target.selectionStart,t=l.target.value,a=t.substring(0,e),n=t.substring(e,t.length);l.target.value=a+" "+n,l.target.selectionStart=a.length+4,l.target.selectionEnd=a.length+4,l.preventDefault(),this.handleChange(l)}},handleChange:function(l){const e=l.target.value;try{let t=JSON.parse(e);i.isString(t)&&(t=JSON.parse(t)),this.setState({currentValue:e,valid:!0},function(){this.props.onChange(t)})}catch{this.setState({currentValue:e,valid:!1})}},handleBlur:function(l){const e=l.target.value;try{let t=JSON.parse(e);i.isString(t)&&(t=JSON.parse(t)),this.setState({currentValue:JSON.stringify(t,null,4),valid:!0},function(){this.props.onChange(t)})}catch{this.setState({currentValue:JSON.stringify(this.props.value,null,4),valid:!0})}},render:function(){const l="perseus-json-editor "+(this.state.valid?"valid":"invalid");return s.jsx("textarea",{className:l,value:this.state.currentValue,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onBlur:this.handleBlur})}});let Te=0;const de={},me={};window.iframeDataStore={};window.addEventListener("message",l=>{if(typeof l.data=="string"){const e=de[l.data];e&&e()}else l.data.id&&(l.data.height!==void 0?me[l.data.id](l.data.height):l.data.lintWarnings&&Me.log("LINTER REPORT",{lintWarnings:JSON.stringify(l.data.lintWarnings)}))});class Ps extends p.Component{constructor(){super(...arguments),this.container=p.createRef()}componentDidMount(){this._isMounted=!0,this.iframeID=Te,Te++,this._prepareFrame(),de[this.iframeID]=()=>{this.sendNewData(this._lastData)},me[this.iframeID]=e=>{this._lastHeight=e,this._isMounted&&this.props.seamless&&this.container.current&&(this.container.current.style.height=e+"px")}}shouldComponentUpdate(e){return e.datasetValue!==this.props.datasetValue||e.seamless!==this.props.seamless}componentDidUpdate(e){this.container.current&&(this.props.seamless?this.container.current.style.height=this._lastHeight+"px":this.container.current.style.height="100%"),e.datasetValue!==this.props.datasetValue&&this._prepareFrame()}componentWillUnmount(){de[this.iframeID]=null,me[this.iframeID]=null,this._isMounted=!1}_prepareFrame(){var t,a;this._frame&&((t=this.container.current)==null||t.removeChild(this._frame));const e=document.createElement("iframe");e.style.width="100%",e.style.height="100%",e.src=this.props.url,this.props.datasetKey&&(e.dataset[this.props.datasetKey]=this.props.datasetValue),e.dataset.id=String(this.iframeID),this.props.seamless&&(e.dataset.lintGutter="true"),(a=this.container.current)==null||a.appendChild(e),this._frame=e}sendNewData(e){const t=this._frame;this._isMounted&&e&&(t!=null&&t.contentWindow)&&(this._lastData=e,window.iframeDataStore[this.iframeID]=e,t.contentWindow.postMessage(this.iframeID,"*"))}render(){return s.jsx("div",{ref:this.container,style:{width:"100%",height:"100%"}})}}Ps.__docgenInfo={description:"",methods:[{name:"_prepareFrame",docblock:null,modifiers:[],params:[],returns:null},{name:"sendNewData",docblock:null,modifiers:[],params:[{name:"data",optional:!1,type:{name:"any"}}],returns:null}],displayName:"IframeContentRenderer",props:{url:{required:!0,tsType:{name:"string"},description:""},datasetKey:{required:!0,tsType:{name:"string"},description:""},datasetValue:{required:!0,tsType:{name:"any"},description:""},seamless:{required:!0,tsType:{name:"boolean"},description:""}}};const{InfoTip:qe}=g,ke=400,Se=400;var j;let Os=(j=class extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.serialize=()=>m.serialize.call(this)}render(){return s.jsxs("fieldset",{className:"pair-editor",children:[s.jsxs("label",{children:["Name:"," ",s.jsx(f,{value:this.props.name,onChange:this.change("name")})]}),s.jsxs("label",{children:[" ","Value:"," ",s.jsx(f,{value:this.props.value,onChange:this.change("value")})]})]})}},j.propTypes={...c,name:r.string,value:r.string},j.defaultProps={name:"",value:""},j);var E;let As=(E=class extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.handlePairChange=(e,t)=>{const a=this.props.pairs.slice();a[e]=t;const n=a[a.length-1];n.name&&n.value&&a.push({name:"",value:""}),this.change("pairs",a)},this.serialize=()=>m.serialize.call(this)}render(){const e=i.map(this.props.pairs,(t,a)=>s.jsx(Os,{name:t.name,value:t.value,onChange:this.handlePairChange.bind(this,a)},a));return s.jsx("div",{children:e})}},E.propTypes={...c,pairs:r.arrayOf(r.shape({name:r.string,value:r.string})).isRequired},E);const Rs=/khanacademy\.org\/computer-programming\/[^\/]+\/(\d+)/;function zs(l){const e=Rs.exec(l);return e&&(l=e[1]),l}const C=class C extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this._handleSettingsChange=e=>{this.change({settings:e.pairs})},this._handleProgramIDChange=e=>{e=zs(e);const{isDevServer:t,InitialRequestUrl:a}=Ue(),o=`${t?a.origin:"https://www.khanacademy.org"}/api/internal/scratchpads/${e}`;Fe.getJSON(o).done(d=>{const h=d.userAuthoredContentType;this.change({width:d.width,height:d.height,programID:e,programType:h})}).fail((d,h,x)=>{Me.error("Error retrieving scratchpad info for program ID ",us.TransientService,{cause:x,loggedMetadata:{textStatus:h,programID:e}}),this.change({width:ke,height:Se,programID:e,programType:null})})},this.serialize=()=>m.serialize.call(this)}render(){return s.jsxs("div",{children:[s.jsxs("label",{children:["Url or Program ID:"," ",s.jsx(f,{value:this.props.programID,onChange:this._handleProgramIDChange})]}),s.jsx("br",{}),s.jsx(b,{label:"Show Editor",checked:this.props.showEditor,onChange:e=>{this.props.onChange({showEditor:e})}}),s.jsx(qe,{children:'If you show the editor, you should use the "full-width" alignment to make room for the width of the editor.'}),s.jsx("br",{}),s.jsx(b,{label:"Show Buttons",checked:this.props.showButtons,onChange:e=>{this.props.onChange({showButtons:e})}}),s.jsx("br",{}),s.jsxs("label",{children:["Settings:",s.jsx(As,{name:"settings",pairs:this.props.settings,onChange:this._handleSettingsChange}),s.jsxs(qe,{children:["Settings that you add here are available to the program as an object returned by ",s.jsx("code",{children:"Program.settings()"})]})]})]})}};C.propTypes={...c},C.widgetName="cs-program",C.defaultProps={programID:"",programType:null,settings:[{name:"",value:""}],showEditor:!1,showButtons:!1,width:ke,height:Se};let $=C;$.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"_handleSettingsChange",docblock:null,modifiers:[],params:[{name:"settings",optional:!1,type:null}],returns:null},{name:"_handleProgramIDChange",docblock:null,modifiers:[],params:[{name:"programID",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"CSProgramEditor",props:{programID:{defaultValue:{value:'""',computed:!1},required:!1},programType:{defaultValue:{value:"null",computed:!1},required:!1},settings:{defaultValue:{value:'[{name: "", value: ""}]',computed:!1},required:!1},showEditor:{defaultValue:{value:"false",computed:!1},required:!1},showButtons:{defaultValue:{value:"false",computed:!1},required:!1},width:{defaultValue:{value:"400",computed:!1},required:!1},height:{defaultValue:{value:"400",computed:!1},required:!1}},composes:["@khanacademy/perseus"]};const ve=class ve extends p.Component{serialize(){return m.serialize.call(this)}render(){return s.jsxs("div",{children:[s.jsx("p",{children:"This widget has been deprecated and removed"}),s.jsx("p",{children:"Learners will see a message and they will not be graded on this part. Please replace this widget with a supported one."})]})}};ve.widgetName="deprecated-standin";let F=ve;F.__docgenInfo={description:"",methods:[{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"any"}}}],displayName:"DeprecatedStandinEditor",props:{onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(options: any) => void",signature:{arguments:[{type:{name:"any"},name:"options"}],return:{name:"void"}}},description:""}}};const{InlineIcon:Ne,TextInput:Vs}=g,T=class T extends p.Component{constructor(){super(...arguments),this.editor=p.createRef(),this.hintEditor=p.createRef(),this.change=(...e)=>u.apply(this,e),this.handleAddHint=()=>{const e={content:""};this.props.onChange({hint:e},()=>{var t;(t=this.hintEditor.current)==null||t.focus()})},this.handleRemoveHint=e=>{this.props.onChange({hint:null})},this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=()=>{var e,t;return{title:this.props.title,...(e=this.editor.current)==null?void 0:e.serialize(),hint:(t=this.hintEditor.current)==null?void 0:t.serialize()}}}render(){return s.jsxs("div",{className:"perseus-group-editor",children:[s.jsx("div",{className:"perseus-widget-row",children:s.jsxs("label",{className:_.css(oe.title),children:["Title:"," ",s.jsx(Vs,{value:this.props.title,className:_.css(oe.input),onChange:this.change("title")})]})}),s.jsx(y,{ref:this.editor,content:this.props.content,widgets:this.props.widgets,apiOptions:this.props.apiOptions,images:this.props.images,widgetEnabled:!0,immutableWidgets:!1,onChange:this.props.onChange,warnNoPrompt:!0,warnNoWidgets:!0}),!this.props.hint&&s.jsxs("button",{type:"button",style:{marginTop:10},className:"add-hint simple-button orange",onClick:this.handleAddHint,children:[s.jsx(Ne,{...fs})," Add a hint"]}),this.props.hint&&s.jsxs("div",{className:"perseus-hint-editor",children:[s.jsx("div",{className:_.css(oe.hintsTitle),children:"Hint"}),s.jsx(y,{ref:this.hintEditor,content:this.props.hint?this.props.hint.content:"",widgets:this.props.hint?this.props.hint.widgets:{},apiOptions:this.props.apiOptions,images:this.props.hint&&this.props.hint.images,widgetEnabled:!0,immutableWidgets:!1,onChange:e=>{this.change("hint",Object.assign({},this.props.hint,e))}}),s.jsxs("button",{type:"button",className:"remove-hint simple-button orange",onClick:this.handleRemoveHint,children:[s.jsx(Ne,{...gs})," Remove this hint"]})]})]})}};T.propTypes={...c,title:r.string,content:r.string,widgets:r.object,images:r.object,apiOptions:be.propTypes},T.widgetName="graded-group",T.defaultProps={title:"",content:"",widgets:{},images:{},hint:null};let v=T;const oe=_.StyleSheet.create({title:{fontSize:18,fontWeight:"bold"},input:{fontSize:18},hintsTitle:{marginTop:10,fontSize:"110%",fontWeight:"bold"}});v.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleAddHint",docblock:null,modifiers:[],params:[],returns:null},{name:"handleRemoveHint",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GradedGroupEditor",props:{title:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},content:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},widgets:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},images:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},hint:{defaultValue:{value:"null",computed:!1},required:!1},apiOptions:{description:"",type:{name:"shape",value:{isArticle:{name:"bool",required:!0},onFocusChange:{name:"func",required:!0},GroupMetadataEditor:{name:"func",required:!0},showAlignmentOptions:{name:"bool",required:!0},readOnly:{name:"bool",required:!0},answerableCallback:{name:"func",required:!1},getAnotherHint:{name:"func",required:!1},interactionCallback:{name:"func",required:!1},groupAnnotator:{name:"func",required:!0},imagePlaceholder:{name:"node",required:!1},widgetPlaceholder:{name:"node",required:!1},baseElements:{name:"shape",value:{Link:{name:"func",required:!1}},required:!1},imagePreloader:{name:"func",required:!1},trackInteraction:{name:"func",required:!1},customKeypad:{name:"bool",required:!1},nativeKeypadProxy:{name:"func",required:!1},isMobile:{name:"bool",required:!1},setDrawingAreaAvailable:{name:"func",required:!1},hintProgressColor:{name:"string",required:!1},canScrollPage:{name:"bool",required:!1},crossOutEnabled:{name:"bool",required:!1},editorChangeDelay:{name:"number",required:!1}}},required:!0}},composes:["@khanacademy/perseus"]};const q=class q extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.getSaveWarnings=()=>[].concat(...this._editors.map(e=>e?e.getSaveWarnings():[])),this.serialize=()=>({gradedGroups:this.props.gradedGroups}),this.renderGroups=()=>this.props.gradedGroups?this.props.gradedGroups.map((e,t)=>s.jsx(v,{ref:a=>this._editors[t]=a,...e,apiOptions:this.props.apiOptions,widgetEnabled:!0,immutableWidgets:!1,onChange:a=>this.change("gradedGroups",Ls(this.props.gradedGroups,t,{...this.props.gradedGroups[t],...a}))},t)):null,this.addGroup=()=>{const e=this.props.gradedGroups||[];this.change("gradedGroups",e.concat([v.defaultProps]))}}UNSAFE_componentWillMount(){this._editors=[]}render(){return s.jsxs("div",{className:"perseus-group-editor",children:[this.renderGroups(),s.jsx("button",{onClick:this.addGroup,children:"Add group"})]})}};q.propTypes={...c,apiOptions:be.propTypes,gradedGroups:r.array,onChange:r.func.isRequired},q.widgetName="graded-group-set",q.defaultProps={gradedGroups:[]};let W=q;const Ls=(l,e,t)=>[...l.slice(0,e),t,...l.slice(e+1)];W.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null},{name:"renderGroups",docblock:null,modifiers:[],params:[],returns:null},{name:"addGroup",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GradedGroupSetEditor",props:{gradedGroups:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"array"},required:!1},apiOptions:{description:"",type:{name:"shape",value:{isArticle:{name:"bool",required:!0},onFocusChange:{name:"func",required:!0},GroupMetadataEditor:{name:"func",required:!0},showAlignmentOptions:{name:"bool",required:!0},readOnly:{name:"bool",required:!0},answerableCallback:{name:"func",required:!1},getAnotherHint:{name:"func",required:!1},interactionCallback:{name:"func",required:!1},groupAnnotator:{name:"func",required:!0},imagePlaceholder:{name:"node",required:!1},widgetPlaceholder:{name:"node",required:!1},baseElements:{name:"shape",value:{Link:{name:"func",required:!1}},required:!1},imagePreloader:{name:"func",required:!1},trackInteraction:{name:"func",required:!1},customKeypad:{name:"bool",required:!1},nativeKeypadProxy:{name:"func",required:!1},isMobile:{name:"bool",required:!1},setDrawingAreaAvailable:{name:"func",required:!1},hintProgressColor:{name:"string",required:!1},canScrollPage:{name:"bool",required:!1},crossOutEnabled:{name:"bool",required:!1},editorChangeDelay:{name:"number",required:!1}}},required:!0},onChange:{description:"",type:{name:"func"},required:!0}},composes:["@khanacademy/perseus"]};const{InfoTip:Es,MultiButtonGroup:Ds}=g,Ms=Je.widget,{DEFAULT_GRAPHER_PROPS:pe,allTypes:Us,chooseType:_s,defaultPlotProps:$s,getEquationString:Fs,typeToButton:Ws}=Is,k=class k extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.handleAvailableTypesChange=e=>{let t=this.props.correct;if(!i.contains(e,this.props.correct.type)){const a=this.props.graph,n=_s(e);t=$s(n,a)}this.props.onChange({availableTypes:e,correct:t})},this.serialize=()=>i.chain(this.props).pick("correct","availableTypes").extend({graph:i.omit(this.props.graph,"box")}).value()}render(){const e=rs.SMALL;let t,a;if(this.props.graph.valid===!0){const n={graph:this.props.graph,plot:this.props.correct,availableTypes:this.props.availableTypes,onChange:(o,d)=>{var x;let h=this.props.correct;h.type===((x=o.plot)==null?void 0:x.type)?h=i.extend({},h,o.plot):h=o.plot,this.props.onChange({correct:h},d)},trackInteraction:function(){}};a=s.jsx(Ms,{...n,apiOptions:this.props.apiOptions,containerSizeClass:e}),t=Fs(n)}else a=s.jsx("div",{className:"perseus-error",children:this.props.graph.valid});return s.jsxs("div",{children:[s.jsxs("div",{children:["Correct answer"," ",s.jsx(Es,{children:s.jsx("p",{children:"Graph the correct answer in the graph below and ensure the equation or point coordinates displayed represent the correct answer."})})," ",": ",t]}),s.jsx($e,{editableSettings:["graph","snap","image"],box:as(e),range:this.props.graph.range,labels:this.props.graph.labels,step:this.props.graph.step,gridStep:this.props.graph.gridStep,snapStep:this.props.graph.snapStep,valid:this.props.graph.valid,backgroundImage:this.props.graph.backgroundImage,markings:this.props.graph.markings,rulerLabel:this.props.graph.rulerLabel,rulerTicks:this.props.graph.rulerTicks,showTooltips:this.props.graph.showTooltips,onChange:this.change("graph")}),s.jsxs("div",{className:"perseus-widget-row",children:[s.jsx("label",{children:"Available functions: "}),s.jsx(Ds,{allowEmpty:!1,values:this.props.availableTypes,buttons:i.map(Us,Ws),onChange:this.handleAvailableTypesChange})]}),a]})}};k.propTypes={...c},k.widgetName="grapher",k.defaultProps={correct:pe.plot,graph:pe.graph,availableTypes:pe.availableTypes};let H=k;H.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleAvailableTypesChange",docblock:null,modifiers:[],params:[{name:"newAvailableTypes",optional:!1,type:{name:"Array",elements:[{name:"any"}],raw:"Array",alias:"Array"}}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GrapherEditor",props:{correct:{defaultValue:{value:"DEFAULT_GRAPHER_PROPS.plot",computed:!0},required:!1},graph:{defaultValue:{value:"DEFAULT_GRAPHER_PROPS.graph",computed:!0},required:!1},availableTypes:{defaultValue:{value:"DEFAULT_GRAPHER_PROPS.availableTypes",computed:!0},required:!1}},composes:["@khanacademy/perseus"]};const S=class S extends p.Component{constructor(){super(...arguments),this.editor=p.createRef(),this._renderMetadataEditor=()=>{const e=this.props.apiOptions.GroupMetadataEditor;return s.jsx(e,{value:this.props.metadata,onChange:this.change("metadata")})},this.change=(...e)=>u.apply(this,e),this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=()=>{var e;return i.extend({},(e=this.editor.current)==null?void 0:e.serialize(),{metadata:this.props.metadata})}}render(){return s.jsxs("div",{className:"perseus-group-editor",children:[s.jsx("div",{children:this._renderMetadataEditor()}),s.jsx(y,{ref:this.editor,content:this.props.content,widgets:this.props.widgets,apiOptions:this.props.apiOptions,images:this.props.images,widgetEnabled:!0,immutableWidgets:!1,onChange:this.props.onChange})]})}};S.propTypes={...c,content:r.string,widgets:r.object,images:r.object,metadata:r.any,apiOptions:be.propTypes},S.widgetName="group",S.defaultProps={content:"",widgets:{},images:{},metadata:void 0};let B=S;B.__docgenInfo={description:"",methods:[{name:"_renderMetadataEditor",docblock:null,modifiers:[],params:[],returns:null},{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GroupEditor",props:{content:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},widgets:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},images:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},metadata:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"any"},required:!1},apiOptions:{description:"",type:{name:"shape",value:{isArticle:{name:"bool",required:!0},onFocusChange:{name:"func",required:!0},GroupMetadataEditor:{name:"func",required:!0},showAlignmentOptions:{name:"bool",required:!0},readOnly:{name:"bool",required:!0},answerableCallback:{name:"func",required:!1},getAnotherHint:{name:"func",required:!1},interactionCallback:{name:"func",required:!1},groupAnnotator:{name:"func",required:!0},imagePlaceholder:{name:"node",required:!1},widgetPlaceholder:{name:"node",required:!1},baseElements:{name:"shape",value:{Link:{name:"func",required:!1}},required:!1},imagePreloader:{name:"func",required:!1},trackInteraction:{name:"func",required:!1},customKeypad:{name:"bool",required:!1},nativeKeypadProxy:{name:"func",required:!1},isMobile:{name:"bool",required:!1},setDrawingAreaAvailable:{name:"func",required:!1},hintProgressColor:{name:"string",required:!1},canScrollPage:{name:"bool",required:!1},crossOutEnabled:{name:"bool",required:!1},editorChangeDelay:{name:"number",required:!1}}},required:!0}},composes:["@khanacademy/perseus"]};const re=class re extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.serialize=()=>m.serialize.call(this)}render(){return s.jsxs("fieldset",{children:[s.jsxs("label",{children:["Name:",s.jsx(f,{value:this.props.name,onChange:this.change("name")})]}),s.jsxs("label",{children:["Value:",s.jsx(f,{value:this.props.value,onChange:this.change("value")})]})]})}};re.propTypes={...c,name:r.string,value:r.string},re.defaultProps={name:"",value:""};let ge=re;const je=class je extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.handlePairChange=(e,t)=>{const a=this.props.pairs.slice();a[e]=t;const n=a[a.length-1];n.name&&n.value&&a.push({name:"",value:""}),this.change("pairs",a)},this.serialize=()=>m.serialize.call(this)}render(){const e=i.map(this.props.pairs,(t,a)=>s.jsx(ge,{name:t.name,value:t.value,onChange:this.handlePairChange.bind(this,a)},a));return s.jsx("div",{children:e})}};je.propTypes={...c,pairs:r.arrayOf(r.shape({name:r.string,value:r.string})).isRequired};let fe=je;const N=class N extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.handleSettingsChange=e=>{this.change({settings:e.pairs})},this.serialize=()=>m.serialize.call(this)}render(){return s.jsxs("div",{children:[s.jsxs("div",{style:{fontWeight:"bold",textAlign:"center"},children:["This widget is deprecated! ",s.jsx("br",{}),"Try using the Video or CS Program widgets instead."]}),s.jsxs("label",{children:["Url or Program ID:",s.jsx(f,{value:this.props.url,onChange:this.change("url")})]}),s.jsx("br",{}),s.jsxs("label",{children:["Settings:",s.jsx(fe,{name:"settings",pairs:this.props.settings,onChange:this.handleSettingsChange})]}),s.jsx("br",{}),s.jsxs("label",{children:["Width:",s.jsx(f,{value:this.props.width,onChange:this.change("width")})]}),s.jsxs("label",{children:["Height:",s.jsx(f,{value:this.props.height,onChange:this.change("height")})]}),s.jsx(b,{label:"Allow full screen",checked:this.props.allowFullScreen,onChange:e=>{this.props.onChange({allowFullScreen:e})}}),s.jsx("br",{}),s.jsx(b,{label:"Allow iframe content to redirect the page",checked:this.props.allowTopNavigation,onChange:e=>{this.props.onChange({allowTopNavigation:e})}})]})}};N.propTypes={...c},N.widgetName="iframe",N.defaultProps={url:"",settings:[{name:"",value:""}],width:"400",height:"400",allowFullScreen:!1,allowTopNavigation:!1};let K=N;K.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleSettingsChange",docblock:null,modifiers:[],params:[{name:"settings",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"IframeEditor",props:{url:{defaultValue:{value:'""',computed:!1},required:!1},settings:{defaultValue:{value:'[{name: "", value: ""}]',computed:!1},required:!1},width:{defaultValue:{value:'"400"',computed:!1},required:!1},height:{defaultValue:{value:'"400"',computed:!1},required:!1},allowFullScreen:{defaultValue:{value:"false",computed:!1},required:!1},allowTopNavigation:{defaultValue:{value:"false",computed:!1},required:!1}},composes:["@khanacademy/perseus"]};const{RangeInput:Hs}=g,Bs=Xe.widget,Ie=6,Ks=function(l){const e=[1,1];return i(l).each((t,a)=>{let n=0;i(t).each((o,d)=>{o!=null&&o.toString().length&&(n=d+1)}),e[1]=Math.max(e[1],n),n>0&&(e[0]=Math.max(e[0],a+1))}),e},I=class I extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.onMatrixBoardSizeChange=e=>{const t=Ks(this.props.answers);if(e[0]!==null&&e[1]!==null){e=[Math.round(Math.min(Math.max(e[0],1),Ie)),Math.round(Math.min(Math.max(e[1],1),Ie))];const a=i(Math.min(e[0],t[0])).times(n=>i(Math.min(e[1],t[1])).times(o=>this.props.answers[n][o]));this.props.onChange({matrixBoardSize:e,answers:a})}},this.serialize=()=>m.serialize.call(this)}render(){const e=i.extend({numericInput:!0,onBlur:()=>{},onFocus:()=>{},trackInteraction:()=>{}},this.props);return s.jsxs("div",{className:"perseus-matrix-editor",children:[s.jsxs("div",{className:"perseus-widget-row",children:[" ","Max matrix size:"," ",s.jsx(Hs,{value:this.props.matrixBoardSize,onChange:this.onMatrixBoardSizeChange,format:this.props.labelStyle,useArrowKeys:!0})]}),s.jsx("div",{className:"perseus-widget-row",children:s.jsx(Bs,{...e})}),s.jsxs("div",{className:"perseus-widget-row",children:[" ","Matrix prefix:"," ",s.jsx(y,{ref:"prefix",apiOptions:this.props.apiOptions,content:this.props.prefix,widgetEnabled:!1,onChange:t=>{this.change({prefix:t.content})}})]}),s.jsxs("div",{className:"perseus-widget-row",children:[" ","Matrix suffix:"," ",s.jsx(y,{ref:"suffix",apiOptions:this.props.apiOptions,content:this.props.suffix,widgetEnabled:!1,onChange:t=>{this.change({suffix:t.content})}})]})]})}};I.propTypes={...c,matrixBoardSize:r.arrayOf(r.number).isRequired,answers:r.arrayOf(r.arrayOf(r.number)),prefix:r.string,suffix:r.string,cursorPosition:r.arrayOf(r.number)},I.widgetName="matrix",I.defaultProps={matrixBoardSize:[3,3],answers:[[]],prefix:"",suffix:"",cursorPosition:[0,0]};let G=I;G.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"onMatrixBoardSizeChange",docblock:null,modifiers:[],params:[{name:"range",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MatrixEditor",props:{matrixBoardSize:{defaultValue:{value:"[3, 3]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},answers:{defaultValue:{value:"[[]]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"arrayOf",value:{name:"number"}}},required:!1},prefix:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},suffix:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},cursorPosition:{defaultValue:{value:"[0, 0]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:Gs,NumberInput:D,RangeInput:Ys}=g,Js={url:null,top:0,left:0},P=class P extends p.Component{constructor(){super(...arguments),this.className="perseus-widget-measurer",this.change=(...e)=>u.apply(this,e),this._changeUrl=e=>{this._changeImage("url",e.target.value)},this._changeTop=e=>{this._changeImage("top",e)},this._changeLeft=e=>{this._changeImage("left",e)},this._changeImage=(e,t)=>{const a=i.clone(this.props.image);a[e]=t,this.change("image",a)},this.renderLabelChoices=e=>i.map(e,function(t){const[a,n]=t;return s.jsx("option",{value:n,children:a},n)}),this.serialize=()=>m.serialize.call(this)}render(){const e=i.extend({},Js,this.props.image);return s.jsxs("div",{className:"perseus-widget-measurer",children:[s.jsx("div",{children:"Image displayed under protractor and/or ruler:"}),s.jsxs("div",{children:["URL:"," ",s.jsx("input",{type:"text",className:"perseus-widget-measurer-url",ref:"image-url",defaultValue:e.url,onChange:this._changeUrl}),s.jsx(Gs,{children:s.jsx("p",{children:'Create an image in graphie, or use the "Add image" function to create a background.'})})]}),e.url&&s.jsxs("div",{className:"perseus-widget-row",children:[s.jsxs("label",{className:"perseus-widget-left-col",children:["Pixels from top:"," ",s.jsx(D,{placeholder:0,onChange:this._changeTop,value:e.top,useArrowKeys:!0})]}),s.jsxs("label",{className:"perseus-widget-right-col",children:["Pixels from left:"," ",s.jsx(D,{placeholder:0,onChange:this._changeLeft,value:e.left,useArrowKeys:!0})]})]}),s.jsxs("div",{children:["Containing area [width, height]:"," ",s.jsx(Ys,{onChange:this.change("box"),value:this.props.box,useArrowKeys:!0})]}),s.jsxs("div",{className:"perseus-widget-row",children:[s.jsx("div",{className:"perseus-widget-left-col",children:s.jsx(b,{label:"Show ruler",checked:this.props.showRuler,onChange:t=>{this.props.onChange({showRuler:t})}})}),s.jsx("div",{className:"perseus-widget-right-col",children:s.jsx(b,{label:"Show protractor",checked:this.props.showProtractor,onChange:t=>{this.props.onChange({showProtractor:t})}})})]}),this.props.showRuler&&s.jsxs("div",{children:[s.jsx("div",{children:s.jsxs("label",{children:[" ","Ruler label:"," ",s.jsxs("select",{onChange:t=>this.change("rulerLabel",t.target.value),value:this.props.rulerLabel,children:[s.jsx("option",{value:"",children:"None"}),s.jsx("optgroup",{label:"Metric",children:this.renderLabelChoices([["milimeters","mm"],["centimeters","cm"],["meters","m"],["kilometers","km"]])}),s.jsx("optgroup",{label:"Imperial",children:this.renderLabelChoices([["inches","in"],["feet","ft"],["yards","yd"],["miles","mi"]])})]})]})}),s.jsx("div",{children:s.jsxs("label",{children:[" ","Ruler ticks:"," ",s.jsx("select",{onChange:t=>this.change("rulerTicks",+t.target.value),value:this.props.rulerTicks,children:i.map([1,2,4,8,10,16],function(t){return s.jsx("option",{value:t,children:t},t)})})]})}),s.jsx("div",{children:s.jsxs("label",{children:["Ruler pixels per unit:"," ",s.jsx(D,{placeholder:40,onChange:this.change("rulerPixels"),value:this.props.rulerPixels,useArrowKeys:!0})]})}),s.jsx("div",{children:s.jsxs("label",{children:["Ruler length in units:"," ",s.jsx(D,{placeholder:10,onChange:this.change("rulerLength"),value:this.props.rulerLength,useArrowKeys:!0})]})})]})]})}};P.widgetName="measurer",P.propTypes={...c,box:r.arrayOf(r.number),image:r.shape({url:r.string,top:r.number,left:r.number}),showProtractor:r.bool,showRuler:r.bool,rulerLabel:r.string,rulerTicks:r.number,rulerPixels:r.number,rulerLength:r.number},P.defaultProps={box:[480,480],image:{},showProtractor:!0,showRuler:!1,rulerLabel:"",rulerTicks:10,rulerPixels:40,rulerLength:10};let Y=P;Y.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"_changeUrl",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"_changeTop",docblock:null,modifiers:[],params:[{name:"newTop",optional:!1,type:null}],returns:null},{name:"_changeLeft",docblock:null,modifiers:[],params:[{name:"newLeft",optional:!1,type:null}],returns:null},{name:"_changeImage",docblock:null,modifiers:[],params:[{name:"subProp",optional:!1,type:null},{name:"newValue",optional:!1,type:null}],returns:null},{name:"renderLabelChoices",docblock:null,modifiers:[],params:[{name:"choices",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MeasurerEditor",props:{box:{defaultValue:{value:"[480, 480]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},image:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"shape",value:{url:{name:"string",required:!1},top:{name:"number",required:!1},left:{name:"number",required:!1}}},required:!1},showProtractor:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},showRuler:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},rulerLabel:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},rulerTicks:{defaultValue:{value:"10",computed:!1},description:"",type:{name:"number"},required:!1},rulerPixels:{defaultValue:{value:"40",computed:!1},description:"",type:{name:"number"},required:!1},rulerLength:{defaultValue:{value:"10",computed:!1},description:"",type:{name:"number"},required:!1}},composes:["@khanacademy/perseus"]};const{NumberInput:Xs,TextInput:Zs}=g,ne=class ne extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.updateMolecule=e=>{this.change({smiles:e})},this.updateRotation=e=>{this.change({rotationAngle:e})},this.serialize=()=>m.serialize.call(this)}render(){return s.jsxs("div",{children:[s.jsx("div",{children:s.jsxs("label",{children:["SMILES: ",s.jsx(Zs,{onChange:this.updateMolecule,value:this.props.smiles})]})}),s.jsx("div",{children:s.jsxs("label",{children:["Rotation (deg): ",s.jsx(Xs,{onChange:this.updateRotation,value:this.props.rotationAngle})]})})]})}};ne.propTypes={...c,rotationAngle:r.number,smiles:r.string},ne.widgetName="molecule-renderer";let J=ne;J.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"updateMolecule",docblock:null,modifiers:[],params:[{name:"newValue",optional:!1,type:null}],returns:null},{name:"updateRotation",docblock:null,modifiers:[],params:[{name:"newValue",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MoleculeWidgetEditor",props:{rotationAngle:{description:"",type:{name:"number"},required:!1},smiles:{description:"",type:{name:"string"},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:M,TextListEditor:Pe}=g,ue="normal",Oe="auto",ce="horizontal",Ae="vertical",O=class O extends p.Component{constructor(){super(...arguments),this.onOptionsChange=(e,t,a)=>{const n={};n[e]=i.map(t,function(o){return{content:o}}),this.props.onChange(n,a)},this.onLayoutChange=e=>{this.props.onChange({layout:e.target.value})},this.onHeightChange=e=>{this.props.onChange({height:e.target.value})},this.serialize=()=>({options:i.chain(i.pluck(this.props.correctOptions,"content")).union(i.pluck(this.props.otherOptions,"content")).uniq().reject(function(t){return t===""}).sort().sortBy(function(t){return/\d/.test(t)?0:/^\$?[a-zA-Z]+\$?$/.test(t)?2:1}).map(function(t){return{content:t}}).value(),correctOptions:this.props.correctOptions,otherOptions:this.props.otherOptions,height:this.props.height,layout:this.props.layout})}render(){return s.jsxs("div",{className:"perseus-widget-orderer",children:[s.jsxs("div",{children:[" ","Correct answer:"," ",s.jsx(M,{children:s.jsx("p",{children:"Place the cards in the correct order. The same card can be used more than once in the answer but will only be displayed once at the top of a stack of identical cards."})})]}),s.jsx(Pe,{options:i.pluck(this.props.correctOptions,"content"),onChange:this.onOptionsChange.bind(this,"correctOptions"),layout:this.props.layout}),s.jsxs("div",{children:[" ","Other cards:"," ",s.jsx(M,{children:s.jsx("p",{children:"Create cards that are not part of the answer."})})]}),s.jsx(Pe,{options:i.pluck(this.props.otherOptions,"content"),onChange:this.onOptionsChange.bind(this,"otherOptions"),layout:this.props.layout}),s.jsxs("div",{children:[s.jsxs("label",{children:[" ","Layout:"," ",s.jsxs("select",{value:this.props.layout,onChange:this.onLayoutChange,children:[s.jsx("option",{value:ce,children:"Horizontal"}),s.jsx("option",{value:Ae,children:"Vertical"})]})]}),s.jsx(M,{children:s.jsx("p",{children:"Use the horizontal layout for short text and small images. The vertical layout is best for longer text (e.g. proofs)."})})]}),s.jsxs("div",{children:[s.jsxs("label",{children:[" ","Height:"," ",s.jsxs("select",{value:this.props.height,onChange:this.onHeightChange,children:[s.jsx("option",{value:ue,children:"Normal"}),s.jsx("option",{value:Oe,children:"Automatic"})]})]}),s.jsx(M,{children:s.jsx("p",{children:'Use "Normal" for text, "Automatic" for images.'})})]})]})}};O.propTypes={correctOptions:r.array,otherOptions:r.array,height:r.oneOf([ue,Oe]),layout:r.oneOf([ce,Ae]),onChange:r.func.isRequired},O.widgetName="orderer",O.defaultProps={correctOptions:[{content:"$x$"}],otherOptions:[{content:"$y$"}],height:ue,layout:ce};let X=O;X.__docgenInfo={description:"",methods:[{name:"onOptionsChange",docblock:null,modifiers:[],params:[{name:"whichOptions",optional:!1,type:null},{name:"options",optional:!1,type:null},{name:"cb",optional:!1,type:null}],returns:null},{name:"onLayoutChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"onHeightChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"OrdererEditor",props:{correctOptions:{defaultValue:{value:'[{content: "$x$"}]',computed:!1},description:"",type:{name:"array"},required:!1},otherOptions:{defaultValue:{value:'[{content: "$y$"}]',computed:!1},description:"",type:{name:"array"},required:!1},height:{defaultValue:{value:'"normal"',computed:!1},description:"",type:{name:"enum",value:[{value:'"normal"',computed:!1},{value:'"auto"',computed:!1}]},required:!1},layout:{defaultValue:{value:'"horizontal"',computed:!1},description:"",type:{name:"enum",value:[{value:'"horizontal"',computed:!1},{value:'"vertical"',computed:!1}]},required:!1},onChange:{description:"",type:{name:"func"},required:!0}}};const{InfoTip:Re}=g,A=class A extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.serialize=()=>m.serialize.call(this)}render(){const e=s.jsx(y,{ref:"passage-editor",apiOptions:this.props.apiOptions,content:this.props.passageText,widgetEnabled:!1,placeholder:"Type passage here...",onChange:a=>{this.change({passageText:a.content})},showWordCount:!0}),t=s.jsx(y,{ref:"passage-footnotes-editor",apiOptions:this.props.apiOptions,content:this.props.footnotes,widgetEnabled:!1,placeholder:"Type footnotes here...",onChange:a=>{this.change({footnotes:a.content})}});return s.jsxs("div",{className:"perseus-widget-passage-editor",children:[s.jsx("div",{className:"perseus-widget-row",children:s.jsx(b,{label:"Show line numbers",checked:this.props.showLineNumbers,onChange:a=>{this.props.onChange({showLineNumbers:a})}})}),s.jsxs("div",{children:["Passage title:",s.jsx(Re,{children:s.jsx("p",{children:"An optional title that will appear directly above the passage in the same font style. (E.g. Passage 1)"})}),s.jsx("div",{children:s.jsx("input",{type:"text",defaultValue:this.props.passageTitle,onChange:a=>{this.change({passageTitle:a.target.value})}})})]}),s.jsxs("div",{children:["Passage Text:",e]}),s.jsxs("div",{children:["Footnotes:",s.jsx(Re,{children:s.jsx("p",{children:"To add footnotes, add ^ characters where they belong in the passage. Then, add ^ in the footnotes area to reference the footnotes in the passage."})}),t]})]})}};A.propTypes={...c,passageTitle:r.string,passageText:r.string,footnotes:r.string,showLineNumbers:r.bool},A.widgetName="passage",A.defaultProps={passageTitle:"",passageText:"",footnotes:"",showLineNumbers:!0};let Z=A;Z.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PassageEditor",props:{passageTitle:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},passageText:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},footnotes:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},showLineNumbers:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:Qs,NumberInput:ze,TextInput:et}=g,R=class R extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.serialize=()=>m.serialize.call(this)}render(){return s.jsxs("div",{children:[s.jsx("div",{children:s.jsxs("label",{children:["Passage Number: ",s.jsx(ze,{value:this.props.passageNumber,onChange:this.change("passageNumber")})]})}),s.jsx("div",{children:s.jsxs("label",{children:["Reference Number: ",s.jsx(ze,{value:this.props.referenceNumber,onChange:this.change("referenceNumber")})]})}),s.jsx("div",{children:s.jsxs("label",{children:["Summary Text: ",s.jsx(et,{value:this.props.summaryText,onChange:this.change("summaryText")}),s.jsxs(Qs,{children:[s.jsx("p",{children:"Short summary of the referenced section. This will be included in parentheses and quotes automatically."}),s.jsx("p",{children:"Ex: The start ... the end"})]})]})})]})}};R.propTypes={...c,passageNumber:r.number,referenceNumber:r.number,summaryText:r.string},R.widgetName="passage-ref",R.defaultProps={passageNumber:1,referenceNumber:1,summaryText:""};let Q=R;Q.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PassageRefEditor",props:{passageNumber:{defaultValue:{value:"1",computed:!1},description:"",type:{name:"number"},required:!1},referenceNumber:{defaultValue:{value:"1",computed:!1},description:"",type:{name:"number"},required:!1},summaryText:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1}},composes:["@khanacademy/perseus"]};const z=class z extends p.Component{constructor(){super(...arguments),this.change=(...e)=>u.apply(this,e),this.handleContentChange=e=>{this.change({content:e.target.value})},this.serialize=()=>m.serialize.call(this)}render(){return s.jsxs("div",{children:["Content:",s.jsx("input",{type:"text",value:this.props.content,onChange:this.handleContentChange})]})}};z.propTypes={...c,content:r.string},z.widgetName="passage-ref-target",z.defaultProps={content:""};let ee=z;ee.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleContentChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PassageRefTargetEditor",props:{content:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:w,NumberInput:Ve,RangeInput:st,TextListEditor:tt}=g,at=Ze.widget,ye="starting",xe="correct",rt=[ye,xe];function Le(l,e,t){const a=i.clone(l);a.length=e;for(let n=l.length;n"$"+ts(l,2)+"$",ie=class ie extends p.Component{constructor(){super(...arguments),this.state={editing:this.props.static?ye:xe,pic:null,loadedUrl:null,minX:null,maxX:null,tickStep:null},this.fetchPic=e=>{if(this.state.loadedUrl!==e){const t=new Image;t.src=e,t.onload=()=>{this.setState({pic:t,loadedUrl:e})}}},this.handleChangeTickStep=e=>{this.setState({tickStep:e})},this.handleChangeRange=e=>{this.setState({minX:e[0],maxX:e[1]})},this.changeLabelInterval=e=>{this.props.onChange({labelInterval:e})},this.handlePlotterChange=e=>{const t={};t[this.state.editing]=e.values,this.props.onChange(t)},this.changeType=e=>{let t;if(e==="histogram"?(t=[Ee(0)].concat(this.props.categories),this.props.onChange({type:e,categories:t})):this.props.type==="histogram"?(t=this.props.categories.slice(1),this.props.onChange({type:e,categories:t})):this.props.onChange({type:e}),t){const a=le.findDOMNode(this.refs.categories);a.value=t.join(", ")}},this.changeLabel=(e,t)=>{const a=i.clone(this.props.labels);a[e]=t.target.value,this.props.onChange({labels:a})},this.changePicUrl=e=>{const t=he.getRealImageUrl(e);this.props.onChange({picUrl:t})},this.changeCategories=e=>{let t=e.length;this.props.type==="histogram"&&t--;const a=this.props.scaleY;this.props.onChange({categories:e,correct:Le(this.props.correct,t,a),starting:Le(this.props.starting,t,a)})},this.changeScale=e=>{const t=this.props.scaleY,a=+e.target.value||U.scaleY,n=function(d){return d*a/t},o=n(this.props.maxY);this.props.onChange({scaleY:a,maxY:o,correct:i.map(this.props.correct,n),starting:i.map(this.props.starting,n)}),le.findDOMNode(this.refs.maxY).value=o},this.changeMax=e=>{this.props.onChange({maxY:+e.target.value||U.maxY})},this.changeSnaps=e=>{this.props.onChange({snapsPerLine:+e.target.value||U.snapsPerLine})},this.changeEditing=e=>{this.setState({editing:e})},this.setCategoriesFromScale=()=>{const e=this.state.tickStep||1,t=this.state.minX||0,a=this.state.maxX||0,n=Math.floor((a-t)/e)*e;let o;this.props.type==="histogram"||this.props.type==="dotplot"?o=i.range(0,n+e,e):o=i.range(e,n+e,e),o=i.map(o,h=>h+t),o=i.map(o,Ee),this.changeCategories(o);const d=le.findDOMNode(this.refs.categories);d.value=o.join(", ")},this.serialize=()=>{const e=i.pick(this.props,"correct","starting","type","labels","categories","scaleY","maxY","snapsPerLine","labelInterval");return this.props.type==="pic"&&(e.picUrl=this.props.picUrl),e}}UNSAFE_componentWillMount(){this.fetchPic(this.props.picUrl)}UNSAFE_componentWillReceiveProps(e){this.fetchPic(e.picUrl),e.static&&this.setState({editing:"starting"})}render(){const e=i.contains(["line","histogram","dotplot"],this.props.type),t=!i.contains(["pic","dotplot"],this.props.type),a={trackInteraction:()=>{},...this.props};return s.jsxs("div",{className:"perseus-widget-plotter-editor",children:[s.jsxs("div",{children:["Chart type:"," ",Qe.map(n=>s.jsxs("label",{children:[s.jsx("input",{type:"radio",name:"chart-type",checked:this.props.type===n,onChange:i.partial(this.changeType,n)}),n]},n),this)]}),s.jsxs("div",{children:["Labels:"," ",["x","y"].map((n,o)=>s.jsxs("label",{children:[n+":",s.jsx("input",{type:"text",onChange:i.partial(this.changeLabel,o),defaultValue:this.props.labels[o]})]},n),this)]}),e&&s.jsxs("div",{className:"set-from-scale-box",children:[s.jsx("span",{className:"categories-title",children:"Set Categories From Scale"}),s.jsxs("div",{children:[s.jsxs("label",{children:["Tick Step:"," ",s.jsx(Ve,{placeholder:1,useArrowKeys:!0,value:this.state.tickStep,onChange:this.handleChangeTickStep})]}),s.jsx(w,{children:s.jsx("p",{children:"The difference between adjacent ticks."})})]}),s.jsx("div",{children:s.jsxs("label",{children:["Range:"," ",s.jsx(st,{placeholder:[0,10],useArrowKeys:!0,value:[this.state.minX,this.state.maxX],onChange:this.handleChangeRange})]})}),s.jsx("div",{children:s.jsxs("button",{onClick:this.setCategoriesFromScale,children:["Set Categories"," "]})})]}),s.jsxs("div",{children:[s.jsxs("label",{children:["Label Interval:"," ",s.jsx(Ve,{useArrowKeys:!0,value:this.props.labelInterval,onChange:this.changeLabelInterval})]}),s.jsx(w,{children:s.jsx("p",{children:'Which ticks to display the labels for. For instance, setting this to "4" will only show every 4th label (plus the last one)'})})]}),this.props.type==="pic"&&s.jsxs("div",{children:[s.jsxs("label",{children:["Picture:"," ",s.jsx(f,{className:"pic-url",value:this.props.picUrl,onChange:this.changePicUrl}),s.jsx(w,{children:s.jsx("p",{children:'Use the default picture of Earth, or insert the URL for a different picture using the "Add image" function.'})})]}),this.state.pic&&this.state.pic.width!==this.state.pic.height&&s.jsxs("p",{className:"warning",children:[s.jsx("b",{children:"Warning"}),": You are using a picture which is not square. This means the image will get distorted. You should probably crop it to be square."]})]}),s.jsx("div",{children:s.jsxs("label",{children:["Categories:"," ",s.jsx(tt,{ref:"categories",layout:"horizontal",options:this.props.categories,onChange:this.changeCategories})]})}),s.jsx("div",{children:s.jsxs("label",{children:["Scale (y):"," ",s.jsx("input",{type:"text",onChange:this.changeScale,defaultValue:this.props.scaleY})]})}),s.jsx("div",{children:s.jsxs("label",{children:["Max y:"," ",s.jsx("input",{type:"text",ref:"maxY",onChange:this.changeMax,defaultValue:this.props.maxY})]})}),t&&s.jsxs("div",{children:[s.jsxs("label",{children:["Snaps per line:"," ",s.jsx("input",{type:"text",onChange:this.changeSnaps,defaultValue:this.props.snapsPerLine})]}),s.jsx(w,{children:s.jsx("p",{children:"Creates the specified number of divisions between the horizontal lines. Fewer snaps between lines makes the graph easier for the student to create correctly."})})]}),s.jsxs("div",{children:["Editing values:"," ",rt.map(n=>s.jsxs("label",{children:[s.jsx("input",{type:"radio",disabled:n===xe&&this.props.static,checked:this.props.static?n===ye:this.state.editing===n,onChange:o=>this.changeEditing(n)}),n]},n)),s.jsxs(w,{children:[s.jsx("p",{children:"Use this toggle to switch between editing the correct answer (what the student will be graded on) and the starting values (what the student will see plotted when they start the problem). Note: These cannot be the same."}),s.jsx("p",{children:"In static mode, the starting values are rendered out to the displayed widget."})]})]}),s.jsx(at,{...a,starting:this.props[this.state.editing],onChange:this.handlePlotterChange})]})}};ie.widgetName="plotter",ie.defaultProps={...U,correct:[1],starting:[1],type:"bar",labels:["",""],categories:[""],picSize:30,picBoxHeight:36,plotDimensions:[275,200],labelInterval:1,get picUrl(){const e=Ue().staticUrl;return e?e("/images/badges/earth-small.png"):null}};let se=ie;se.__docgenInfo={description:"",methods:[{name:"fetchPic",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:null}],returns:null},{name:"handleChangeTickStep",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"handleChangeRange",docblock:null,modifiers:[],params:[{name:"newValue",optional:!1,type:null}],returns:null},{name:"changeLabelInterval",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"handlePlotterChange",docblock:null,modifiers:[],params:[{name:"newProps",optional:!1,type:null}],returns:null},{name:"changeType",docblock:null,modifiers:[],params:[{name:"type",optional:!1,type:null}],returns:null},{name:"changeLabel",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"changePicUrl",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"changeCategories",docblock:null,modifiers:[],params:[{name:"categories",optional:!1,type:null}],returns:null},{name:"changeScale",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"changeMax",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"changeSnaps",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"changeEditing",docblock:null,modifiers:[],params:[{name:"editing",optional:!1,type:null}],returns:null},{name:"setCategoriesFromScale",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PlotterEditor",props:{type:{required:!1,tsType:{name:"unknown[number]",raw:'PerseusPlotterWidgetOptions["type"]'},description:"",defaultValue:{value:'"bar"',computed:!1}},labels:{required:!1,tsType:{name:"Array",elements:[{name:"string"}],raw:"Array"},description:"",defaultValue:{value:'["", ""]',computed:!1}},categories:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]}],raw:"ReadonlyArray"},description:"",defaultValue:{value:'[""]',computed:!1}},scaleY:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}},maxY:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"10",computed:!1}},snapsPerLine:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"2",computed:!1}},picSize:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"30",computed:!1}},picBoxHeight:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"36",computed:!1}},picUrl:{required:!0,tsType:{name:"string"},description:""},plotDimensions:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[275, 200]",computed:!1}},labelInterval:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}},starting:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[1]",computed:!1}},correct:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[1]",computed:!1}},static:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"any"},description:""}}};const{InfoTip:nt,NumberInput:De}=g,it=es.widget,V=class V extends p.Component{constructor(){super(...arguments),this.numberOfColumns=p.createRef(),this.focus=()=>{var e;(e=this.numberOfColumns.current)==null||e.focus()},this.onSizeInput=(e,t)=>{let a=+e||0,n=+t||0;a=Math.min(Math.max(1,a),30),n=Math.min(Math.max(1,n),6);const o=this.props.columns,d=this.props.rows,h=this.props.answers;a<=d?h.length=a:i(a-d).times(function(){h.push(he.stringArrayOfSize(o))});function x(Ce){n<=o?Ce.length=n:i(n-o).times(function(){Ce.push("")})}const we=this.props.headers;x(we),i.each(h,x),this.props.onChange({rows:a,columns:n,answers:h,headers:we})},this.serialize=()=>{const e=i.pick(this.props,"headers","rows","columns");return i.extend({},e,{answers:i.map(this.props.answers,i.clone)})}}render(){return s.jsxs("div",{children:[s.jsx("div",{className:"perseus-widget-row",children:s.jsxs("label",{children:["Number of columns:"," ",s.jsx(De,{ref:this.numberOfColumns,value:this.props.columns,onChange:e=>{e&&this.onSizeInput(this.props.rows,e)},useArrowKeys:!0})]})}),s.jsx("div",{className:"perseus-widget-row",children:s.jsxs("label",{children:["Number of rows:"," ",s.jsx(De,{ref:"numberOfRows",value:this.props.rows,onChange:e=>{e&&this.onSizeInput(e,this.props.columns)},useArrowKeys:!0})]})}),s.jsxs("div",{children:[" ","Table of answers:"," ",s.jsx(nt,{children:s.jsx("p",{children:"The student has to fill out all cells in the table. For partially filled tables create a table using the template, and insert text input boxes as desired."})})]}),s.jsx("div",{children:s.jsx(it,{headers:this.props.headers,answers:this.props.answers,onChange:this.props.onChange,apiOptions:this.props.apiOptions,editableHeaders:!0,onFocus:()=>{},onBlur:()=>{},trackInteraction:()=>{},Editor:y})})]})}};V.propTypes={rows:r.number,columns:r.number,headers:r.arrayOf(r.string),answers:r.arrayOf(r.arrayOf(r.string))},V.widgetName="table",V.defaultProps=function(){const a=i(4).times(function(){return he.stringArrayOfSize(1)});return{headers:[""],rows:4,columns:1,answers:a}}();let te=V;te.__docgenInfo={description:"",methods:[{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"onSizeInput",docblock:null,modifiers:[],params:[{name:"numRawRows",optional:!1,type:null},{name:"numRawColumns",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"TableEditor",props:{rows:{description:"",type:{name:"number"},required:!1},columns:{description:"",type:{name:"number"},required:!1},headers:{description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},answers:{description:"",type:{name:"arrayOf",value:{name:"arrayOf",value:{name:"string"}}},required:!1}}};const{InfoTip:lt}=g,ot=/khanacademy\.org\/.*\/v\/(.*)$/;function pt(l){const e=ot.exec(l);return e?e[1]:l}const L=class L extends p.Component{constructor(){super(...arguments),this._handleUrlChange=e=>{this.props.onChange({location:pt(e)})},this.change=(...e)=>u.apply(this,e),this.serialize=()=>m.serialize.call(this)}render(){return s.jsx("div",{children:s.jsxs("label",{children:["KA Video Slug:"," ",s.jsx(f,{value:this.props.location,style:{width:290},onChange:this._handleUrlChange}),s.jsx(lt,{children:"KA video URLs will be converted to just the slug."})]})})}};L.propTypes={...c,location:r.string,onChange:r.func},L.widgetName="video",L.defaultProps={location:""};let ae=L;ae.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"_handleUrlChange",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:null}],returns:null},{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"VideoEditor",props:{location:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},onChange:{description:"",type:{name:"func"},required:!1}},composes:["@khanacademy/perseus"]};const ut=[ps,$,cs,hs,ds,ms,v,W,H,B,K,ys,xs,bs,vs,js,ws,G,Y,J,Cs,Ts,X,Z,Q,ee,qs,se,ks,Ns,te,ae,Ss,F],fa=()=>{ns(ss),is(ut),ls(),os()};export{ut as A,Ps as I,ga as J,fa as r}; diff --git a/assets/register-all-widgets-for-testing-ucxEr_N9.js b/assets/register-all-widgets-for-testing-ucxEr_N9.js deleted file mode 100644 index ca9f87d487..0000000000 --- a/assets/register-all-widgets-for-testing-ucxEr_N9.js +++ /dev/null @@ -1 +0,0 @@ -import{w as e}from"./article-renderer-mU-6RWLp.js";import{r,a as s}from"./renderer-1DxKQj1_.js";const a=()=>{r(e),s()};export{a as r}; diff --git a/assets/register-all-widgets-for-testing-vNa20up7.js b/assets/register-all-widgets-for-testing-vNa20up7.js new file mode 100644 index 0000000000..0001d45df1 --- /dev/null +++ b/assets/register-all-widgets-for-testing-vNa20up7.js @@ -0,0 +1 @@ +import{w as e}from"./article-renderer-HEYBK15c.js";import{r,a as s}from"./renderer-L37a98D_.js";const a=()=>{r(e),s()};export{a as r}; diff --git a/assets/renderer-1DxKQj1_.js b/assets/renderer-L37a98D_.js similarity index 99% rename from assets/renderer-1DxKQj1_.js rename to assets/renderer-L37a98D_.js index 6c5e132b39..c5026a9de4 100644 --- a/assets/renderer-1DxKQj1_.js +++ b/assets/renderer-L37a98D_.js @@ -1,4 +1,4 @@ -import{j as h}from"./jsx-runtime-63Ea5SlK.js";import{a as xe}from"./version-akiLXZts.js";import{P as z,E as A}from"./perseus-error-l3K_anoI.js";import{g as dr}from"./_commonjsHelpers-4gQjN7DL.js";import{e as yr,i as mr}from"./invariant-bu5zBsRS.js";import{e as gr}from"./index-J2t_5nK1.js";import{c as fe}from"./index-dnMhQZ-1.js";import{_ as m,d as hr,$ as pr}from"./jquery-yG1GhClm.js";import{r as E}from"./index-6oxdNXpR.js";import{F as ke}from"./index-9gkyvru-.js";import{c as ce}from"./asset-context-H6Iqp7Gi.js";import{P as cr}from"./i18n-context-fsWEgybQ.js";import{L as G,o as Ge,S as br}from"./svg-image-7aOK05RI.js";import{T as Ee}from"./tex-MX5FPdQh.js";import{Z as vr}from"./zoomable-_uYFBX1Q.js";import{Z as wr}from"./zoomable-tex-Jjwex-Ep.js";import{g as J,D as fr}from"./dependencies-CP7Uh8Kq.js";import{A as kr,C as be}from"./perseus-api-1-ethIrW.js";import{L as qr}from"./lint-CRWxUAIQ.js";import{U as K}from"./util-AYeX86gl.js";import{f as Tr,t as Rr,u as Ar,z as Or}from"./constants-iPV6vHZm.js";class B{static parse(e){return new me(e).parse()}match(e){throw new z("Selector subclasses must implement match()",A.NotAllowed)}toString(){return"Unknown selector class"}}class me{constructor(e){e=e.trim().replace(/\s+/g," "),this.tokens=e.match(me.TOKENS)||[],this.tokenIndex=0}nextToken(){return this.tokens[this.tokenIndex]||""}consume(){this.tokenIndex++}isIdentifier(){const e=this.tokens[this.tokenIndex][0];return e>="a"&&e<="z"||e>="A"&&e<="Z"}skipSpace(){for(;this.nextToken()===" ";)this.consume()}parse(){const e=this.parseTreeSelector();let r=this.nextToken();if(!r)return e;const n=[e];for(;r;){if(r===",")this.consume();else throw new ve("Expected comma");n.push(this.parseTreeSelector()),r=this.nextToken()}return new jr(n)}parseTreeSelector(){this.skipSpace();let e=this.parseNodeSelector();for(;;){const r=this.nextToken();if(!r||r===",")break;if(r===" ")this.consume(),e=new Cr(e,this.parseNodeSelector());else if(r===">")this.consume(),e=new Ir(e,this.parseNodeSelector());else if(r==="+")this.consume(),e=new zr(e,this.parseNodeSelector());else if(r==="~")this.consume(),e=new Nr(e,this.parseNodeSelector());else throw new ve("Unexpected token: "+r)}return e}parseNodeSelector(){this.skipSpace();const e=this.nextToken();if(e==="*")return this.consume(),new xr;if(this.isIdentifier())return this.consume(),new Wr(e);throw new ve("Expected node type")}}me.TOKENS=/([a-zA-Z][\w-]*)|(\d+)|[^\s]|(\s(?=[a-zA-Z\*]))/g;class ve extends Error{constructor(e){super(e)}}class jr extends B{constructor(e){super(),this.selectors=e}match(e){for(let r=0;r0?", ":"",e+=this.selectors[r].toString();return e}}class xr extends B{match(e){return[e.currentNode()]}toString(){return"*"}}class Wr extends B{constructor(e){super(),this.type=e}match(e){const r=e.currentNode();return r.type===this.type?[r]:null}toString(){return this.type}}class ge extends B{constructor(e,r){super(),this.left=e,this.right=r}}class Cr extends ge{constructor(e,r){super(e,r)}match(e){const r=this.right.match(e);if(r)for(e=e.clone();e.hasParent();){e.goToParent();const n=this.left.match(e);if(n)return n.concat(r)}return null}toString(){return this.left.toString()+" "+this.right.toString()}}class Ir extends ge{constructor(e,r){super(e,r)}match(e){const r=this.right.match(e);if(r&&e.hasParent()){e=e.clone(),e.goToParent();const n=this.left.match(e);if(n)return n.concat(r)}return null}toString(){return this.left.toString()+" > "+this.right.toString()}}class zr extends ge{constructor(e,r){super(e,r)}match(e){const r=this.right.match(e);if(r&&e.hasPreviousSibling()){e=e.clone(),e.goToPreviousSibling();const n=this.left.match(e);if(n)return n.concat(r)}return null}toString(){return this.left.toString()+" + "+this.right.toString()}}class Nr extends ge{constructor(e,r){super(e,r)}match(e){const r=this.right.match(e);if(r)for(e=e.clone();e.hasPreviousSibling();){e.goToPreviousSibling();const n=this.left.match(e);if(n)return n.concat(r)}return null}toString(){return this.left.toString()+" ~ "+this.right.toString()}}const _=class _{constructor(e,r,n,a,i,o){if(!n&&!a)throw new z("Lint rules must have a selector or pattern",A.InvalidInput,{metadata:{name:e}});this.name=e||"unnamed rule",this.severity=r||_.Severity.BULK_WARNING,this.selector=n||_.DEFAULT_SELECTOR,this.pattern=a||null,typeof i=="function"?(this.lint=i,this.message=null):(this.lint=(...s)=>this._defaultLintFunction(...s),this.message=i),this.applies=o||function(){return!0}}static makeRule(e){return new _(e.name,e.severity,e.selector?B.parse(e.selector):null,_.makePattern(e.pattern),e.lint||e.message,e.applies)}check(e,r,n,a){const i=this.selector.match(r);if(!i)return null;let o;if(this.pattern?o=n.match(this.pattern):o=_.FakePatternMatch(n,n,0),!o)return null;try{const s=this.lint(r,n,i,o,a);return s?typeof s=="string"?{rule:this.name,severity:this.severity,message:s,start:0,end:n.length}:{rule:this.name,severity:this.severity,message:s.message,start:s.start,end:s.end}:null}catch(s){return{rule:"lint-rule-failure",message:`Exception in rule ${this.name}: ${s.message} +import{j as h}from"./jsx-runtime-63Ea5SlK.js";import{a as je}from"./version-akiLXZts.js";import{P as z,E as A}from"./perseus-error-l3K_anoI.js";import{g as dr}from"./_commonjsHelpers-4gQjN7DL.js";import{e as yr,i as mr}from"./invariant-bu5zBsRS.js";import{e as gr}from"./index-J2t_5nK1.js";import{c as fe}from"./index-dnMhQZ-1.js";import{_ as m,d as hr,$ as pr}from"./jquery-yG1GhClm.js";import{r as E}from"./index-6oxdNXpR.js";import{F as ke}from"./index-9gkyvru-.js";import{c as ce}from"./asset-context-H6Iqp7Gi.js";import{P as cr}from"./i18n-context-fsWEgybQ.js";import{L as G,o as Ge,S as br}from"./svg-image-7aOK05RI.js";import{T as Ee}from"./tex-MX5FPdQh.js";import{Z as vr}from"./zoomable-_uYFBX1Q.js";import{Z as wr}from"./zoomable-tex-Jjwex-Ep.js";import{g as J,D as fr}from"./dependencies-CP7Uh8Kq.js";import{A as kr,C as be}from"./perseus-api-1-ethIrW.js";import{L as qr}from"./lint-CRWxUAIQ.js";import{U as K}from"./util-AYeX86gl.js";import{f as Tr,t as Rr,u as Ar,z as Or}from"./constants-iPV6vHZm.js";class B{static parse(e){return new me(e).parse()}match(e){throw new z("Selector subclasses must implement match()",A.NotAllowed)}toString(){return"Unknown selector class"}}class me{constructor(e){e=e.trim().replace(/\s+/g," "),this.tokens=e.match(me.TOKENS)||[],this.tokenIndex=0}nextToken(){return this.tokens[this.tokenIndex]||""}consume(){this.tokenIndex++}isIdentifier(){const e=this.tokens[this.tokenIndex][0];return e>="a"&&e<="z"||e>="A"&&e<="Z"}skipSpace(){for(;this.nextToken()===" ";)this.consume()}parse(){const e=this.parseTreeSelector();let r=this.nextToken();if(!r)return e;const n=[e];for(;r;){if(r===",")this.consume();else throw new ve("Expected comma");n.push(this.parseTreeSelector()),r=this.nextToken()}return new xr(n)}parseTreeSelector(){this.skipSpace();let e=this.parseNodeSelector();for(;;){const r=this.nextToken();if(!r||r===",")break;if(r===" ")this.consume(),e=new Cr(e,this.parseNodeSelector());else if(r===">")this.consume(),e=new Ir(e,this.parseNodeSelector());else if(r==="+")this.consume(),e=new zr(e,this.parseNodeSelector());else if(r==="~")this.consume(),e=new Nr(e,this.parseNodeSelector());else throw new ve("Unexpected token: "+r)}return e}parseNodeSelector(){this.skipSpace();const e=this.nextToken();if(e==="*")return this.consume(),new jr;if(this.isIdentifier())return this.consume(),new Wr(e);throw new ve("Expected node type")}}me.TOKENS=/([a-zA-Z][\w-]*)|(\d+)|[^\s]|(\s(?=[a-zA-Z\*]))/g;class ve extends Error{constructor(e){super(e)}}class xr extends B{constructor(e){super(),this.selectors=e}match(e){for(let r=0;r0?", ":"",e+=this.selectors[r].toString();return e}}class jr extends B{match(e){return[e.currentNode()]}toString(){return"*"}}class Wr extends B{constructor(e){super(),this.type=e}match(e){const r=e.currentNode();return r.type===this.type?[r]:null}toString(){return this.type}}class ge extends B{constructor(e,r){super(),this.left=e,this.right=r}}class Cr extends ge{constructor(e,r){super(e,r)}match(e){const r=this.right.match(e);if(r)for(e=e.clone();e.hasParent();){e.goToParent();const n=this.left.match(e);if(n)return n.concat(r)}return null}toString(){return this.left.toString()+" "+this.right.toString()}}class Ir extends ge{constructor(e,r){super(e,r)}match(e){const r=this.right.match(e);if(r&&e.hasParent()){e=e.clone(),e.goToParent();const n=this.left.match(e);if(n)return n.concat(r)}return null}toString(){return this.left.toString()+" > "+this.right.toString()}}class zr extends ge{constructor(e,r){super(e,r)}match(e){const r=this.right.match(e);if(r&&e.hasPreviousSibling()){e=e.clone(),e.goToPreviousSibling();const n=this.left.match(e);if(n)return n.concat(r)}return null}toString(){return this.left.toString()+" + "+this.right.toString()}}class Nr extends ge{constructor(e,r){super(e,r)}match(e){const r=this.right.match(e);if(r)for(e=e.clone();e.hasPreviousSibling();){e.goToPreviousSibling();const n=this.left.match(e);if(n)return n.concat(r)}return null}toString(){return this.left.toString()+" ~ "+this.right.toString()}}const _=class _{constructor(e,r,n,a,i,o){if(!n&&!a)throw new z("Lint rules must have a selector or pattern",A.InvalidInput,{metadata:{name:e}});this.name=e||"unnamed rule",this.severity=r||_.Severity.BULK_WARNING,this.selector=n||_.DEFAULT_SELECTOR,this.pattern=a||null,typeof i=="function"?(this.lint=i,this.message=null):(this.lint=(...s)=>this._defaultLintFunction(...s),this.message=i),this.applies=o||function(){return!0}}static makeRule(e){return new _(e.name,e.severity,e.selector?B.parse(e.selector):null,_.makePattern(e.pattern),e.lint||e.message,e.applies)}check(e,r,n,a){const i=this.selector.match(r);if(!i)return null;let o;if(this.pattern?o=n.match(this.pattern):o=_.FakePatternMatch(n,n,0),!o)return null;try{const s=this.lint(r,n,i,o,a);return s?typeof s=="string"?{rule:this.name,severity:this.severity,message:s,start:0,end:n.length}:{rule:this.name,severity:this.severity,message:s.message,start:s.start,end:s.end}:null}catch(s){return{rule:"lint-rule-failure",message:`Exception in rule ${this.name}: ${s.message} Stack trace: ${s.stack}`,start:0,end:n.length}}}_defaultLintFunction(e,r,n,a,i){return{message:this.message||"",start:a.index,end:a.index+a[0].length}}static makePattern(e){if(!e)return null;if(e instanceof RegExp)return e;if(e[0]==="/"){const r=e.lastIndexOf("/"),n=e.substring(1,r),a=e.substring(r+1);return new RegExp(n,a)}return new RegExp(e)}static FakePatternMatch(e,r,n){const a=[r];return a.index=n,a.input=e,a}};_.Severity={ERROR:1,WARNING:2,GUIDELINE:3,BULK_WARNING:4};let y=_;y.DEFAULT_SELECTOR=B.parse("text");const Er=/\/\/([^\/]+)/;function Lr(t){if(!t)return"";const e=t.match(Er);return e?e[1]:""}const _r=y.makeRule({name:"absolute-url",severity:y.Severity.GUIDELINE,selector:"link, image",lint:function(t,e,r,n){const a=r[0].target,i=Lr(a);if(i==="khanacademy.org"||i.endsWith(".khanacademy.org"))return`Don't use absolute URLs: When linking to KA content or images, omit the @@ -41,13 +41,13 @@ The table header has ${i} cells, but Row ${s+1} has ${o[s]} cells.`}}),pt=y.makeRule({name:"unbalanced-code-delimiters",severity:y.Severity.ERROR,pattern:/[`~]+/,message:`Unbalanced code delimiters: code blocks should begin and end with the same type and number of delimiters`}),ct=y.makeRule({name:"unescaped-dollar",severity:y.Severity.ERROR,selector:"unescapedDollar",message:`Unescaped dollar sign: Dollar signs must appear in pairs or be escaped as \\$`}),bt=y.makeRule({name:"widget-in-table",severity:y.Severity.BULK_WARNING,selector:"table widget",message:`Widget in table: -do not put widgets inside of tables.`}),vt=[_r,Pr,$r,Fr,Mr,Dr,Vr,Hr,Gr,Xr,Yr,Jr,et,rt,tt,nt,at,it,st,ot,lt,ut,dt,mt,gt,ht,ct,bt,yt,pt,Qr,Zr];class V{constructor(e){this.root=e}static isNode(e){return e&&typeof e=="object"&&typeof e.type=="string"}static isTextNode(e){return V.isNode(e)&&e.type==="text"&&typeof e.content=="string"}traverse(e){this._traverse(this.root,new We(this.root),e)}_traverse(e,r,n){let a="";if(V.isNode(e)){const i=e;r._containers.push(i),r._ancestors.push(i),typeof i.content=="string"&&(a=i.content),Object.keys(i).forEach(s=>{if(s==="type")return;const l=i[s];l&&typeof l=="object"&&(r._indexes.push(s),a+=this._traverse(l,r,n),r._indexes.pop())}),r._currentNode=r._ancestors.pop(),r._containers.pop(),n(i,r,a)}else if(Array.isArray(e)){const i=e;r._containers.push(i);let o=0;for(;or+1?e[r+1]:null}previousSibling(){const e=this._containers.top();if(!e||!Array.isArray(e))return null;const r=this._indexes.top();return r>0?e[r-1]:null}removeNextSibling(){const e=this._containers.top();if(e&&Array.isArray(e)){const r=this._indexes.top();if(e.length>r+1)return e.splice(r+1,1)[0]}return null}replace(...e){const r=this._containers.top();if(!r)throw new z("Can't replace the root of the tree",A.Internal);if(Array.isArray(r)){const n=this._indexes.top();r.splice(n,1,...e),this._indexes.pop(),this._indexes.push(n+e.length-1)}else{const n=this._indexes.top();e.length===0?delete r[n]:e.length===1?r[n]=e[0]:r[n]=e}}hasPreviousSibling(){return Array.isArray(this._containers.top())&&this._indexes.top()>0}goToPreviousSibling(){if(!this.hasPreviousSibling())throw new z("goToPreviousSibling(): node has no previous sibling",A.Internal);this._currentNode=this.previousSibling();const e=this._indexes.pop();this._indexes.push(e-1)}hasParent(){return this._ancestors.size()!==0}goToParent(){if(!this.hasParent())throw new z("goToParent(): node has no ancestor",A.NotAllowed);for(this._currentNode=this._ancestors.pop();this._containers.size()&&this._containers.top()[this._indexes.top()]!==this._currentNode;)this._containers.pop(),this._indexes.pop()}clone(){const e=new We(this.root);return e._currentNode=this._currentNode,e._containers=this._containers.clone(),e._indexes=this._indexes.clone(),e._ancestors=this._ancestors.clone(),e}equals(e){return this.root===e.root&&this._currentNode===e._currentNode&&this._containers.equals(e._containers)&&this._indexes.equals(e._indexes)&&this._ancestors.equals(e._ancestors)}}class Q{constructor(e){this.stack=e?e.slice(0):[]}push(e){this.stack.push(e)}pop(){return this.stack.pop()}top(){return this.stack[this.stack.length-1]}values(){return this.stack.slice(0)}size(){return this.stack.length}toString(){return this.stack.toString()}clone(){return new Q(this.stack)}equals(e){if(!e||!e.stack||e.stack.length!==this.stack.length)return!1;for(let r=0;rt.severity{if(V.isTextNode(l)){let g=u.nextSibling();for(;V.isTextNode(g);)l.content+=g.content,u.removeNextSibling(),g=u.nextSibling()}});let o=[],s=!1;return i.traverse((l,u,d)=>{const g=[],b=n.filter(p=>p.applies(e)),q=[...e.stack];q.push(l.type);const R={...e,stack:q.join(".")};if(b.forEach(p=>{const w=p.check(l,u,d,R);w&&((w.start||w.end)&&(w.target=d.substring(w.start,w.end)),a.push(w),r&&g.push(w))}),!!r&&(l.type==="table"?(o.length&&g.push(...o),s=!1,o=[]):s||(s=u.ancestors().some(p=>p.type==="table")),s&&g.length&&o.push(...g),g.length))if(g.sort((p,w)=>p.severity-w.severity),l.type!=="text"||g.length>1)u.replace({type:"lint",content:l,message:g.map(p=>p.message).join(` +do not put widgets inside of tables.`}),vt=[_r,Pr,$r,Fr,Mr,Dr,Vr,Hr,Gr,Xr,Yr,Jr,et,rt,tt,nt,at,it,st,ot,lt,ut,dt,mt,gt,ht,ct,bt,yt,pt,Qr,Zr];class V{constructor(e){this.root=e}static isNode(e){return e&&typeof e=="object"&&typeof e.type=="string"}static isTextNode(e){return V.isNode(e)&&e.type==="text"&&typeof e.content=="string"}traverse(e){this._traverse(this.root,new We(this.root),e)}_traverse(e,r,n){let a="";if(V.isNode(e)){const i=e;r._containers.push(i),r._ancestors.push(i),typeof i.content=="string"&&(a=i.content),Object.keys(i).forEach(s=>{if(s==="type")return;const l=i[s];l&&typeof l=="object"&&(r._indexes.push(s),a+=this._traverse(l,r,n),r._indexes.pop())}),r._currentNode=r._ancestors.pop(),r._containers.pop(),n(i,r,a)}else if(Array.isArray(e)){const i=e;r._containers.push(i);let o=0;for(;or+1?e[r+1]:null}previousSibling(){const e=this._containers.top();if(!e||!Array.isArray(e))return null;const r=this._indexes.top();return r>0?e[r-1]:null}removeNextSibling(){const e=this._containers.top();if(e&&Array.isArray(e)){const r=this._indexes.top();if(e.length>r+1)return e.splice(r+1,1)[0]}return null}replace(...e){const r=this._containers.top();if(!r)throw new z("Can't replace the root of the tree",A.Internal);if(Array.isArray(r)){const n=this._indexes.top();r.splice(n,1,...e),this._indexes.pop(),this._indexes.push(n+e.length-1)}else{const n=this._indexes.top();e.length===0?delete r[n]:e.length===1?r[n]=e[0]:r[n]=e}}hasPreviousSibling(){return Array.isArray(this._containers.top())&&this._indexes.top()>0}goToPreviousSibling(){if(!this.hasPreviousSibling())throw new z("goToPreviousSibling(): node has no previous sibling",A.Internal);this._currentNode=this.previousSibling();const e=this._indexes.pop();this._indexes.push(e-1)}hasParent(){return this._ancestors.size()!==0}goToParent(){if(!this.hasParent())throw new z("goToParent(): node has no ancestor",A.NotAllowed);for(this._currentNode=this._ancestors.pop();this._containers.size()&&this._containers.top()[this._indexes.top()]!==this._currentNode;)this._containers.pop(),this._indexes.pop()}clone(){const e=new We(this.root);return e._currentNode=this._currentNode,e._containers=this._containers.clone(),e._indexes=this._indexes.clone(),e._ancestors=this._ancestors.clone(),e}equals(e){return this.root===e.root&&this._currentNode===e._currentNode&&this._containers.equals(e._containers)&&this._indexes.equals(e._indexes)&&this._ancestors.equals(e._ancestors)}}class Q{constructor(e){this.stack=e?e.slice(0):[]}push(e){this.stack.push(e)}pop(){return this.stack.pop()}top(){return this.stack[this.stack.length-1]}values(){return this.stack.slice(0)}size(){return this.stack.length}toString(){return this.stack.toString()}clone(){return new Q(this.stack)}equals(e){if(!e||!e.stack||e.stack.length!==this.stack.length)return!1;for(let r=0;rt.severity{if(V.isTextNode(l)){let g=u.nextSibling();for(;V.isTextNode(g);)l.content+=g.content,u.removeNextSibling(),g=u.nextSibling()}});let o=[],s=!1;return i.traverse((l,u,d)=>{const g=[],b=n.filter(p=>p.applies(e)),q=[...e.stack];q.push(l.type);const R={...e,stack:q.join(".")};if(b.forEach(p=>{const w=p.check(l,u,d,R);w&&((w.start||w.end)&&(w.target=d.substring(w.start,w.end)),a.push(w),r&&g.push(w))}),!!r&&(l.type==="table"?(o.length&&g.push(...o),s=!1,o=[]):s||(s=u.ancestors().some(p=>p.type==="table")),s&&g.length&&o.push(...g),g.length))if(g.sort((p,w)=>p.severity-w.severity),l.type!=="text"||g.length>1)u.replace({type:"lint",content:l,message:g.map(p=>p.message).join(` -`),ruleName:g[0].rule,blockHighlight:R.blockHighlight,insideTable:s,severity:g[0].severity});else{const p=l.content,w=g[0],O=w.start||0,W=w.end||p.length,P=p.substring(0,O),j=p.substring(O,W),re=p.substring(W),te=[];P&&te.push({type:"text",content:P}),te.push({type:"lint",content:{type:"text",content:j},message:w.message,ruleName:w.rule,insideTable:s,severity:w.severity}),re&&te.push({type:"text",content:re}),u.replace(...te)}}),a}function Ct(t,e){const r=t.stack||[];return{...t,stack:r.concat(e)}}const It={activeDefinitionId:null,setActiveDefinitionId:()=>{}},Xe=E.createContext(It);class qe extends E.Component{constructor(){super(...arguments),this.state={activeDefinitionId:null},this.setActiveDefinitionId=e=>{this.setState(r=>({activeDefinitionId:e}))}}render(){const{children:e}=this.props,{activeDefinitionId:r}=this.state,{setActiveDefinitionId:n}=this;return h.jsx(Xe.Provider,{value:{activeDefinitionId:r,setActiveDefinitionId:n},children:e})}}const ma=Xe.Consumer;qe.__docgenInfo={description:"",methods:[{name:"setActiveDefinitionId",docblock:null,modifiers:[],params:[{name:"activeDefinitionId",optional:!0,type:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]}}],returns:{type:{name:"void"}}}],displayName:"DefinitionProvider",props:{children:{required:!0,tsType:{name:"any"},description:""}}};class N extends E.Component{constructor(e){super(e),this.state={error:""}}componentDidCatch(e,r){var n,a;this.setState({error:e.toString()}),(a=(n=this.props).onError)==null||a.call(n,e,r),G.error("Unhandled Perseus error: "+e.message,A.Internal,{cause:e,loggedMetadata:{componentStack:r&&"componentStack"in r?r.componentStack:"componentStack not provided",...this.props.metadata}})}render(){return this.state.error?h.jsxs("svg",{height:"16",width:"16",viewBox:"0 0 16 16",role:"img",children:[h.jsx("title",{children:"Rendering Error!"}),h.jsx("path",{d:"m8 16c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm0-3c0.55 0 1-0.45 1-1s-0.45-1-1-1-1 0.45-1 1 0.45 1 1 1zm0-9c-0.55 0-1 0.45-1 1v4c0 0.55.45 1 1 1s1-0.45 1-1v-4c0-0.55-0.45-1-1-1z",fill:"#d92916",fillRule:"evenodd"})]}):this.props.children}}N.__docgenInfo={description:"",methods:[],displayName:"ErrorBoundary",props:{children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},metadata:{required:!1,tsType:{name:"Record",elements:[{name:"string"},{name:"string"}],raw:"Record"},description:""},onError:{required:!1,tsType:{name:"signature",type:"function",raw:"(error: Error, info: any) => void",signature:{arguments:[{type:{name:"Error"},name:"error"},{type:{name:"any"},name:"info"}],return:{name:"void"}}},description:""}}};function zt(){}class Nt{constructor(e,r,n,a){this._track=i=>{this._tracked&&!this.setting||(this._tracked=!0,this.trackApi({type:this.widgetType,id:this.widgetID,...i}))},e?(this._tracked=!1,this.trackApi=e,this.widgetType=r,this.widgetID=n,this.setting=a,this.track=this._track):this.track=zt}}const Et="@khanacademy/simple-markdown",Lt="__lib_version__";xe(Et,Lt);var _t=/\r\n?/g,Pt=/\t/g,$t=/\f/g,Ye=function(t){return t.replace(_t,` +`),ruleName:g[0].rule,blockHighlight:R.blockHighlight,insideTable:s,severity:g[0].severity});else{const p=l.content,w=g[0],O=w.start||0,W=w.end||p.length,P=p.substring(0,O),x=p.substring(O,W),re=p.substring(W),te=[];P&&te.push({type:"text",content:P}),te.push({type:"lint",content:{type:"text",content:x},message:w.message,ruleName:w.rule,insideTable:s,severity:w.severity}),re&&te.push({type:"text",content:re}),u.replace(...te)}}),a}function Ct(t,e){const r=t.stack||[];return{...t,stack:r.concat(e)}}const It={activeDefinitionId:null,setActiveDefinitionId:()=>{}},Xe=E.createContext(It);class qe extends E.Component{constructor(){super(...arguments),this.state={activeDefinitionId:null},this.setActiveDefinitionId=e=>{this.setState(r=>({activeDefinitionId:e}))}}render(){const{children:e}=this.props,{activeDefinitionId:r}=this.state,{setActiveDefinitionId:n}=this;return h.jsx(Xe.Provider,{value:{activeDefinitionId:r,setActiveDefinitionId:n},children:e})}}const ma=Xe.Consumer;qe.__docgenInfo={description:"",methods:[{name:"setActiveDefinitionId",docblock:null,modifiers:[],params:[{name:"activeDefinitionId",optional:!0,type:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]}}],returns:{type:{name:"void"}}}],displayName:"DefinitionProvider",props:{children:{required:!0,tsType:{name:"any"},description:""}}};class N extends E.Component{constructor(e){super(e),this.state={error:""}}componentDidCatch(e,r){var n,a;this.setState({error:e.toString()}),(a=(n=this.props).onError)==null||a.call(n,e,r),G.error("Unhandled Perseus error: "+e.message,A.Internal,{cause:e,loggedMetadata:{componentStack:r&&"componentStack"in r?r.componentStack:"componentStack not provided",...this.props.metadata}})}render(){return this.state.error?h.jsxs("svg",{height:"16",width:"16",viewBox:"0 0 16 16",role:"img",children:[h.jsx("title",{children:"Rendering Error!"}),h.jsx("path",{d:"m8 16c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm0-3c0.55 0 1-0.45 1-1s-0.45-1-1-1-1 0.45-1 1 0.45 1 1 1zm0-9c-0.55 0-1 0.45-1 1v4c0 0.55.45 1 1 1s1-0.45 1-1v-4c0-0.55-0.45-1-1-1z",fill:"#d92916",fillRule:"evenodd"})]}):this.props.children}}N.__docgenInfo={description:"",methods:[],displayName:"ErrorBoundary",props:{children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},metadata:{required:!1,tsType:{name:"Record",elements:[{name:"string"},{name:"string"}],raw:"Record"},description:""},onError:{required:!1,tsType:{name:"signature",type:"function",raw:"(error: Error, info: any) => void",signature:{arguments:[{type:{name:"Error"},name:"error"},{type:{name:"any"},name:"info"}],return:{name:"void"}}},description:""}}};function zt(){}class Nt{constructor(e,r,n,a){this._track=i=>{this._tracked&&!this.setting||(this._tracked=!0,this.trackApi({type:this.widgetType,id:this.widgetID,...i}))},e?(this._tracked=!1,this.trackApi=e,this.widgetType=r,this.widgetID=n,this.setting=a,this.track=this._track):this.track=zt}}const Et="@khanacademy/simple-markdown",Lt="__lib_version__";je(Et,Lt);var _t=/\r\n?/g,Pt=/\t/g,$t=/\f/g,Ye=function(t){return t.replace(_t,` `).replace($t,"").replace(Pt," ")},Je=function(t,e){var r=t||{};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},Qe=function(t,e){var r=Object.keys(t).filter(function(o){var s=t[o];if(s==null||s.match==null)return!1;var l=s.order;return(typeof l!="number"||!isFinite(l))&&typeof console<"u"&&console.warn("simple-markdown: Invalid order for rule `"+o+"`: "+String(l)),!0});r.sort(function(o,s){var l=t[o],u=t[s],d=l.order,g=u.order;if(d!==g)return d-g;var b=l.quality?0:1,q=u.quality?0:1;return b!==q?b-q:os?1:0});var n,a=function(o,s){var l=[];for(s=s||n,n=s;o;){var u=null,d=null,g=null,b=NaN,q=0,R=r[0],p=t[R];do{var w=p.order,O=s.prevCapture==null?"":s.prevCapture[0],W=p.match(o,s,O);if(W){var P=p.quality?p.quality(W,s,O):0;P<=b||(u=R,d=p,g=W,b=P)}q++,R=r[q],p=t[R]}while(p&&(!g||p.order===w&&p.quality));if(d==null||g==null)throw new Error("Could not find a matching rule for the below content. The rule with highest `order` should always match content provided to it. Check the definition of `match` for '"+r[r.length-1]+`'. It seems to not match the following source: -`+o);if(g.index)throw new Error("`match` must return a capture starting at index 0 (the current parse index). Did you forget a ^ at the start of the RegExp?");var j=d.parse(g,a,s);if(Array.isArray(j))Array.prototype.push.apply(l,j);else{if(j==null||typeof j!="object")throw new Error(`parse() function returned invalid parse result: '${j}'`);j.type==null&&(j.type=u),l.push(j)}s.prevCapture=g,o=o.substring(s.prevCapture[0].length)}return l},i=function(o,s){return n=Je(s,e),!n.inline&&!n.disableAutoBlockNewlines&&(o=o+` +`+o);if(g.index)throw new Error("`match` must return a capture starting at index 0 (the current parse index). Did you forget a ^ at the start of the RegExp?");var x=d.parse(g,a,s);if(Array.isArray(x))Array.prototype.push.apply(l,x);else{if(x==null||typeof x!="object")throw new Error(`parse() function returned invalid parse result: '${x}'`);x.type==null&&(x.type=u),l.push(x)}s.prevCapture=g,o=o.substring(s.prevCapture[0].length)}return l},i=function(o,s){return n=Je(s,e),!n.inline&&!n.disableAutoBlockNewlines&&(o=o+` -`),n.prevCapture=null,a(Ye(o),n)};return i},x=function(t){var e=function(r,n,a){return n.inline?t.exec(r):null};return e.regex=t,e},I=function(t){var e=function(r,n){return n.inline?null:t.exec(r)};return e.regex=t,e},Te=function(t){var e=function(r,n){return t.exec(r)};return e.regex=t,e},Ft=typeof Symbol=="function"&&Symbol.for&&Symbol.for("react.element")||60103,f=function(t,e,r){var n={$$typeof:Ft,type:t,key:e??void 0,ref:null,props:r,_owner:null};return n},T=function(t,e,r,n){r=r||{},n=typeof n<"u"?n:!0;var a="";for(var i in r){var o=r[i];Object.prototype.hasOwnProperty.call(r,i)&&o&&(a+=" "+H(i)+'="'+H(o)+'"')}var s="<"+t+a+">";return n?s+e+"":s},Ut={},Y=function(t){if(t==null)return null;try{var e=new URL(t,"https://localhost").protocol;if(e.indexOf("javascript:")===0||e.indexOf("vbscript:")===0||e.indexOf("data:")===0)return null}catch{return null}return t},St=/[<>&"']/g,Mt={"<":"<",">":">","&":"&",'"':""","'":"'","/":"/","`":"`"},H=function(t){return String(t).replace(St,function(e){return Mt[e]})},Dt=/\\([^0-9A-Za-z\s])/g,Re=function(t){return t.replace(Dt,"$1")},le=function(t,e,r){var n=r.inline||!1;r.inline=!0;var a=t(e,r);return r.inline=n,a},Vt=function(t,e,r){var n=r.inline||!1;r.inline=!1;var a=t(e+` +`),n.prevCapture=null,a(Ye(o),n)};return i},j=function(t){var e=function(r,n,a){return n.inline?t.exec(r):null};return e.regex=t,e},I=function(t){var e=function(r,n){return n.inline?null:t.exec(r)};return e.regex=t,e},Te=function(t){var e=function(r,n){return t.exec(r)};return e.regex=t,e},Ft=typeof Symbol=="function"&&Symbol.for&&Symbol.for("react.element")||60103,f=function(t,e,r){var n={$$typeof:Ft,type:t,key:e??void 0,ref:null,props:r,_owner:null};return n},T=function(t,e,r,n){r=r||{},n=typeof n<"u"?n:!0;var a="";for(var i in r){var o=r[i];Object.prototype.hasOwnProperty.call(r,i)&&o&&(a+=" "+H(i)+'="'+H(o)+'"')}var s="<"+t+a+">";return n?s+e+"":s},Ut={},Y=function(t){if(t==null)return null;try{var e=new URL(t,"https://localhost").protocol;if(e.indexOf("javascript:")===0||e.indexOf("vbscript:")===0||e.indexOf("data:")===0)return null}catch{return null}return t},St=/[<>&"']/g,Mt={"<":"<",">":">","&":"&",'"':""","'":"'","/":"/","`":"`"},H=function(t){return String(t).replace(St,function(e){return Mt[e]})},Dt=/\\([^0-9A-Za-z\s])/g,Re=function(t){return t.replace(Dt,"$1")},le=function(t,e,r){var n=r.inline||!1;r.inline=!0;var a=t(e,r);return r.inline=n,a},Vt=function(t,e,r){var n=r.inline||!1;r.inline=!1;var a=t(e+` `,r);return r.inline=n,a},ne=function(t,e,r){return{content:le(e,t[1],r)}},we=function(){return{}},ue="(?:[*+-]|\\d+\\.)",Ze="( *)("+ue+") +",Le=new RegExp("^"+Ze),Ht=new RegExp(Ze+"[^\\n]*(?:\\n(?!\\1"+ue+` )[^\\n]*)*( |$)`,"gm"),er=/\n{2,}$/,Gt=/^ (?= *`)|(` *) $/g,Kt=er,_e=/ *\n+$/,Bt=new RegExp("^( *)("+ue+`) [\\s\\S]+?(?: @@ -56,21 +56,21 @@ do not put widgets inside of tables.`}),vt=[_r,Pr,$r,Fr,Mr,Dr,Vr,Hr,Gr,Xr,Yr,Jr, `);return R.map(function(p){return s(p,g,b,q)})},u=function(d){return function(g,b,q){q.inline=!0;var R=s(g[1],b,q,d),p=o(g[2],b,q,d),w=l(g[3],b,q,d);return q.inline=!1,{type:"table",header:R,align:p,cells:w}}};return{parseTable:u(!0),parseNpTable:u(!1),TABLE_REGEX:/^ *(\|.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/,NPTABLE_REGEX:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/}}(),ie="(?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*",Pe=`\\s*?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*`,Yt=/mailto:/i,$e=function(t,e,r){var n=(t[2]||t[1]).replace(/\s+/g," ").toLowerCase();if(e._defs&&e._defs[n]){var a=e._defs[n];r.target=a.target,r.title=a.title}return e._refs=e._refs||{},e._refs[n]=e._refs[n]||[],e._refs[n].push(r),r},v=0,ee={Array:{react:function(t,e,r){for(var n=r.key,a=[],i=0,o=0;i