diff --git a/assets/Color-F6OSRLHC-lWbWp51Z.js b/assets/Color-F6OSRLHC-ed4oFm_F.js similarity index 99% rename from assets/Color-F6OSRLHC-lWbWp51Z.js rename to assets/Color-F6OSRLHC-ed4oFm_F.js index 6a156a7f2d..bd1dcfa8d9 100644 --- a/assets/Color-F6OSRLHC-lWbWp51Z.js +++ b/assets/Color-F6OSRLHC-ed4oFm_F.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-MEZMDSes.js";import{R as m,r as p}from"./index-6oxdNXpR.js";import"./iframe-C_SWW3D2.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-BlB9J7L7.js";import{R as m,r as p}from"./index-6oxdNXpR.js";import"./iframe-3V2-igME.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-MEZMDSes.js b/assets/DocsRenderer-CFRXHY34-BlB9J7L7.js similarity index 99% rename from assets/DocsRenderer-CFRXHY34-MEZMDSes.js rename to assets/DocsRenderer-CFRXHY34-BlB9J7L7.js index 76cf65cef4..bb82e3cb4b 100644 --- a/assets/DocsRenderer-CFRXHY34-MEZMDSes.js +++ b/assets/DocsRenderer-CFRXHY34-BlB9J7L7.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-C_SWW3D2.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-3V2-igME.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-d52WCTsb.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-vEFUSWPo.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-lWbWp51Z.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-ed4oFm_F.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-d52WCTsb.js","./iframe-C_SWW3D2.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-lWbWp51Z.js","./index-fP2ooXcT.js"] + __vite__mapDeps.viteFileDeps = ["./index-vEFUSWPo.js","./iframe-3V2-igME.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-ed4oFm_F.js","./index-fP2ooXcT.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } diff --git a/assets/answer-choices-SJp9oQsg.js b/assets/answer-choices-BvCuCrDd.js similarity index 99% rename from assets/answer-choices-SJp9oQsg.js rename to assets/answer-choices-BvCuCrDd.js index 313591b585..db7b5a06d5 100644 --- a/assets/answer-choices-SJp9oQsg.js +++ b/assets/answer-choices-BvCuCrDd.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-2Ae1Nml7.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-IhFUya5i.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-bKXAiW0J.js b/assets/answer-choices-h1kjoc3F.js similarity index 95% rename from assets/answer-choices-bKXAiW0J.js rename to assets/answer-choices-h1kjoc3F.js index a3c490652d..3eef393d53 100644 --- a/assets/answer-choices-bKXAiW0J.js +++ b/assets/answer-choices-h1kjoc3F.js @@ -1,3 +1,3 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{b as v}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as C}from"./components-JJnZE9Qc.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-rlF_k7iQ.js b/assets/answer-choices.stories-439XWrdJ.js similarity index 93% rename from assets/answer-choices.stories-rlF_k7iQ.js rename to assets/answer-choices.stories-439XWrdJ.js index ec9379e8a1..0cf093a9d4 100644 --- a/assets/answer-choices.stories-rlF_k7iQ.js +++ b/assets/answer-choices.stories-439XWrdJ.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-SJp9oQsg.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-2Ae1Nml7.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-BvCuCrDd.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-IhFUya5i.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-FcZanvM1.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 => { 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-_cVmQIli.js b/assets/answer-choices.stories-DRrt5y6z.js similarity index 83% rename from assets/answer-choices.stories-_cVmQIli.js rename to assets/answer-choices.stories-DRrt5y6z.js index 0bb255f33a..4d1a356b1a 100644 --- a/assets/answer-choices.stories-_cVmQIli.js +++ b/assets/answer-choices.stories-DRrt5y6z.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-bKXAiW0J.js";import"./v4-yQnnJER4.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.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-h1kjoc3F.js";import"./v4-yQnnJER4.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.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-ZZeQEGrZ.js b/assets/answer-pill-1rH5rJkp.js similarity index 98% rename from assets/answer-pill-ZZeQEGrZ.js rename to assets/answer-pill-1rH5rJkp.js index f95b1639cb..6ba4194f53 100644 --- a/assets/answer-pill-ZZeQEGrZ.js +++ b/assets/answer-pill-1rH5rJkp.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-2Ae1Nml7.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-IhFUya5i.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-ZF0XauTV.js b/assets/answer-pill.stories-HqbwIe4g.js similarity index 94% rename from assets/answer-pill.stories-ZF0XauTV.js rename to assets/answer-pill.stories-HqbwIe4g.js index d04e5ff697..6e71bcdafa 100644 --- a/assets/answer-pill.stories-ZF0XauTV.js +++ b/assets/answer-pill.stories-HqbwIe4g.js @@ -1,4 +1,4 @@ -import{j as C}from"./jsx-runtime-63Ea5SlK.js";import{A as t}from"./answer-pill-ZZeQEGrZ.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-2Ae1Nml7.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-1rH5rJkp.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-IhFUya5i.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-FcZanvM1.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:`{ args: { id: "1", selectedAnswers: ["Answer Pill"], diff --git a/assets/article-editor-EaP2C-Ia.js b/assets/article-editor-Z29bafBK.js similarity index 99% rename from assets/article-editor-EaP2C-Ia.js rename to assets/article-editor-Z29bafBK.js index cc886c5fc0..8a1f83c193 100644 --- a/assets/article-editor-EaP2C-Ia.js +++ b/assets/article-editor-Z29bafBK.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-jwwMfp2y.js";import{_ as p}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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-6LJcizcL.js";import{S as i}from"./section-control-button-Rtk7iZI-.js";import{E as q}from"./editor-MI6542O9.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=[...this._sections()];n[t]={...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(i,{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(i,{icon:T,onClick:()=>{this._handleMoveSectionEarlier(a)},title:"Move this section up"}),r.jsx(i,{icon:b,onClick:()=>{const s="Are you sure you want to delete section "+(a+1)+"?";confirm(s)&&this._handleRemoveSection(a)},title:"Delete this section"})]})]}),r.jsx(q,{...g,apiOptions:n,imageUploader:t,onChange:s=>this._handleEditorChange(a,s),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=[...this._sections()],n=e[t];e.splice(t,1),e.splice(t-1,0,n),this.props.onChange({json:e})}_handleMoveSectionLater(t){const e=[...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=p.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=[...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-m2DxR4DL.js";import{_ as p}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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c}from"./components-JJnZE9Qc.js";import{i as b}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-nH8rs09r.js";import{S as i}from"./section-control-button-5uzo1xSa.js";import{E as q}from"./editor-G-UjVjKd.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=[...this._sections()];n[t]={...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(i,{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(i,{icon:T,onClick:()=>{this._handleMoveSectionEarlier(a)},title:"Move this section up"}),r.jsx(i,{icon:b,onClick:()=>{const s="Are you sure you want to delete section "+(a+1)+"?";confirm(s)&&this._handleRemoveSection(a)},title:"Delete this section"})]})]}),r.jsx(q,{...g,apiOptions:n,imageUploader:t,onChange:s=>this._handleEditorChange(a,s),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=[...this._sections()],n=e[t];e.splice(t,1),e.splice(t-1,0,n),this.props.onChange({json:e})}_handleMoveSectionLater(t){const e=[...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=p.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=[...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-lFaSlzqb.js b/assets/article-editor.stories-KSUxY2l2.js similarity index 57% rename from assets/article-editor.stories-lFaSlzqb.js rename to assets/article-editor.stories-KSUxY2l2.js index f21fb0fabf..721fd50c57 100644 --- a/assets/article-editor.stories-lFaSlzqb.js +++ b/assets/article-editor.stories-KSUxY2l2.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-EaP2C-Ia.js";import{r as f}from"./register-all-widgets-and-editors-for-testing-6LJcizcL.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-D8O3Xswb.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-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.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-OdYPsA-W.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-Rtk7iZI-.js";import"./index-wzSCRJFK.js";import"./editor-MI6542O9.js";import"./icon-paths-EoBkHOLI.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";import"./graph-settings-3CGKz-Fx.js";import"./index-0C4KXdeC.js";import"./categorizer-editor-eZd-YZhk.js";import"./editor-jsonify-N_KGPfNT.js";import"./blur-input-6j4bgLwx.js";import"./definition-editor-ARTDgF3h.js";import"./dropdown-editor-M2GE09YI.js";import"./explanation-editor-0ahwp8Rb.js";import"./expression-editor-oFIZlZCP.js";import"./image-editor-Yj3_NT-i.js";import"./input-number-editor-r7btJNGI.js";import"./interaction-editor-AWh9DTES.js";import"./interactive-graph-editor--agEG2l8.js";import"./heading-1izW0-GJ.js";import"./interactive-graph-settings-f83FlCXt.js";import"./locked-figures-section--nV0kbTr.js";import"./locked-ellipse-settings-ZwFdyrTR.js";import"./locked-figure-aria-DMjwSLKk.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-Q_sgivvq.js";import"./color-select-oJZpOIQc.js";import"./util-WOIF_4W1.js";import"./line-stroke-select-tLzFP-jE.js";import"./locked-function-settings-5syaS11L.js";import"./line-swatch-5z1mrdDY.js";import"./locked-line-settings-X29AVEXv.js";import"./locked-point-settings-hNpBYzsr.js";import"./labeled-switch-H2OzEdZH.js";import"./locked-polygon-settings-F-dWbN7O.js";import"./locked-vector-settings-teFof_kC.js";import"./label-image-editor-uR0SR8x7.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-bKXAiW0J.js";import"./behavior-gU_GOIJI.js";import"./question-markers-0UUgPbE8.js";import"./marker-Hd-8N1dg.js";import"./select-image-8Yo1S9fa.js";import"./matcher-editor-AxlX3C-j.js";import"./number-line-editor-V9wGJGbX.js";import"./numeric-input-editor-qBNHWsXs.js";import"./phet-simulation-editor-YDXi7iT_.js";import"./python-program-editor-uSZoB793.js";import"./editor-f8HUcWmB.js";import"./sorter-editor-iYjrGKmy.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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-Z29bafBK.js";import{r as f}from"./register-all-widgets-and-editors-for-testing-nH8rs09r.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-cAdD85Lh.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-BvCuCrDd.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.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-cKXRS8bE.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./components-JJnZE9Qc.js";import"./device-framer-MUDr0WgQ.js";import"./constants-p_UgHLsb.js";import"./section-control-button-5uzo1xSa.js";import"./index-wzSCRJFK.js";import"./editor-G-UjVjKd.js";import"./icon-paths-EoBkHOLI.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";import"./graph-settings-HWzOkGCp.js";import"./index-0C4KXdeC.js";import"./categorizer-editor-Cwj-_Em8.js";import"./editor-jsonify-Xq2j5Ptn.js";import"./blur-input-6j4bgLwx.js";import"./definition-editor-lqhCzKJC.js";import"./dropdown-editor-JwHnzJHe.js";import"./explanation-editor-wfdanvql.js";import"./expression-editor-5Q0xRi4N.js";import"./image-editor-GD2oimd5.js";import"./input-number-editor-aqA3wlxN.js";import"./interaction-editor-XUhUj9pY.js";import"./interactive-graph-editor--Tp_Keeb.js";import"./heading-1izW0-GJ.js";import"./interactive-graph-settings-5yYCaRBt.js";import"./locked-figures-section-pNdU5eE3.js";import"./locked-ellipse-settings-FOiuHQ4s.js";import"./locked-figure-aria-G5ecBSuw.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-sHo8DjC4.js";import"./color-select-JWbIjxmk.js";import"./util-uQZZCXuL.js";import"./line-stroke-select-OgLwffrZ.js";import"./locked-function-settings-_kb3Q6u1.js";import"./line-swatch-wstb9auL.js";import"./locked-line-settings-WUX1i1E1.js";import"./locked-point-settings-yOnHJo2I.js";import"./labeled-switch-bgXqZg-6.js";import"./locked-polygon-settings-X00uUZoT.js";import"./locked-vector-settings-02mN1v7Q.js";import"./label-image-editor-0iusi5Gy.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-h1kjoc3F.js";import"./behavior-xBQWDl2O.js";import"./question-markers-3hvq1-K6.js";import"./marker-zKJG4WlZ.js";import"./select-image-jxbS7f2v.js";import"./matcher-editor-VfYBBAUU.js";import"./number-line-editor-X3MuZsf0.js";import"./numeric-input-editor-Ms-T6-c5.js";import"./phet-simulation-editor-d4l-9Rog.js";import"./python-program-editor-4XiuwJQ9.js";import"./editor-HGB2tTCA.js";import"./sorter-editor-twvCXJig.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-jwwMfp2y.js b/assets/article-renderer-m2DxR4DL.js similarity index 99% rename from assets/article-renderer-jwwMfp2y.js rename to assets/article-renderer-m2DxR4DL.js index 57b636a021..7d7604f3a3 100644 --- a/assets/article-renderer-jwwMfp2y.js +++ b/assets/article-renderer-m2DxR4DL.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-2Ae1Nml7.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-D8O3Xswb.js";import{S as _r}from"./simple-keypad-input-7tb5_po1.js";import{B as vl}from"./base-radio-ZvkGSpa4.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-SJp9oQsg.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-sirTJF7M.js";import{S as Zt}from"./sortable-pOpkHk6I.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-IhFUya5i.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-FcZanvM1.js";import{s as tr,c as H,f as bl}from"./index-Dfd6auV6.js";import{I as Gi}from"./input-with-examples-cAdD85Lh.js";import{S as _r}from"./simple-keypad-input-7tb5_po1.js";import{B as vl}from"./base-radio-DUduhCT2.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-BvCuCrDd.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-4ZDD3NK_.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-zOWMpEAL.js";import{S as Zt}from"./sortable-Ho8icdmJ.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()+` diff --git a/assets/article-renderer.stories-t5zRRfYX.js b/assets/article-renderer.stories-N9zESDk7.js similarity index 89% rename from assets/article-renderer.stories-t5zRRfYX.js rename to assets/article-renderer.stories-N9zESDk7.js index 8a0f5a9e9f..bad331d80a 100644 --- a/assets/article-renderer.stories-t5zRRfYX.js +++ b/assets/article-renderer.stories-N9zESDk7.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-fOZQW4nE.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-jwwMfp2y.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-IqvoTTry.js";import"./renderer-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.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-iQhk5A81.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-m2DxR4DL.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-0z8sJlZ3.js";import"./renderer-IhFUya5i.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-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.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-ZvkGSpa4.js b/assets/base-radio-DUduhCT2.js similarity index 99% rename from assets/base-radio-ZvkGSpa4.js rename to assets/base-radio-DUduhCT2.js index 2ceee37b81..768c40cd97 100644 --- a/assets/base-radio-ZvkGSpa4.js +++ b/assets/base-radio-DUduhCT2.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-OdYPsA-W.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-cKXRS8bE.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-FmyKUOTk.js b/assets/base-radio.stories-y2YN7Oy1.js similarity index 97% rename from assets/base-radio.stories-FmyKUOTk.js rename to assets/base-radio.stories-y2YN7Oy1.js index 8fd06ca7ae..103e6e718b 100644 --- a/assets/base-radio.stories-FmyKUOTk.js +++ b/assets/base-radio.stories-y2YN7Oy1.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-ZvkGSpa4.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-OdYPsA-W.js";import"./renderer-2Ae1Nml7.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-DUduhCT2.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-cKXRS8bE.js";import"./renderer-IhFUya5i.js";import"./index-J2t_5nK1.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-gU_GOIJI.js b/assets/behavior-xBQWDl2O.js similarity index 96% rename from assets/behavior-gU_GOIJI.js rename to assets/behavior-xBQWDl2O.js index 9184510215..0cd9c61d8f 100644 --- a/assets/behavior-gU_GOIJI.js +++ b/assets/behavior-xBQWDl2O.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{b as j}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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:`{ 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-Dn7kENRm.js b/assets/behavior.stories-fcqeBsQF.js similarity index 79% rename from assets/behavior.stories-Dn7kENRm.js rename to assets/behavior.stories-fcqeBsQF.js index ea9061ee34..d4dced1fc6 100644 --- a/assets/behavior.stories-Dn7kENRm.js +++ b/assets/behavior.stories-fcqeBsQF.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-gU_GOIJI.js";import"./v4-yQnnJER4.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.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-xBQWDl2O.js";import"./v4-yQnnJER4.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.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-eZd-YZhk.js b/assets/categorizer-editor-Cwj-_Em8.js similarity index 89% rename from assets/categorizer-editor-eZd-YZhk.js rename to assets/categorizer-editor-Cwj-_Em8.js index 063639f7f2..0ae8b919dc 100644 --- a/assets/categorizer-editor-eZd-YZhk.js +++ b/assets/categorizer-editor-Cwj-_Em8.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-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-N_KGPfNT.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as u}from"./components-JJnZE9Qc.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.js";import"./index-smZ6iCr_.js";import{E as d}from"./editor-jsonify-Xq2j5Ptn.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}; diff --git a/assets/categorizer-editor.stories-yOi_fvI9.js b/assets/categorizer-editor.stories-9Ohj3D2G.js similarity index 74% rename from assets/categorizer-editor.stories-yOi_fvI9.js rename to assets/categorizer-editor.stories-9Ohj3D2G.js index 943f746d31..171ad739cd 100644 --- a/assets/categorizer-editor.stories-yOi_fvI9.js +++ b/assets/categorizer-editor.stories-9Ohj3D2G.js @@ -1,3 +1,3 @@ -import{j as p}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-eZd-YZhk.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-D8O3Xswb.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-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.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-OdYPsA-W.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-N_KGPfNT.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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-Cwj-_Em8.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-cAdD85Lh.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-BvCuCrDd.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.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-cKXRS8bE.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./v4-yQnnJER4.js";import"./components-JJnZE9Qc.js";import"./editor-jsonify-Xq2j5Ptn.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 => { 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-O-lW6cjY.js b/assets/categorizer.stories-uiiCCUWx.js similarity index 81% rename from assets/categorizer.stories-O-lW6cjY.js rename to assets/categorizer.stories-uiiCCUWx.js index 9837ff4c5a..184006a675 100644 --- a/assets/categorizer.stories-O-lW6cjY.js +++ b/assets/categorizer.stories-uiiCCUWx.js @@ -1,4 +1,4 @@ -import{j as p}from"./jsx-runtime-63Ea5SlK.js";import{R as e}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.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-OdYPsA-W.js b/assets/choice-none-above-cKXRS8bE.js similarity index 87% rename from assets/choice-none-above-OdYPsA-W.js rename to assets/choice-none-above-cKXRS8bE.js index f69a2ad63e..4fadc3403f 100644 --- a/assets/choice-none-above-OdYPsA-W.js +++ b/assets/choice-none-above-cKXRS8bE.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-2Ae1Nml7.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-IhFUya5i.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-9RKVG2Bm.js b/assets/choice-none-above.stories-U7THKklR.js similarity index 90% rename from assets/choice-none-above.stories-9RKVG2Bm.js rename to assets/choice-none-above.stories-U7THKklR.js index d0b421d59f..56630fff39 100644 --- a/assets/choice-none-above.stories-9RKVG2Bm.js +++ b/assets/choice-none-above.stories-U7THKklR.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-OdYPsA-W.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./i18n-context-fsWEgybQ.js";import"./renderer-2Ae1Nml7.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-cKXRS8bE.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./i18n-context-fsWEgybQ.js";import"./renderer-IhFUya5i.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-FcZanvM1.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 => { const combineProps = { ...ChoiceDefaults, ...args diff --git a/assets/color-select-oJZpOIQc.js b/assets/color-select-JWbIjxmk.js similarity index 74% rename from assets/color-select-oJZpOIQc.js rename to assets/color-select-JWbIjxmk.js index ca92456cf3..63d2bb9f1d 100644 --- a/assets/color-select-oJZpOIQc.js +++ b/assets/color-select-JWbIjxmk.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{l}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-SJp9oQsg.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}from"./util-WOIF_4W1.js";const g=Object.keys(l),t=i=>{const{selectedValue:m,style:s,onChange:p}=i;return e.jsx(n,{style:[r.row,s],children:e.jsxs(y,{tag:"label",style:r.row,children:["color",e.jsx(u,{size:d.xxSmall_6}),e.jsx(a,{selectedValue:m,onChange:p,placeholder:"",children:g.map(o=>e.jsx(c,{value:o,label:o,leftAccessory:e.jsx(C,{color:o,decorative:!0})},o))})]})})},r=f.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center",minWidth:"auto"}}),Z=t;t.__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:"(newColor: LockedFigureColor) => void",signature:{arguments:[{type:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},name:"newColor"}],return:{name:"void"}}},description:""}}};export{Z as C}; +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{l}from"./article-renderer-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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-BvCuCrDd.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}from"./util-uQZZCXuL.js";const g=Object.keys(l),t=i=>{const{selectedValue:m,style:s,onChange:p}=i;return e.jsx(n,{style:[r.row,s],children:e.jsxs(y,{tag:"label",style:r.row,children:["color",e.jsx(u,{size:d.xxSmall_6}),e.jsx(a,{selectedValue:m,onChange:p,placeholder:"",children:g.map(o=>e.jsx(c,{value:o,label:o,leftAccessory:e.jsx(C,{color:o,decorative:!0})},o))})]})})},r=f.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center",minWidth:"auto"}}),Z=t;t.__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:"(newColor: LockedFigureColor) => void",signature:{arguments:[{type:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},name:"newColor"}],return:{name:"void"}}},description:""}}};export{Z as C}; diff --git a/assets/color-select.stories-uXkWLnPS.js b/assets/color-select.stories-Jw3Ng-PJ.js similarity index 77% rename from assets/color-select.stories-uXkWLnPS.js rename to assets/color-select.stories-Jw3Ng-PJ.js index 27bffac6df..673f7b9ad0 100644 --- a/assets/color-select.stories-uXkWLnPS.js +++ b/assets/color-select.stories-Jw3Ng-PJ.js @@ -1,4 +1,4 @@ -import{j as n}from"./jsx-runtime-63Ea5SlK.js";import{r as f}from"./index-6oxdNXpR.js";import{C as t}from"./color-select-oJZpOIQc.js";import{g as C}from"./util-WOIF_4W1.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";const to={title:"PerseusEditor/Components/Color Select",component:t},r=e=>n.jsx(t,{...e}),c=C("point").color;r.args={id:"color-select",selectedValue:c,onChange:()=>{}};const o={render:function(){const[u,d]=f.useState(c);return n.jsx(t,{selectedValue:u,onChange:d})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var m,p,i;r.parameters={...r.parameters,docs:{...(m=r.parameters)==null?void 0:m.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as n}from"./jsx-runtime-63Ea5SlK.js";import{r as f}from"./index-6oxdNXpR.js";import{C as t}from"./color-select-JWbIjxmk.js";import{g as C}from"./util-uQZZCXuL.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";const to={title:"PerseusEditor/Components/Color Select",component:t},r=e=>n.jsx(t,{...e}),c=C("point").color;r.args={id:"color-select",selectedValue:c,onChange:()=>{}};const o={render:function(){const[u,d]=f.useState(c);return n.jsx(t,{selectedValue:u,onChange:d})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var m,p,i;r.parameters={...r.parameters,docs:{...(m=r.parameters)==null?void 0:m.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(i=(p=r.parameters)==null?void 0:p.docs)==null?void 0:i.source}}};var s,a,l;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/color-swatch.stories-0EVuSFZ3.js b/assets/color-swatch.stories-Uc-L1-8V.js similarity index 74% rename from assets/color-swatch.stories-0EVuSFZ3.js rename to assets/color-swatch.stories-Uc-L1-8V.js index 461f6caac8..801e3fc739 100644 --- a/assets/color-swatch.stories-0EVuSFZ3.js +++ b/assets/color-swatch.stories-Uc-L1-8V.js @@ -1,3 +1,3 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{C as p,g as s}from"./util-WOIF_4W1.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.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-uQZZCXuL.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.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/components-ODdjt0Ld.js b/assets/components-JJnZE9Qc.js similarity index 85% rename from assets/components-ODdjt0Ld.js rename to assets/components-JJnZE9Qc.js index 41c8b6b1d1..24ae0f1e33 100644 --- a/assets/components-ODdjt0Ld.js +++ b/assets/components-JJnZE9Qc.js @@ -1 +1 @@ -import{B as o}from"./button-group-G5CZaedn.js";import{G as r}from"./graph-QfZUzUyx.js";import{a as t,S as m}from"./svg-image-7aOK05RI.js";import{H as p}from"./hud-ifw9Ofbw.js";import{I as a}from"./icon-7RFbyLiL.js";import{I as i}from"./index-BIPwuHvF.js";import{I as e}from"./inline-icon-6fh0Wu1y.js";import{M as n}from"./math-input-ILg8RrvB.js";import{M as s}from"./multi-button-group-QUVHbBcE.js";import{N as f}from"./number-input-ogh82yD8.js";import{R as u}from"./range-input-w5Z3sPK5.js";import{T as I}from"./text-input-5e4vF1bl.js";import{T as c}from"./text-list-editor-aj1SAzcA.js";const v=Object.freeze(Object.defineProperty({__proto__:null,ButtonGroup:o,Graph:r,Graphie:t,HUD:p,Icon:a,InfoTip:i,InlineIcon:e,MathInput:n,MultiButtonGroup:s,NumberInput:f,RangeInput:u,SvgImage:m,TextInput:I,TextListEditor:c},Symbol.toStringTag,{value:"Module"}));export{v as c}; +import{B as o}from"./button-group-G5CZaedn.js";import{G as r}from"./graph-4ZDD3NK_.js";import{a as t,S as m}from"./svg-image-FcZanvM1.js";import{H as p}from"./hud-ifw9Ofbw.js";import{I as a}from"./icon-7RFbyLiL.js";import{I as i}from"./index-BIPwuHvF.js";import{I as e}from"./inline-icon-6fh0Wu1y.js";import{M as n}from"./math-input-ILg8RrvB.js";import{M as s}from"./multi-button-group-QUVHbBcE.js";import{N as f}from"./number-input-ogh82yD8.js";import{R as u}from"./range-input-w5Z3sPK5.js";import{T as I}from"./text-input-5e4vF1bl.js";import{T as c}from"./text-list-editor-aj1SAzcA.js";const v=Object.freeze(Object.defineProperty({__proto__:null,ButtonGroup:o,Graph:r,Graphie:t,HUD:p,Icon:a,InfoTip:i,InlineIcon:e,MathInput:n,MultiButtonGroup:s,NumberInput:f,RangeInput:u,SvgImage:m,TextInput:I,TextListEditor:c},Symbol.toStringTag,{value:"Module"}));export{v as c}; diff --git a/assets/content-preview.stories-uWJrIV11.js b/assets/content-preview.stories-AfOmEP1I.js similarity index 99% rename from assets/content-preview.stories-uWJrIV11.js rename to assets/content-preview.stories-AfOmEP1I.js index a9b566cf02..c110e33f0f 100644 --- a/assets/content-preview.stories-uWJrIV11.js +++ b/assets/content-preview.stories-AfOmEP1I.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import{R as W}from"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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 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-TJi7eV3F.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-D8O3Xswb.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-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.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-OdYPsA-W.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:`{ +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import{R as W}from"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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 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-0KQVCsZT.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-cAdD85Lh.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-BvCuCrDd.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.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-cKXRS8bE.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./components-JJnZE9Qc.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)). diff --git a/assets/cs-program.stories-7VVJ46Wq.js b/assets/cs-program.stories-Kuc3rLSE.js similarity index 77% rename from assets/cs-program.stories-7VVJ46Wq.js rename to assets/cs-program.stories-Kuc3rLSE.js index 1ba599091f..4f1527bdb4 100644 --- a/assets/cs-program.stories-7VVJ46Wq.js +++ b/assets/cs-program.stories-Kuc3rLSE.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{R as p}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.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-ARTDgF3h.js b/assets/definition-editor-lqhCzKJC.js similarity index 78% rename from assets/definition-editor-ARTDgF3h.js rename to assets/definition-editor-lqhCzKJC.js index 4f8900da4d..cbce7a5478 100644 --- a/assets/definition-editor-ARTDgF3h.js +++ b/assets/definition-editor-lqhCzKJC.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{c as n,p}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-N_KGPfNT.js";import{P as o}from"./index-0C4KXdeC.js";import{r as d}from"./index-6oxdNXpR.js";import{E as c}from"./editor-MI6542O9.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as m}from"./components-JJnZE9Qc.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.js";import"./index-smZ6iCr_.js";import{E as l}from"./editor-jsonify-Xq2j5Ptn.js";import{P as o}from"./index-0C4KXdeC.js";import{r as d}from"./index-6oxdNXpR.js";import{E as c}from"./editor-G-UjVjKd.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-DH9p-tBT.js b/assets/definition-editor.stories-2qnB6S7b.js similarity index 70% rename from assets/definition-editor.stories-DH9p-tBT.js rename to assets/definition-editor.stories-2qnB6S7b.js index d93146311a..ec1db22cb5 100644 --- a/assets/definition-editor.stories-DH9p-tBT.js +++ b/assets/definition-editor.stories-2qnB6S7b.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-ARTDgF3h.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./components-ODdjt0Ld.js";import"./editor-jsonify-N_KGPfNT.js";import"./index-0C4KXdeC.js";import"./editor-MI6542O9.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-Rtk7iZI-.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-lqhCzKJC.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.js";import"./editor-jsonify-Xq2j5Ptn.js";import"./index-0C4KXdeC.js";import"./editor-G-UjVjKd.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-5uzo1xSa.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-9ABUtqST.js b/assets/definition.stories-Rxx2Cfx5.js similarity index 86% rename from assets/definition.stories-9ABUtqST.js rename to assets/definition.stories-Rxx2Cfx5.js index 6920c8f243..c8f334ab15 100644 --- a/assets/definition.stories-9ABUtqST.js +++ b/assets/definition.stories-Rxx2Cfx5.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-63Ea5SlK.js";import{R as f}from"./renderer-with-debug-ui-rlAJ1oPQ.js";import{s as h}from"./test-dependencies-fOZQW4nE.js";import{A as g}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./renderer-2Ae1Nml7.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-dH4zQ5yQ.js";import"./shared-4TdECMLk.js";import"./base-radio-ZvkGSpa4.js";import"./choice-none-above-OdYPsA-W.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-IqvoTTry.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./enums-x5qaTru7.js";import"./input-with-examples-D8O3Xswb.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./answer-choices-SJp9oQsg.js";import"./marker-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.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-Hlx8S3_1.js";import{s as h}from"./test-dependencies-iQhk5A81.js";import{A as g}from"./article-renderer-m2DxR4DL.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-N_w_I8xw.js";import"./renderer-IhFUya5i.js";import"./index-J2t_5nK1.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-b_P2F9w3.js";import"./shared-4TdECMLk.js";import"./base-radio-DUduhCT2.js";import"./choice-none-above-cKXRS8bE.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-0z8sJlZ3.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./enums-x5qaTru7.js";import"./input-with-examples-cAdD85Lh.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./answer-choices-BvCuCrDd.js";import"./marker-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.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-8-skAoQp.js b/assets/deprecated-standin.stories-SsbKMRHE.js similarity index 78% rename from assets/deprecated-standin.stories-8-skAoQp.js rename to assets/deprecated-standin.stories-SsbKMRHE.js index 763a95b447..8a1af9585e 100644 --- a/assets/deprecated-standin.stories-8-skAoQp.js +++ b/assets/deprecated-standin.stories-SsbKMRHE.js @@ -1,4 +1,4 @@ -import{j as p}from"./jsx-runtime-63Ea5SlK.js";import{R as m}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.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-M2GE09YI.js b/assets/dropdown-editor-JwHnzJHe.js similarity index 92% rename from assets/dropdown-editor-M2GE09YI.js rename to assets/dropdown-editor-JwHnzJHe.js index 7f7c3d0d28..e0cd584cc1 100644 --- a/assets/dropdown-editor-M2GE09YI.js +++ b/assets/dropdown-editor-JwHnzJHe.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-N_KGPfNT.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as m}from"./components-JJnZE9Qc.js";import{i as u}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.js";import"./index-smZ6iCr_.js";import{E as f}from"./editor-jsonify-Xq2j5Ptn.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:`[ { content: "", correct: false, diff --git a/assets/dropdown-editor.stories-xzpD4zl0.js b/assets/dropdown-editor.stories-IfKatrYq.js similarity index 75% rename from assets/dropdown-editor.stories-xzpD4zl0.js rename to assets/dropdown-editor.stories-IfKatrYq.js index 0aa187e531..1660641f3e 100644 --- a/assets/dropdown-editor.stories-xzpD4zl0.js +++ b/assets/dropdown-editor.stories-IfKatrYq.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-M2GE09YI.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./components-ODdjt0Ld.js";import"./editor-jsonify-N_KGPfNT.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-JwHnzJHe.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.js";import"./editor-jsonify-Xq2j5Ptn.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 => { return
; diff --git a/assets/dropdown.stories-5tof_Ni4.js b/assets/dropdown.stories-GUiRyi1l.js similarity index 86% rename from assets/dropdown.stories-5tof_Ni4.js rename to assets/dropdown.stories-GUiRyi1l.js index 6281c5ee7d..db5588b3a6 100644 --- a/assets/dropdown.stories-5tof_Ni4.js +++ b/assets/dropdown.stories-GUiRyi1l.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{R as i}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.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-MI6542O9.js b/assets/editor-G-UjVjKd.js similarity index 99% rename from assets/editor-MI6542O9.js rename to assets/editor-G-UjVjKd.js index b572fb580f..bacc4d8ca3 100644 --- a/assets/editor-MI6542O9.js +++ b/assets/editor-G-UjVjKd.js @@ -1,4 +1,4 @@ -import{j as U}from"./jsx-runtime-63Ea5SlK.js";import{S as ws,d as ks}from"./article-renderer-jwwMfp2y.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-2Ae1Nml7.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./base-radio-ZvkGSpa4.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-Rtk7iZI-.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-m2DxR4DL.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-IhFUya5i.js";import"./perseus-api-1-ethIrW.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import{L as zs}from"./svg-image-FcZanvM1.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-JJnZE9Qc.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-5uzo1xSa.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 diff --git a/assets/editor-f8HUcWmB.js b/assets/editor-HGB2tTCA.js similarity index 95% rename from assets/editor-f8HUcWmB.js rename to assets/editor-HGB2tTCA.js index 21248ca0b9..f762fe33a3 100644 --- a/assets/editor-f8HUcWmB.js +++ b/assets/editor-HGB2tTCA.js @@ -1 +1 @@ -import{j as n}from"./jsx-runtime-63Ea5SlK.js";import{c as y,p as v}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import{B as q}from"./base-radio-ZvkGSpa4.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-MI6542O9.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import{B as q}from"./base-radio-DUduhCT2.js";import{c as x}from"./components-JJnZE9Qc.js";import{i as O}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-G-UjVjKd.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-jsonify-N_KGPfNT.js b/assets/editor-jsonify-Xq2j5Ptn.js similarity index 61% rename from assets/editor-jsonify-N_KGPfNT.js rename to assets/editor-jsonify-Xq2j5Ptn.js index bd4e6c7ab1..594a3c6a85 100644 --- a/assets/editor-jsonify-N_KGPfNT.js +++ b/assets/editor-jsonify-Xq2j5Ptn.js @@ -1 +1 @@ -import{_ as o}from"./jquery-yG1GhClm.js";import{d as i}from"./article-renderer-jwwMfp2y.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-m2DxR4DL.js";const s={serialize:function(){return o.omit(this.props,i)}};export{s as E}; diff --git a/assets/editor-page-bRBZkw3M.js b/assets/editor-page-GOdzEuJC.js similarity index 99% rename from assets/editor-page-bRBZkw3M.js rename to assets/editor-page-GOdzEuJC.js index 4cef0980ae..2de954b910 100644 --- a/assets/editor-page-bRBZkw3M.js +++ b/assets/editor-page-GOdzEuJC.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-6LJcizcL.js";import{V as j}from"./viewport-resizer-TJi7eV3F.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-MI6542O9.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-lovX4vvB.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as w}from"./components-JJnZE9Qc.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-nH8rs09r.js";import{V as j}from"./viewport-resizer-0KQVCsZT.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-G-UjVjKd.js";import{a as x,b as z,i as C}from"./icon-paths-EoBkHOLI.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-b8a6MKdk.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, diff --git a/assets/editor-page-with-storybook-preview-eID9LGeq.js b/assets/editor-page-with-storybook-preview-VLm4w66W.js similarity index 99% rename from assets/editor-page-with-storybook-preview-eID9LGeq.js rename to assets/editor-page-with-storybook-preview-VLm4w66W.js index 4bb9a1d0ae..909c8ad051 100644 --- a/assets/editor-page-with-storybook-preview-eID9LGeq.js +++ b/assets/editor-page-with-storybook-preview-VLm4w66W.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import{R as g}from"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-Q_sgivvq.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-bRBZkw3M.js";import{f as N}from"./flags-for-api-options-K2okOOce.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:`{ +import{j as r}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import{R as g}from"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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-sHo8DjC4.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-GOdzEuJC.js";import{f as N}from"./flags-for-api-options-CUL0S_V-.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, diff --git a/assets/editor-page.stories-FzrJl5wV.js b/assets/editor-page.stories-FzrJl5wV.js new file mode 100644 index 0000000000..1050bc2b90 --- /dev/null +++ b/assets/editor-page.stories-FzrJl5wV.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-nH8rs09r.js";import{E as e}from"./editor-page-with-storybook-preview-VLm4w66W.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./graph-settings-HWzOkGCp.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.js";import"./index-0C4KXdeC.js";import"./categorizer-editor-Cwj-_Em8.js";import"./editor-jsonify-Xq2j5Ptn.js";import"./blur-input-6j4bgLwx.js";import"./definition-editor-lqhCzKJC.js";import"./editor-G-UjVjKd.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-5uzo1xSa.js";import"./index-wzSCRJFK.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";import"./dropdown-editor-JwHnzJHe.js";import"./explanation-editor-wfdanvql.js";import"./expression-editor-5Q0xRi4N.js";import"./image-editor-GD2oimd5.js";import"./input-number-editor-aqA3wlxN.js";import"./interaction-editor-XUhUj9pY.js";import"./interactive-graph-editor--Tp_Keeb.js";import"./heading-1izW0-GJ.js";import"./interactive-graph-settings-5yYCaRBt.js";import"./locked-figures-section-pNdU5eE3.js";import"./locked-ellipse-settings-FOiuHQ4s.js";import"./locked-figure-aria-G5ecBSuw.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-sHo8DjC4.js";import"./color-select-JWbIjxmk.js";import"./util-uQZZCXuL.js";import"./line-stroke-select-OgLwffrZ.js";import"./locked-function-settings-_kb3Q6u1.js";import"./line-swatch-wstb9auL.js";import"./locked-line-settings-WUX1i1E1.js";import"./locked-point-settings-yOnHJo2I.js";import"./labeled-switch-bgXqZg-6.js";import"./locked-polygon-settings-X00uUZoT.js";import"./locked-vector-settings-02mN1v7Q.js";import"./label-image-editor-0iusi5Gy.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-h1kjoc3F.js";import"./behavior-xBQWDl2O.js";import"./question-markers-3hvq1-K6.js";import"./marker-zKJG4WlZ.js";import"./select-image-jxbS7f2v.js";import"./matcher-editor-VfYBBAUU.js";import"./number-line-editor-X3MuZsf0.js";import"./numeric-input-editor-Ms-T6-c5.js";import"./phet-simulation-editor-d4l-9Rog.js";import"./python-program-editor-4XiuwJQ9.js";import"./editor-HGB2tTCA.js";import"./sorter-editor-twvCXJig.js";import"./chunk-D5ZWXAHU-vR62DWf0.js";import"./v4-yQnnJER4.js";import"./editor-page-GOdzEuJC.js";import"./viewport-resizer-0KQVCsZT.js";import"./constants-p_UgHLsb.js";import"./device-framer-MUDr0WgQ.js";import"./item-extras-editor-b8a6MKdk.js";import"./flags-for-api-options-CUL0S_V-.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-xWQuHRg5.js b/assets/editor-page.stories-xWQuHRg5.js deleted file mode 100644 index ef7e1613f5..0000000000 --- a/assets/editor-page.stories-xWQuHRg5.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-6LJcizcL.js";import{E as e}from"./editor-page-with-storybook-preview-eID9LGeq.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./graph-settings-3CGKz-Fx.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";import"./categorizer-editor-eZd-YZhk.js";import"./editor-jsonify-N_KGPfNT.js";import"./blur-input-6j4bgLwx.js";import"./definition-editor-ARTDgF3h.js";import"./editor-MI6542O9.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-Rtk7iZI-.js";import"./index-wzSCRJFK.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";import"./dropdown-editor-M2GE09YI.js";import"./explanation-editor-0ahwp8Rb.js";import"./expression-editor-oFIZlZCP.js";import"./image-editor-Yj3_NT-i.js";import"./input-number-editor-r7btJNGI.js";import"./interaction-editor-AWh9DTES.js";import"./interactive-graph-editor--agEG2l8.js";import"./heading-1izW0-GJ.js";import"./interactive-graph-settings-f83FlCXt.js";import"./locked-figures-section--nV0kbTr.js";import"./locked-ellipse-settings-ZwFdyrTR.js";import"./locked-figure-aria-DMjwSLKk.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-Q_sgivvq.js";import"./color-select-oJZpOIQc.js";import"./util-WOIF_4W1.js";import"./line-stroke-select-tLzFP-jE.js";import"./locked-function-settings-5syaS11L.js";import"./line-swatch-5z1mrdDY.js";import"./locked-line-settings-X29AVEXv.js";import"./locked-point-settings-hNpBYzsr.js";import"./labeled-switch-H2OzEdZH.js";import"./locked-polygon-settings-F-dWbN7O.js";import"./locked-vector-settings-teFof_kC.js";import"./label-image-editor-uR0SR8x7.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-bKXAiW0J.js";import"./behavior-gU_GOIJI.js";import"./question-markers-0UUgPbE8.js";import"./marker-Hd-8N1dg.js";import"./select-image-8Yo1S9fa.js";import"./matcher-editor-AxlX3C-j.js";import"./number-line-editor-V9wGJGbX.js";import"./numeric-input-editor-qBNHWsXs.js";import"./phet-simulation-editor-YDXi7iT_.js";import"./python-program-editor-uSZoB793.js";import"./editor-f8HUcWmB.js";import"./sorter-editor-iYjrGKmy.js";import"./chunk-D5ZWXAHU-vR62DWf0.js";import"./v4-yQnnJER4.js";import"./editor-page-bRBZkw3M.js";import"./viewport-resizer-TJi7eV3F.js";import"./constants-p_UgHLsb.js";import"./device-framer-MUDr0WgQ.js";import"./item-extras-editor-lovX4vvB.js";import"./flags-for-api-options-K2okOOce.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-5ueq0lXW.js b/assets/editor.stories-fWJ54GsJ.js similarity index 70% rename from assets/editor.stories-5ueq0lXW.js rename to assets/editor.stories-fWJ54GsJ.js index f29db521d3..aa980fd021 100644 --- a/assets/editor.stories-5ueq0lXW.js +++ b/assets/editor.stories-fWJ54GsJ.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-zt79SAQ4.js";import{S as O}from"./side-by-side-MBJuyilC.js";import{r as C}from"./register-all-widgets-and-editors-for-testing-6LJcizcL.js";import{a as u}from"./flags-for-api-options-K2okOOce.js";import{E as f}from"./editor-MI6542O9.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./version-akiLXZts.js";import"./article-editor-EaP2C-Ia.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./components-ODdjt0Ld.js";import"./device-framer-MUDr0WgQ.js";import"./constants-p_UgHLsb.js";import"./section-control-button-Rtk7iZI-.js";import"./index-wzSCRJFK.js";import"./icon-paths-EoBkHOLI.js";import"./viewport-resizer-TJi7eV3F.js";import"./index-0C4KXdeC.js";import"./structured-item-diff-0iAD6MzK.js";import"./text-diff-LGX1DVHQ.js";import"./tags-diff-CAGYiPAf.js";import"./editor-page-bRBZkw3M.js";import"./item-extras-editor-lovX4vvB.js";import"./multi-items-t1jjN0h8.js";/* empty css */import"./graph-settings-3CGKz-Fx.js";import"./categorizer-editor-eZd-YZhk.js";import"./editor-jsonify-N_KGPfNT.js";import"./blur-input-6j4bgLwx.js";import"./definition-editor-ARTDgF3h.js";import"./dropdown-editor-M2GE09YI.js";import"./explanation-editor-0ahwp8Rb.js";import"./expression-editor-oFIZlZCP.js";import"./image-editor-Yj3_NT-i.js";import"./input-number-editor-r7btJNGI.js";import"./interaction-editor-AWh9DTES.js";import"./interactive-graph-editor--agEG2l8.js";import"./heading-1izW0-GJ.js";import"./toggleable-caret-YFS5vs4O.js";import"./interactive-graph-settings-f83FlCXt.js";import"./locked-figures-section--nV0kbTr.js";import"./locked-ellipse-settings-ZwFdyrTR.js";import"./locked-figure-aria-DMjwSLKk.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-Q_sgivvq.js";import"./color-select-oJZpOIQc.js";import"./util-WOIF_4W1.js";import"./line-stroke-select-tLzFP-jE.js";import"./locked-function-settings-5syaS11L.js";import"./line-swatch-5z1mrdDY.js";import"./locked-line-settings-X29AVEXv.js";import"./locked-point-settings-hNpBYzsr.js";import"./labeled-switch-H2OzEdZH.js";import"./locked-polygon-settings-F-dWbN7O.js";import"./locked-vector-settings-teFof_kC.js";import"./label-image-editor-uR0SR8x7.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-bKXAiW0J.js";import"./behavior-gU_GOIJI.js";import"./question-markers-0UUgPbE8.js";import"./marker-Hd-8N1dg.js";import"./select-image-8Yo1S9fa.js";import"./matcher-editor-AxlX3C-j.js";import"./number-line-editor-V9wGJGbX.js";import"./numeric-input-editor-qBNHWsXs.js";import"./phet-simulation-editor-YDXi7iT_.js";import"./python-program-editor-uSZoB793.js";import"./editor-f8HUcWmB.js";import"./sorter-editor-iYjrGKmy.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-8cli1Wkv.js";import{S as O}from"./side-by-side-MBJuyilC.js";import{r as C}from"./register-all-widgets-and-editors-for-testing-nH8rs09r.js";import{a as u}from"./flags-for-api-options-CUL0S_V-.js";import{E as f}from"./editor-G-UjVjKd.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./version-akiLXZts.js";import"./article-editor-Z29bafBK.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.js";import"./device-framer-MUDr0WgQ.js";import"./constants-p_UgHLsb.js";import"./section-control-button-5uzo1xSa.js";import"./index-wzSCRJFK.js";import"./icon-paths-EoBkHOLI.js";import"./viewport-resizer-0KQVCsZT.js";import"./index-0C4KXdeC.js";import"./structured-item-diff-A4k3naVl.js";import"./text-diff-44zRM9-e.js";import"./tags-diff-GoL2kY7u.js";import"./editor-page-GOdzEuJC.js";import"./item-extras-editor-b8a6MKdk.js";import"./multi-items-KIV3SbJE.js";/* empty css */import"./graph-settings-HWzOkGCp.js";import"./categorizer-editor-Cwj-_Em8.js";import"./editor-jsonify-Xq2j5Ptn.js";import"./blur-input-6j4bgLwx.js";import"./definition-editor-lqhCzKJC.js";import"./dropdown-editor-JwHnzJHe.js";import"./explanation-editor-wfdanvql.js";import"./expression-editor-5Q0xRi4N.js";import"./image-editor-GD2oimd5.js";import"./input-number-editor-aqA3wlxN.js";import"./interaction-editor-XUhUj9pY.js";import"./interactive-graph-editor--Tp_Keeb.js";import"./heading-1izW0-GJ.js";import"./toggleable-caret-YFS5vs4O.js";import"./interactive-graph-settings-5yYCaRBt.js";import"./locked-figures-section-pNdU5eE3.js";import"./locked-ellipse-settings-FOiuHQ4s.js";import"./locked-figure-aria-G5ecBSuw.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-sHo8DjC4.js";import"./color-select-JWbIjxmk.js";import"./util-uQZZCXuL.js";import"./line-stroke-select-OgLwffrZ.js";import"./locked-function-settings-_kb3Q6u1.js";import"./line-swatch-wstb9auL.js";import"./locked-line-settings-WUX1i1E1.js";import"./locked-point-settings-yOnHJo2I.js";import"./labeled-switch-bgXqZg-6.js";import"./locked-polygon-settings-X00uUZoT.js";import"./locked-vector-settings-02mN1v7Q.js";import"./label-image-editor-0iusi5Gy.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-h1kjoc3F.js";import"./behavior-xBQWDl2O.js";import"./question-markers-3hvq1-K6.js";import"./marker-zKJG4WlZ.js";import"./select-image-jxbS7f2v.js";import"./matcher-editor-VfYBBAUU.js";import"./number-line-editor-X3MuZsf0.js";import"./numeric-input-editor-Ms-T6-c5.js";import"./phet-simulation-editor-d4l-9Rog.js";import"./python-program-editor-4XiuwJQ9.js";import"./editor-HGB2tTCA.js";import"./sorter-editor-twvCXJig.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-iGDxu2-F.js b/assets/entry-preview-DB2JHZA1.js similarity index 99% rename from assets/entry-preview-iGDxu2-F.js rename to assets/entry-preview-DB2JHZA1.js index b47b79fd2e..959191a6ba 100644 --- a/assets/entry-preview-iGDxu2-F.js +++ b/assets/entry-preview-DB2JHZA1.js @@ -1,4 +1,4 @@ -import{_ as tr}from"./iframe-C_SWW3D2.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-3V2-igME.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-0ahwp8Rb.js b/assets/explanation-editor-wfdanvql.js similarity index 82% rename from assets/explanation-editor-0ahwp8Rb.js rename to assets/explanation-editor-wfdanvql.js index ba4cc8d191..70dcee0101 100644 --- a/assets/explanation-editor-0ahwp8Rb.js +++ b/assets/explanation-editor-wfdanvql.js @@ -1,3 +1,3 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{c as p,p as l}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-N_KGPfNT.js";import{P as s}from"./index-0C4KXdeC.js";import{r as c}from"./index-6oxdNXpR.js";import{E as h}from"./editor-MI6542O9.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as m}from"./components-JJnZE9Qc.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.js";import"./index-smZ6iCr_.js";import{E as d}from"./editor-jsonify-Xq2j5Ptn.js";import{P as s}from"./index-0C4KXdeC.js";import{r as c}from"./index-6oxdNXpR.js";import{E as h}from"./editor-G-UjVjKd.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-1C8ppnHA.js b/assets/explanation-editor.stories-BL6rpEST.js similarity index 71% rename from assets/explanation-editor.stories-1C8ppnHA.js rename to assets/explanation-editor.stories-BL6rpEST.js index 8fe138d3f3..4f588bba23 100644 --- a/assets/explanation-editor.stories-1C8ppnHA.js +++ b/assets/explanation-editor.stories-BL6rpEST.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-0ahwp8Rb.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./components-ODdjt0Ld.js";import"./editor-jsonify-N_KGPfNT.js";import"./index-0C4KXdeC.js";import"./editor-MI6542O9.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-Rtk7iZI-.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-wfdanvql.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.js";import"./editor-jsonify-Xq2j5Ptn.js";import"./index-0C4KXdeC.js";import"./editor-G-UjVjKd.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-5uzo1xSa.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-_GPtYDn6.js b/assets/explanation.stories-YDTevx37.js similarity index 90% rename from assets/explanation.stories-_GPtYDn6.js rename to assets/explanation.stories-YDTevx37.js index 74f389b0aa..cb8b086c8e 100644 --- a/assets/explanation.stories-_GPtYDn6.js +++ b/assets/explanation.stories-YDTevx37.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-63Ea5SlK.js";import{R as a}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.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-oFIZlZCP.js b/assets/expression-editor-5Q0xRi4N.js similarity index 97% rename from assets/expression-editor-oFIZlZCP.js rename to assets/expression-editor-5Q0xRi4N.js index ef5fa586b8..b7ad3568a3 100644 --- a/assets/expression-editor-oFIZlZCP.js +++ b/assets/expression-editor-5Q0xRi4N.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-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as _}from"./components-JJnZE9Qc.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-ty53WgIG.js b/assets/expression-editor.stories-3QlgbdRA.js similarity index 80% rename from assets/expression-editor.stories-ty53WgIG.js rename to assets/expression-editor.stories-3QlgbdRA.js index 5f5bd6db43..0946afa9cc 100644 --- a/assets/expression-editor.stories-ty53WgIG.js +++ b/assets/expression-editor.stories-3QlgbdRA.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-rlAJ1oPQ.js";import{E as g}from"./expression-editor-oFIZlZCP.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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-Hlx8S3_1.js";import{E as g}from"./expression-editor-5Q0xRi4N.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.js";import"./components-JJnZE9Qc.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-yrUUGtjv.js b/assets/expression.stories-EG3pd5yP.js similarity index 90% rename from assets/expression.stories-yrUUGtjv.js rename to assets/expression.stories-EG3pd5yP.js index 7fda0922d2..2995172974 100644 --- a/assets/expression.stories-yrUUGtjv.js +++ b/assets/expression.stories-EG3pd5yP.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-ZouO16-6.js";import{T as W}from"./test-keypad-context-wrapper-qNJz2rBH.js";import{I as L,e as M}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./renderer-2Ae1Nml7.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-dH4zQ5yQ.js";import"./shared-4TdECMLk.js";import"./base-radio-ZvkGSpa4.js";import"./choice-none-above-OdYPsA-W.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-fOZQW4nE.js";import"./register-all-widgets-for-testing-IqvoTTry.js";import"./input-with-examples-D8O3Xswb.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./answer-choices-SJp9oQsg.js";import"./marker-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.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-4efEH9Ok.js";import{T as W}from"./test-keypad-context-wrapper-qNJz2rBH.js";import{I as L,e as M}from"./article-renderer-m2DxR4DL.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-N_w_I8xw.js";import"./renderer-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-b_P2F9w3.js";import"./shared-4TdECMLk.js";import"./base-radio-DUduhCT2.js";import"./choice-none-above-cKXRS8bE.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-iQhk5A81.js";import"./register-all-widgets-for-testing-0z8sJlZ3.js";import"./input-with-examples-cAdD85Lh.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./answer-choices-BvCuCrDd.js";import"./marker-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.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-K2okOOce.js b/assets/flags-for-api-options-CUL0S_V-.js similarity index 76% rename from assets/flags-for-api-options-K2okOOce.js rename to assets/flags-for-api-options-CUL0S_V-.js index 81cc06b291..247e07b182 100644 --- a/assets/flags-for-api-options-K2okOOce.js +++ b/assets/flags-for-api-options-CUL0S_V-.js @@ -1 +1 @@ -import"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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}; diff --git a/assets/graded-group-set.stories-WukUoSjw.js b/assets/graded-group-set.stories-jP5JeBtf.js similarity index 91% rename from assets/graded-group-set.stories-WukUoSjw.js rename to assets/graded-group-set.stories-jP5JeBtf.js index c3420ac2d8..0929e97ce8 100644 --- a/assets/graded-group-set.stories-WukUoSjw.js +++ b/assets/graded-group-set.stories-jP5JeBtf.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{R as s}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.js";const n={content:`#Section 1: Adding tenths less than one [[☃ graded-group-set 1]] diff --git a/assets/graded-group.stories-gSE-aqAH.js b/assets/graded-group.stories-nzdMGhZf.js similarity index 86% rename from assets/graded-group.stories-gSE-aqAH.js rename to assets/graded-group.stories-nzdMGhZf.js index 7dff23c137..ba35734c0b 100644 --- a/assets/graded-group.stories-gSE-aqAH.js +++ b/assets/graded-group.stories-nzdMGhZf.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-63Ea5SlK.js";import{R as a}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.js";const m={content:`--- +import{j as s}from"./jsx-runtime-63Ea5SlK.js";import{R as a}from"./renderer-with-debug-ui-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.js";const m={content:`--- ##Check your understanding! diff --git a/assets/graph-QfZUzUyx.js b/assets/graph-4ZDD3NK_.js similarity index 99% rename from assets/graph-QfZUzUyx.js rename to assets/graph-4ZDD3NK_.js index e6c936c4ee..084268ad91 100644 --- a/assets/graph-QfZUzUyx.js +++ b/assets/graph-4ZDD3NK_.js @@ -1,4 +1,4 @@ -import{j as d}from"./jsx-runtime-63Ea5SlK.js";import{U as k}from"./util-AYeX86gl.js";import{G as M,m as p,S as _}from"./svg-image-7aOK05RI.js";import{_ as u,$ as h}from"./jquery-yG1GhClm.js";import{r as w}from"./index-6oxdNXpR.js";import{c as q}from"./asset-context-H6Iqp7Gi.js";import{i as x}from"./constants-iPV6vHZm.js";const C={url:null},G={fontStyle:"italic",fontWeight:"bold",fontSize:"32px",width:"100%",height:"100%",textAlign:"center",backgroundColor:"white",position:"absolute",zIndex:1,transition:"opacity .25s ease-in-out"},R={position:"relative",top:"25%"};function D(y,s){return Math.floor((y[1]-y[0])/s)}const v=class v extends w.Component{constructor(){super(...arguments),this.graphieDivRef=w.createRef(),this.reset=()=>{this._setupGraphie(!1)},this.graphie=()=>this._graphie,this.pointsFromNormalized=(s,e)=>{const n=this;return u.map(s,function(a){return u.map(a,function(i,o){const l=n.props.range[o];if(e)return l[0]+(l[1]-l[0])*i;const m=n.props.step[o],t=D(l,m),c=Math.round(i*t);return l[0]+m*c})})},this._setupGraphie=s=>{if(this._hasSetupGraphieThisUpdate)return;const e=this.graphieDivRef.current;h(e).empty();const n=this.props.labels.map(r=>k.unescapeMathMode(r)),a=this.props.range,i=this._graphie=M.createGraphie(e),o=this._getGridConfig();i.snap=this.props.snapStep,this.props.markings==="graph"?(i.graphInit({range:a,scale:p(o,r=>r.scale),axisArrows:"<->",labelFormat:function(r){return"\\small{"+r+"}"},gridStep:this.props.gridStep,tickStep:p(o,r=>r.tickStep),labelStep:1,unityLabels:p(o,r=>r.unityLabel),isMobile:this.props.isMobile}),i.label([0,a[1][1]],n[1],this.props.isMobile?"below right":"above"),i.label([a[0][1],0],n[0],this.props.isMobile?"above left":"right")):this.props.markings==="grid"?i.graphInit({range:a,scale:p(o,r=>r.scale),gridStep:this.props.gridStep,axes:!1,ticks:!1,labels:!1,isMobile:this.props.isMobile}):this.props.markings==="none"&&i.init({range:a,scale:p(o,r=>r.scale),isMobile:this.props.isMobile});const l=.5,m=0;let t;if(this.props.instructions){t=h("
"),u.each(G,function(f,g){t.css(g,f)}),t.css("opacity",l);const r=h("",{text:this.props.instructions});u.each(R,function(f,g){r.css(g,f)}),t.append(r),h(e).append(t)}else t=void 0;const c=t||this.props.onMouseDown?u.bind(function(r){t&&(t.remove(),t=null),this.props.onMouseDown(r)},this):void 0,T=t?function(){t&&t.css("opacity",m)}:void 0,S=t?function(){t&&t.css("opacity",l)}:void 0;i.addMouseLayer({onClick:this.props.onClick,onMouseDown:c,onMouseOver:T,onMouseOut:S,onMouseMove:this.props.onMouseMove,allowScratchpad:!0,setDrawingAreaAvailable:this.props.setDrawingAreaAvailable}),this._updateProtractor(),this._updateRuler(),this._hasSetupGraphieThisUpdate=!0,!s&&this.props.onGraphieUpdated&&this.props.onGraphieUpdated(i)},this._getGridConfig=()=>p(this.props.step,(s,e)=>k.gridDimensionConfig(s,this.props.range[e],this.props.box[e],this.props.gridStep[e])),this._updateProtractor=()=>{if(this.protractor&&this.protractor.remove(),this.props.showProtractor){const s=this.pointsFromNormalized([[.5,.05]])[0];this.protractor=this._graphie.protractor(s)}},this._updateRuler=()=>{if(this.ruler&&this.ruler.remove(),this.props.showRuler){const s=this.pointsFromNormalized([[.5,.25]])[0],e=this._graphie.range[0][1]-this._graphie.range[0][0];this.ruler=this._graphie.ruler({center:s,label:this.props.rulerLabel,pixelsPerUnit:this._graphie.scale[0],ticksPerUnit:this.props.rulerTicks,units:Math.round(.8*e)})}},this.toJSON=()=>u.pick(this.props,"range","step","markings","labels","backgroundImage","showProtractor","showRuler","rulerLabel","rulerTicks","gridStep","snapStep")}componentDidMount(){this._setupGraphie(!0)}UNSAFE_componentWillReceiveProps(s){const e=["labels","range","step","markings","showProtractor","showRuler","rulerLabel","rulerTicks","gridStep","snapStep"],n=this;u.each(e,function(a){u.isEqual(n.props[a],s[a])||(n._shouldSetupGraphie=!0)})}componentDidUpdate(){this._hasSetupGraphieThisUpdate=!1,this._shouldSetupGraphie&&(this._setupGraphie(!1),this._shouldSetupGraphie=!1)}render(){let s;const e=this.props.backgroundImage;if(e.url){const n=this.props.box[0]/x.defaultBoxSize;s=d.jsx(q.Consumer,{children:({setAssetStatus:a})=>d.jsx(_,{src:e.url,width:e.width,height:e.height,scale:n,responsive:!1,setAssetStatus:a})})}else s=null;return d.jsxs("div",{className:"graphie-container above-scratchpad",style:{width:this.props.box[0],height:this.props.box[1]},onMouseOut:this.onMouseOut,onMouseOver:this.onMouseOver,onClick:this.onClick,children:[s,d.jsx("div",{className:"graphie",ref:this.graphieDivRef})]})}};v.defaultProps={labels:["x","y"],range:[[-10,10],[-10,10]],step:[1,1],gridStep:[1,1],snapStep:[.5,.5],markings:"graph",backgroundImage:C,showProtractor:!1,showRuler:!1,rulerLabel:"",rulerTicks:10,isMobile:!1};let b=v;b.__docgenInfo={description:"",methods:[{name:"reset",docblock:null,modifiers:[],params:[],returns:null},{name:"graphie",docblock:null,modifiers:[],params:[],returns:null},{name:"pointsFromNormalized",docblock:null,modifiers:[],params:[{name:"coordsList",optional:!1,type:null},{name:"noSnap",optional:!1,type:null}],returns:null},{name:"_setupGraphie",docblock:null,modifiers:[],params:[{name:"initialMount",optional:!1,type:null}],returns:null},{name:"_getGridConfig",docblock:null,modifiers:[],params:[],returns:null},{name:"_updateProtractor",docblock:null,modifiers:[],params:[],returns:null},{name:"_updateRuler",docblock:null,modifiers:[],params:[],returns:null},{name:"toJSON",docblock:null,modifiers:[],params:[],returns:null}],displayName:"Graph",props:{box:{required:!0,tsType:{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},description:""},labels:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:'["x", "y"]',computed:!1}},range:{required:!1,tsType:{name:"tuple",raw:"[Coord, Coord]",elements:[{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]}]},description:"",defaultValue:{value:`[ +import{j as d}from"./jsx-runtime-63Ea5SlK.js";import{U as k}from"./util-AYeX86gl.js";import{G as M,m as p,S as _}from"./svg-image-FcZanvM1.js";import{_ as u,$ as h}from"./jquery-yG1GhClm.js";import{r as w}from"./index-6oxdNXpR.js";import{c as q}from"./asset-context-H6Iqp7Gi.js";import{i as x}from"./constants-iPV6vHZm.js";const C={url:null},G={fontStyle:"italic",fontWeight:"bold",fontSize:"32px",width:"100%",height:"100%",textAlign:"center",backgroundColor:"white",position:"absolute",zIndex:1,transition:"opacity .25s ease-in-out"},R={position:"relative",top:"25%"};function D(y,s){return Math.floor((y[1]-y[0])/s)}const v=class v extends w.Component{constructor(){super(...arguments),this.graphieDivRef=w.createRef(),this.reset=()=>{this._setupGraphie(!1)},this.graphie=()=>this._graphie,this.pointsFromNormalized=(s,e)=>{const n=this;return u.map(s,function(a){return u.map(a,function(i,o){const l=n.props.range[o];if(e)return l[0]+(l[1]-l[0])*i;const m=n.props.step[o],t=D(l,m),c=Math.round(i*t);return l[0]+m*c})})},this._setupGraphie=s=>{if(this._hasSetupGraphieThisUpdate)return;const e=this.graphieDivRef.current;h(e).empty();const n=this.props.labels.map(r=>k.unescapeMathMode(r)),a=this.props.range,i=this._graphie=M.createGraphie(e),o=this._getGridConfig();i.snap=this.props.snapStep,this.props.markings==="graph"?(i.graphInit({range:a,scale:p(o,r=>r.scale),axisArrows:"<->",labelFormat:function(r){return"\\small{"+r+"}"},gridStep:this.props.gridStep,tickStep:p(o,r=>r.tickStep),labelStep:1,unityLabels:p(o,r=>r.unityLabel),isMobile:this.props.isMobile}),i.label([0,a[1][1]],n[1],this.props.isMobile?"below right":"above"),i.label([a[0][1],0],n[0],this.props.isMobile?"above left":"right")):this.props.markings==="grid"?i.graphInit({range:a,scale:p(o,r=>r.scale),gridStep:this.props.gridStep,axes:!1,ticks:!1,labels:!1,isMobile:this.props.isMobile}):this.props.markings==="none"&&i.init({range:a,scale:p(o,r=>r.scale),isMobile:this.props.isMobile});const l=.5,m=0;let t;if(this.props.instructions){t=h("
"),u.each(G,function(f,g){t.css(g,f)}),t.css("opacity",l);const r=h("",{text:this.props.instructions});u.each(R,function(f,g){r.css(g,f)}),t.append(r),h(e).append(t)}else t=void 0;const c=t||this.props.onMouseDown?u.bind(function(r){t&&(t.remove(),t=null),this.props.onMouseDown(r)},this):void 0,T=t?function(){t&&t.css("opacity",m)}:void 0,S=t?function(){t&&t.css("opacity",l)}:void 0;i.addMouseLayer({onClick:this.props.onClick,onMouseDown:c,onMouseOver:T,onMouseOut:S,onMouseMove:this.props.onMouseMove,allowScratchpad:!0,setDrawingAreaAvailable:this.props.setDrawingAreaAvailable}),this._updateProtractor(),this._updateRuler(),this._hasSetupGraphieThisUpdate=!0,!s&&this.props.onGraphieUpdated&&this.props.onGraphieUpdated(i)},this._getGridConfig=()=>p(this.props.step,(s,e)=>k.gridDimensionConfig(s,this.props.range[e],this.props.box[e],this.props.gridStep[e])),this._updateProtractor=()=>{if(this.protractor&&this.protractor.remove(),this.props.showProtractor){const s=this.pointsFromNormalized([[.5,.05]])[0];this.protractor=this._graphie.protractor(s)}},this._updateRuler=()=>{if(this.ruler&&this.ruler.remove(),this.props.showRuler){const s=this.pointsFromNormalized([[.5,.25]])[0],e=this._graphie.range[0][1]-this._graphie.range[0][0];this.ruler=this._graphie.ruler({center:s,label:this.props.rulerLabel,pixelsPerUnit:this._graphie.scale[0],ticksPerUnit:this.props.rulerTicks,units:Math.round(.8*e)})}},this.toJSON=()=>u.pick(this.props,"range","step","markings","labels","backgroundImage","showProtractor","showRuler","rulerLabel","rulerTicks","gridStep","snapStep")}componentDidMount(){this._setupGraphie(!0)}UNSAFE_componentWillReceiveProps(s){const e=["labels","range","step","markings","showProtractor","showRuler","rulerLabel","rulerTicks","gridStep","snapStep"],n=this;u.each(e,function(a){u.isEqual(n.props[a],s[a])||(n._shouldSetupGraphie=!0)})}componentDidUpdate(){this._hasSetupGraphieThisUpdate=!1,this._shouldSetupGraphie&&(this._setupGraphie(!1),this._shouldSetupGraphie=!1)}render(){let s;const e=this.props.backgroundImage;if(e.url){const n=this.props.box[0]/x.defaultBoxSize;s=d.jsx(q.Consumer,{children:({setAssetStatus:a})=>d.jsx(_,{src:e.url,width:e.width,height:e.height,scale:n,responsive:!1,setAssetStatus:a})})}else s=null;return d.jsxs("div",{className:"graphie-container above-scratchpad",style:{width:this.props.box[0],height:this.props.box[1]},onMouseOut:this.onMouseOut,onMouseOver:this.onMouseOver,onClick:this.onClick,children:[s,d.jsx("div",{className:"graphie",ref:this.graphieDivRef})]})}};v.defaultProps={labels:["x","y"],range:[[-10,10],[-10,10]],step:[1,1],gridStep:[1,1],snapStep:[.5,.5],markings:"graph",backgroundImage:C,showProtractor:!1,showRuler:!1,rulerLabel:"",rulerTicks:10,isMobile:!1};let b=v;b.__docgenInfo={description:"",methods:[{name:"reset",docblock:null,modifiers:[],params:[],returns:null},{name:"graphie",docblock:null,modifiers:[],params:[],returns:null},{name:"pointsFromNormalized",docblock:null,modifiers:[],params:[{name:"coordsList",optional:!1,type:null},{name:"noSnap",optional:!1,type:null}],returns:null},{name:"_setupGraphie",docblock:null,modifiers:[],params:[{name:"initialMount",optional:!1,type:null}],returns:null},{name:"_getGridConfig",docblock:null,modifiers:[],params:[],returns:null},{name:"_updateProtractor",docblock:null,modifiers:[],params:[],returns:null},{name:"_updateRuler",docblock:null,modifiers:[],params:[],returns:null},{name:"toJSON",docblock:null,modifiers:[],params:[],returns:null}],displayName:"Graph",props:{box:{required:!0,tsType:{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},description:""},labels:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:'["x", "y"]',computed:!1}},range:{required:!1,tsType:{name:"tuple",raw:"[Coord, Coord]",elements:[{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]}]},description:"",defaultValue:{value:`[ [-10, 10], [-10, 10], ]`,computed:!1}},step:{required:!1,tsType:{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},description:"",defaultValue:{value:"[1, 1]",computed:!1}},gridStep:{required:!1,tsType:{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},description:"",defaultValue:{value:"[1, 1]",computed:!1}},snapStep:{required:!1,tsType:{name:"tuple",raw:"[number, number]",elements:[{name:"number"},{name:"number"}]},description:"",defaultValue:{value:"[0.5, 0.5]",computed:!1}},markings:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"graph"',computed:!1}},backgroundImage:{required:!1,tsType:{name:"signature",type:"object",raw:`{ diff --git a/assets/graph-settings-3CGKz-Fx.js b/assets/graph-settings-HWzOkGCp.js similarity index 97% rename from assets/graph-settings-3CGKz-Fx.js rename to assets/graph-settings-HWzOkGCp.js index e7cb0b7ec0..66ae548b07 100644 --- a/assets/graph-settings-3CGKz-Fx.js +++ b/assets/graph-settings-HWzOkGCp.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-63Ea5SlK.js";import{p as z,c as q}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as V}from"./components-JJnZE9Qc.js";import{i as O}from"./constants-iPV6vHZm.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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";/* object-assign (c) Sindre Sorhus @license MIT diff --git a/assets/graph-settings.stories-BBk2YhNq.js b/assets/graph-settings.stories-pxZw3M1H.js similarity index 77% rename from assets/graph-settings.stories-BBk2YhNq.js rename to assets/graph-settings.stories-pxZw3M1H.js index 3421209428..1243cf5958 100644 --- a/assets/graph-settings.stories-BBk2YhNq.js +++ b/assets/graph-settings.stories-pxZw3M1H.js @@ -1,3 +1,3 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{G as i}from"./graph-settings-3CGKz-Fx.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.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-HWzOkGCp.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.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 => { 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/graph.stories-sCDcQW4z.js b/assets/graph.stories-MRihw5tS.js similarity index 91% rename from assets/graph.stories-sCDcQW4z.js rename to assets/graph.stories-MRihw5tS.js index 136f5f72ca..ae740466ec 100644 --- a/assets/graph.stories-sCDcQW4z.js +++ b/assets/graph.stories-MRihw5tS.js @@ -1,4 +1,4 @@ -import{G as c}from"./graph-QfZUzUyx.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"./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"./asset-context-H6Iqp7Gi.js";const e=200,P={title:"Perseus/Components/Graph",component:c,args:{box:[e,e]}},r={},o={args:{labels:["First label","Second label"]}};var t,a,p;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:"{}",...(p=(a=r.parameters)==null?void 0:a.docs)==null?void 0:p.source}}};var s,m,i;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`{ +import{G as c}from"./graph-4ZDD3NK_.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"./svg-image-FcZanvM1.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"./asset-context-H6Iqp7Gi.js";const e=200,P={title:"Perseus/Components/Graph",component:c,args:{box:[e,e]}},r={},o={args:{labels:["First label","Second label"]}};var t,a,p;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:"{}",...(p=(a=r.parameters)==null?void 0:a.docs)==null?void 0:p.source}}};var s,m,i;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`{ args: { labels: ["First label", "Second label"] } diff --git a/assets/grapher.stories-4eU3M1Vy.js b/assets/grapher.stories-mNQ_4cpY.js similarity index 92% rename from assets/grapher.stories-4eU3M1Vy.js rename to assets/grapher.stories-mNQ_4cpY.js index 11044b86e3..c7506bedb7 100644 --- a/assets/grapher.stories-4eU3M1Vy.js +++ b/assets/grapher.stories-mNQ_4cpY.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{R as r}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.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-sStd2s2k.js b/assets/graphie.stories-iPjcxLBs.js similarity index 83% rename from assets/graphie.stories-sStd2s2k.js rename to assets/graphie.stories-iPjcxLBs.js index 40b3e56e25..9c0f8f339b 100644 --- a/assets/graphie.stories-sStd2s2k.js +++ b/assets/graphie.stories-iPjcxLBs.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-ZouO16-6.js";import{I as h}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./renderer-2Ae1Nml7.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-dH4zQ5yQ.js";import"./shared-4TdECMLk.js";import"./base-radio-ZvkGSpa4.js";import"./choice-none-above-OdYPsA-W.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-fOZQW4nE.js";import"./register-all-widgets-for-testing-IqvoTTry.js";import"./enums-x5qaTru7.js";import"./input-with-examples-D8O3Xswb.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./answer-choices-SJp9oQsg.js";import"./marker-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.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-4efEH9Ok.js";import{I as h}from"./article-renderer-m2DxR4DL.js";import{a as g}from"./svg-image-FcZanvM1.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-N_w_I8xw.js";import"./renderer-IhFUya5i.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-b_P2F9w3.js";import"./shared-4TdECMLk.js";import"./base-radio-DUduhCT2.js";import"./choice-none-above-cKXRS8bE.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-iQhk5A81.js";import"./register-all-widgets-for-testing-0z8sJlZ3.js";import"./enums-x5qaTru7.js";import"./input-with-examples-cAdD85Lh.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./answer-choices-BvCuCrDd.js";import"./marker-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.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-jjRNoiuh.js b/assets/group.stories-axo34YZk.js similarity index 85% rename from assets/group.stories-jjRNoiuh.js rename to assets/group.stories-axo34YZk.js index 3d8a819dc7..02291e90e2 100644 --- a/assets/group.stories-jjRNoiuh.js +++ b/assets/group.stories-axo34YZk.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-63Ea5SlK.js";import{R as n}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.js";const a={content:`![](https://ka-perseus-graphie.s3.amazonaws.com/3e6d0981127dea205c2becc0ead24702fbe862a1.png) ===== diff --git a/assets/hints-renderer-dH4zQ5yQ.js b/assets/hints-renderer-b_P2F9w3.js similarity index 99% rename from assets/hints-renderer-dH4zQ5yQ.js rename to assets/hints-renderer-b_P2F9w3.js index 2ec82bf1ec..478b2d2ddc 100644 --- a/assets/hints-renderer-dH4zQ5yQ.js +++ b/assets/hints-renderer-b_P2F9w3.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-2Ae1Nml7.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-IhFUya5i.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, diff --git a/assets/hints-renderer.stories-7-A_Xahd.js b/assets/hints-renderer.stories-G1_2jZrY.js similarity index 96% rename from assets/hints-renderer.stories-7-A_Xahd.js rename to assets/hints-renderer.stories-G1_2jZrY.js index cdb0e97c65..d86ae69417 100644 --- a/assets/hints-renderer.stories-7-A_Xahd.js +++ b/assets/hints-renderer.stories-G1_2jZrY.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-dH4zQ5yQ.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-2Ae1Nml7.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-b_P2F9w3.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-IhFUya5i.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-FcZanvM1.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:`{ args: { hints: [{ content: "this is hint 1", diff --git a/assets/iframe-C_SWW3D2.js b/assets/iframe-3V2-igME.js similarity index 78% rename from assets/iframe-C_SWW3D2.js rename to assets/iframe-3V2-igME.js index d969e2a19d..d889c5efce 100644 --- a/assets/iframe-C_SWW3D2.js +++ b/assets/iframe-3V2-igME.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-lFaSlzqb.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-uWJrIV11.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-xWQuHRg5.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-5ueq0lXW.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-A1pXseCx.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-hCsUjCA6.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-uXkWLnPS.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-0EVuSFZ3.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-BBk2YhNq.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-V0DbIM2r.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-gbFSr_8T.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-XCFqBRO9.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-0C68qdPu.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-puGSPKU3.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-h22MKy4T.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-s6R9aIqR.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-dbthaiWi.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-FZTFtkqP.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-Dw3MpGLS.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-DrRDwzBx.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-MZYCBiaB.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-4ElQu3PW.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-50gWgNlb.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-yOi_fvI9.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-DH9p-tBT.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-xzpD4zl0.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-1C8ppnHA.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-ty53WgIG.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-mI0VtcU8.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-x9ZqEHSF.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-Mf5TBiNk.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-fkaaKTJH.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-9f4pJ9id.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--gvma5VJ.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-1B6GBGYc.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-qzbU33sG.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-4UWsWR8g.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-5swOIFQn.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-azC_XcNB.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-euOWCWyM.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-_cVmQIli.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-Dn7kENRm.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-zNB6zErC.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-VLBW6x4Z.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-nIx9C5pg.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-t5zRRfYX.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-7-A_Xahd.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-cjb1b8CX.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-sStd2s2k.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-UlaFcjNK.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-S0uFjUuF.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-Q6YTs86k.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-O-lW6cjY.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-7VVJ46Wq.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-9ABUtqST.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-8-skAoQp.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-5tof_Ni4.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-_GPtYDn6.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-yrUUGtjv.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-WukUoSjw.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-gSE-aqAH.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-4eU3M1Vy.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-jjRNoiuh.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-PebohNRv.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-wxN5xHQV.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-hqAUG0Z1.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-loeaowPc.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-qJh-I9CQ.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-0DmaCBBF.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-DGrKbdc_.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-rlF_k7iQ.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-ZF0XauTV.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-6xGBe1u2.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-x3NEwLJn.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-X8SHuh8h.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-kDK3rFWv.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-urFoRWpS.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-XBusYOqD.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-FCd3dilX.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-SyRBFTE0.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-QVGoD6W2.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-_Qyzx93P.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-aQm8gtHN.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-FmyKUOTk.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-9RKVG2Bm.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-Dk8Rarsr.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-eYTE7Hhe.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-ao_2OTPZ.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-iGDxu2-F.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-CKEBPZQH.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-81jWffeN.js"),__vite__mapDeps([]),import.meta.url),e[11]??s(()=>import("./preview-U3Ydjq5X.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-KSUxY2l2.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-AfOmEP1I.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-FzrJl5wV.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-fWJ54GsJ.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-HQQDc4fZ.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-jcs7Joja.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-Jw3Ng-PJ.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-Uc-L1-8V.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-pxZw3M1H.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-qnrNKe0O.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-jRfApP-w.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-w11JjOyT.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-ik7Ji3Dq.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-qj3aVlWg.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-2DG1DQtc.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-afZkUn61.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-TZ8ICcx_.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-bPZpickT.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-GLPdJzcp.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--Brnpkwf.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-xxCW2xVf.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-e8MPTM6d.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-SU5T_twx.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-9Ohj3D2G.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-2qnB6S7b.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-IfKatrYq.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-BL6rpEST.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-3QlgbdRA.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-yQ9SIoOF.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-8FeAhIMn.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-mnZor7JR.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-ew4R3xFo.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-WBmDnB4F.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-pKbf4W7F.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-df50jfc5.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-7CjFC-Bf.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-GoUfT7PD.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-xJ9k_eaZ.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-Y7l-Dnzs.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-DdYB9DV7.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-DRrt5y6z.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-fcqeBsQF.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-0butrb5y.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-1B9cJ9hF.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-R9p0ydJC.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-N9zESDk7.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-G1_2jZrY.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-FqrcCuZb.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-MRihw5tS.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-iPjcxLBs.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-qITwsOct.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-e7anpDcs.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-tU_aScnA.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-64FhqD4V.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-uiiCCUWx.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-Kuc3rLSE.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-Rxx2Cfx5.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-SsbKMRHE.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-GUiRyi1l.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-YDTevx37.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-EG3pd5yP.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-jP5JeBtf.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-nzdMGhZf.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-mNQ_4cpY.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-axo34YZk.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-fMArE-l5.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-rkzY4VWy.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-7eUHzuMN.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-34EbQ24d.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-NPCskUW3.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-ym07TDiQ.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-8ehcTx4P.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-439XWrdJ.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-HqbwIe4g.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-X1KJvj4w.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-AV1Yfm5l.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-w0tpOh2-.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-d7XiDgqo.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-RLBZ8xng.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-krG2YiAw.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-i6ImYLYC.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-7UxxK3Xv.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-U48vfP3H.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-4QZEiAcq.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-7FhMONUu.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-y2YN7Oy1.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-U7THKklR.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-L6mwImb8.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-TdCKcYiw.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-SKPn9ZDM.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-DB2JHZA1.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-H8sA0bwg.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-xr_Ktw-f.js"),__vite__mapDeps([]),import.meta.url),e[11]??s(()=>import("./preview-ng8KMcFK.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-lFaSlzqb.js","./article-renderer-jwwMfp2y.js","./util-AYeX86gl.js","./perseus-error-l3K_anoI.js","./jquery-yG1GhClm.js","./renderer-2Ae1Nml7.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-pz-U1ZWj.css","./index-BIPwuHvF.js","./index-469F30Ub.js","./math-input-ILg8RrvB.js","./index-CyYhwSUV.js","./input-with-examples-D8O3Xswb.js","./text-input-5e4vF1bl.js","./index-V5gl6frG.js","./minus-bold-ONmDo3Ve.js","./tooltip-_t9Bc-o8.js","./simple-keypad-input-7tb5_po1.js","./base-radio-ZvkGSpa4.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-OdYPsA-W.js","./phet-simulation-_7qOO4_B.js","./arrow-square-out-bold-090vdhrx.js","./answer-choices-SJp9oQsg.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-sirTJF7M.js","./answer-pill-ZZeQEGrZ.js","./sortable-pOpkHk6I.js","./video-transcript-link-_gpkjmR8.js","./article-renderer-Fup2g6Rr.css","./perseus-item-9YLLcbpB.js","./hints-renderer-dH4zQ5yQ.js","./article-editor-EaP2C-Ia.js","./components-ODdjt0Ld.js","./device-framer-MUDr0WgQ.js","./constants-p_UgHLsb.js","./register-all-widgets-and-editors-for-testing-6LJcizcL.js","./graph-settings-3CGKz-Fx.js","./index-0C4KXdeC.js","./categorizer-editor-eZd-YZhk.js","./editor-jsonify-N_KGPfNT.js","./blur-input-6j4bgLwx.js","./definition-editor-ARTDgF3h.js","./editor-MI6542O9.js","./icon-paths-EoBkHOLI.js","./section-control-button-Rtk7iZI-.js","./index-wzSCRJFK.js","./tex-error-view-oha0Bum8.js","./toggleable-caret-YFS5vs4O.js","./dropdown-editor-M2GE09YI.js","./explanation-editor-0ahwp8Rb.js","./expression-editor-oFIZlZCP.js","./image-editor-Yj3_NT-i.js","./input-number-editor-r7btJNGI.js","./interaction-editor-AWh9DTES.js","./interactive-graph-editor--agEG2l8.js","./heading-1izW0-GJ.js","./interactive-graph-settings-f83FlCXt.js","./locked-figures-section--nV0kbTr.js","./locked-ellipse-settings-ZwFdyrTR.js","./locked-figure-aria-DMjwSLKk.js","./scrollless-number-text-field-d5PK69vy.js","./util-qk2aeK8X.js","./locked-label-settings-Q_sgivvq.js","./color-select-oJZpOIQc.js","./util-WOIF_4W1.js","./line-stroke-select-tLzFP-jE.js","./locked-function-settings-5syaS11L.js","./line-swatch-5z1mrdDY.js","./locked-line-settings-X29AVEXv.js","./locked-point-settings-hNpBYzsr.js","./labeled-switch-H2OzEdZH.js","./locked-polygon-settings-F-dWbN7O.js","./locked-vector-settings-teFof_kC.js","./label-image-editor-uR0SR8x7.js","./form-wrapped-text-field-NbyiOLVb.js","./global-colors-VIVU4Od4.js","./answer-choices-bKXAiW0J.js","./behavior-gU_GOIJI.js","./question-markers-0UUgPbE8.js","./marker-Hd-8N1dg.js","./select-image-8Yo1S9fa.js","./matcher-editor-AxlX3C-j.js","./number-line-editor-V9wGJGbX.js","./numeric-input-editor-qBNHWsXs.js","./phet-simulation-editor-YDXi7iT_.js","./python-program-editor-uSZoB793.js","./editor-f8HUcWmB.js","./sorter-editor-iYjrGKmy.js","./content-preview.stories-uWJrIV11.js","./article-renderer.testdata-spwNviYy.js","./radio.testdata-sITJ8lxE.js","./viewport-resizer-TJi7eV3F.js","./perseus-editor-0Y-TvOcR.css","./editor-page.stories-xWQuHRg5.js","./editor-page-with-storybook-preview-eID9LGeq.js","./editor-page-bRBZkw3M.js","./item-extras-editor-lovX4vvB.js","./flags-for-api-options-K2okOOce.js","./editor.stories-5ueq0lXW.js","./index-zt79SAQ4.js","./structured-item-diff-0iAD6MzK.js","./text-diff-LGX1DVHQ.js","./tags-diff-CAGYiPAf.js","./multi-items-t1jjN0h8.js","./side-by-side-MBJuyilC.js","./interactive-graph-editor.stories-A1pXseCx.js","./interactive-graph-question-builder-VBdpjz9Z.js","./interactive-graph.testdata--LRl7_OC.js","./item-editor.stories-hCsUjCA6.js","./tex-error-view.stories--fr65KDX.js","./blur-input.stories-MEVoLwh0.js","./color-select.stories-uXkWLnPS.js","./color-swatch.stories-0EVuSFZ3.js","./device-framer.stories--gF4_S4i.js","./graph-settings.stories-BBk2YhNq.js","./interactive-graph-settings.stories-V0DbIM2r.js","./locked-ellipse-settings.stories-gbFSr_8T.js","./locked-figures-section.stories-XCFqBRO9.js","./locked-function-settings.stories-0C68qdPu.js","./locked-label-settings.stories-puGSPKU3.js","./locked-line-settings.stories-h22MKy4T.js","./locked-point-settings.stories-s6R9aIqR.js","./locked-polygon-settings.stories-dbthaiWi.js","./locked-vector-settings.stories-FZTFtkqP.js","./scrollless-number-text-field.stories-nVFV0ihc.js","./section-control-button.stories-Dw3MpGLS.js","./toggleable-caret.stories-RjkVgUY7.js","./viewport-resizer.stories-DrRDwzBx.js","./structured-item-diff.stories-MZYCBiaB.js","./perseus-diff-wrapper-c32IFwe6.js","./tags-diff.stories-4ElQu3PW.js","./text-diff.stories-50gWgNlb.js","./categorizer-editor.stories-yOi_fvI9.js","./definition-editor.stories-DH9p-tBT.js","./dropdown-editor.stories-xzpD4zl0.js","./explanation-editor.stories-1C8ppnHA.js","./expression-editor.stories-ty53WgIG.js","./renderer-with-debug-ui-rlAJ1oPQ.js","./register-all-widgets-for-testing-IqvoTTry.js","./image-editor.stories-mI0VtcU8.js","./input-number-editor.stories-x9ZqEHSF.js","./interaction-editor.stories-Mf5TBiNk.js","./interactive-graph-editor.stories-fkaaKTJH.js","./label-image-editor.stories-9f4pJ9id.js","./matcher-editor.stories--gvma5VJ.js","./number-line-editor.stories-1B6GBGYc.js","./numeric-input-editor.stories-qzbU33sG.js","./phet-simulation-editor.stories-4UWsWR8g.js","./python-program-editor.stories-5swOIFQn.js","./radio-editor.stories-azC_XcNB.js","./sorter-editor.stories-euOWCWyM.js","./answer-choices.stories-_cVmQIli.js","./behavior.stories-Dn7kENRm.js","./marker.stories-zNB6zErC.js","./question-markers.stories-VLBW6x4Z.js","./select-image.stories-nIx9C5pg.js","./article-renderer.stories-t5zRRfYX.js","./test-dependencies-fOZQW4nE.js","./test-dependencies-vi99l57r.css","./test-keypad-context-wrapper-qNJz2rBH.js","./hints-renderer.stories-7-A_Xahd.js","./server-item-renderer.stories-cjb1b8CX.js","./server-item-renderer-with-debug-ui-ZouO16-6.js","./ke-score-ui-AQ1XUyPU.js","./button-group.stories-SVj84HqS.js","./fixed-to-responsive.stories-TlwP860I.js","./graph.stories-sCDcQW4z.js","./graphie.stories-sStd2s2k.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-UlaFcjNK.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-S0uFjUuF.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-Q6YTs86k.js","./categorizer.stories-O-lW6cjY.js","./cs-program.stories-7VVJ46Wq.js","./definition.stories-9ABUtqST.js","./deprecated-standin.stories-8-skAoQp.js","./dropdown.stories-5tof_Ni4.js","./explanation.stories-_GPtYDn6.js","./expression.stories-yrUUGtjv.js","./graded-group-set.stories-WukUoSjw.js","./graded-group.stories-gSE-aqAH.js","./grapher.stories-4eU3M1Vy.js","./group.stories-jjRNoiuh.js","./iframe.stories-PebohNRv.js","./image.stories-wxN5xHQV.js","./input-number.stories-hqAUG0Z1.js","./interaction.stories-loeaowPc.js","./interactive-graph-regression.stories-qJh-I9CQ.js","./interactive-graph.stories-0DmaCBBF.js","./locked-functions.stories-DGrKbdc_.js","./answer-choices.stories-rlF_k7iQ.js","./answer-pill.stories-ZF0XauTV.js","./label-image.stories-6xGBe1u2.js","./marker.stories-x3NEwLJn.js","./matcher.stories-X8SHuh8h.js","./matrix.stories-kDK3rFWv.js","./number-line.stories-urFoRWpS.js","./numeric-input.stories-XBusYOqD.js","./orderer.stories-FCd3dilX.js","./passage-ref.stories-SyRBFTE0.js","./passage.stories-QVGoD6W2.js","./phet-simulation.stories-bbv0Wjep.js","./plotter.stories-_Qyzx93P.js","./python-program.stories-aQm8gtHN.js","./base-radio.stories-FmyKUOTk.js","./choice-icon.stories-2BPZpvZi.js","./choice-none-above.stories-9RKVG2Bm.js","./choice.stories-4KrIkHMw.js","./focus-ring.stories-4AFN_C87.js","./option-status.stories-vLiZB-UF.js","./radio.stories-Dk8Rarsr.js","./sorter.stories-eYTE7Hhe.js","./video-transcript-link.stories-QBSva3hd.js","./video.stories-ao_2OTPZ.js","./entry-preview-iGDxu2-F.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-U3Ydjq5X.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-KSUxY2l2.js","./article-renderer-m2DxR4DL.js","./util-AYeX86gl.js","./perseus-error-l3K_anoI.js","./jquery-yG1GhClm.js","./renderer-IhFUya5i.js","./index-dnMhQZ-1.js","./asset-context-H6Iqp7Gi.js","./i18n-context-fsWEgybQ.js","./svg-image-FcZanvM1.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-pz-U1ZWj.css","./index-BIPwuHvF.js","./index-469F30Ub.js","./math-input-ILg8RrvB.js","./index-CyYhwSUV.js","./input-with-examples-cAdD85Lh.js","./text-input-5e4vF1bl.js","./index-V5gl6frG.js","./minus-bold-ONmDo3Ve.js","./tooltip-_t9Bc-o8.js","./simple-keypad-input-7tb5_po1.js","./base-radio-DUduhCT2.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-cKXRS8bE.js","./phet-simulation-_7qOO4_B.js","./arrow-square-out-bold-090vdhrx.js","./answer-choices-BvCuCrDd.js","./button-group-G5CZaedn.js","./graph-4ZDD3NK_.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-zOWMpEAL.js","./answer-pill-1rH5rJkp.js","./sortable-Ho8icdmJ.js","./video-transcript-link-_gpkjmR8.js","./article-renderer-Fup2g6Rr.css","./perseus-item-N_w_I8xw.js","./hints-renderer-b_P2F9w3.js","./article-editor-Z29bafBK.js","./components-JJnZE9Qc.js","./device-framer-MUDr0WgQ.js","./constants-p_UgHLsb.js","./register-all-widgets-and-editors-for-testing-nH8rs09r.js","./graph-settings-HWzOkGCp.js","./index-0C4KXdeC.js","./categorizer-editor-Cwj-_Em8.js","./editor-jsonify-Xq2j5Ptn.js","./blur-input-6j4bgLwx.js","./definition-editor-lqhCzKJC.js","./editor-G-UjVjKd.js","./icon-paths-EoBkHOLI.js","./section-control-button-5uzo1xSa.js","./index-wzSCRJFK.js","./tex-error-view-oha0Bum8.js","./toggleable-caret-YFS5vs4O.js","./dropdown-editor-JwHnzJHe.js","./explanation-editor-wfdanvql.js","./expression-editor-5Q0xRi4N.js","./image-editor-GD2oimd5.js","./input-number-editor-aqA3wlxN.js","./interaction-editor-XUhUj9pY.js","./interactive-graph-editor--Tp_Keeb.js","./heading-1izW0-GJ.js","./interactive-graph-settings-5yYCaRBt.js","./locked-figures-section-pNdU5eE3.js","./locked-ellipse-settings-FOiuHQ4s.js","./locked-figure-aria-G5ecBSuw.js","./scrollless-number-text-field-d5PK69vy.js","./util-qk2aeK8X.js","./locked-label-settings-sHo8DjC4.js","./color-select-JWbIjxmk.js","./util-uQZZCXuL.js","./line-stroke-select-OgLwffrZ.js","./locked-function-settings-_kb3Q6u1.js","./line-swatch-wstb9auL.js","./locked-line-settings-WUX1i1E1.js","./locked-point-settings-yOnHJo2I.js","./labeled-switch-bgXqZg-6.js","./locked-polygon-settings-X00uUZoT.js","./locked-vector-settings-02mN1v7Q.js","./label-image-editor-0iusi5Gy.js","./form-wrapped-text-field-NbyiOLVb.js","./global-colors-VIVU4Od4.js","./answer-choices-h1kjoc3F.js","./behavior-xBQWDl2O.js","./question-markers-3hvq1-K6.js","./marker-zKJG4WlZ.js","./select-image-jxbS7f2v.js","./matcher-editor-VfYBBAUU.js","./number-line-editor-X3MuZsf0.js","./numeric-input-editor-Ms-T6-c5.js","./phet-simulation-editor-d4l-9Rog.js","./python-program-editor-4XiuwJQ9.js","./editor-HGB2tTCA.js","./sorter-editor-twvCXJig.js","./content-preview.stories-AfOmEP1I.js","./article-renderer.testdata-spwNviYy.js","./radio.testdata-sITJ8lxE.js","./viewport-resizer-0KQVCsZT.js","./perseus-editor-0Y-TvOcR.css","./editor-page.stories-FzrJl5wV.js","./editor-page-with-storybook-preview-VLm4w66W.js","./editor-page-GOdzEuJC.js","./item-extras-editor-b8a6MKdk.js","./flags-for-api-options-CUL0S_V-.js","./editor.stories-fWJ54GsJ.js","./index-8cli1Wkv.js","./structured-item-diff-A4k3naVl.js","./text-diff-44zRM9-e.js","./tags-diff-GoL2kY7u.js","./multi-items-KIV3SbJE.js","./side-by-side-MBJuyilC.js","./interactive-graph-editor.stories-HQQDc4fZ.js","./interactive-graph-question-builder-VBdpjz9Z.js","./interactive-graph.testdata--LRl7_OC.js","./item-editor.stories-jcs7Joja.js","./tex-error-view.stories--fr65KDX.js","./blur-input.stories-MEVoLwh0.js","./color-select.stories-Jw3Ng-PJ.js","./color-swatch.stories-Uc-L1-8V.js","./device-framer.stories--gF4_S4i.js","./graph-settings.stories-pxZw3M1H.js","./interactive-graph-settings.stories-qnrNKe0O.js","./locked-ellipse-settings.stories-jRfApP-w.js","./locked-figures-section.stories-w11JjOyT.js","./locked-function-settings.stories-ik7Ji3Dq.js","./locked-label-settings.stories-qj3aVlWg.js","./locked-line-settings.stories-2DG1DQtc.js","./locked-point-settings.stories-afZkUn61.js","./locked-polygon-settings.stories-TZ8ICcx_.js","./locked-vector-settings.stories-bPZpickT.js","./scrollless-number-text-field.stories-nVFV0ihc.js","./section-control-button.stories-GLPdJzcp.js","./toggleable-caret.stories-RjkVgUY7.js","./viewport-resizer.stories--Brnpkwf.js","./structured-item-diff.stories-xxCW2xVf.js","./perseus-diff-wrapper-c32IFwe6.js","./tags-diff.stories-e8MPTM6d.js","./text-diff.stories-SU5T_twx.js","./categorizer-editor.stories-9Ohj3D2G.js","./definition-editor.stories-2qnB6S7b.js","./dropdown-editor.stories-IfKatrYq.js","./explanation-editor.stories-BL6rpEST.js","./expression-editor.stories-3QlgbdRA.js","./renderer-with-debug-ui-Hlx8S3_1.js","./register-all-widgets-for-testing-0z8sJlZ3.js","./image-editor.stories-yQ9SIoOF.js","./input-number-editor.stories-8FeAhIMn.js","./interaction-editor.stories-mnZor7JR.js","./interactive-graph-editor.stories-ew4R3xFo.js","./label-image-editor.stories-WBmDnB4F.js","./matcher-editor.stories-pKbf4W7F.js","./number-line-editor.stories-df50jfc5.js","./numeric-input-editor.stories-7CjFC-Bf.js","./phet-simulation-editor.stories-GoUfT7PD.js","./python-program-editor.stories-xJ9k_eaZ.js","./radio-editor.stories-Y7l-Dnzs.js","./sorter-editor.stories-DdYB9DV7.js","./answer-choices.stories-DRrt5y6z.js","./behavior.stories-fcqeBsQF.js","./marker.stories-0butrb5y.js","./question-markers.stories-1B9cJ9hF.js","./select-image.stories-R9p0ydJC.js","./article-renderer.stories-N9zESDk7.js","./test-dependencies-iQhk5A81.js","./test-dependencies-vi99l57r.css","./test-keypad-context-wrapper-qNJz2rBH.js","./hints-renderer.stories-G1_2jZrY.js","./server-item-renderer.stories-FqrcCuZb.js","./server-item-renderer-with-debug-ui-4efEH9Ok.js","./ke-score-ui-AQ1XUyPU.js","./button-group.stories-SVj84HqS.js","./fixed-to-responsive.stories-TlwP860I.js","./graph.stories-MRihw5tS.js","./graphie.stories-iPjcxLBs.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-qITwsOct.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-e7anpDcs.js","./stub-tag-editor.stories-6eMueEDt.js","./svg-image.stories-tU_aScnA.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-64FhqD4V.js","./categorizer.stories-uiiCCUWx.js","./cs-program.stories-Kuc3rLSE.js","./definition.stories-Rxx2Cfx5.js","./deprecated-standin.stories-SsbKMRHE.js","./dropdown.stories-GUiRyi1l.js","./explanation.stories-YDTevx37.js","./expression.stories-EG3pd5yP.js","./graded-group-set.stories-jP5JeBtf.js","./graded-group.stories-nzdMGhZf.js","./grapher.stories-mNQ_4cpY.js","./group.stories-axo34YZk.js","./iframe.stories-fMArE-l5.js","./image.stories-rkzY4VWy.js","./input-number.stories-7eUHzuMN.js","./interaction.stories-34EbQ24d.js","./interactive-graph-regression.stories-NPCskUW3.js","./interactive-graph.stories-ym07TDiQ.js","./locked-functions.stories-8ehcTx4P.js","./answer-choices.stories-439XWrdJ.js","./answer-pill.stories-HqbwIe4g.js","./label-image.stories-X1KJvj4w.js","./marker.stories-AV1Yfm5l.js","./matcher.stories-w0tpOh2-.js","./matrix.stories-d7XiDgqo.js","./number-line.stories-RLBZ8xng.js","./numeric-input.stories-krG2YiAw.js","./orderer.stories-i6ImYLYC.js","./passage-ref.stories-7UxxK3Xv.js","./passage.stories-U48vfP3H.js","./phet-simulation.stories-bbv0Wjep.js","./plotter.stories-4QZEiAcq.js","./python-program.stories-7FhMONUu.js","./base-radio.stories-y2YN7Oy1.js","./choice-icon.stories-2BPZpvZi.js","./choice-none-above.stories-U7THKklR.js","./choice.stories-4KrIkHMw.js","./focus-ring.stories-4AFN_C87.js","./option-status.stories-vLiZB-UF.js","./radio.stories-L6mwImb8.js","./sorter.stories-TdCKcYiw.js","./video-transcript-link.stories-QBSva3hd.js","./video.stories-SKPn9ZDM.js","./entry-preview-DB2JHZA1.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-ng8KMcFK.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } diff --git a/assets/iframe.stories-PebohNRv.js b/assets/iframe.stories-fMArE-l5.js similarity index 78% rename from assets/iframe.stories-PebohNRv.js rename to assets/iframe.stories-fMArE-l5.js index 61a7a8047c..8f9b4c84d9 100644 --- a/assets/iframe.stories-PebohNRv.js +++ b/assets/iframe.stories-fMArE-l5.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{R as p}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.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-Yj3_NT-i.js b/assets/image-editor-GD2oimd5.js similarity index 99% rename from assets/image-editor-Yj3_NT-i.js rename to assets/image-editor-GD2oimd5.js index 9883374bcc..a2a950f8c7 100644 --- a/assets/image-editor-Yj3_NT-i.js +++ b/assets/image-editor-GD2oimd5.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{c as p}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-N_KGPfNT.js";import{r as w}from"./index-6oxdNXpR.js";import{B as f}from"./blur-input-6j4bgLwx.js";import{E as d}from"./editor-MI6542O9.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c}from"./components-JJnZE9Qc.js";import{i as b}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.js";import"./index-smZ6iCr_.js";import{E as v}from"./editor-jsonify-Xq2j5Ptn.js";import{r as w}from"./index-6oxdNXpR.js";import{B as f}from"./blur-input-6j4bgLwx.js";import{E as d}from"./editor-G-UjVjKd.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-mI0VtcU8.js b/assets/image-editor.stories-yQ9SIoOF.js similarity index 76% rename from assets/image-editor.stories-mI0VtcU8.js rename to assets/image-editor.stories-yQ9SIoOF.js index db4b6e7c46..994ae56ab9 100644 --- a/assets/image-editor.stories-mI0VtcU8.js +++ b/assets/image-editor.stories-yQ9SIoOF.js @@ -1,3 +1,3 @@ -import{j as t}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-Yj3_NT-i.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-D8O3Xswb.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-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.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-OdYPsA-W.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-N_KGPfNT.js";import"./blur-input-6j4bgLwx.js";import"./editor-MI6542O9.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-Rtk7iZI-.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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-GD2oimd5.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-cAdD85Lh.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-BvCuCrDd.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.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-cKXRS8bE.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./v4-yQnnJER4.js";import"./components-JJnZE9Qc.js";import"./editor-jsonify-Xq2j5Ptn.js";import"./blur-input-6j4bgLwx.js";import"./editor-G-UjVjKd.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-5uzo1xSa.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-wxN5xHQV.js b/assets/image.stories-rkzY4VWy.js similarity index 88% rename from assets/image.stories-wxN5xHQV.js rename to assets/image.stories-rkzY4VWy.js index 5bf1aa4011..d79fb6a5d9 100644 --- a/assets/image.stories-wxN5xHQV.js +++ b/assets/image.stories-rkzY4VWy.js @@ -1,4 +1,4 @@ -import{j as d}from"./jsx-runtime-63Ea5SlK.js";import{R as c}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.js";const t={content:`[[☃ image 1]] +import{j as d}from"./jsx-runtime-63Ea5SlK.js";import{R as c}from"./renderer-with-debug-ui-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.js";const t={content:`[[☃ image 1]] ===== diff --git a/assets/index-zt79SAQ4.js b/assets/index-8cli1Wkv.js similarity index 99% rename from assets/index-zt79SAQ4.js rename to assets/index-8cli1Wkv.js index 04911384d9..a99149afac 100644 --- a/assets/index-zt79SAQ4.js +++ b/assets/index-8cli1Wkv.js @@ -1,4 +1,4 @@ -import{a as M}from"./version-akiLXZts.js";import"./article-editor-EaP2C-Ia.js";import"./device-framer-MUDr0WgQ.js";import"./viewport-resizer-TJi7eV3F.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-0iAD6MzK.js";import{H as V}from"./editor-page-bRBZkw3M.js";import{E as H}from"./editor-MI6542O9.js";import{w as G}from"./article-renderer-jwwMfp2y.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-2Ae1Nml7.js";import{A as Y}from"./perseus-api-1-ethIrW.js";import{l as g,g as Z,e as X}from"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./base-radio-ZvkGSpa4.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-6LJcizcL.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-t1jjN0h8.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-Z29bafBK.js";import"./device-framer-MUDr0WgQ.js";import"./viewport-resizer-0KQVCsZT.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-A4k3naVl.js";import{H as V}from"./editor-page-GOdzEuJC.js";import{E as H}from"./editor-G-UjVjKd.js";import{w as G}from"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import{A as Y}from"./perseus-api-1-ethIrW.js";import{l as g,g as Z,e as X}from"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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-nH8rs09r.js";import{c as te}from"./components-JJnZE9Qc.js";import{c as E,i as ne}from"./icon-paths-5JCXzGsq.js";import{M as ae}from"./multi-items-KIV3SbJE.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) diff --git a/assets/index-d52WCTsb.js b/assets/index-vEFUSWPo.js similarity index 93% rename from assets/index-d52WCTsb.js rename to assets/index-vEFUSWPo.js index 965a5d47ff..f9406b861e 100644 --- a/assets/index-d52WCTsb.js +++ b/assets/index-vEFUSWPo.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-MEZMDSes.js";import"./iframe-C_SWW3D2.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-BlB9J7L7.js";import"./iframe-3V2-igME.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-r7btJNGI.js b/assets/input-number-editor-aqA3wlxN.js similarity index 95% rename from assets/input-number-editor-r7btJNGI.js rename to assets/input-number-editor-aqA3wlxN.js index 96fd1cf257..61927508b2 100644 --- a/assets/input-number-editor-r7btJNGI.js +++ b/assets/input-number-editor-aqA3wlxN.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as u}from"./components-JJnZE9Qc.js";import"./index-k-0mNqHS.js";import{P as m}from"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-x9ZqEHSF.js b/assets/input-number-editor.stories-8FeAhIMn.js similarity index 74% rename from assets/input-number-editor.stories-x9ZqEHSF.js rename to assets/input-number-editor.stories-8FeAhIMn.js index 67bf19e177..92e0951a1e 100644 --- a/assets/input-number-editor.stories-x9ZqEHSF.js +++ b/assets/input-number-editor.stories-8FeAhIMn.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-r7btJNGI.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.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-aqA3wlxN.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.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-hqAUG0Z1.js b/assets/input-number.stories-7eUHzuMN.js similarity index 92% rename from assets/input-number.stories-hqAUG0Z1.js rename to assets/input-number.stories-7eUHzuMN.js index 177d14f3ef..b001c81e8b 100644 --- a/assets/input-number.stories-hqAUG0Z1.js +++ b/assets/input-number.stories-7eUHzuMN.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{R as o}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.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-D8O3Xswb.js b/assets/input-with-examples-cAdD85Lh.js similarity index 98% rename from assets/input-with-examples-D8O3Xswb.js rename to assets/input-with-examples-cAdD85Lh.js index aeb1e63ed6..5b3c42751e 100644 --- a/assets/input-with-examples-D8O3Xswb.js +++ b/assets/input-with-examples-cAdD85Lh.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-63Ea5SlK.js";import{l as p,R as d,p as m}from"./renderer-2Ae1Nml7.js";import{r as c}from"./index-6oxdNXpR.js";import{C as n}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 i,V as x}from"./tooltip-_t9Bc-o8.js";const{captureScratchpadTouchStart:b}=h,s=class s extends c.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=n.INPUT+" "+n.INTERACTIVE;return this.state.focused&&(e+=" "+n.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=this.props.examples.length<=2?this.props.examples.join(" "):this.props.examples.map((r,u)=>u===0&&r.startsWith("**")?`${r} +import{j as t}from"./jsx-runtime-63Ea5SlK.js";import{l as p,R as d,p as m}from"./renderer-IhFUya5i.js";import{r as c}from"./index-6oxdNXpR.js";import{C as n}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 i,V as x}from"./tooltip-_t9Bc-o8.js";const{captureScratchpadTouchStart:b}=h,s=class s extends c.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=n.INPUT+" "+n.INTERACTIVE;return this.state.focused&&(e+=" "+n.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=this.props.examples.length<=2?this.props.examples.join(" "):this.props.examples.map((r,u)=>u===0&&r.startsWith("**")?`${r} `:`- ${r}`).join(` `),l=this.props.shouldShowExamples&&this.state.showExamples;return t.jsxs(g,{className:"perseus-formats-tooltip preview-measure",horizontalPosition:i.Left,horizontalAlign:i.Left,verticalPosition:x.Bottom,arrowSize:10,borderColor:"#ccc",show:l,children:[e,t.jsx("div",{id:this._getUniqueId(),children:t.jsx(d,{content:a,linterContext:m(this.props.linterContext,"input-with-examples"),strings:this.context.strings})})]})}};s.contextType=f,s.defaultProps={shouldShowExamples:!0,onFocus:function(){},onBlur:function(){},disabled:!1,linterContext:p,className:""};let o=s;o.__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; diff --git a/assets/input-with-examples.stories-UlaFcjNK.js b/assets/input-with-examples.stories-qITwsOct.js similarity index 93% rename from assets/input-with-examples.stories-UlaFcjNK.js rename to assets/input-with-examples.stories-qITwsOct.js index 90a14d7ce2..3b5ea6840b 100644 --- a/assets/input-with-examples.stories-UlaFcjNK.js +++ b/assets/input-with-examples.stories-qITwsOct.js @@ -1,4 +1,4 @@ -import{a as b}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{I as f}from"./input-with-examples-D8O3Xswb.js";import"./v4-yQnnJER4.js";import"./jsx-runtime-63Ea5SlK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./renderer-2Ae1Nml7.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-cAdD85Lh.js";import"./v4-yQnnJER4.js";import"./jsx-runtime-63Ea5SlK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./renderer-IhFUya5i.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-FcZanvM1.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:`{ args: { examples: testExamples } diff --git a/assets/interaction-editor-AWh9DTES.js b/assets/interaction-editor-XUhUj9pY.js similarity index 98% rename from assets/interaction-editor-AWh9DTES.js rename to assets/interaction-editor-XUhUj9pY.js index 01256a2556..a162364be1 100644 --- a/assets/interaction-editor-AWh9DTES.js +++ b/assets/interaction-editor-XUhUj9pY.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{c as u}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-N_KGPfNT.js";import{r as p}from"./index-6oxdNXpR.js";import{G as H}from"./graph-settings-3CGKz-Fx.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import{K as o}from"./svg-image-FcZanvM1.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-Xq2j5Ptn.js";import{r as p}from"./index-6oxdNXpR.js";import{G as H}from"./graph-settings-HWzOkGCp.js";import{c}from"./components-JJnZE9Qc.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-Mf5TBiNk.js b/assets/interaction-editor.stories-mnZor7JR.js similarity index 75% rename from assets/interaction-editor.stories-Mf5TBiNk.js rename to assets/interaction-editor.stories-mnZor7JR.js index 30d8681b7a..1b272730ee 100644 --- a/assets/interaction-editor.stories-Mf5TBiNk.js +++ b/assets/interaction-editor.stories-mnZor7JR.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-AWh9DTES.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./editor-jsonify-N_KGPfNT.js";import"./graph-settings-3CGKz-Fx.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-XUhUj9pY.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./editor-jsonify-Xq2j5Ptn.js";import"./graph-settings-HWzOkGCp.js";import"./components-JJnZE9Qc.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 => { const [elements, setElements] = useState(); const [graph, setGraph] = useState(); function handleChange(next) { diff --git a/assets/interaction.stories-loeaowPc.js b/assets/interaction.stories-34EbQ24d.js similarity index 86% rename from assets/interaction.stories-loeaowPc.js rename to assets/interaction.stories-34EbQ24d.js index 8bbf6a43e2..2b1e0119d4 100644 --- a/assets/interaction.stories-loeaowPc.js +++ b/assets/interaction.stories-34EbQ24d.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-63Ea5SlK.js";import{R as a}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.js";const p={content:`Drag the dot all the way to the right. [[☃ interaction 1]] diff --git a/assets/interactive-graph-editor--agEG2l8.js b/assets/interactive-graph-editor--Tp_Keeb.js similarity index 99% rename from assets/interactive-graph-editor--agEG2l8.js rename to assets/interactive-graph-editor--Tp_Keeb.js index 8ac465335c..1514d3a7a6 100644 --- a/assets/interactive-graph-editor--agEG2l8.js +++ b/assets/interactive-graph-editor--Tp_Keeb.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-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import{m as Be,n as Xe}from"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-SJp9oQsg.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-f83FlCXt.js";import{L as rr}from"./locked-figures-section--nV0kbTr.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-Q_sgivvq.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-FcZanvM1.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import{m as Be,n as Xe}from"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as Qe}from"./components-JJnZE9Qc.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-BvCuCrDd.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-5yYCaRBt.js";import{L as rr}from"./locked-figures-section-pNdU5eE3.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-sHo8DjC4.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-A1pXseCx.js b/assets/interactive-graph-editor.stories-HQQDc4fZ.js similarity index 86% rename from assets/interactive-graph-editor.stories-A1pXseCx.js rename to assets/interactive-graph-editor.stories-HQQDc4fZ.js index b3e92221c1..b93147d479 100644 --- a/assets/interactive-graph-editor.stories-A1pXseCx.js +++ b/assets/interactive-graph-editor.stories-HQQDc4fZ.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-zt79SAQ4.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-6LJcizcL.js";import{E as t}from"./editor-page-with-storybook-preview-eID9LGeq.js";import{f as a}from"./flags-for-api-options-K2okOOce.js";import{E as wt}from"./editor-page-bRBZkw3M.js";import"./v4-yQnnJER4.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./version-akiLXZts.js";import"./article-editor-EaP2C-Ia.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./components-ODdjt0Ld.js";import"./device-framer-MUDr0WgQ.js";import"./constants-p_UgHLsb.js";import"./section-control-button-Rtk7iZI-.js";import"./index-wzSCRJFK.js";import"./editor-MI6542O9.js";import"./icon-paths-EoBkHOLI.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";import"./viewport-resizer-TJi7eV3F.js";import"./index-0C4KXdeC.js";import"./structured-item-diff-0iAD6MzK.js";import"./text-diff-LGX1DVHQ.js";import"./tags-diff-CAGYiPAf.js";import"./multi-items-t1jjN0h8.js";/* empty css */import"./graph-settings-3CGKz-Fx.js";import"./categorizer-editor-eZd-YZhk.js";import"./editor-jsonify-N_KGPfNT.js";import"./blur-input-6j4bgLwx.js";import"./definition-editor-ARTDgF3h.js";import"./dropdown-editor-M2GE09YI.js";import"./explanation-editor-0ahwp8Rb.js";import"./expression-editor-oFIZlZCP.js";import"./image-editor-Yj3_NT-i.js";import"./input-number-editor-r7btJNGI.js";import"./interaction-editor-AWh9DTES.js";import"./interactive-graph-editor--agEG2l8.js";import"./heading-1izW0-GJ.js";import"./interactive-graph-settings-f83FlCXt.js";import"./locked-figures-section--nV0kbTr.js";import"./locked-ellipse-settings-ZwFdyrTR.js";import"./locked-figure-aria-DMjwSLKk.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-Q_sgivvq.js";import"./color-select-oJZpOIQc.js";import"./util-WOIF_4W1.js";import"./line-stroke-select-tLzFP-jE.js";import"./locked-function-settings-5syaS11L.js";import"./line-swatch-5z1mrdDY.js";import"./locked-line-settings-X29AVEXv.js";import"./locked-point-settings-hNpBYzsr.js";import"./labeled-switch-H2OzEdZH.js";import"./locked-polygon-settings-F-dWbN7O.js";import"./locked-vector-settings-teFof_kC.js";import"./label-image-editor-uR0SR8x7.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-bKXAiW0J.js";import"./behavior-gU_GOIJI.js";import"./question-markers-0UUgPbE8.js";import"./marker-Hd-8N1dg.js";import"./select-image-8Yo1S9fa.js";import"./matcher-editor-AxlX3C-j.js";import"./number-line-editor-V9wGJGbX.js";import"./numeric-input-editor-qBNHWsXs.js";import"./phet-simulation-editor-YDXi7iT_.js";import"./python-program-editor-uSZoB793.js";import"./editor-f8HUcWmB.js";import"./sorter-editor-iYjrGKmy.js";import"./item-extras-editor-lovX4vvB.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-8cli1Wkv.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-nH8rs09r.js";import{E as t}from"./editor-page-with-storybook-preview-VLm4w66W.js";import{f as a}from"./flags-for-api-options-CUL0S_V-.js";import{E as wt}from"./editor-page-GOdzEuJC.js";import"./v4-yQnnJER4.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./version-akiLXZts.js";import"./article-editor-Z29bafBK.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.js";import"./device-framer-MUDr0WgQ.js";import"./constants-p_UgHLsb.js";import"./section-control-button-5uzo1xSa.js";import"./index-wzSCRJFK.js";import"./editor-G-UjVjKd.js";import"./icon-paths-EoBkHOLI.js";import"./tex-error-view-oha0Bum8.js";import"./toggleable-caret-YFS5vs4O.js";import"./viewport-resizer-0KQVCsZT.js";import"./index-0C4KXdeC.js";import"./structured-item-diff-A4k3naVl.js";import"./text-diff-44zRM9-e.js";import"./tags-diff-GoL2kY7u.js";import"./multi-items-KIV3SbJE.js";/* empty css */import"./graph-settings-HWzOkGCp.js";import"./categorizer-editor-Cwj-_Em8.js";import"./editor-jsonify-Xq2j5Ptn.js";import"./blur-input-6j4bgLwx.js";import"./definition-editor-lqhCzKJC.js";import"./dropdown-editor-JwHnzJHe.js";import"./explanation-editor-wfdanvql.js";import"./expression-editor-5Q0xRi4N.js";import"./image-editor-GD2oimd5.js";import"./input-number-editor-aqA3wlxN.js";import"./interaction-editor-XUhUj9pY.js";import"./interactive-graph-editor--Tp_Keeb.js";import"./heading-1izW0-GJ.js";import"./interactive-graph-settings-5yYCaRBt.js";import"./locked-figures-section-pNdU5eE3.js";import"./locked-ellipse-settings-FOiuHQ4s.js";import"./locked-figure-aria-G5ecBSuw.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-sHo8DjC4.js";import"./color-select-JWbIjxmk.js";import"./util-uQZZCXuL.js";import"./line-stroke-select-OgLwffrZ.js";import"./locked-function-settings-_kb3Q6u1.js";import"./line-swatch-wstb9auL.js";import"./locked-line-settings-WUX1i1E1.js";import"./locked-point-settings-yOnHJo2I.js";import"./labeled-switch-bgXqZg-6.js";import"./locked-polygon-settings-X00uUZoT.js";import"./locked-vector-settings-02mN1v7Q.js";import"./label-image-editor-0iusi5Gy.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-h1kjoc3F.js";import"./behavior-xBQWDl2O.js";import"./question-markers-3hvq1-K6.js";import"./marker-zKJG4WlZ.js";import"./select-image-jxbS7f2v.js";import"./matcher-editor-VfYBBAUU.js";import"./number-line-editor-X3MuZsf0.js";import"./numeric-input-editor-Ms-T6-c5.js";import"./phet-simulation-editor-d4l-9Rog.js";import"./python-program-editor-4XiuwJQ9.js";import"./editor-HGB2tTCA.js";import"./sorter-editor-twvCXJig.js";import"./item-extras-editor-b8a6MKdk.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-fkaaKTJH.js b/assets/interactive-graph-editor.stories-ew4R3xFo.js similarity index 84% rename from assets/interactive-graph-editor.stories-fkaaKTJH.js rename to assets/interactive-graph-editor.stories-ew4R3xFo.js index e3256cf48f..da747a0e9f 100644 --- a/assets/interactive-graph-editor.stories-fkaaKTJH.js +++ b/assets/interactive-graph-editor.stories-ew4R3xFo.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-K2okOOce.js";import{I as oo}from"./interactive-graph-editor--agEG2l8.js";import{g as ro}from"./util-WOIF_4W1.js";import"./v4-yQnnJER4.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./components-ODdjt0Ld.js";import"./heading-1izW0-GJ.js";import"./index-wzSCRJFK.js";import"./toggleable-caret-YFS5vs4O.js";import"./interactive-graph-settings-f83FlCXt.js";import"./locked-figures-section--nV0kbTr.js";import"./locked-ellipse-settings-ZwFdyrTR.js";import"./locked-figure-aria-DMjwSLKk.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-Q_sgivvq.js";import"./color-select-oJZpOIQc.js";import"./line-stroke-select-tLzFP-jE.js";import"./locked-function-settings-5syaS11L.js";import"./line-swatch-5z1mrdDY.js";import"./locked-line-settings-X29AVEXv.js";import"./locked-point-settings-hNpBYzsr.js";import"./labeled-switch-H2OzEdZH.js";import"./locked-polygon-settings-F-dWbN7O.js";import"./locked-vector-settings-teFof_kC.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-CUL0S_V-.js";import{I as oo}from"./interactive-graph-editor--Tp_Keeb.js";import{g as ro}from"./util-uQZZCXuL.js";import"./v4-yQnnJER4.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.js";import"./heading-1izW0-GJ.js";import"./index-wzSCRJFK.js";import"./toggleable-caret-YFS5vs4O.js";import"./interactive-graph-settings-5yYCaRBt.js";import"./locked-figures-section-pNdU5eE3.js";import"./locked-ellipse-settings-FOiuHQ4s.js";import"./locked-figure-aria-G5ecBSuw.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-sHo8DjC4.js";import"./color-select-JWbIjxmk.js";import"./line-stroke-select-OgLwffrZ.js";import"./locked-function-settings-_kb3Q6u1.js";import"./line-swatch-wstb9auL.js";import"./locked-line-settings-WUX1i1E1.js";import"./locked-point-settings-yOnHJo2I.js";import"./labeled-switch-bgXqZg-6.js";import"./locked-polygon-settings-X00uUZoT.js";import"./locked-vector-settings-02mN1v7Q.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-qJh-I9CQ.js b/assets/interactive-graph-regression.stories-NPCskUW3.js similarity index 99% rename from assets/interactive-graph-regression.stories-qJh-I9CQ.js rename to assets/interactive-graph-regression.stories-NPCskUW3.js index f1490d4f4a..b2d8baea34 100644 --- a/assets/interactive-graph-regression.stories-qJh-I9CQ.js +++ b/assets/interactive-graph-regression.stories-NPCskUW3.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{R as is}from"./renderer-2Ae1Nml7.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-IhFUya5i.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-FcZanvM1.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 => <> `,...(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-f83FlCXt.js b/assets/interactive-graph-settings-5yYCaRBt.js similarity index 98% rename from assets/interactive-graph-settings-f83FlCXt.js rename to assets/interactive-graph-settings-5yYCaRBt.js index c03aa7b4f1..cc3a30e664 100644 --- a/assets/interactive-graph-settings-f83FlCXt.js +++ b/assets/interactive-graph-settings-5yYCaRBt.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{c as P}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as _}from"./components-JJnZE9Qc.js";import{i as j}from"./constants-iPV6vHZm.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-V0DbIM2r.js b/assets/interactive-graph-settings.stories-qnrNKe0O.js similarity index 86% rename from assets/interactive-graph-settings.stories-V0DbIM2r.js rename to assets/interactive-graph-settings.stories-qnrNKe0O.js index 859b0032b3..692b93a9a7 100644 --- a/assets/interactive-graph-settings.stories-V0DbIM2r.js +++ b/assets/interactive-graph-settings.stories-qnrNKe0O.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-f83FlCXt.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.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-5yYCaRBt.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.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-0DmaCBBF.js b/assets/interactive-graph.stories-ym07TDiQ.js similarity index 97% rename from assets/interactive-graph.stories-0DmaCBBF.js rename to assets/interactive-graph.stories-ym07TDiQ.js index 85844cb8b7..275309e8b8 100644 --- a/assets/interactive-graph.stories-0DmaCBBF.js +++ b/assets/interactive-graph.stories-ym07TDiQ.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-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import{R as go,s as ho}from"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-rlAJ1oPQ.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-D8O3Xswb.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./shared-4TdECMLk.js";import"./answer-choices-SJp9oQsg.js";import"./minus-bold-ONmDo3Ve.js";import"./asset-context-H6Iqp7Gi.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.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-OdYPsA-W.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-IqvoTTry.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import{R as go,s as ho}from"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import{S as fo}from"./svg-image-FcZanvM1.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-Hlx8S3_1.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-cAdD85Lh.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./shared-4TdECMLk.js";import"./answer-choices-BvCuCrDd.js";import"./minus-bold-ONmDo3Ve.js";import"./asset-context-H6Iqp7Gi.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.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-cKXRS8bE.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-0z8sJlZ3.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-hCsUjCA6.js b/assets/item-editor.stories-jcs7Joja.js similarity index 72% rename from assets/item-editor.stories-hCsUjCA6.js rename to assets/item-editor.stories-jcs7Joja.js index bf7ae9db7f..402e4d3e7f 100644 --- a/assets/item-editor.stories-hCsUjCA6.js +++ b/assets/item-editor.stories-jcs7Joja.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-lovX4vvB.js";/* empty css */import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.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-b8a6MKdk.js";/* empty css */import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.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-lovX4vvB.js b/assets/item-extras-editor-b8a6MKdk.js similarity index 94% rename from assets/item-extras-editor-lovX4vvB.js rename to assets/item-extras-editor-b8a6MKdk.js index 5090bb984f..35d6bf3767 100644 --- a/assets/item-extras-editor-lovX4vvB.js +++ b/assets/item-extras-editor-b8a6MKdk.js @@ -1 +1 @@ -import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{I as c}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as h}from"./components-JJnZE9Qc.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-uR0SR8x7.js b/assets/label-image-editor-0iusi5Gy.js similarity index 90% rename from assets/label-image-editor-uR0SR8x7.js rename to assets/label-image-editor-0iusi5Gy.js index 7376ae8613..b72b102016 100644 --- a/assets/label-image-editor-uR0SR8x7.js +++ b/assets/label-image-editor-0iusi5Gy.js @@ -1,4 +1,4 @@ -import{j as n}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-N_KGPfNT.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-bKXAiW0J.js";import{B as w}from"./behavior-gU_GOIJI.js";import{Q as A}from"./question-markers-0UUgPbE8.js";import{S as v}from"./select-image-8Yo1S9fa.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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-Xq2j5Ptn.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-h1kjoc3F.js";import{B as w}from"./behavior-xBQWDl2O.js";import{Q as A}from"./question-markers-3hvq1-K6.js";import{S as v}from"./select-image-jxbS7f2v.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-9f4pJ9id.js b/assets/label-image-editor.stories-WBmDnB4F.js similarity index 76% rename from assets/label-image-editor.stories-9f4pJ9id.js rename to assets/label-image-editor.stories-WBmDnB4F.js index 3bbd12e3d6..2560b19434 100644 --- a/assets/label-image-editor.stories-9f4pJ9id.js +++ b/assets/label-image-editor.stories-WBmDnB4F.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-uR0SR8x7.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./editor-jsonify-N_KGPfNT.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-bKXAiW0J.js";import"./components-ODdjt0Ld.js";import"./behavior-gU_GOIJI.js";import"./question-markers-0UUgPbE8.js";import"./marker-Hd-8N1dg.js";import"./util-qk2aeK8X.js";import"./select-image-8Yo1S9fa.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-0iusi5Gy.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./editor-jsonify-Xq2j5Ptn.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";import"./answer-choices-h1kjoc3F.js";import"./components-JJnZE9Qc.js";import"./behavior-xBQWDl2O.js";import"./question-markers-3hvq1-K6.js";import"./marker-zKJG4WlZ.js";import"./util-qk2aeK8X.js";import"./select-image-jxbS7f2v.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-6xGBe1u2.js b/assets/label-image.stories-X1KJvj4w.js similarity index 93% rename from assets/label-image.stories-6xGBe1u2.js rename to assets/label-image.stories-X1KJvj4w.js index be8dcb10e4..77e5ae25d3 100644 --- a/assets/label-image.stories-6xGBe1u2.js +++ b/assets/label-image.stories-X1KJvj4w.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-63Ea5SlK.js";import{R as l}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.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-H2OzEdZH.js b/assets/labeled-switch-bgXqZg-6.js similarity index 94% rename from assets/labeled-switch-H2OzEdZH.js rename to assets/labeled-switch-bgXqZg-6.js index 0908c753aa..9ca7d0f9ad 100644 --- a/assets/labeled-switch-H2OzEdZH.js +++ b/assets/labeled-switch-bgXqZg-6.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-jwwMfp2y.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-m2DxR4DL.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-tLzFP-jE.js b/assets/line-stroke-select-OgLwffrZ.js similarity index 94% rename from assets/line-stroke-select-tLzFP-jE.js rename to assets/line-stroke-select-OgLwffrZ.js index 336080d846..4e0e8fe160 100644 --- a/assets/line-stroke-select-tLzFP-jE.js +++ b/assets/line-stroke-select-OgLwffrZ.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{S as i,O as t}from"./answer-choices-SJp9oQsg.js";import{S as r}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=l=>{const{selectedValue:a,onChange:s}=l;return e.jsxs(o,{tag:"label",style:u.lineStrokeSelect,children:["stroke",e.jsx(r,{size:n.xxxSmall_4}),e.jsxs(i,{selectedValue:a,onChange:s,placeholder:"",children:[e.jsx(t,{value:"solid",label:"solid"}),e.jsx(t,{value:"dashed",label:"dashed"})]})]})},u=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: StyleOptions) => void",signature:{arguments:[{type:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},name:"newValue"}],return:{name:"void"}}},description:""}}};export{m as L}; +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{S as i,O as t}from"./answer-choices-BvCuCrDd.js";import{S as r}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=l=>{const{selectedValue:a,onChange:s}=l;return e.jsxs(o,{tag:"label",style:u.lineStrokeSelect,children:["stroke",e.jsx(r,{size:n.xxxSmall_4}),e.jsxs(i,{selectedValue:a,onChange:s,placeholder:"",children:[e.jsx(t,{value:"solid",label:"solid"}),e.jsx(t,{value:"dashed",label:"dashed"})]})]})},u=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: StyleOptions) => void",signature:{arguments:[{type:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},name:"newValue"}],return:{name:"void"}}},description:""}}};export{m as L}; diff --git a/assets/line-swatch-5z1mrdDY.js b/assets/line-swatch-wstb9auL.js similarity index 78% rename from assets/line-swatch-5z1mrdDY.js rename to assets/line-swatch-wstb9auL.js index fab0830532..bd9dde2377 100644 --- a/assets/line-swatch-5z1mrdDY.js +++ b/assets/line-swatch-wstb9auL.js @@ -1 +1 @@ -import{j as t}from"./jsx-runtime-63Ea5SlK.js";import{l as n}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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}; diff --git a/assets/locked-ellipse-settings-ZwFdyrTR.js b/assets/locked-ellipse-settings-FOiuHQ4s.js similarity index 93% rename from assets/locked-ellipse-settings-ZwFdyrTR.js rename to assets/locked-ellipse-settings-FOiuHQ4s.js index 7b777a7637..8df1d09989 100644 --- a/assets/locked-ellipse-settings-ZwFdyrTR.js +++ b/assets/locked-ellipse-settings-FOiuHQ4s.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{l as j,a as F}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-SJp9oQsg.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-DMjwSLKk.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-Q_sgivvq.js";import{C as ae}from"./color-select-oJZpOIQc.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-tLzFP-jE.js";import{g as le,j as ie,a as oe}from"./util-WOIF_4W1.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as W}from"./components-JJnZE9Qc.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-BvCuCrDd.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-G5ecBSuw.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-sHo8DjC4.js";import{C as ae}from"./color-select-JWbIjxmk.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-OgLwffrZ.js";import{g as le,j as ie,a as oe}from"./util-uQZZCXuL.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-gbFSr_8T.js b/assets/locked-ellipse-settings.stories-jRfApP-w.js similarity index 81% rename from assets/locked-ellipse-settings.stories-gbFSr_8T.js rename to assets/locked-ellipse-settings.stories-jRfApP-w.js index 7689ee6831..5c95c41a22 100644 --- a/assets/locked-ellipse-settings.stories-gbFSr_8T.js +++ b/assets/locked-ellipse-settings.stories-jRfApP-w.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-ZwFdyrTR.js";import{g as k}from"./util-WOIF_4W1.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./components-ODdjt0Ld.js";import"./locked-figure-aria-DMjwSLKk.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-Q_sgivvq.js";import"./color-select-oJZpOIQc.js";import"./line-stroke-select-tLzFP-jE.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-FOiuHQ4s.js";import{g as k}from"./util-uQZZCXuL.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.js";import"./locked-figure-aria-G5ecBSuw.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-sHo8DjC4.js";import"./color-select-JWbIjxmk.js";import"./line-stroke-select-OgLwffrZ.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-DMjwSLKk.js b/assets/locked-figure-aria-G5ecBSuw.js similarity index 88% rename from assets/locked-figure-aria-DMjwSLKk.js rename to assets/locked-figure-aria-G5ecBSuw.js index 3f12bc4002..b1676c41d4 100644 --- a/assets/locked-figure-aria-DMjwSLKk.js +++ b/assets/locked-figure-aria-G5ecBSuw.js @@ -1,2 +1,2 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as f}from"./components-JJnZE9Qc.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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--nV0kbTr.js b/assets/locked-figures-section-pNdU5eE3.js similarity index 99% rename from assets/locked-figures-section--nV0kbTr.js rename to assets/locked-figures-section-pNdU5eE3.js index 328a100856..9889c877c0 100644 --- a/assets/locked-figures-section--nV0kbTr.js +++ b/assets/locked-figures-section-pNdU5eE3.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 F}from"./index-nqMmpXbO.js";import{s as g,c as E}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-SJp9oQsg.js";import{L as $}from"./locked-ellipse-settings-ZwFdyrTR.js";import{L as M}from"./locked-function-settings-5syaS11L.js";import{L as D}from"./locked-label-settings-Q_sgivvq.js";import{L as V}from"./locked-line-settings-X29AVEXv.js";import{L as G}from"./locked-point-settings-hNpBYzsr.js";import{L as U}from"./locked-polygon-settings-F-dWbN7O.js";import{L as H}from"./locked-vector-settings-teFof_kC.js";import{g as K}from"./util-WOIF_4W1.js";const q=n=>{const{id:h,onChange:o}=n,l=["point","line","vector","ellipse","polygon","function",...n.showLabelsFlag?["label"]:[]];return 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:E.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: LockedFigureType) => void",signature:{arguments:[{type:{name:'union["type"]',raw:'LockedFigure["type"]'},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 F}from"./index-nqMmpXbO.js";import{s as g,c as E}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-BvCuCrDd.js";import{L as $}from"./locked-ellipse-settings-FOiuHQ4s.js";import{L as M}from"./locked-function-settings-_kb3Q6u1.js";import{L as D}from"./locked-label-settings-sHo8DjC4.js";import{L as V}from"./locked-line-settings-WUX1i1E1.js";import{L as G}from"./locked-point-settings-yOnHJo2I.js";import{L as U}from"./locked-polygon-settings-X00uUZoT.js";import{L as H}from"./locked-vector-settings-02mN1v7Q.js";import{g as K}from"./util-uQZZCXuL.js";const q=n=>{const{id:h,onChange:o}=n,l=["point","line","vector","ellipse","polygon","function",...n.showLabelsFlag?["label"]:[]];return 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:E.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: LockedFigureType) => void",signature:{arguments:[{type:{name:'union["type"]',raw:'LockedFigure["type"]'},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(F,{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-XCFqBRO9.js b/assets/locked-figures-section.stories-w11JjOyT.js similarity index 75% rename from assets/locked-figures-section.stories-XCFqBRO9.js rename to assets/locked-figures-section.stories-w11JjOyT.js index 0f30d52151..acd026e31d 100644 --- a/assets/locked-figures-section.stories-XCFqBRO9.js +++ b/assets/locked-figures-section.stories-w11JjOyT.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--nV0kbTr.js";import{g as d}from"./util-WOIF_4W1.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-SJp9oQsg.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-2Ae1Nml7.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-ZwFdyrTR.js";import"./article-renderer-jwwMfp2y.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./components-ODdjt0Ld.js";import"./locked-figure-aria-DMjwSLKk.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-Q_sgivvq.js";import"./color-select-oJZpOIQc.js";import"./line-stroke-select-tLzFP-jE.js";import"./locked-function-settings-5syaS11L.js";import"./line-swatch-5z1mrdDY.js";import"./locked-line-settings-X29AVEXv.js";import"./locked-point-settings-hNpBYzsr.js";import"./labeled-switch-H2OzEdZH.js";import"./locked-polygon-settings-F-dWbN7O.js";import"./locked-vector-settings-teFof_kC.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-pNdU5eE3.js";import{g as d}from"./util-uQZZCXuL.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-BvCuCrDd.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-IhFUya5i.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./index-J2t_5nK1.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-FOiuHQ4s.js";import"./article-renderer-m2DxR4DL.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.js";import"./locked-figure-aria-G5ecBSuw.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./util-qk2aeK8X.js";import"./locked-label-settings-sHo8DjC4.js";import"./color-select-JWbIjxmk.js";import"./line-stroke-select-OgLwffrZ.js";import"./locked-function-settings-_kb3Q6u1.js";import"./line-swatch-wstb9auL.js";import"./locked-line-settings-WUX1i1E1.js";import"./locked-point-settings-yOnHJo2I.js";import"./labeled-switch-bgXqZg-6.js";import"./locked-polygon-settings-X00uUZoT.js";import"./locked-vector-settings-02mN1v7Q.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-5syaS11L.js b/assets/locked-function-settings-_kb3Q6u1.js similarity index 96% rename from assets/locked-function-settings-5syaS11L.js rename to assets/locked-function-settings-_kb3Q6u1.js index 270aba6322..970dcded77 100644 --- a/assets/locked-function-settings-5syaS11L.js +++ b/assets/locked-function-settings-_kb3Q6u1.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-SJp9oQsg.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-Q_sgivvq.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-DMjwSLKk.js";import{l as S}from"./index-awljIyHI.js";import{r as k}from"./index-6oxdNXpR.js";import{C as ne}from"./color-select-oJZpOIQc.js";import{L as re}from"./line-stroke-select-tLzFP-jE.js";import{L as te}from"./line-swatch-5z1mrdDY.js";import{g as oe,j as le,a as ie}from"./util-WOIF_4W1.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-BvCuCrDd.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-sHo8DjC4.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-G5ecBSuw.js";import{l as S}from"./index-awljIyHI.js";import{r as k}from"./index-6oxdNXpR.js";import{C as ne}from"./color-select-JWbIjxmk.js";import{L as re}from"./line-stroke-select-OgLwffrZ.js";import{L as te}from"./line-swatch-wstb9auL.js";import{g as oe,j as le,a as ie}from"./util-uQZZCXuL.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-0C68qdPu.js b/assets/locked-function-settings.stories-ik7Ji3Dq.js similarity index 77% rename from assets/locked-function-settings.stories-0C68qdPu.js rename to assets/locked-function-settings.stories-ik7Ji3Dq.js index 30a7cf3e83..1f4d26bd73 100644 --- a/assets/locked-function-settings.stories-0C68qdPu.js +++ b/assets/locked-function-settings.stories-ik7Ji3Dq.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-5syaS11L.js";import{g as x}from"./util-WOIF_4W1.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-SJp9oQsg.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-2Ae1Nml7.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-Q_sgivvq.js";import"./article-renderer-jwwMfp2y.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-D8O3Xswb.js";import"./text-input-5e4vF1bl.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./components-ODdjt0Ld.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-oJZpOIQc.js";import"./locked-figure-aria-DMjwSLKk.js";import"./line-stroke-select-tLzFP-jE.js";import"./line-swatch-5z1mrdDY.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-_kb3Q6u1.js";import{g as x}from"./util-uQZZCXuL.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-BvCuCrDd.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-IhFUya5i.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./index-J2t_5nK1.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-sHo8DjC4.js";import"./article-renderer-m2DxR4DL.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-cAdD85Lh.js";import"./text-input-5e4vF1bl.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./base-radio-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-JWbIjxmk.js";import"./locked-figure-aria-G5ecBSuw.js";import"./line-stroke-select-OgLwffrZ.js";import"./line-swatch-wstb9auL.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-DGrKbdc_.js b/assets/locked-functions.stories-8ehcTx4P.js similarity index 90% rename from assets/locked-functions.stories-DGrKbdc_.js rename to assets/locked-functions.stories-8ehcTx4P.js index 499f0eb24a..76ee7bf7a0 100644 --- a/assets/locked-functions.stories-DGrKbdc_.js +++ b/assets/locked-functions.stories-8ehcTx4P.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{R as t}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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:o}=i,[d,l]=a.useState([e[0].toString(),e[1].toString()]);a.useEffect(()=>{l([e[0].toString(),e[1].toString()])},[e]);function p(c,g){const v=[...d];if(v[g]=c,l(v),isNaN(+c)||c==="")return;const f=[...e];f[g]=+c,o(f)}return u.jsxs(j,{style:[A.row,n],children:[u.jsxs(te,{tag:"label",style:A.row,children:[t?t[0]:"x coord",u.jsx(W,{size:h.xxSmall_6}),u.jsx(fe,{value:d[0],onChange:c=>p(c,0),style:[A.textField,r?A.errorField:void 0]})]}),u.jsx(W,{size:h.medium_16}),u.jsxs(te,{tag:"label",style:A.row,children:[t?t[1]:"y coord",u.jsx(W,{size:h.xxSmall_6}),u.jsx(fe,{value:d[1],onChange:c=>p(c,1),style:[A.textField,r?A.errorField:void 0]})]})]})},A=R.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},textField:{width:h.xxxLarge_64},errorField:{borderColor:s.red,backgroundColor:s.fadedRed8}}),Ke=xe;xe.__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(i){for(var e=1;e=0)&&(t[n]=i[n]);return t}const He=["children","id","initialExpandedIndex","allowMultipleExpanded","caretPosition","cornerKind","animated","style"],Ve=re("ul"),Xe=6;a.forwardRef(function(e,t){const{children:r,id:n,initialExpandedIndex:o,allowMultipleExpanded:d=!0,caretPosition:l,cornerKind:p="rounded",animated:c,style:g}=e,v=Ce(e,He),f=Array(r.length).fill(!1);o!==void 0&&(f[o]=!0);const[w,S]=a.useState(f),m=Array(r.length).fill(null),x=r.length<=Xe,I=(C,b)=>{const k=d?[...w]:Array(r.length).fill(!1),T=!w[C];k[C]=T,S(k),b&&b(T)},N=C=>{var b,k,T,B;const F=m.findIndex($=>$.current===document.activeElement);if(F!==-1)switch(C.key){case"ArrowUp":C.preventDefault();const $=(F+r.length-1)%r.length;(b=m[$].current)==null||b.focus();break;case"ArrowDown":C.preventDefault();const D=(F+1)%r.length;(k=m[D].current)==null||k.focus();break;case"Home":C.preventDefault(),(T=m[0].current)==null||T.focus();break;case"End":C.preventDefault(),(B=m[r.length-1].current)==null||B.focus();break}};return a.createElement(Ve,X({style:[Ge.wrapper,g],onKeyDown:N},v,{ref:t}),r.map((C,b)=>{const{caretPosition:k,cornerKind:T,onToggle:B,animated:F}=C.props,$=a.createRef();m[b]=$;const _=b===0,D=b===r.length-1;return a.createElement("li",{key:b,id:n},a.cloneElement(C,{animated:F??c,caretPosition:k??l,cornerKind:T??p,expanded:w[b],onToggle:()=>I(b,B),isFirstSection:_,isLastSection:D,isRegion:x,ref:$}))}))});const Ge=R.StyleSheet.create({wrapper:{boxSizing:"border-box",listStyle:"none",padding:0,width:"100%"}});function Qe(i,e,t,r){switch(i){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=a.forwardRef(function(e,t){const{id:r,header:n,caretPosition:o,cornerKind:d,collapsible:l=!0,expanded:p,animated:c,onClick:g,sectionContentUniqueId:v,headerStyle:f,tag:w="h2",testId:S,isFirstSection:m,isLastSection:x}=e,I=typeof n=="string",{roundedTop:N,roundedBottom:C}=Qe(d,m,x,p);return a.createElement(De,{tag:w,style:E.heading},a.createElement(Me,{id:r,"aria-expanded":p,"aria-controls":v,onClick:g,disabled:!l,testId:S?`${S}-header`:void 0,style:[E.headerWrapper,c&&E.headerWrapperWithAnimation,o==="start"&&E.headerWrapperCaretStart,N&&E.roundedTop,C&&E.roundedBottom,f,!l&&E.disabled],ref:t},()=>a.createElement(a.Fragment,null,a.createElement(j,{style:[E.headerContent,I&&E.headerString]},I?a.createElement(j,{style:[o==="end"?E.headerStringCaretEnd:E.headerStringCaretStart]},n):n),l&&a.createElement(se,{icon:ve,color:s.offBlack64,size:"small",style:[c&&E.iconWithAnimation,o==="start"?E.iconStart:E.iconEnd,p&&E.iconExpanded],testId:S?`${S}-caret-icon`:void 0}))))}),Q=h.small_12-1,me="300ms",E=R.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 ${s.activeBlue}`},":hover":{outline:`2px solid ${s.blue}`},":focus":{boxShadow:`0 0 0 2px ${s.blue}`},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":{outline:`2px solid ${s.blue}`}},headerWrapperWithAnimation:{transition:`border-radius ${me}`},headerWrapperCaretStart:{flexDirection:"row-reverse"},roundedTop:{borderStartStartRadius:Q,borderStartEndRadius:Q},roundedBottom:{borderEndStartRadius:Q,borderEndEndRadius:Q},headerContent:{flexGrow:1,textAlign:"start"},headerString:{paddingTop:h.medium_16,paddingBottom:h.medium_16},headerStringCaretEnd:{paddingInlineEnd:h.small_12,paddingInlineStart:h.medium_16},headerStringCaretStart:{paddingInlineEnd:h.medium_16,paddingInlineStart:h.small_12},iconWithAnimation:{transition:`transform ${me}`},iconExpanded:{transform:"rotate(180deg)"},iconStart:{marginInlineStart:h.medium_16},iconEnd:{marginInlineEnd:h.medium_16},disabled:{pointerEvents:"none",color:"inherit",":focus":{boxShadow:`0 0 0 2px ${s.offBlack32}`},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":{outline:`2px solid ${s.offBlack32}`}}}),Ye=["children","id","header","collapsible","expanded","animated","onToggle","caretPosition","cornerKind","style","headerStyle","tag","testId","isFirstSection","isLastSection","isRegion"],Ze=a.forwardRef(function(e,t){const{children:r,id:n,header:o,collapsible:d,expanded:l,animated:p=!1,onToggle:c,caretPosition:g="end",cornerKind:v="rounded",style:f,headerStyle:w,tag:S,testId:m,isFirstSection:x=!0,isLastSection:I=!0,isRegion:N=!0}=e,C=Ce(e,Ye),[b,k]=a.useState(l??!1),T=l!==void 0&&c,B=Ne(),F=n??B.get("accordion-section"),$=n?`${n}-header`:B.get("accordion-section-header"),_=B.get("accordion-section-content"),D=et(v,x,I),he=()=>{T?c(!l):(k(!b),c&&c(!b))};let U;return d===!1?U=!0:U=T?l:b,a.createElement(j,X({id:F,style:[M.wrapper,p&&M.wrapperWithAnimation,D.wrapper,U?M.wrapperExpanded:M.wrapperCollapsed,f],testId:m},C),a.createElement(Je,{id:$,header:o,caretPosition:g,cornerKind:v,collapsible:d,expanded:U,animated:p,onClick:he,sectionContentUniqueId:_,headerStyle:w,tag:S,testId:m,isFirstSection:x,isLastSection:I,ref:t}),a.createElement(j,{id:_,role:N?"region":void 0,"aria-labelledby":$,style:[M.contentWrapper,U?M.contentWrapperExpanded:M.conentWrapperCollapsed,D.contentWrapper],testId:m?`${m}-content-panel`:void 0},typeof r=="string"?a.createElement(Le,{style:M.stringContent},r):r))}),M=R.StyleSheet.create({wrapper:{display:"grid",position:"static",boxSizing:"border-box",backgroundColor:s.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:h.medium_16}}),J={},et=(i,e,t)=>{const r=`${i}-${e.toString()}-${t.toString()}`;if(J[r])return J[r];let n=Object.freeze({}),o=Object.freeze({}),d=Object.freeze({}),l=Object.freeze({});i==="square"&&(n={border:`1px solid ${s.offBlack16}`,borderBottom:"none",borderRadius:0},t&&(l={borderBottom:`1px solid ${s.offBlack16}`})),i==="rounded"&&(n={border:`1px solid ${s.offBlack16}`,borderBottom:"none"},e&&(d={borderStartStartRadius:h.small_12,borderStartEndRadius:h.small_12}),t&&(l={borderBottom:`1px solid ${s.offBlack16}`,borderEndStartRadius:h.small_12,borderEndEndRadius:h.small_12},o={borderEndEndRadius:h.small_12,borderEndStartRadius:h.small_12})),i==="rounded-per-section"&&(n={border:`1px solid ${s.offBlack16}`,borderRadius:h.small_12,marginBottom:h.medium_16},o={borderEndEndRadius:h.small_12,borderEndStartRadius:h.small_12});const p={wrapper:X({},n,d,l),contentWrapper:o};return J[r]=R.StyleSheet.create(p),J[r]},ke=i=>{const{children:e,header:t,expanded:r,containerStyle:n,panelStyle:o,onToggle:d}=i;return u.jsx(j,{className:"perseus-editor-accordion",children:u.jsx(Ze,{expanded:r,onToggle:d,style:[ae.container,n],headerStyle:ae.accordionHeader,header:t,children:u.jsx(j,{style:[ae.accordionPanel,o],children:e})})})},ae=R.StyleSheet.create({container:{backgroundColor:s.fadedBlue8,marginTop:h.xSmall_8},accordionHeader:{padding:h.small_12,paddingInlineEnd:0,height:h.xxLarge_48},accordionPanel:{paddingTop:h.xxSmall_6,paddingBottom:h.xxxSmall_4,paddingLeft:h.small_12,paddingRight:h.small_12}}),tt=ke;ke.__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 Re(i){const e=[];if(i)if(Array.isArray(i))for(const t of i)e.push(...Re(t));else e.push(i);else return e;return e}function Ee(i){const e=[],t=[];if(!i)return{style:{},className:""};const r=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;Re(i).forEach(o=>{const d=o._definition;if(d!=null)if(r){const l={};for(const[p,c]of Object.entries(d))l[p.replace(/-[a-z]/g,g=>g[1].toUpperCase())]=c;t.push(l)}else e.push(o);else t.push(o)});const n=Object.assign({},...t);if(t.length>0&&!r){const o=R.StyleSheet.create({inlineStyles:n});e.push(o.inlineStyles)}return{style:r?n:{},className:R.css(...e)}}const rt=["children","style","tag","testId"],nt=/^h[1-6]$/,ge=R.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}});a.forwardRef(function(e,t){let{children:r,style:n,tag:o="span",testId:d}=e,l=H(e,rt);const p=nt.test(o),c=Ee([ge.text,p&&ge.header,n]),g=l.className?[l.className,c.className].join(" "):c.className;return a.createElement(o,y({},l,{style:c.style,className:g,"data-testid":d,ref:t}),r)});const ot=["className","style"];function P(i,e){return a.forwardRef((t,r)=>{const{className:n,style:o}=t,d=H(t,ot),l=typeof i=="string"?it[i]:null,{className:p,style:c}=Ee([l,e,o]);return a.createElement(i,y({},d,{ref:r,className:[p,n].filter(Boolean).join(" "),style:c}))})}const it=R.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),at=["testId","tag"],G=R.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}}),st=P("div",G.default),lt=P("article",G.default),dt=P("aside",G.default),ct=P("nav",G.default),ut=P("section",G.default);a.forwardRef(function(e,t){const{testId:r,tag:n="div"}=e,o=H(e,at),d=y({},o,{"data-testid":r});switch(n){case"article":return a.createElement(lt,y({},d,{ref:t}));case"aside":return a.createElement(dt,y({},d,{ref:t}));case"nav":return a.createElement(ct,y({},d,{ref:t}));case"section":return a.createElement(ut,y({},d,{ref:t}));case"div":return a.createElement(st,y({},d,{ref:t}));default:throw Error(`${n} is not an allowed value for the 'tag' prop`)}});let O=function(i){return i.Root="root",i.Initial="initial",i.Standard="standard",i}({});const ee=a.createContext(O.Root);ee.displayName="RenderStateContext";class ht extends a.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?a.createElement(ee.Provider,{value:O.Standard},t()):r?a.createElement(ee.Provider,{value:O.Initial},r()):null}_maybeRender(e){const{children:t,fallback:r}=this.props;switch(e){case O.Root:return this._renderAsRootComponent();case O.Initial:return r?r():null;case O.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(O.Root)}}render(){return a.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 le{get(e){return e}}le.Default=new le;var pt=le.Default;class ft extends a.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 a.createElement(ht,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}}class de extends a.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():a.createElement(ft,{scope:t,mockOnFirstRender:!0},r=>this.renderChildren(r))}}de.defaultId="wb-id";const ye=i=>{switch(i){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}}},mt={onClick:()=>{},onMouseEnter:()=>{},onMouseLeave:()=>{},onMouseDown:()=>{},onMouseUp:()=>{},onTouchStart:()=>{},onTouchEnd:()=>{},onTouchCancel:()=>{},onKeyDown:()=>{},onKeyUp:()=>{}},q={enter:13,space:32},be={hovered:!1,focused:!1,pressed:!1,waiting:!1};class ce extends a.Component{static getDerivedStateFromProps(e,t){return e.disabled?y({},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:o=void 0}=this.props;this.enterClick||((r||n||o)&&(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 o=t.which||t.keyCode,{triggerOnEnter:d,triggerOnSpace:l}=ye(n);d&&o===q.enter||l&&o===q.space?(t.preventDefault(),this.setState({pressed:!0})):!d&&o===q.enter&&(this.enterClick=!0)},this.handleKeyUp=t=>{const{onKeyUp:r,role:n}=this.props;r&&r(t);const o=t.which||t.keyCode,{triggerOnEnter:d,triggerOnSpace:l}=ye(n);d&&o===q.enter||l&&o===q.space?(this.setState({pressed:!1,focused:!0}),this.runCallbackAndMaybeNavigate(t)):!d&&o===q.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:o=void 0}=this.props;r&&(o==="_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(o=>{}).finally(()=>{this.navigateOrReset(t)}))}runCallbackAndMaybeNavigate(e){const{onClick:t=void 0,beforeNav:r=void 0,safeWithNav:n=void 0,href:o,type:d}=this.props;let l=!0,p=!0;if(t&&t(e),e.defaultPrevented&&(l=!1,p=!1),e.preventDefault(),!o&&d==="submit"&&p){let c=e.currentTarget;for(;c;){if(c instanceof window.HTMLFormElement){const g=new window.Event("submit",{bubbles:!0,cancelable:!0});c.dispatchEvent(g);break}c=c.parentElement}}if(r)this.setState({waiting:!0}),r().then(()=>n?this.handleSafeWithNav(n,l):this.navigateOrReset(l)).catch(()=>{});else{if(n)return this.handleSafeWithNav(n,l);this.navigateOrReset(l)}}render(){const e=this.props.rel||(this.props.target==="_blank"?"noopener noreferrer":void 0),t=this.props.disabled?y({},mt,{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)}}ce.defaultProps={disabled:!1};const ue=i=>typeof i!="string"?!1:!/^(https?:)?\/\//i.test(i)&&!/^([^#]*#[\w-]*|[\w\-.]+:)/.test(i),gt=Oe(ce);function yt(i,e,t){return t&&e!==!0&&i&&ue(i)?gt:ce}const bt=["href","onClick","skipClientNav","beforeNav","safeWithNav","style","target","testId","onFocus","onKeyDown","onKeyUp","onMouseDown","onMouseUp","hideDefaultFocusRing","light","disabled","tabIndex"],vt=P("a"),St=P("button"),wt=P(we),xt=a.forwardRef(function(e,t){const r=(o,d,l)=>{const p=e.href&&!e.disabled,c=d&&!e.skipClientNav&&ue(e.href||"");return p&&c&&e.href?a.createElement(wt,y({},l,{to:e.href,role:e.role,target:e.target||void 0,"aria-disabled":e.disabled?"true":"false",ref:t}),e.children(o)):p&&!c?a.createElement(vt,y({},l,{href:e.href,role:e.role,target:e.target||void 0,"aria-disabled":e.disabled?"true":"false",ref:t}),e.children(o)):a.createElement(St,y({},l,{type:"button","aria-disabled":e.disabled,ref:t}),e.children(o))},n=o=>{const{href:d,onClick:l,skipClientNav:p,beforeNav:c=void 0,safeWithNav:g=void 0,style:v,target:f=void 0,testId:w,onFocus:S,onKeyDown:m,onKeyUp:x,onMouseDown:I,onMouseUp:N,hideDefaultFocusRing:C,light:b,disabled:k,tabIndex:T}=e,B=H(e,bt),F=yt(d,p,o),$=_=>[V.reset,V.link,!C&&_.focused&&(b?V.focusedLight:V.focused),k&&V.disabled,v];return c?a.createElement(F,{href:d,onClick:l,beforeNav:c,safeWithNav:g,onFocus:S,onKeyDown:m,onKeyUp:x,onMouseDown:I,onMouseUp:N,disabled:k,tabIndex:T},(_,D)=>r(_,o,y({},B,{"data-testid":w,style:$(_)},D))):a.createElement(F,{href:d,onClick:l,safeWithNav:g,onFocus:S,onKeyDown:m,onKeyUp:x,onMouseDown:I,onMouseUp:N,target:f,disabled:k,tabIndex:T},(_,D)=>r(_,o,y({},B,{"data-testid":w,style:$(_)},D)))};return a.createElement(Se.Consumer,null,o=>n(o))});xt.defaultProps={light:!1,disabled:!1};const V=R.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 ${s.blue}`}},focusedLight:{outline:`solid 2px ${s.white}`},disabled:{color:s.offBlack32,cursor:"not-allowed",":focus":{outline:"none"},":focus-visible":{outline:`solid 2px ${s.blue}`}}}),Ct=i=>{switch(i){case"xsmall":return"small";case"small":return"medium";case"medium":return"medium";case"large":return"medium"}},kt=i=>({xsmall:24,small:32,medium:40,large:48})[i],oe={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:z.width.thin,active:z.width.none,hovered:z.width.thin,hoveredInverse:z.width.thin},radius:{default:z.radius.medium_4}}},Rt=ze(oe,{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:z.width.none,hoveredInverse:z.width.none}}}),Et={default:oe,khanmigo:Rt},Ie=We(oe);function It(i){var e;const t=a.useContext(qe),r=(e=Et[t])!=null?e:oe;return a.createElement(Ie.Provider,{value:r},i.children)}const Tt=["color","disabled","href","icon","kind","light","size","skipClientNav","style","testId"];function _t({icon:i,size:e}){switch(Ct(e)){case"small":return a.createElement(se,{size:"small",color:"currentColor",icon:i});case"medium":default:return a.createElement(se,{size:"medium",color:"currentColor",icon:i})}}const $t=re("a"),Nt=re("button"),Bt=re(we),Ft=a.forwardRef(function(e,t){const{color:r,disabled:n,href:o,icon:d,kind:l="primary",light:p=!1,size:c="medium",skipClientNav:g,style:v,testId:f}=e,w=H(e,Tt),{theme:S,themeName:m}=Ue(Ie),x=I=>{const N=Lt(r,l,p,c,S,m),C=[jt.shared,N.default,n&&N.disabled],b=a.createElement(_t,{size:c,icon:d}),k=y({"data-testid":f,style:[C,v]},w);return o&&!n?I&&!g&&ue(o)?a.createElement(Bt,y({},k,{to:o,ref:t}),b):a.createElement($t,y({},k,{href:o,ref:t}),b):a.createElement(Nt,y({type:"button"},k,{onClick:n?void 0:w.onClick,"aria-disabled":n,ref:t}),b)};return a.createElement(Se.Consumer,null,I=>x(I))}),jt=R.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 Dt(i,e,t,r,n){switch(i){case"primary":const o=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:o,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 Lt=(i="default",e,t,r,n,o)=>{const d=i==="destructive"?n.color.stroke.critical.default:n.color.stroke.action.default,l=`${d}-${e}-${t}-${r}-${o}`;if(Y[l])return Y[l];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")}})(),c=kt(r),g=Dt(e,n,d,t,i),v=i==="destructive"?n.color.stroke.critical.inverse:n.color.stroke.action.inverse,f=i==="destructive"?n.color.stroke.critical.active:n.color.stroke.action.active,w=t?n.color.stroke.inverse:d,S=t?n.color.stroke.disabled.inverse:n.color.stroke.disabled.default,m={backgroundColor:n.color.bg.disabled,color:S,outlineColor:S},x={default:{height:c,width:c,color:p,borderRadius:n.border.radius.default,":hover":y({boxShadow:"none",color:w,borderRadius:n.border.radius.default,outlineWidth:n.border.width.default},g[":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":y({boxShadow:"none",outlineWidth:n.border.width.default,outlineColor:w,outlineOffset:1,outlineStyle:"solid",borderRadius:n.border.radius.default},g[":focus-visible"]),":active":y({color:t?v:f,outlineWidth:n.border.width.default,outlineColor:t?v:f,outlineOffset:1,outlineStyle:"solid",borderRadius:n.border.radius.default},g[":active"])},disabled:{color:S,cursor:"not-allowed",":hover":y({},m,{outline:"none"}),":active":y({},m,{outline:"none"}),":focus":{boxShadow:`0 0 0 ${n.border.width.default}px ${S}`,borderRadius:n.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":m}};return Y[l]=R.StyleSheet.create(x),Y[l]},Mt=["color","disabled","href","kind","light","size","skipClientNav","tabIndex","target"],Z=a.forwardRef(function(e,t){const{color:r="default",disabled:n=!1,href:o,kind:d="primary",light:l=!1,size:p="medium",skipClientNav:c,tabIndex:g,target:v}=e,f=H(e,Mt);function w(m){const x=m.key;!o&&(x==="Enter"||x==="Space")&&m.preventDefault()}function S(m){const x=m.key;!o&&(x==="Enter"||x==="Space")&&f.onClick&&f.onClick(m)}return a.createElement(It,null,a.createElement(Ft,y({},f,{color:r,disabled:n,href:o,kind:d,light:l,ref:t,skipClientNav:c,size:p,target:v,tabIndex:g,onKeyDown:w,onKeyUp:S})))}),Pt=""+new URL("caret-double-down-bold-XepWuyCn.svg",import.meta.url).href,At=""+new URL("caret-double-up-bold-10VQDgxI.svg",import.meta.url).href,Ot=""+new URL("caret-up-bold-0QYBH_hJ.svg",import.meta.url).href,zt=""+new URL("trash-bold-rak1tQ6r.svg",import.meta.url).href,Te=i=>{const{figureType:e,onMove:t,onRemove:r}=i;return u.jsxs(j,{style:K.container,children:[u.jsx(Ae,{startIcon:zt,"aria-label":`Delete locked ${e}`,onClick:r,kind:"tertiary",style:K.deleteButton,children:"Delete"}),t&&u.jsxs(u.Fragment,{children:[u.jsx(je,{}),u.jsx(Z,{icon:At,size:"small","aria-label":`Move locked ${e} to the back`,onClick:()=>t("back"),style:K.iconButton}),u.jsx(Z,{icon:Ot,size:"small","aria-label":`Move locked ${e} backward`,onClick:()=>t("backward"),style:K.iconButton}),u.jsx(Z,{icon:ve,size:"small","aria-label":`Move locked ${e} forward`,onClick:()=>t("forward"),style:K.iconButton}),u.jsx(Z,{icon:Pt,size:"small","aria-label":`Move locked ${e} to the front`,onClick:()=>t("front"),style:K.iconButton})]})]})},K=R.StyleSheet.create({container:{width:"100%",flexDirection:"row",alignItems:"center",marginTop:h.xxxSmall_4},deleteButton:{marginInlineStart:-h.xxxSmall_4},iconButton:{margin:0}}),Wt=Te;Te.__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 u}from"./jsx-runtime-63Ea5SlK.js";import{l as _e}from"./article-renderer-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as $e}from"./components-JJnZE9Qc.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.js";import"./index-smZ6iCr_.js";import{V as j,b as re,u as Ne,a as H,_ as y}from"./index-0DbkllkJ.js";import{c as ve,S as Be,O as ie}from"./answer-choices-BvCuCrDd.js";import{T as Fe}from"./index-V5gl6frG.js";import{S as W,a as je}from"./index-nqMmpXbO.js";import{s as h,c as s,b as z}from"./index-deFLJwr4.js";import{a as te,H as De,B as Le,L as pe}from"./index-18qWGOW7.js";import{l as R}from"./index-awljIyHI.js";import{r as a}from"./index-6oxdNXpR.js";import{S as fe}from"./scrollless-number-text-field-d5PK69vy.js";import{C as Me}from"./index-i1pBWAmI.js";import{P as se}from"./index-469F30Ub.js";import{C as Pe}from"./color-select-JWbIjxmk.js";import{B as Ae}from"./choice-Xr-SKHrB.js";import{w as Oe,c as Se,L as we}from"./react-router-dom-VIBHfbW6.js";import{m as ze,c as We,u as Ue,T as qe}from"./index-f-3iKkZU.js";const xe=i=>{const{coord:e,labels:t,error:r,style:n,onChange:o}=i,[d,l]=a.useState([e[0].toString(),e[1].toString()]);a.useEffect(()=>{l([e[0].toString(),e[1].toString()])},[e]);function p(c,g){const v=[...d];if(v[g]=c,l(v),isNaN(+c)||c==="")return;const f=[...e];f[g]=+c,o(f)}return u.jsxs(j,{style:[A.row,n],children:[u.jsxs(te,{tag:"label",style:A.row,children:[t?t[0]:"x coord",u.jsx(W,{size:h.xxSmall_6}),u.jsx(fe,{value:d[0],onChange:c=>p(c,0),style:[A.textField,r?A.errorField:void 0]})]}),u.jsx(W,{size:h.medium_16}),u.jsxs(te,{tag:"label",style:A.row,children:[t?t[1]:"y coord",u.jsx(W,{size:h.xxSmall_6}),u.jsx(fe,{value:d[1],onChange:c=>p(c,1),style:[A.textField,r?A.errorField:void 0]})]})]})},A=R.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},textField:{width:h.xxxLarge_64},errorField:{borderColor:s.red,backgroundColor:s.fadedRed8}}),Ke=xe;xe.__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(i){for(var e=1;e=0)&&(t[n]=i[n]);return t}const He=["children","id","initialExpandedIndex","allowMultipleExpanded","caretPosition","cornerKind","animated","style"],Ve=re("ul"),Xe=6;a.forwardRef(function(e,t){const{children:r,id:n,initialExpandedIndex:o,allowMultipleExpanded:d=!0,caretPosition:l,cornerKind:p="rounded",animated:c,style:g}=e,v=Ce(e,He),f=Array(r.length).fill(!1);o!==void 0&&(f[o]=!0);const[w,S]=a.useState(f),m=Array(r.length).fill(null),x=r.length<=Xe,I=(C,b)=>{const k=d?[...w]:Array(r.length).fill(!1),T=!w[C];k[C]=T,S(k),b&&b(T)},N=C=>{var b,k,T,B;const F=m.findIndex($=>$.current===document.activeElement);if(F!==-1)switch(C.key){case"ArrowUp":C.preventDefault();const $=(F+r.length-1)%r.length;(b=m[$].current)==null||b.focus();break;case"ArrowDown":C.preventDefault();const D=(F+1)%r.length;(k=m[D].current)==null||k.focus();break;case"Home":C.preventDefault(),(T=m[0].current)==null||T.focus();break;case"End":C.preventDefault(),(B=m[r.length-1].current)==null||B.focus();break}};return a.createElement(Ve,X({style:[Ge.wrapper,g],onKeyDown:N},v,{ref:t}),r.map((C,b)=>{const{caretPosition:k,cornerKind:T,onToggle:B,animated:F}=C.props,$=a.createRef();m[b]=$;const _=b===0,D=b===r.length-1;return a.createElement("li",{key:b,id:n},a.cloneElement(C,{animated:F??c,caretPosition:k??l,cornerKind:T??p,expanded:w[b],onToggle:()=>I(b,B),isFirstSection:_,isLastSection:D,isRegion:x,ref:$}))}))});const Ge=R.StyleSheet.create({wrapper:{boxSizing:"border-box",listStyle:"none",padding:0,width:"100%"}});function Qe(i,e,t,r){switch(i){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=a.forwardRef(function(e,t){const{id:r,header:n,caretPosition:o,cornerKind:d,collapsible:l=!0,expanded:p,animated:c,onClick:g,sectionContentUniqueId:v,headerStyle:f,tag:w="h2",testId:S,isFirstSection:m,isLastSection:x}=e,I=typeof n=="string",{roundedTop:N,roundedBottom:C}=Qe(d,m,x,p);return a.createElement(De,{tag:w,style:E.heading},a.createElement(Me,{id:r,"aria-expanded":p,"aria-controls":v,onClick:g,disabled:!l,testId:S?`${S}-header`:void 0,style:[E.headerWrapper,c&&E.headerWrapperWithAnimation,o==="start"&&E.headerWrapperCaretStart,N&&E.roundedTop,C&&E.roundedBottom,f,!l&&E.disabled],ref:t},()=>a.createElement(a.Fragment,null,a.createElement(j,{style:[E.headerContent,I&&E.headerString]},I?a.createElement(j,{style:[o==="end"?E.headerStringCaretEnd:E.headerStringCaretStart]},n):n),l&&a.createElement(se,{icon:ve,color:s.offBlack64,size:"small",style:[c&&E.iconWithAnimation,o==="start"?E.iconStart:E.iconEnd,p&&E.iconExpanded],testId:S?`${S}-caret-icon`:void 0}))))}),Q=h.small_12-1,me="300ms",E=R.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 ${s.activeBlue}`},":hover":{outline:`2px solid ${s.blue}`},":focus":{boxShadow:`0 0 0 2px ${s.blue}`},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":{outline:`2px solid ${s.blue}`}},headerWrapperWithAnimation:{transition:`border-radius ${me}`},headerWrapperCaretStart:{flexDirection:"row-reverse"},roundedTop:{borderStartStartRadius:Q,borderStartEndRadius:Q},roundedBottom:{borderEndStartRadius:Q,borderEndEndRadius:Q},headerContent:{flexGrow:1,textAlign:"start"},headerString:{paddingTop:h.medium_16,paddingBottom:h.medium_16},headerStringCaretEnd:{paddingInlineEnd:h.small_12,paddingInlineStart:h.medium_16},headerStringCaretStart:{paddingInlineEnd:h.medium_16,paddingInlineStart:h.small_12},iconWithAnimation:{transition:`transform ${me}`},iconExpanded:{transform:"rotate(180deg)"},iconStart:{marginInlineStart:h.medium_16},iconEnd:{marginInlineEnd:h.medium_16},disabled:{pointerEvents:"none",color:"inherit",":focus":{boxShadow:`0 0 0 2px ${s.offBlack32}`},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":{outline:`2px solid ${s.offBlack32}`}}}),Ye=["children","id","header","collapsible","expanded","animated","onToggle","caretPosition","cornerKind","style","headerStyle","tag","testId","isFirstSection","isLastSection","isRegion"],Ze=a.forwardRef(function(e,t){const{children:r,id:n,header:o,collapsible:d,expanded:l,animated:p=!1,onToggle:c,caretPosition:g="end",cornerKind:v="rounded",style:f,headerStyle:w,tag:S,testId:m,isFirstSection:x=!0,isLastSection:I=!0,isRegion:N=!0}=e,C=Ce(e,Ye),[b,k]=a.useState(l??!1),T=l!==void 0&&c,B=Ne(),F=n??B.get("accordion-section"),$=n?`${n}-header`:B.get("accordion-section-header"),_=B.get("accordion-section-content"),D=et(v,x,I),he=()=>{T?c(!l):(k(!b),c&&c(!b))};let U;return d===!1?U=!0:U=T?l:b,a.createElement(j,X({id:F,style:[M.wrapper,p&&M.wrapperWithAnimation,D.wrapper,U?M.wrapperExpanded:M.wrapperCollapsed,f],testId:m},C),a.createElement(Je,{id:$,header:o,caretPosition:g,cornerKind:v,collapsible:d,expanded:U,animated:p,onClick:he,sectionContentUniqueId:_,headerStyle:w,tag:S,testId:m,isFirstSection:x,isLastSection:I,ref:t}),a.createElement(j,{id:_,role:N?"region":void 0,"aria-labelledby":$,style:[M.contentWrapper,U?M.contentWrapperExpanded:M.conentWrapperCollapsed,D.contentWrapper],testId:m?`${m}-content-panel`:void 0},typeof r=="string"?a.createElement(Le,{style:M.stringContent},r):r))}),M=R.StyleSheet.create({wrapper:{display:"grid",position:"static",boxSizing:"border-box",backgroundColor:s.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:h.medium_16}}),J={},et=(i,e,t)=>{const r=`${i}-${e.toString()}-${t.toString()}`;if(J[r])return J[r];let n=Object.freeze({}),o=Object.freeze({}),d=Object.freeze({}),l=Object.freeze({});i==="square"&&(n={border:`1px solid ${s.offBlack16}`,borderBottom:"none",borderRadius:0},t&&(l={borderBottom:`1px solid ${s.offBlack16}`})),i==="rounded"&&(n={border:`1px solid ${s.offBlack16}`,borderBottom:"none"},e&&(d={borderStartStartRadius:h.small_12,borderStartEndRadius:h.small_12}),t&&(l={borderBottom:`1px solid ${s.offBlack16}`,borderEndStartRadius:h.small_12,borderEndEndRadius:h.small_12},o={borderEndEndRadius:h.small_12,borderEndStartRadius:h.small_12})),i==="rounded-per-section"&&(n={border:`1px solid ${s.offBlack16}`,borderRadius:h.small_12,marginBottom:h.medium_16},o={borderEndEndRadius:h.small_12,borderEndStartRadius:h.small_12});const p={wrapper:X({},n,d,l),contentWrapper:o};return J[r]=R.StyleSheet.create(p),J[r]},ke=i=>{const{children:e,header:t,expanded:r,containerStyle:n,panelStyle:o,onToggle:d}=i;return u.jsx(j,{className:"perseus-editor-accordion",children:u.jsx(Ze,{expanded:r,onToggle:d,style:[ae.container,n],headerStyle:ae.accordionHeader,header:t,children:u.jsx(j,{style:[ae.accordionPanel,o],children:e})})})},ae=R.StyleSheet.create({container:{backgroundColor:s.fadedBlue8,marginTop:h.xSmall_8},accordionHeader:{padding:h.small_12,paddingInlineEnd:0,height:h.xxLarge_48},accordionPanel:{paddingTop:h.xxSmall_6,paddingBottom:h.xxxSmall_4,paddingLeft:h.small_12,paddingRight:h.small_12}}),tt=ke;ke.__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 Re(i){const e=[];if(i)if(Array.isArray(i))for(const t of i)e.push(...Re(t));else e.push(i);else return e;return e}function Ee(i){const e=[],t=[];if(!i)return{style:{},className:""};const r=typeof global<"u"&&global.SNAPSHOT_INLINE_APHRODITE;Re(i).forEach(o=>{const d=o._definition;if(d!=null)if(r){const l={};for(const[p,c]of Object.entries(d))l[p.replace(/-[a-z]/g,g=>g[1].toUpperCase())]=c;t.push(l)}else e.push(o);else t.push(o)});const n=Object.assign({},...t);if(t.length>0&&!r){const o=R.StyleSheet.create({inlineStyles:n});e.push(o.inlineStyles)}return{style:r?n:{},className:R.css(...e)}}const rt=["children","style","tag","testId"],nt=/^h[1-6]$/,ge=R.StyleSheet.create({text:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},header:{marginTop:0,marginBottom:0}});a.forwardRef(function(e,t){let{children:r,style:n,tag:o="span",testId:d}=e,l=H(e,rt);const p=nt.test(o),c=Ee([ge.text,p&&ge.header,n]),g=l.className?[l.className,c.className].join(" "):c.className;return a.createElement(o,y({},l,{style:c.style,className:g,"data-testid":d,ref:t}),r)});const ot=["className","style"];function P(i,e){return a.forwardRef((t,r)=>{const{className:n,style:o}=t,d=H(t,ot),l=typeof i=="string"?it[i]:null,{className:p,style:c}=Ee([l,e,o]);return a.createElement(i,y({},d,{ref:r,className:[p,n].filter(Boolean).join(" "),style:c}))})}const it=R.StyleSheet.create({button:{margin:0,"::-moz-focus-inner":{border:0}}}),at=["testId","tag"],G=R.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}}),st=P("div",G.default),lt=P("article",G.default),dt=P("aside",G.default),ct=P("nav",G.default),ut=P("section",G.default);a.forwardRef(function(e,t){const{testId:r,tag:n="div"}=e,o=H(e,at),d=y({},o,{"data-testid":r});switch(n){case"article":return a.createElement(lt,y({},d,{ref:t}));case"aside":return a.createElement(dt,y({},d,{ref:t}));case"nav":return a.createElement(ct,y({},d,{ref:t}));case"section":return a.createElement(ut,y({},d,{ref:t}));case"div":return a.createElement(st,y({},d,{ref:t}));default:throw Error(`${n} is not an allowed value for the 'tag' prop`)}});let O=function(i){return i.Root="root",i.Initial="initial",i.Standard="standard",i}({});const ee=a.createContext(O.Root);ee.displayName="RenderStateContext";class ht extends a.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?a.createElement(ee.Provider,{value:O.Standard},t()):r?a.createElement(ee.Provider,{value:O.Initial},r()):null}_maybeRender(e){const{children:t,fallback:r}=this.props;switch(e){case O.Root:return this._renderAsRootComponent();case O.Initial:return r?r():null;case O.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(O.Root)}}render(){return a.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 le{get(e){return e}}le.Default=new le;var pt=le.Default;class ft extends a.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 a.createElement(ht,{fallback:()=>this._performRender(!0)},()=>this._performRender(!1))}}class de extends a.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():a.createElement(ft,{scope:t,mockOnFirstRender:!0},r=>this.renderChildren(r))}}de.defaultId="wb-id";const ye=i=>{switch(i){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}}},mt={onClick:()=>{},onMouseEnter:()=>{},onMouseLeave:()=>{},onMouseDown:()=>{},onMouseUp:()=>{},onTouchStart:()=>{},onTouchEnd:()=>{},onTouchCancel:()=>{},onKeyDown:()=>{},onKeyUp:()=>{}},q={enter:13,space:32},be={hovered:!1,focused:!1,pressed:!1,waiting:!1};class ce extends a.Component{static getDerivedStateFromProps(e,t){return e.disabled?y({},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:o=void 0}=this.props;this.enterClick||((r||n||o)&&(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 o=t.which||t.keyCode,{triggerOnEnter:d,triggerOnSpace:l}=ye(n);d&&o===q.enter||l&&o===q.space?(t.preventDefault(),this.setState({pressed:!0})):!d&&o===q.enter&&(this.enterClick=!0)},this.handleKeyUp=t=>{const{onKeyUp:r,role:n}=this.props;r&&r(t);const o=t.which||t.keyCode,{triggerOnEnter:d,triggerOnSpace:l}=ye(n);d&&o===q.enter||l&&o===q.space?(this.setState({pressed:!1,focused:!0}),this.runCallbackAndMaybeNavigate(t)):!d&&o===q.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:o=void 0}=this.props;r&&(o==="_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(o=>{}).finally(()=>{this.navigateOrReset(t)}))}runCallbackAndMaybeNavigate(e){const{onClick:t=void 0,beforeNav:r=void 0,safeWithNav:n=void 0,href:o,type:d}=this.props;let l=!0,p=!0;if(t&&t(e),e.defaultPrevented&&(l=!1,p=!1),e.preventDefault(),!o&&d==="submit"&&p){let c=e.currentTarget;for(;c;){if(c instanceof window.HTMLFormElement){const g=new window.Event("submit",{bubbles:!0,cancelable:!0});c.dispatchEvent(g);break}c=c.parentElement}}if(r)this.setState({waiting:!0}),r().then(()=>n?this.handleSafeWithNav(n,l):this.navigateOrReset(l)).catch(()=>{});else{if(n)return this.handleSafeWithNav(n,l);this.navigateOrReset(l)}}render(){const e=this.props.rel||(this.props.target==="_blank"?"noopener noreferrer":void 0),t=this.props.disabled?y({},mt,{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)}}ce.defaultProps={disabled:!1};const ue=i=>typeof i!="string"?!1:!/^(https?:)?\/\//i.test(i)&&!/^([^#]*#[\w-]*|[\w\-.]+:)/.test(i),gt=Oe(ce);function yt(i,e,t){return t&&e!==!0&&i&&ue(i)?gt:ce}const bt=["href","onClick","skipClientNav","beforeNav","safeWithNav","style","target","testId","onFocus","onKeyDown","onKeyUp","onMouseDown","onMouseUp","hideDefaultFocusRing","light","disabled","tabIndex"],vt=P("a"),St=P("button"),wt=P(we),xt=a.forwardRef(function(e,t){const r=(o,d,l)=>{const p=e.href&&!e.disabled,c=d&&!e.skipClientNav&&ue(e.href||"");return p&&c&&e.href?a.createElement(wt,y({},l,{to:e.href,role:e.role,target:e.target||void 0,"aria-disabled":e.disabled?"true":"false",ref:t}),e.children(o)):p&&!c?a.createElement(vt,y({},l,{href:e.href,role:e.role,target:e.target||void 0,"aria-disabled":e.disabled?"true":"false",ref:t}),e.children(o)):a.createElement(St,y({},l,{type:"button","aria-disabled":e.disabled,ref:t}),e.children(o))},n=o=>{const{href:d,onClick:l,skipClientNav:p,beforeNav:c=void 0,safeWithNav:g=void 0,style:v,target:f=void 0,testId:w,onFocus:S,onKeyDown:m,onKeyUp:x,onMouseDown:I,onMouseUp:N,hideDefaultFocusRing:C,light:b,disabled:k,tabIndex:T}=e,B=H(e,bt),F=yt(d,p,o),$=_=>[V.reset,V.link,!C&&_.focused&&(b?V.focusedLight:V.focused),k&&V.disabled,v];return c?a.createElement(F,{href:d,onClick:l,beforeNav:c,safeWithNav:g,onFocus:S,onKeyDown:m,onKeyUp:x,onMouseDown:I,onMouseUp:N,disabled:k,tabIndex:T},(_,D)=>r(_,o,y({},B,{"data-testid":w,style:$(_)},D))):a.createElement(F,{href:d,onClick:l,safeWithNav:g,onFocus:S,onKeyDown:m,onKeyUp:x,onMouseDown:I,onMouseUp:N,target:f,disabled:k,tabIndex:T},(_,D)=>r(_,o,y({},B,{"data-testid":w,style:$(_)},D)))};return a.createElement(Se.Consumer,null,o=>n(o))});xt.defaultProps={light:!1,disabled:!1};const V=R.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 ${s.blue}`}},focusedLight:{outline:`solid 2px ${s.white}`},disabled:{color:s.offBlack32,cursor:"not-allowed",":focus":{outline:"none"},":focus-visible":{outline:`solid 2px ${s.blue}`}}}),Ct=i=>{switch(i){case"xsmall":return"small";case"small":return"medium";case"medium":return"medium";case"large":return"medium"}},kt=i=>({xsmall:24,small:32,medium:40,large:48})[i],oe={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:z.width.thin,active:z.width.none,hovered:z.width.thin,hoveredInverse:z.width.thin},radius:{default:z.radius.medium_4}}},Rt=ze(oe,{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:z.width.none,hoveredInverse:z.width.none}}}),Et={default:oe,khanmigo:Rt},Ie=We(oe);function It(i){var e;const t=a.useContext(qe),r=(e=Et[t])!=null?e:oe;return a.createElement(Ie.Provider,{value:r},i.children)}const Tt=["color","disabled","href","icon","kind","light","size","skipClientNav","style","testId"];function _t({icon:i,size:e}){switch(Ct(e)){case"small":return a.createElement(se,{size:"small",color:"currentColor",icon:i});case"medium":default:return a.createElement(se,{size:"medium",color:"currentColor",icon:i})}}const $t=re("a"),Nt=re("button"),Bt=re(we),Ft=a.forwardRef(function(e,t){const{color:r,disabled:n,href:o,icon:d,kind:l="primary",light:p=!1,size:c="medium",skipClientNav:g,style:v,testId:f}=e,w=H(e,Tt),{theme:S,themeName:m}=Ue(Ie),x=I=>{const N=Lt(r,l,p,c,S,m),C=[jt.shared,N.default,n&&N.disabled],b=a.createElement(_t,{size:c,icon:d}),k=y({"data-testid":f,style:[C,v]},w);return o&&!n?I&&!g&&ue(o)?a.createElement(Bt,y({},k,{to:o,ref:t}),b):a.createElement($t,y({},k,{href:o,ref:t}),b):a.createElement(Nt,y({type:"button"},k,{onClick:n?void 0:w.onClick,"aria-disabled":n,ref:t}),b)};return a.createElement(Se.Consumer,null,I=>x(I))}),jt=R.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 Dt(i,e,t,r,n){switch(i){case"primary":const o=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:o,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 Lt=(i="default",e,t,r,n,o)=>{const d=i==="destructive"?n.color.stroke.critical.default:n.color.stroke.action.default,l=`${d}-${e}-${t}-${r}-${o}`;if(Y[l])return Y[l];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")}})(),c=kt(r),g=Dt(e,n,d,t,i),v=i==="destructive"?n.color.stroke.critical.inverse:n.color.stroke.action.inverse,f=i==="destructive"?n.color.stroke.critical.active:n.color.stroke.action.active,w=t?n.color.stroke.inverse:d,S=t?n.color.stroke.disabled.inverse:n.color.stroke.disabled.default,m={backgroundColor:n.color.bg.disabled,color:S,outlineColor:S},x={default:{height:c,width:c,color:p,borderRadius:n.border.radius.default,":hover":y({boxShadow:"none",color:w,borderRadius:n.border.radius.default,outlineWidth:n.border.width.default},g[":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":y({boxShadow:"none",outlineWidth:n.border.width.default,outlineColor:w,outlineOffset:1,outlineStyle:"solid",borderRadius:n.border.radius.default},g[":focus-visible"]),":active":y({color:t?v:f,outlineWidth:n.border.width.default,outlineColor:t?v:f,outlineOffset:1,outlineStyle:"solid",borderRadius:n.border.radius.default},g[":active"])},disabled:{color:S,cursor:"not-allowed",":hover":y({},m,{outline:"none"}),":active":y({},m,{outline:"none"}),":focus":{boxShadow:`0 0 0 ${n.border.width.default}px ${S}`,borderRadius:n.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":m}};return Y[l]=R.StyleSheet.create(x),Y[l]},Mt=["color","disabled","href","kind","light","size","skipClientNav","tabIndex","target"],Z=a.forwardRef(function(e,t){const{color:r="default",disabled:n=!1,href:o,kind:d="primary",light:l=!1,size:p="medium",skipClientNav:c,tabIndex:g,target:v}=e,f=H(e,Mt);function w(m){const x=m.key;!o&&(x==="Enter"||x==="Space")&&m.preventDefault()}function S(m){const x=m.key;!o&&(x==="Enter"||x==="Space")&&f.onClick&&f.onClick(m)}return a.createElement(It,null,a.createElement(Ft,y({},f,{color:r,disabled:n,href:o,kind:d,light:l,ref:t,skipClientNav:c,size:p,target:v,tabIndex:g,onKeyDown:w,onKeyUp:S})))}),Pt=""+new URL("caret-double-down-bold-XepWuyCn.svg",import.meta.url).href,At=""+new URL("caret-double-up-bold-10VQDgxI.svg",import.meta.url).href,Ot=""+new URL("caret-up-bold-0QYBH_hJ.svg",import.meta.url).href,zt=""+new URL("trash-bold-rak1tQ6r.svg",import.meta.url).href,Te=i=>{const{figureType:e,onMove:t,onRemove:r}=i;return u.jsxs(j,{style:K.container,children:[u.jsx(Ae,{startIcon:zt,"aria-label":`Delete locked ${e}`,onClick:r,kind:"tertiary",style:K.deleteButton,children:"Delete"}),t&&u.jsxs(u.Fragment,{children:[u.jsx(je,{}),u.jsx(Z,{icon:At,size:"small","aria-label":`Move locked ${e} to the back`,onClick:()=>t("back"),style:K.iconButton}),u.jsx(Z,{icon:Ot,size:"small","aria-label":`Move locked ${e} backward`,onClick:()=>t("backward"),style:K.iconButton}),u.jsx(Z,{icon:ve,size:"small","aria-label":`Move locked ${e} forward`,onClick:()=>t("forward"),style:K.iconButton}),u.jsx(Z,{icon:Pt,size:"small","aria-label":`Move locked ${e} to the front`,onClick:()=>t("front"),style:K.iconButton})]})]})},K=R.StyleSheet.create({container:{width:"100%",flexDirection:"row",alignItems:"center",marginTop:h.xxxSmall_4},deleteButton:{marginInlineStart:-h.xxxSmall_4},iconButton:{margin:0}}),Wt=Te;Te.__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:Ut}=$e;function qt(i){const{type:e,coord:t,color:r,size:n,text:o,expanded:d,onChangeProps:l,onMove:p,onRemove:c,onToggle:g,containerStyle:v}=i;return u.jsxs(tt,{expanded:d,onToggle:g,header:u.jsxs(j,{style:[L.row,L.accordionHeaderContainer],children:[u.jsxs(pe,{children:["Label (",t[0],", ",t[1],")"]}),u.jsx(W,{size:h.xSmall_8}),o!==""&&u.jsx(pe,{style:[{backgroundColor:s.white,color:_e[r]},L.accordionHeader],children:o})]}),containerStyle:v,children:[u.jsx(Ke,{coord:t,onChange:f=>{l({coord:f})},style:L.spaceUnder}),u.jsxs(j,{style:L.row,children:[u.jsxs(te,{tag:"label",style:[L.row,L.spaceUnder,{flexGrow:1}],children:["text",u.jsx(W,{size:h.xSmall_8}),u.jsx(Fe,{value:o,placeholder:"ex. x^2 or \\frac{1}{2}",onChange:f=>l({text:f})})]}),u.jsxs(Ut,{children:["Surround your text with $ for TeX.",u.jsx("br",{}),"Example: ","This circle has radius $\\frac{1}{2}$ units.",u.jsx("br",{}),u.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.']})]}),u.jsxs(j,{style:L.row,children:[u.jsx(Pe,{selectedValue:r,onChange:f=>{l({color:f})},style:L.spaceUnder}),u.jsx(W,{size:h.medium_16}),u.jsxs(te,{tag:"label",style:L.row,children:["size",u.jsx(W,{size:h.xSmall_8}),u.jsxs(Be,{selectedValue:n,onChange:f=>l({size:f}),placeholder:"",children:[u.jsx(ie,{value:"small",label:"small"}),u.jsx(ie,{value:"medium",label:"medium"}),u.jsx(ie,{value:"large",label:"large"})]})]})]}),u.jsx(Wt,{figureType:e,onMove:p,onRemove:c})]})}const L=R.StyleSheet.create({accordionHeaderContainer:{whiteSpace:"nowrap"},accordionHeader:{padding:h.xxxSmall_4,marginInlineEnd:h.xSmall_8,borderRadius:h.xxxSmall_4,textOverflow:"ellipsis",overflow:"hidden"},row:{display:"flex",flexDirection:"row",alignItems:"center",minWidth:0},spaceUnder:{marginBottom:h.xSmall_8}});qt.__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:"signature",type:"object",raw:`{ diff --git a/assets/locked-label-settings.stories-puGSPKU3.js b/assets/locked-label-settings.stories-qj3aVlWg.js similarity index 78% rename from assets/locked-label-settings.stories-puGSPKU3.js rename to assets/locked-label-settings.stories-qj3aVlWg.js index a9eb643fcb..1ff366ebd6 100644 --- a/assets/locked-label-settings.stories-puGSPKU3.js +++ b/assets/locked-label-settings.stories-qj3aVlWg.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-Q_sgivvq.js";import{g as x}from"./util-WOIF_4W1.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./components-ODdjt0Ld.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-oJZpOIQc.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-sHo8DjC4.js";import{g as x}from"./util-uQZZCXuL.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-JWbIjxmk.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-X29AVEXv.js b/assets/locked-line-settings-WUX1i1E1.js similarity index 97% rename from assets/locked-line-settings-X29AVEXv.js rename to assets/locked-line-settings-WUX1i1E1.js index 4be253f6d7..ad9792d23d 100644 --- a/assets/locked-line-settings-X29AVEXv.js +++ b/assets/locked-line-settings-WUX1i1E1.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-SJp9oQsg.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-DMjwSLKk.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-Q_sgivvq.js";import{C as ne}from"./color-select-oJZpOIQc.js";import{L as ae}from"./line-stroke-select-tLzFP-jE.js";import{L as le}from"./line-swatch-5z1mrdDY.js";import{L as N}from"./locked-point-settings-hNpBYzsr.js";import{g as te,j as T,a as oe}from"./util-WOIF_4W1.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-FcZanvM1.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-BvCuCrDd.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-G5ecBSuw.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-sHo8DjC4.js";import{C as ne}from"./color-select-JWbIjxmk.js";import{L as ae}from"./line-stroke-select-OgLwffrZ.js";import{L as le}from"./line-swatch-wstb9auL.js";import{L as N}from"./locked-point-settings-yOnHJo2I.js";import{g as te,j as T,a as oe}from"./util-uQZZCXuL.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-h22MKy4T.js b/assets/locked-line-settings.stories-2DG1DQtc.js similarity index 83% rename from assets/locked-line-settings.stories-h22MKy4T.js rename to assets/locked-line-settings.stories-2DG1DQtc.js index 1467664edf..1076262e42 100644 --- a/assets/locked-line-settings.stories-h22MKy4T.js +++ b/assets/locked-line-settings.stories-2DG1DQtc.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-X29AVEXv.js";import{g as h}from"./util-WOIF_4W1.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-SJp9oQsg.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-2Ae1Nml7.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-DMjwSLKk.js";import"./article-renderer-jwwMfp2y.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./components-ODdjt0Ld.js";import"./locked-label-settings-Q_sgivvq.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-oJZpOIQc.js";import"./line-stroke-select-tLzFP-jE.js";import"./line-swatch-5z1mrdDY.js";import"./locked-point-settings-hNpBYzsr.js";import"./labeled-switch-H2OzEdZH.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-WUX1i1E1.js";import{g as h}from"./util-uQZZCXuL.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-FcZanvM1.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-BvCuCrDd.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-IhFUya5i.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-G5ecBSuw.js";import"./article-renderer-m2DxR4DL.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.js";import"./locked-label-settings-sHo8DjC4.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-JWbIjxmk.js";import"./line-stroke-select-OgLwffrZ.js";import"./line-swatch-wstb9auL.js";import"./locked-point-settings-yOnHJo2I.js";import"./labeled-switch-bgXqZg-6.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-hNpBYzsr.js b/assets/locked-point-settings-yOnHJo2I.js similarity index 96% rename from assets/locked-point-settings-hNpBYzsr.js rename to assets/locked-point-settings-yOnHJo2I.js index 56f03646c6..0ffb60efe6 100644 --- a/assets/locked-point-settings-hNpBYzsr.js +++ b/assets/locked-point-settings-yOnHJo2I.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-DMjwSLKk.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-Q_sgivvq.js";import{C as H}from"./color-select-oJZpOIQc.js";import{C as J,g as K,j as Q,a as Y}from"./util-WOIF_4W1.js";import{L as q}from"./labeled-switch-H2OzEdZH.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-G5ecBSuw.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-sHo8DjC4.js";import{C as H}from"./color-select-JWbIjxmk.js";import{C as J,g as K,j as Q,a as Y}from"./util-uQZZCXuL.js";import{L as q}from"./labeled-switch-bgXqZg-6.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-s6R9aIqR.js b/assets/locked-point-settings.stories-afZkUn61.js similarity index 82% rename from assets/locked-point-settings.stories-s6R9aIqR.js rename to assets/locked-point-settings.stories-afZkUn61.js index d9ccbf36ee..a147f65ef2 100644 --- a/assets/locked-point-settings.stories-s6R9aIqR.js +++ b/assets/locked-point-settings.stories-afZkUn61.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-hNpBYzsr.js";import{g as w}from"./util-WOIF_4W1.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-DMjwSLKk.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./components-ODdjt0Ld.js";import"./locked-label-settings-Q_sgivvq.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-oJZpOIQc.js";import"./labeled-switch-H2OzEdZH.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-yOnHJo2I.js";import{g as w}from"./util-uQZZCXuL.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-G5ecBSuw.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.js";import"./locked-label-settings-sHo8DjC4.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-JWbIjxmk.js";import"./labeled-switch-bgXqZg-6.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-F-dWbN7O.js b/assets/locked-polygon-settings-X00uUZoT.js similarity index 93% rename from assets/locked-polygon-settings-F-dWbN7O.js rename to assets/locked-polygon-settings-X00uUZoT.js index 32a9224cd5..fea9a8c959 100644 --- a/assets/locked-polygon-settings-F-dWbN7O.js +++ b/assets/locked-polygon-settings-X00uUZoT.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{l as j,a as F}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-SJp9oQsg.js";import{P as S,C as X,I as g,L as G,a as H}from"./locked-label-settings-Q_sgivvq.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-DMjwSLKk.js";import{l as A}from"./index-awljIyHI.js";import{C as Q}from"./color-select-oJZpOIQc.js";import{L as Y}from"./labeled-switch-H2OzEdZH.js";import{L as Z}from"./line-stroke-select-tLzFP-jE.js";import{g as ee,j as re,a as ne}from"./util-WOIF_4W1.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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-BvCuCrDd.js";import{P as S,C as X,I as g,L as G,a as H}from"./locked-label-settings-sHo8DjC4.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-G5ecBSuw.js";import{l as A}from"./index-awljIyHI.js";import{C as Q}from"./color-select-JWbIjxmk.js";import{L as Y}from"./labeled-switch-bgXqZg-6.js";import{L as Z}from"./line-stroke-select-OgLwffrZ.js";import{g as ee,j as re,a as ne}from"./util-uQZZCXuL.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-dbthaiWi.js b/assets/locked-polygon-settings.stories-TZ8ICcx_.js similarity index 81% rename from assets/locked-polygon-settings.stories-dbthaiWi.js rename to assets/locked-polygon-settings.stories-TZ8ICcx_.js index 7cce93ba29..7c22f7fcc6 100644 --- a/assets/locked-polygon-settings.stories-dbthaiWi.js +++ b/assets/locked-polygon-settings.stories-TZ8ICcx_.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-F-dWbN7O.js";import{g as C}from"./util-WOIF_4W1.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./locked-label-settings-Q_sgivvq.js";import"./components-ODdjt0Ld.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-oJZpOIQc.js";import"./locked-figure-aria-DMjwSLKk.js";import"./labeled-switch-H2OzEdZH.js";import"./line-stroke-select-tLzFP-jE.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-X00uUZoT.js";import{g as C}from"./util-uQZZCXuL.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./locked-label-settings-sHo8DjC4.js";import"./components-JJnZE9Qc.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-JWbIjxmk.js";import"./locked-figure-aria-G5ecBSuw.js";import"./labeled-switch-bgXqZg-6.js";import"./line-stroke-select-OgLwffrZ.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-teFof_kC.js b/assets/locked-vector-settings-02mN1v7Q.js similarity index 97% rename from assets/locked-vector-settings-teFof_kC.js rename to assets/locked-vector-settings-02mN1v7Q.js index e749e92dae..b062fdfa26 100644 --- a/assets/locked-vector-settings-teFof_kC.js +++ b/assets/locked-vector-settings-02mN1v7Q.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-DMjwSLKk.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-Q_sgivvq.js";import{C as G}from"./color-select-oJZpOIQc.js";import{L as H}from"./line-swatch-5z1mrdDY.js";import{g as J,j as K,a as Q}from"./util-WOIF_4W1.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-FcZanvM1.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-G5ecBSuw.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-sHo8DjC4.js";import{C as G}from"./color-select-JWbIjxmk.js";import{L as H}from"./line-swatch-wstb9auL.js";import{g as J,j as K,a as Q}from"./util-uQZZCXuL.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-FZTFtkqP.js b/assets/locked-vector-settings.stories-bPZpickT.js similarity index 80% rename from assets/locked-vector-settings.stories-FZTFtkqP.js rename to assets/locked-vector-settings.stories-bPZpickT.js index be4e56a69c..14b75d8041 100644 --- a/assets/locked-vector-settings.stories-FZTFtkqP.js +++ b/assets/locked-vector-settings.stories-bPZpickT.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-teFof_kC.js";import{g as k}from"./util-WOIF_4W1.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-DMjwSLKk.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./components-ODdjt0Ld.js";import"./locked-label-settings-Q_sgivvq.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-oJZpOIQc.js";import"./line-swatch-5z1mrdDY.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-02mN1v7Q.js";import{g as k}from"./util-uQZZCXuL.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-FcZanvM1.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-G5ecBSuw.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.js";import"./locked-label-settings-sHo8DjC4.js";import"./scrollless-number-text-field-d5PK69vy.js";import"./color-select-JWbIjxmk.js";import"./line-swatch-wstb9auL.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-Hd-8N1dg.js b/assets/marker-zKJG4WlZ.js similarity index 96% rename from assets/marker-Hd-8N1dg.js rename to assets/marker-zKJG4WlZ.js index 5b8245fe40..962b801e48 100644 --- a/assets/marker-Hd-8N1dg.js +++ b/assets/marker-zKJG4WlZ.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-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as x}from"./components-JJnZE9Qc.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-sirTJF7M.js b/assets/marker-zOWMpEAL.js similarity index 99% rename from assets/marker-sirTJF7M.js rename to assets/marker-zOWMpEAL.js index ec57545d41..0d155319d5 100644 --- a/assets/marker-sirTJF7M.js +++ b/assets/marker-zOWMpEAL.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-ZZeQEGrZ.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-1rH5rJkp.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.stories-zNB6zErC.js b/assets/marker.stories-0butrb5y.js similarity index 81% rename from assets/marker.stories-zNB6zErC.js rename to assets/marker.stories-0butrb5y.js index 66cf954963..658b3b3cdd 100644 --- a/assets/marker.stories-zNB6zErC.js +++ b/assets/marker.stories-0butrb5y.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-Hd-8N1dg.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.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-zKJG4WlZ.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.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-x3NEwLJn.js b/assets/marker.stories-AV1Yfm5l.js similarity index 96% rename from assets/marker.stories-x3NEwLJn.js rename to assets/marker.stories-AV1Yfm5l.js index 6c1ed0db7d..44df42609e 100644 --- a/assets/marker.stories-x3NEwLJn.js +++ b/assets/marker.stories-AV1Yfm5l.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-sirTJF7M.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-ZZeQEGrZ.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-2Ae1Nml7.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-zOWMpEAL.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-1rH5rJkp.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-IhFUya5i.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-FcZanvM1.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 => { const props = { answers: ["BMW", "Ferrari"], selected: [], diff --git a/assets/matcher-editor-AxlX3C-j.js b/assets/matcher-editor-VfYBBAUU.js similarity index 90% rename from assets/matcher-editor-AxlX3C-j.js rename to assets/matcher-editor-VfYBBAUU.js index 2cc5af075f..678ef0526e 100644 --- a/assets/matcher-editor-AxlX3C-j.js +++ b/assets/matcher-editor-VfYBBAUU.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as h}from"./components-JJnZE9Qc.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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}; diff --git a/assets/matcher-editor.stories--gvma5VJ.js b/assets/matcher-editor.stories-pKbf4W7F.js similarity index 74% rename from assets/matcher-editor.stories--gvma5VJ.js rename to assets/matcher-editor.stories-pKbf4W7F.js index c27e1cc264..f20caf1309 100644 --- a/assets/matcher-editor.stories--gvma5VJ.js +++ b/assets/matcher-editor.stories-pKbf4W7F.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-AxlX3C-j.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.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-VfYBBAUU.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.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 => { 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-X8SHuh8h.js b/assets/matcher.stories-w0tpOh2-.js similarity index 81% rename from assets/matcher.stories-X8SHuh8h.js rename to assets/matcher.stories-w0tpOh2-.js index 84419d5c52..b6aa5aaef6 100644 --- a/assets/matcher.stories-X8SHuh8h.js +++ b/assets/matcher.stories-w0tpOh2-.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{R as m}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.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-kDK3rFWv.js b/assets/matrix.stories-d7XiDgqo.js similarity index 78% rename from assets/matrix.stories-kDK3rFWv.js rename to assets/matrix.stories-d7XiDgqo.js index 661b0eca3b..d5e0046138 100644 --- a/assets/matrix.stories-kDK3rFWv.js +++ b/assets/matrix.stories-d7XiDgqo.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{R as p}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.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-t1jjN0h8.js b/assets/multi-items-KIV3SbJE.js similarity index 94% rename from assets/multi-items-t1jjN0h8.js rename to assets/multi-items-KIV3SbJE.js index 7806e8dfbd..0f60222d2e 100644 --- a/assets/multi-items-t1jjN0h8.js +++ b/assets/multi-items-KIV3SbJE.js @@ -1 +1 @@ -import{M as s,s as p,b as a,f,a as u,i as y}from"./perseus-item-9YLLcbpB.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-N_w_I8xw.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}; diff --git a/assets/multi-renderer.stories-Q6YTs86k.js b/assets/multi-renderer.stories-64FhqD4V.js similarity index 99% rename from assets/multi-renderer.stories-Q6YTs86k.js rename to assets/multi-renderer.stories-64FhqD4V.js index df66212b33..7df9c8f39f 100644 --- a/assets/multi-renderer.stories-Q6YTs86k.js +++ b/assets/multi-renderer.stories-64FhqD4V.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-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-t1jjN0h8.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-fOZQW4nE.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-D8O3Xswb.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./shared-4TdECMLk.js";import"./answer-choices-SJp9oQsg.js";import"./minus-bold-ONmDo3Ve.js";import"./asset-context-H6Iqp7Gi.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.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-OdYPsA-W.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./register-all-widgets-for-testing-IqvoTTry.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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-KIV3SbJE.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-iQhk5A81.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-cAdD85Lh.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./shared-4TdECMLk.js";import"./answer-choices-BvCuCrDd.js";import"./minus-bold-ONmDo3Ve.js";import"./asset-context-H6Iqp7Gi.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.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-cKXRS8bE.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./register-all-widgets-for-testing-0z8sJlZ3.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-line-editor-V9wGJGbX.js b/assets/number-line-editor-X3MuZsf0.js similarity index 96% rename from assets/number-line-editor-V9wGJGbX.js rename to assets/number-line-editor-X3MuZsf0.js index 154524d084..c4dfde1db1 100644 --- a/assets/number-line-editor-V9wGJGbX.js +++ b/assets/number-line-editor-X3MuZsf0.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{i as v}from"./util-AYeX86gl.js";import"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-N_KGPfNT.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as j}from"./components-JJnZE9Qc.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.js";import"./index-smZ6iCr_.js";import{E as k}from"./editor-jsonify-Xq2j5Ptn.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}; diff --git a/assets/number-line-editor.stories-1B6GBGYc.js b/assets/number-line-editor.stories-df50jfc5.js similarity index 74% rename from assets/number-line-editor.stories-1B6GBGYc.js rename to assets/number-line-editor.stories-df50jfc5.js index 9751291ddd..a6d5d64b67 100644 --- a/assets/number-line-editor.stories-1B6GBGYc.js +++ b/assets/number-line-editor.stories-df50jfc5.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-V9wGJGbX.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./components-ODdjt0Ld.js";import"./editor-jsonify-N_KGPfNT.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-X3MuZsf0.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-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.js";import"./editor-jsonify-Xq2j5Ptn.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 => { 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-urFoRWpS.js b/assets/number-line.stories-RLBZ8xng.js similarity index 85% rename from assets/number-line.stories-urFoRWpS.js rename to assets/number-line.stories-RLBZ8xng.js index eb8a485d7f..1401c9e304 100644 --- a/assets/number-line.stories-urFoRWpS.js +++ b/assets/number-line.stories-RLBZ8xng.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-rlAJ1oPQ.js";import{S as x}from"./server-item-renderer-with-debug-ui-ZouO16-6.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.js";import"./ke-score-ui-AQ1XUyPU.js";import"./test-dependencies-fOZQW4nE.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-Hlx8S3_1.js";import{S as x}from"./server-item-renderer-with-debug-ui-4efEH9Ok.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.js";import"./ke-score-ui-AQ1XUyPU.js";import"./test-dependencies-iQhk5A81.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-qBNHWsXs.js b/assets/numeric-input-editor-Ms-T6-c5.js similarity index 99% rename from assets/numeric-input-editor-qBNHWsXs.js rename to assets/numeric-input-editor-Ms-T6-c5.js index 04ad2374c0..37b8205bf6 100644 --- a/assets/numeric-input-editor-qBNHWsXs.js +++ b/assets/numeric-input-editor-Ms-T6-c5.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{c as N}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-N_KGPfNT.js";import{C as b}from"./index-V5gl6frG.js";import{r as z}from"./index-6oxdNXpR.js";import{E as L}from"./editor-MI6542O9.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as I}from"./components-JJnZE9Qc.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-FcZanvM1.js";import"./index-smZ6iCr_.js";import{E as C}from"./editor-jsonify-Xq2j5Ptn.js";import{C as b}from"./index-V5gl6frG.js";import{r as z}from"./index-6oxdNXpR.js";import{E as L}from"./editor-G-UjVjKd.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-qzbU33sG.js b/assets/numeric-input-editor.stories-7CjFC-Bf.js similarity index 74% rename from assets/numeric-input-editor.stories-qzbU33sG.js rename to assets/numeric-input-editor.stories-7CjFC-Bf.js index fd3226d419..706e1d47e5 100644 --- a/assets/numeric-input-editor.stories-qzbU33sG.js +++ b/assets/numeric-input-editor.stories-7CjFC-Bf.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-qBNHWsXs.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./components-ODdjt0Ld.js";import"./editor-jsonify-N_KGPfNT.js";import"./editor-MI6542O9.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-Rtk7iZI-.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-Ms-T6-c5.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.js";import"./editor-jsonify-Xq2j5Ptn.js";import"./editor-G-UjVjKd.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-5uzo1xSa.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-XBusYOqD.js b/assets/numeric-input.stories-krG2YiAw.js similarity index 91% rename from assets/numeric-input.stories-XBusYOqD.js rename to assets/numeric-input.stories-krG2YiAw.js index b06bc77aa4..97d0f71a65 100644 --- a/assets/numeric-input.stories-XBusYOqD.js +++ b/assets/numeric-input.stories-krG2YiAw.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-rlAJ1oPQ.js";import{N as a}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./renderer-2Ae1Nml7.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-dH4zQ5yQ.js";import"./shared-4TdECMLk.js";import"./base-radio-ZvkGSpa4.js";import"./choice-none-above-OdYPsA-W.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-IqvoTTry.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./enums-x5qaTru7.js";import"./input-with-examples-D8O3Xswb.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./answer-choices-SJp9oQsg.js";import"./marker-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.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-Hlx8S3_1.js";import{N as a}from"./article-renderer-m2DxR4DL.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-N_w_I8xw.js";import"./renderer-IhFUya5i.js";import"./index-J2t_5nK1.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-b_P2F9w3.js";import"./shared-4TdECMLk.js";import"./base-radio-DUduhCT2.js";import"./choice-none-above-cKXRS8bE.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-0z8sJlZ3.js";import"./index-smZ6iCr_.js";import"./tiny-invariant-bHgPayXn.js";import"./enums-x5qaTru7.js";import"./input-with-examples-cAdD85Lh.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./answer-choices-BvCuCrDd.js";import"./marker-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.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-FCd3dilX.js b/assets/orderer.stories-i6ImYLYC.js similarity index 84% rename from assets/orderer.stories-FCd3dilX.js rename to assets/orderer.stories-i6ImYLYC.js index f5fa5ca431..cc21bcc0d3 100644 --- a/assets/orderer.stories-FCd3dilX.js +++ b/assets/orderer.stories-i6ImYLYC.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-63Ea5SlK.js";import{R as n}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.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-SyRBFTE0.js b/assets/passage-ref.stories-7UxxK3Xv.js similarity index 90% rename from assets/passage-ref.stories-SyRBFTE0.js rename to assets/passage-ref.stories-7UxxK3Xv.js index 7ae1a739e7..73e7193ad2 100644 --- a/assets/passage-ref.stories-SyRBFTE0.js +++ b/assets/passage-ref.stories-7UxxK3Xv.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-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.js";const u={content:`[[☃ passage 1]] We can see the word “promotes” is used in [[☃ passage-ref 1]] diff --git a/assets/passage.stories-QVGoD6W2.js b/assets/passage.stories-U48vfP3H.js similarity index 92% rename from assets/passage.stories-QVGoD6W2.js rename to assets/passage.stories-U48vfP3H.js index 83eea0e983..24e9f699b5 100644 --- a/assets/passage.stories-QVGoD6W2.js +++ b/assets/passage.stories-U48vfP3H.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-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.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-item-9YLLcbpB.js b/assets/perseus-item-N_w_I8xw.js similarity index 99% rename from assets/perseus-item-9YLLcbpB.js rename to assets/perseus-item-N_w_I8xw.js index 196d6359aa..1ff0dee3b0 100644 --- a/assets/perseus-item-9YLLcbpB.js +++ b/assets/perseus-item-N_w_I8xw.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-jwwMfp2y.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-2Ae1Nml7.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-dH4zQ5yQ.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-m2DxR4DL.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-IhFUya5i.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-b_P2F9w3.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-FcZanvM1.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; diff --git a/assets/phet-simulation-editor-YDXi7iT_.js b/assets/phet-simulation-editor-d4l-9Rog.js similarity index 87% rename from assets/phet-simulation-editor-YDXi7iT_.js rename to assets/phet-simulation-editor-d4l-9Rog.js index cbe922f744..7be76144cb 100644 --- a/assets/phet-simulation-editor-YDXi7iT_.js +++ b/assets/phet-simulation-editor-d4l-9Rog.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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:`{ // 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-4UWsWR8g.js b/assets/phet-simulation-editor.stories-GoUfT7PD.js similarity index 76% rename from assets/phet-simulation-editor.stories-4UWsWR8g.js rename to assets/phet-simulation-editor.stories-GoUfT7PD.js index 00782794ef..04e871e8cd 100644 --- a/assets/phet-simulation-editor.stories-4UWsWR8g.js +++ b/assets/phet-simulation-editor.stories-GoUfT7PD.js @@ -1,4 +1,4 @@ -import{a as m}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{P as p}from"./phet-simulation-editor-YDXi7iT_.js";import"./v4-yQnnJER4.js";import"./jsx-runtime-63Ea5SlK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.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-d4l-9Rog.js";import"./v4-yQnnJER4.js";import"./jsx-runtime-63Ea5SlK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.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-_Qyzx93P.js b/assets/plotter.stories-4QZEiAcq.js similarity index 80% rename from assets/plotter.stories-_Qyzx93P.js rename to assets/plotter.stories-4QZEiAcq.js index 575cd13eed..1062ad0e9d 100644 --- a/assets/plotter.stories-_Qyzx93P.js +++ b/assets/plotter.stories-4QZEiAcq.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-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.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-CKEBPZQH.js b/assets/preview-H8sA0bwg.js similarity index 74% rename from assets/preview-CKEBPZQH.js rename to assets/preview-H8sA0bwg.js index 23308508c7..be9a79903d 100644 --- a/assets/preview-CKEBPZQH.js +++ b/assets/preview-H8sA0bwg.js @@ -1,7 +1,7 @@ -import{_ as a}from"./iframe-C_SWW3D2.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-MEZMDSes.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-3V2-igME.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-BlB9J7L7.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-MEZMDSes.js","./iframe-C_SWW3D2.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-BlB9J7L7.js","./iframe-3V2-igME.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-U3Ydjq5X.js b/assets/preview-ng8KMcFK.js similarity index 78% rename from assets/preview-U3Ydjq5X.js rename to assets/preview-ng8KMcFK.js index 3017ca40db..23c8b307f3 100644 --- a/assets/preview-U3Ydjq5X.js +++ b/assets/preview-ng8KMcFK.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-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-fOZQW4nE.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-D8O3Xswb.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-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.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-OdYPsA-W.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./register-all-widgets-for-testing-IqvoTTry.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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-iQhk5A81.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-cAdD85Lh.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-BvCuCrDd.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.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-cKXRS8bE.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./register-all-widgets-for-testing-0z8sJlZ3.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/preview-81jWffeN.js b/assets/preview-xr_Ktw-f.js similarity index 94% rename from assets/preview-81jWffeN.js rename to assets/preview-xr_Ktw-f.js index c4b9085473..1c7eb6c4ee 100644 --- a/assets/preview-81jWffeN.js +++ b/assets/preview-xr_Ktw-f.js @@ -1,4 +1,4 @@ -import{_ as S}from"./iframe-C_SWW3D2.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-3V2-igME.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/python-program-editor-uSZoB793.js b/assets/python-program-editor-4XiuwJQ9.js similarity index 84% rename from assets/python-program-editor-uSZoB793.js rename to assets/python-program-editor-4XiuwJQ9.js index 73a8c77abb..d52262e270 100644 --- a/assets/python-program-editor-uSZoB793.js +++ b/assets/python-program-editor-4XiuwJQ9.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{c as a}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as p}from"./components-JJnZE9Qc.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-5swOIFQn.js b/assets/python-program-editor.stories-xJ9k_eaZ.js similarity index 75% rename from assets/python-program-editor.stories-5swOIFQn.js rename to assets/python-program-editor.stories-xJ9k_eaZ.js index 610f4ef198..829bae3b6c 100644 --- a/assets/python-program-editor.stories-5swOIFQn.js +++ b/assets/python-program-editor.stories-xJ9k_eaZ.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-uSZoB793.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.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-4XiuwJQ9.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.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-aQm8gtHN.js b/assets/python-program.stories-7FhMONUu.js similarity index 76% rename from assets/python-program.stories-aQm8gtHN.js rename to assets/python-program.stories-7FhMONUu.js index 789c111808..65feacd8da 100644 --- a/assets/python-program.stories-aQm8gtHN.js +++ b/assets/python-program.stories-7FhMONUu.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{R as p}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.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-0UUgPbE8.js b/assets/question-markers-3hvq1-K6.js similarity index 90% rename from assets/question-markers-0UUgPbE8.js rename to assets/question-markers-3hvq1-K6.js index 82f9df11c7..cb228cdbc6 100644 --- a/assets/question-markers-0UUgPbE8.js +++ b/assets/question-markers-3hvq1-K6.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-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-Hd-8N1dg.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-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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-zKJG4WlZ.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-VLBW6x4Z.js b/assets/question-markers.stories-1B9cJ9hF.js similarity index 84% rename from assets/question-markers.stories-VLBW6x4Z.js rename to assets/question-markers.stories-1B9cJ9hF.js index f6a9f6fe80..8dd3728f55 100644 --- a/assets/question-markers.stories-VLBW6x4Z.js +++ b/assets/question-markers.stories-1B9cJ9hF.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-0UUgPbE8.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./global-colors-VIVU4Od4.js";import"./marker-Hd-8N1dg.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-3hvq1-K6.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./global-colors-VIVU4Od4.js";import"./marker-zKJG4WlZ.js";import"./components-JJnZE9Qc.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-azC_XcNB.js b/assets/radio-editor.stories-Y7l-Dnzs.js similarity index 80% rename from assets/radio-editor.stories-azC_XcNB.js rename to assets/radio-editor.stories-Y7l-Dnzs.js index 4da72d568f..6f2f39d14f 100644 --- a/assets/radio-editor.stories-azC_XcNB.js +++ b/assets/radio-editor.stories-Y7l-Dnzs.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-f8HUcWmB.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";import"./editor-MI6542O9.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-Rtk7iZI-.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-HGB2tTCA.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.js";import"./index-0C4KXdeC.js";import"./editor-G-UjVjKd.js";import"./icon-paths-EoBkHOLI.js";import"./section-control-button-5uzo1xSa.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-Dk8Rarsr.js b/assets/radio.stories-L6mwImb8.js similarity index 80% rename from assets/radio.stories-Dk8Rarsr.js rename to assets/radio.stories-L6mwImb8.js index 5aad24206e..cd85ed9765 100644 --- a/assets/radio.stories-Dk8Rarsr.js +++ b/assets/radio.stories-L6mwImb8.js @@ -1,4 +1,4 @@ -import{j as M}from"./jsx-runtime-63Ea5SlK.js";import{R as O}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.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-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.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/register-all-widgets-and-editors-for-testing-6LJcizcL.js b/assets/register-all-widgets-and-editors-for-testing-nH8rs09r.js similarity index 97% rename from assets/register-all-widgets-and-editors-for-testing-6LJcizcL.js rename to assets/register-all-widgets-and-editors-for-testing-nH8rs09r.js index 6f388a4ce6..59a4b713a4 100644 --- a/assets/register-all-widgets-and-editors-for-testing-6LJcizcL.js +++ b/assets/register-all-widgets-and-editors-for-testing-nH8rs09r.js @@ -1 +1 @@ -import{j as s}from"./jsx-runtime-63Ea5SlK.js";import{c as _e,G as $e}from"./graph-settings-3CGKz-Fx.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-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import{m as as,n as rs,r as ns,c as is,a as ls,d as os}from"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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-eZd-YZhk.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-N_KGPfNT.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-ARTDgF3h.js";import{D as hs}from"./dropdown-editor-M2GE09YI.js";import{E as ds}from"./explanation-editor-0ahwp8Rb.js";import{E as ms}from"./expression-editor-oFIZlZCP.js";import{i as gs}from"./icon-paths-5JCXzGsq.js";import{l as _}from"./index-awljIyHI.js";import{E as y}from"./editor-MI6542O9.js";import{i as fs}from"./icon-paths-EoBkHOLI.js";import{I as ys}from"./image-editor-Yj3_NT-i.js";import{I as xs}from"./input-number-editor-r7btJNGI.js";import{I as bs}from"./interaction-editor-AWh9DTES.js";import{I as vs}from"./interactive-graph-editor--agEG2l8.js";import{L as js}from"./label-image-editor-uR0SR8x7.js";import{M as ws}from"./matcher-editor-AxlX3C-j.js";import{N as Cs}from"./number-line-editor-V9wGJGbX.js";import{N as Ts}from"./numeric-input-editor-qBNHWsXs.js";import{P as qs}from"./phet-simulation-editor-YDXi7iT_.js";import{F as le}from"./index-9gkyvru-.js";import{P as ks}from"./python-program-editor-uSZoB793.js";import{R as Ss}from"./editor-f8HUcWmB.js";import{S as Ns}from"./sorter-editor-iYjrGKmy.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-HWzOkGCp.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-m2DxR4DL.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-FcZanvM1.js";import{A as be}from"./perseus-api-1-ethIrW.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import{m as as,n as rs,r as ns,c as is,a as ls,d as os}from"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-Cwj-_Em8.js";import{E as us}from"./perseus-error-l3K_anoI.js";import{c as g}from"./components-JJnZE9Qc.js";import{E as m}from"./editor-jsonify-Xq2j5Ptn.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-lqhCzKJC.js";import{D as hs}from"./dropdown-editor-JwHnzJHe.js";import{E as ds}from"./explanation-editor-wfdanvql.js";import{E as ms}from"./expression-editor-5Q0xRi4N.js";import{i as gs}from"./icon-paths-5JCXzGsq.js";import{l as _}from"./index-awljIyHI.js";import{E as y}from"./editor-G-UjVjKd.js";import{i as fs}from"./icon-paths-EoBkHOLI.js";import{I as ys}from"./image-editor-GD2oimd5.js";import{I as xs}from"./input-number-editor-aqA3wlxN.js";import{I as bs}from"./interaction-editor-XUhUj9pY.js";import{I as vs}from"./interactive-graph-editor--Tp_Keeb.js";import{L as js}from"./label-image-editor-0iusi5Gy.js";import{M as ws}from"./matcher-editor-VfYBBAUU.js";import{N as Cs}from"./number-line-editor-X3MuZsf0.js";import{N as Ts}from"./numeric-input-editor-Ms-T6-c5.js";import{P as qs}from"./phet-simulation-editor-d4l-9Rog.js";import{F as le}from"./index-9gkyvru-.js";import{P as ks}from"./python-program-editor-4XiuwJQ9.js";import{R as Ss}from"./editor-HGB2tTCA.js";import{S as Ns}from"./sorter-editor-twvCXJig.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-0z8sJlZ3.js b/assets/register-all-widgets-for-testing-0z8sJlZ3.js new file mode 100644 index 0000000000..25136333a4 --- /dev/null +++ b/assets/register-all-widgets-for-testing-0z8sJlZ3.js @@ -0,0 +1 @@ +import{w as e}from"./article-renderer-m2DxR4DL.js";import{r,a as s}from"./renderer-IhFUya5i.js";const a=()=>{r(e),s()};export{a as r}; diff --git a/assets/register-all-widgets-for-testing-IqvoTTry.js b/assets/register-all-widgets-for-testing-IqvoTTry.js deleted file mode 100644 index 06898e64ef..0000000000 --- a/assets/register-all-widgets-for-testing-IqvoTTry.js +++ /dev/null @@ -1 +0,0 @@ -import{w as e}from"./article-renderer-jwwMfp2y.js";import{r,a as s}from"./renderer-2Ae1Nml7.js";const a=()=>{r(e),s()};export{a as r}; diff --git a/assets/renderer-2Ae1Nml7.js b/assets/renderer-IhFUya5i.js similarity index 99% rename from assets/renderer-2Ae1Nml7.js rename to assets/renderer-IhFUya5i.js index d85fe5ecae..df13aff166 100644 --- a/assets/renderer-2Ae1Nml7.js +++ b/assets/renderer-IhFUya5i.js @@ -1,4 +1,4 @@ -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} +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-FcZanvM1.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 diff --git a/assets/renderer-with-debug-ui-rlAJ1oPQ.js b/assets/renderer-with-debug-ui-Hlx8S3_1.js similarity index 99% rename from assets/renderer-with-debug-ui-rlAJ1oPQ.js rename to assets/renderer-with-debug-ui-Hlx8S3_1.js index 814c164bd9..b342e06593 100644 --- a/assets/renderer-with-debug-ui-rlAJ1oPQ.js +++ b/assets/renderer-with-debug-ui-Hlx8S3_1.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{B as l}from"./choice-Xr-SKHrB.js";import{V as n}from"./index-0DbkllkJ.js";import{P as v}from"./index-469F30Ub.js";import{S as w}from"./index-nqMmpXbO.js";import{S as f}from"./article-renderer-jwwMfp2y.js";import{H as u}from"./index-18qWGOW7.js";import{r as o}from"./index-6oxdNXpR.js";import{S as k,R as d}from"./side-by-side-MBJuyilC.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import{R as q,s as T}from"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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 R,m as A}from"./i18n-context-fsWEgybQ.js";import{r as O}from"./register-all-widgets-for-testing-IqvoTTry.js";import"./index-smZ6iCr_.js";const j=""+new URL("device-mobile-o16X2EYh.svg",import.meta.url).href,x=({question:r,apiOptions:y,reviewMode:m=!1,...g})=>{O();const t=o.useRef(null),[i,h]=o.useState(null),[s,p]=o.useState(!1),{strings:c}=R();return e.jsx(k,{leftTitle:e.jsxs(n,{style:{flexDirection:"row",alignItems:"center",width:"100%"},children:["Widget",e.jsx(n,{style:{marginLeft:"auto"},children:e.jsx(f,{icon:e.jsx(v,{icon:j}),checked:s,onChange:p})})]}),left:e.jsxs(n,{children:[e.jsx(n,{className:s?"perseus-mobile":"",children:e.jsx(q,{ref:t,content:r.content,images:r.images,widgets:r.widgets,problemNum:0,apiOptions:{...y,isMobile:s},reviewMode:m,strings:c,...g})}),e.jsxs(n,{style:{flexDirection:"row",alignItems:"center"},children:[e.jsx(l,{onClick:()=>{if(!t.current)return;const a=t.current.getUserInputMap(),b=T(r,t.current.getUserInputMap(),A,"en");h([a,b])},children:"Check"}),e.jsx(w,{size:8}),e.jsx(l,{onClick:()=>{var a;(a=t.current)==null||a.showRationalesForCurrentlySelectedChoices()},children:"Show Rationales"})]}),i!=null&&e.jsxs(e.Fragment,{children:[e.jsx(u,{style:{marginTop:"10px"},children:"Guess"}),e.jsx(d,{quotesOnKeys:!1,enableClipboard:!1,src:i[0]}),e.jsx(u,{style:{marginTop:"10px"},children:"Score"}),e.jsx(d,{quotesOnKeys:!1,enableClipboard:!1,src:i[1]})]})]}),jsonObject:r})};x.__docgenInfo={description:"",methods:[],displayName:"RendererWithDebugUI",props:{question:{required:!0,tsType:{name:"signature",type:"object",raw:`{ +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{B as l}from"./choice-Xr-SKHrB.js";import{V as n}from"./index-0DbkllkJ.js";import{P as v}from"./index-469F30Ub.js";import{S as w}from"./index-nqMmpXbO.js";import{S as f}from"./article-renderer-m2DxR4DL.js";import{H as u}from"./index-18qWGOW7.js";import{r as o}from"./index-6oxdNXpR.js";import{S as k,R as d}from"./side-by-side-MBJuyilC.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import{R as q,s as T}from"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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 R,m as A}from"./i18n-context-fsWEgybQ.js";import{r as O}from"./register-all-widgets-for-testing-0z8sJlZ3.js";import"./index-smZ6iCr_.js";const j=""+new URL("device-mobile-o16X2EYh.svg",import.meta.url).href,x=({question:r,apiOptions:y,reviewMode:m=!1,...g})=>{O();const t=o.useRef(null),[i,h]=o.useState(null),[s,p]=o.useState(!1),{strings:c}=R();return e.jsx(k,{leftTitle:e.jsxs(n,{style:{flexDirection:"row",alignItems:"center",width:"100%"},children:["Widget",e.jsx(n,{style:{marginLeft:"auto"},children:e.jsx(f,{icon:e.jsx(v,{icon:j}),checked:s,onChange:p})})]}),left:e.jsxs(n,{children:[e.jsx(n,{className:s?"perseus-mobile":"",children:e.jsx(q,{ref:t,content:r.content,images:r.images,widgets:r.widgets,problemNum:0,apiOptions:{...y,isMobile:s},reviewMode:m,strings:c,...g})}),e.jsxs(n,{style:{flexDirection:"row",alignItems:"center"},children:[e.jsx(l,{onClick:()=>{if(!t.current)return;const a=t.current.getUserInputMap(),b=T(r,t.current.getUserInputMap(),A,"en");h([a,b])},children:"Check"}),e.jsx(w,{size:8}),e.jsx(l,{onClick:()=>{var a;(a=t.current)==null||a.showRationalesForCurrentlySelectedChoices()},children:"Show Rationales"})]}),i!=null&&e.jsxs(e.Fragment,{children:[e.jsx(u,{style:{marginTop:"10px"},children:"Guess"}),e.jsx(d,{quotesOnKeys:!1,enableClipboard:!1,src:i[0]}),e.jsx(u,{style:{marginTop:"10px"},children:"Score"}),e.jsx(d,{quotesOnKeys:!1,enableClipboard:!1,src:i[1]})]})]}),jsonObject:r})};x.__docgenInfo={description:"",methods:[],displayName:"RendererWithDebugUI",props:{question:{required:!0,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)). diff --git a/assets/section-control-button-Rtk7iZI-.js b/assets/section-control-button-5uzo1xSa.js similarity index 76% rename from assets/section-control-button-Rtk7iZI-.js rename to assets/section-control-button-5uzo1xSa.js index 7a019a08a7..51cefb86ad 100644 --- a/assets/section-control-button-Rtk7iZI-.js +++ b/assets/section-control-button-5uzo1xSa.js @@ -1 +1 @@ -import{j as o}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.js";import{c as i}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 s}from"./index-wzSCRJFK.js";import{c as p}from"./index-deFLJwr4.js";import{l as m}from"./index-awljIyHI.js";import{r as a}from"./index-6oxdNXpR.js";const{InlineIcon:l}=i;class c extends a.Component{render(){const{icon:r,onClick:e,title:n}=this.props;return o.jsx(s,{className:"section-control-button simple-button simple-button--small ",onClick:t=>{t.preventDefault(),e()},role:"button",hideDefaultFocusRing:!0,"aria-label":n,style:u.button,children:({hovered:t,focused:f,pressed:g})=>o.jsx(l,{...r})})}}const u=m.StyleSheet.create({button:{backgroundColor:p.gold,margin:2,paddingRight:10,paddingLeft:10,paddingBottom:2}});c.__docgenInfo={description:"",methods:[],displayName:"SectionControlButton",props:{icon:{required:!0,tsType:{name:"PropsFor",elements:[{name:"InlineIcon"}],raw:"PropsFor"},description:""},onClick:{required:!0,tsType:{name:"signature",type:"function",raw:"() => unknown",signature:{arguments:[],return:{name:"unknown"}}},description:""},title:{required:!0,tsType:{name:"string"},description:""}}};export{c as S}; +import{j as o}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as i}from"./components-JJnZE9Qc.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.js";import"./index-smZ6iCr_.js";import{C as s}from"./index-wzSCRJFK.js";import{c as p}from"./index-deFLJwr4.js";import{l as m}from"./index-awljIyHI.js";import{r as a}from"./index-6oxdNXpR.js";const{InlineIcon:l}=i;class c extends a.Component{render(){const{icon:r,onClick:e,title:n}=this.props;return o.jsx(s,{className:"section-control-button simple-button simple-button--small ",onClick:t=>{t.preventDefault(),e()},role:"button",hideDefaultFocusRing:!0,"aria-label":n,style:u.button,children:({hovered:t,focused:f,pressed:g})=>o.jsx(l,{...r})})}}const u=m.StyleSheet.create({button:{backgroundColor:p.gold,margin:2,paddingRight:10,paddingLeft:10,paddingBottom:2}});c.__docgenInfo={description:"",methods:[],displayName:"SectionControlButton",props:{icon:{required:!0,tsType:{name:"PropsFor",elements:[{name:"InlineIcon"}],raw:"PropsFor"},description:""},onClick:{required:!0,tsType:{name:"signature",type:"function",raw:"() => unknown",signature:{arguments:[],return:{name:"unknown"}}},description:""},title:{required:!0,tsType:{name:"string"},description:""}}};export{c as S}; diff --git a/assets/section-control-button.stories-Dw3MpGLS.js b/assets/section-control-button.stories-GLPdJzcp.js similarity index 76% rename from assets/section-control-button.stories-Dw3MpGLS.js rename to assets/section-control-button.stories-GLPdJzcp.js index 2b3a846575..a1e821a6e0 100644 --- a/assets/section-control-button.stories-Dw3MpGLS.js +++ b/assets/section-control-button.stories-GLPdJzcp.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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{i as p}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{S as e}from"./section-control-button-Rtk7iZI-.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-D8O3Xswb.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.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-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.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-OdYPsA-W.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./components-ODdjt0Ld.js";import"./index-wzSCRJFK.js";const Vt={title:"PerseusEditor/Components/Section Control Button"},t=n=>m.jsx(e,{icon:p,onClick:()=>{},title:"Remove image widget"});t.__docgenInfo={description:"",methods:[],displayName:"ButtonForEditingSectionsOfContentWithInArticleEditor"};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"./article-renderer-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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 as p}from"./icon-paths-5JCXzGsq.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./index-smZ6iCr_.js";import{S as e}from"./section-control-button-5uzo1xSa.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-cAdD85Lh.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.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-BvCuCrDd.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.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-cKXRS8bE.js";import"./client-Rb4DelHy.js";import"./image-loader-qoercD2n.js";import"./index-V5gl6frG.js";import"./components-JJnZE9Qc.js";import"./index-wzSCRJFK.js";const Vt={title:"PerseusEditor/Components/Section Control Button"},t=n=>m.jsx(e,{icon:p,onClick:()=>{},title:"Remove image widget"});t.__docgenInfo={description:"",methods:[],displayName:"ButtonForEditingSectionsOfContentWithInArticleEditor"};var o,r,i;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return {}} title="Remove image widget" />; }`,...(i=(r=t.parameters)==null?void 0:r.docs)==null?void 0:i.source}}};const Xt=["ButtonForEditingSectionsOfContentWithInArticleEditor"];export{t as ButtonForEditingSectionsOfContentWithInArticleEditor,Xt as __namedExportsOrder,Vt as default}; diff --git a/assets/select-image-8Yo1S9fa.js b/assets/select-image-jxbS7f2v.js similarity index 81% rename from assets/select-image-8Yo1S9fa.js rename to assets/select-image-jxbS7f2v.js index 4ed3e2f842..3585d68e7c 100644 --- a/assets/select-image-8Yo1S9fa.js +++ b/assets/select-image-jxbS7f2v.js @@ -1 +1 @@ -import{j as t}from"./jsx-runtime-63Ea5SlK.js";import{b as p}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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 s}from"./choice-Xr-SKHrB.js";import{l as o}from"./index-awljIyHI.js";import{F as a}from"./form-wrapped-text-field-NbyiOLVb.js";import{a as n}from"./global-colors-VIVU4Od4.js";const l=({onChange:i,url:e})=>t.jsxs("div",{children:[t.jsx("div",{className:o.css(r.title),children:"Image"}),t.jsxs("div",{className:o.css(r.components),children:[t.jsx(a,{placeholder:"URL",grow:1,onChange:m=>i(m.target.value),value:e}),t.jsx("div",{className:o.css(r.spacer)}),t.jsx(s,{disabled:!e,"aria-label":e?"":"Not implemented. Use the 'Add Image' button in the editor to upload image, then copy the URL here.",onClick:()=>i(""),style:r.btn,children:e?"Remove":"Upload"})]})]}),r=o.StyleSheet.create({title:{...p,marginBottom:6,color:n},components:{display:"flex"},spacer:{width:16},btn:{minWidth:90}});l.__docgenInfo={description:"",methods:[],displayName:"SelectImage",props:{onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(url: string) => void",signature:{arguments:[{type:{name:"string"},name:"url"}],return:{name:"void"}}},description:""},url:{required:!0,tsType:{name:"string"},description:""}}};export{l as S}; +import{j as t}from"./jsx-runtime-63Ea5SlK.js";import{b as p}from"./article-renderer-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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 s}from"./choice-Xr-SKHrB.js";import{l as o}from"./index-awljIyHI.js";import{F as a}from"./form-wrapped-text-field-NbyiOLVb.js";import{a as n}from"./global-colors-VIVU4Od4.js";const l=({onChange:i,url:e})=>t.jsxs("div",{children:[t.jsx("div",{className:o.css(r.title),children:"Image"}),t.jsxs("div",{className:o.css(r.components),children:[t.jsx(a,{placeholder:"URL",grow:1,onChange:m=>i(m.target.value),value:e}),t.jsx("div",{className:o.css(r.spacer)}),t.jsx(s,{disabled:!e,"aria-label":e?"":"Not implemented. Use the 'Add Image' button in the editor to upload image, then copy the URL here.",onClick:()=>i(""),style:r.btn,children:e?"Remove":"Upload"})]})]}),r=o.StyleSheet.create({title:{...p,marginBottom:6,color:n},components:{display:"flex"},spacer:{width:16},btn:{minWidth:90}});l.__docgenInfo={description:"",methods:[],displayName:"SelectImage",props:{onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(url: string) => void",signature:{arguments:[{type:{name:"string"},name:"url"}],return:{name:"void"}}},description:""},url:{required:!0,tsType:{name:"string"},description:""}}};export{l as S}; diff --git a/assets/select-image.stories-nIx9C5pg.js b/assets/select-image.stories-R9p0ydJC.js similarity index 83% rename from assets/select-image.stories-nIx9C5pg.js rename to assets/select-image.stories-R9p0ydJC.js index 79b54dcbd9..2964008ef3 100644 --- a/assets/select-image.stories-nIx9C5pg.js +++ b/assets/select-image.stories-R9p0ydJC.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{l as i}from"./index-awljIyHI.js";import{r as E}from"./index-6oxdNXpR.js";import{S}from"./select-image-8Yo1S9fa.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";const nt={title:"PerseusEditor/Widgets/Label Image/Select Image"},x=i.StyleSheet.create({wrapper:{width:338}}),f=t=>r.jsx("div",{className:i.css(x.wrapper),children:r.jsx(S,{...t})}),I=()=>{const[t,o]=E.useState("");return r.jsx("div",{className:i.css(x.wrapper),children:r.jsx(S,{onChange:y=>o(y),url:t})})},p=t=>{const o={url:"",onChange:()=>{}};return r.jsx(f,{...o})},m=t=>{const o={url:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",onChange:()=>{}};return r.jsx(f,{...o})},e=t=>r.jsx(I,{});p.__docgenInfo={description:"",methods:[],displayName:"Empty"};m.__docgenInfo={description:"",methods:[],displayName:"Filled"};e.__docgenInfo={description:"",methods:[],displayName:"Interactive"};var s,a,n;p.parameters={...p.parameters,docs:{...(s=p.parameters)==null?void 0:s.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{l as i}from"./index-awljIyHI.js";import{r as E}from"./index-6oxdNXpR.js";import{S}from"./select-image-jxbS7f2v.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./form-wrapped-text-field-NbyiOLVb.js";import"./global-colors-VIVU4Od4.js";const nt={title:"PerseusEditor/Widgets/Label Image/Select Image"},x=i.StyleSheet.create({wrapper:{width:338}}),f=t=>r.jsx("div",{className:i.css(x.wrapper),children:r.jsx(S,{...t})}),I=()=>{const[t,o]=E.useState("");return r.jsx("div",{className:i.css(x.wrapper),children:r.jsx(S,{onChange:y=>o(y),url:t})})},p=t=>{const o={url:"",onChange:()=>{}};return r.jsx(f,{...o})},m=t=>{const o={url:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",onChange:()=>{}};return r.jsx(f,{...o})},e=t=>r.jsx(I,{});p.__docgenInfo={description:"",methods:[],displayName:"Empty"};m.__docgenInfo={description:"",methods:[],displayName:"Filled"};e.__docgenInfo={description:"",methods:[],displayName:"Interactive"};var s,a,n;p.parameters={...p.parameters,docs:{...(s=p.parameters)==null?void 0:s.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const props = { url: "", onChange: () => {} diff --git a/assets/server-item-renderer-with-debug-ui-ZouO16-6.js b/assets/server-item-renderer-with-debug-ui-4efEH9Ok.js similarity index 99% rename from assets/server-item-renderer-with-debug-ui-ZouO16-6.js rename to assets/server-item-renderer-with-debug-ui-4efEH9Ok.js index 2b031d1f9d..2ea34b16c1 100644 --- a/assets/server-item-renderer-with-debug-ui-ZouO16-6.js +++ b/assets/server-item-renderer-with-debug-ui-4efEH9Ok.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{B as a}from"./choice-Xr-SKHrB.js";import{V as y}from"./index-0DbkllkJ.js";import{S as m}from"./index-nqMmpXbO.js";import{r as i}from"./index-6oxdNXpR.js";import"./article-renderer-jwwMfp2y.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{r as g}from"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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{K as h}from"./ke-score-ui-AQ1XUyPU.js";import{S as p}from"./side-by-side-MBJuyilC.js";import{s as c}from"./test-dependencies-fOZQW4nE.js";const b=({item:t,apiOptions:s,keypadElement:o})=>{const r=i.useRef(null),[l,u]=i.useState(null),d=s||Object.freeze({});return e.jsx(p,{leftTitle:"Renderer",left:e.jsxs(e.Fragment,{children:[e.jsx(g,{ref:r,problemNum:0,apiOptions:d,item:t,dependencies:c,keypadElement:o}),e.jsxs(y,{style:{flexDirection:"row",alignItems:"center"},children:[e.jsx(a,{onClick:()=>{r.current&&u(r.current.scoreInput())},children:"Check"}),e.jsx(m,{size:8}),e.jsx(a,{onClick:()=>{var n;(n=r.current)==null||n.showRationalesForCurrentlySelectedChoices()},children:"Show Rationales"})]}),e.jsx(h,{score:l})]}),jsonObject:t})};b.__docgenInfo={description:"",methods:[],displayName:"ServerItemRendererWithDebugUI",props:{item:{required:!0,tsType:{name:"signature",type:"object",raw:`{ +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{B as a}from"./choice-Xr-SKHrB.js";import{V as y}from"./index-0DbkllkJ.js";import{S as m}from"./index-nqMmpXbO.js";import{r as i}from"./index-6oxdNXpR.js";import"./article-renderer-m2DxR4DL.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{r as g}from"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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{K as h}from"./ke-score-ui-AQ1XUyPU.js";import{S as p}from"./side-by-side-MBJuyilC.js";import{s as c}from"./test-dependencies-iQhk5A81.js";const b=({item:t,apiOptions:s,keypadElement:o})=>{const r=i.useRef(null),[l,u]=i.useState(null),d=s||Object.freeze({});return e.jsx(p,{leftTitle:"Renderer",left:e.jsxs(e.Fragment,{children:[e.jsx(g,{ref:r,problemNum:0,apiOptions:d,item:t,dependencies:c,keypadElement:o}),e.jsxs(y,{style:{flexDirection:"row",alignItems:"center"},children:[e.jsx(a,{onClick:()=>{r.current&&u(r.current.scoreInput())},children:"Check"}),e.jsx(m,{size:8}),e.jsx(a,{onClick:()=>{var n;(n=r.current)==null||n.showRationalesForCurrentlySelectedChoices()},children:"Show Rationales"})]}),e.jsx(h,{score:l})]}),jsonObject:t})};b.__docgenInfo={description:"",methods:[],displayName:"ServerItemRendererWithDebugUI",props:{item:{required:!0,tsType:{name:"signature",type:"object",raw:`{ // The details of the question being asked to the user. question: PerseusRenderer; // A collection of hints to be offered to the user that support answering the question. diff --git a/assets/server-item-renderer.stories-cjb1b8CX.js b/assets/server-item-renderer.stories-FqrcCuZb.js similarity index 95% rename from assets/server-item-renderer.stories-cjb1b8CX.js rename to assets/server-item-renderer.stories-FqrcCuZb.js index 120513a25f..ea4f3a7e6b 100644 --- a/assets/server-item-renderer.stories-cjb1b8CX.js +++ b/assets/server-item-renderer.stories-FqrcCuZb.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{r as C}from"./index-6oxdNXpR.js";import{S as i}from"./server-item-renderer-with-debug-ui-ZouO16-6.js";import{s as B}from"./test-dependencies-fOZQW4nE.js";import{I as F}from"./article-renderer-jwwMfp2y.js";import{S as G}from"./perseus-item-9YLLcbpB.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"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.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"./shared-4TdECMLk.js";import"./base-radio-ZvkGSpa4.js";import"./choice-none-above-OdYPsA-W.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"./register-all-widgets-for-testing-IqvoTTry.js";import"./enums-x5qaTru7.js";import"./input-with-examples-D8O3Xswb.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./answer-choices-SJp9oQsg.js";import"./marker-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";const K={question:{content:"Enter the number $$-42$$ in the box: [[☃ input-number 1]]",images:{},widgets:{"input-number 1":{type:"input-number",graded:!0,options:{answerType:"number",value:"-42",simplify:"required",size:"normal",inexact:!1,maxError:.1}}}},hints:[{content:"Hint #1",images:{},widgets:{}},{content:"Hint #2",images:{},widgets:{}},{content:"Hint #3",images:{},widgets:{}}],answerArea:null,itemDataVersion:{major:0,minor:0},answer:null},Q={question:{content:`Enter the number $$1$$ in box one: [[☃ input-number 1]] +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{r as C}from"./index-6oxdNXpR.js";import{S as i}from"./server-item-renderer-with-debug-ui-4efEH9Ok.js";import{s as B}from"./test-dependencies-iQhk5A81.js";import{I as F}from"./article-renderer-m2DxR4DL.js";import{S as G}from"./perseus-item-N_w_I8xw.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"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./index-J2t_5nK1.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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"./shared-4TdECMLk.js";import"./base-radio-DUduhCT2.js";import"./choice-none-above-cKXRS8bE.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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"./register-all-widgets-for-testing-0z8sJlZ3.js";import"./enums-x5qaTru7.js";import"./input-with-examples-cAdD85Lh.js";import"./tooltip-_t9Bc-o8.js";import"./simple-keypad-input-7tb5_po1.js";import"./answer-choices-BvCuCrDd.js";import"./marker-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";const K={question:{content:"Enter the number $$-42$$ in the box: [[☃ input-number 1]]",images:{},widgets:{"input-number 1":{type:"input-number",graded:!0,options:{answerType:"number",value:"-42",simplify:"required",size:"normal",inexact:!1,maxError:.1}}}},hints:[{content:"Hint #1",images:{},widgets:{}},{content:"Hint #2",images:{},widgets:{}},{content:"Hint #3",images:{},widgets:{}}],answerArea:null,itemDataVersion:{major:0,minor:0},answer:null},Q={question:{content:`Enter the number $$1$$ in box one: [[☃ input-number 1]] Enter the number $$2$$ in box two: [[☃ input-number 2]]`,images:{},widgets:{"input-number 1":{type:"input-number",graded:!0,options:{answerType:"number",value:"1",simplify:"required",size:"normal",inexact:!1,maxError:.1}},"input-number 2":{type:"input-number",graded:!0,options:{answerType:"number",value:"2",simplify:"required",size:"normal",inexact:!1,maxError:.1}}}},hints:[{content:"Hint #1",images:{},widgets:{}},{content:"Hint #2",images:{},widgets:{}},{content:"Hint #3",images:{},widgets:{}}],answerArea:null,itemDataVersion:{major:0,minor:0},answer:null},X={question:{content:`Here's a radio widget: [[☃ radio 1]] diff --git a/assets/sortable-pOpkHk6I.js b/assets/sortable-Ho8icdmJ.js similarity index 99% rename from assets/sortable-pOpkHk6I.js rename to assets/sortable-Ho8icdmJ.js index a22e312f71..cf6cf9ff39 100644 --- a/assets/sortable-pOpkHk6I.js +++ b/assets/sortable-Ho8icdmJ.js @@ -1,4 +1,4 @@ -import{j as d}from"./jsx-runtime-63Ea5SlK.js";import{l as S,R as C,p as A}from"./renderer-2Ae1Nml7.js";import{C as T}from"./svg-image-7aOK05RI.js";import{l as k}from"./index-awljIyHI.js";import{$ as p,_ as i}from"./jquery-yG1GhClm.js";import{r as q}from"./index-6oxdNXpR.js";import{F as y}from"./index-9gkyvru-.js";import{g as I}from"./dependencies-CP7Uh8Kq.js";import{C as U}from"./perseus-api-1-ethIrW.js";import{U as v}from"./util-AYeX86gl.js";import{P as D}from"./i18n-context-fsWEgybQ.js";const P=(R,e)=>{const t=R.offsetParent();return{top:e.top+t.scrollTop(),left:e.left+t.scrollLeft()}};class j extends q.Component{render(){const{layout:e}=this.props,t=k.css(m.card,m.placeholder,e==="horizontal"&&m.horizontalCard),n={width:this.props.width,height:this.props.height};return this.props.margin!=null&&(n.margin=this.props.margin),d.jsx("li",{className:t,style:n})}}const M=class M extends q.Component{constructor(){super(...arguments),this.animationFrameRequest=null,this.state={startPosition:{left:0,top:0},startMouse:{left:0,top:0},mouse:{left:0,top:0},dragging:!1},this.getCurrentPosition=()=>({left:this.state.startPosition.left+this.state.mouse.left-this.state.startMouse.left,top:this.state.startPosition.top+this.state.mouse.top-this.state.startMouse.top}),this.bindMouseMoveUp=()=>{this.isMouseMoveUpBound=!0,p(document).on("mousemove",this.onMouseMove),p(document).on("mouseup",this.onMouseUp)},this.unbindMouseMoveUp=()=>{this.isMouseMoveUpBound=!1,p(document).off("mousemove",this.onMouseMove),p(document).off("mouseup",this.onMouseUp)},this.onMouseDown=e=>{if(this.props.state!=="static"||!(e.button===0||e.touches!=null&&e.touches.length===1))return;e.preventDefault();const t=v.extractPointerLocation(e);this.animationFrameRequest=requestAnimationFrame(()=>{const n=p(y.findDOMNode(this)),o=n.position(),r=P(n,o);t&&this._mounted&&this.setState({startPosition:r,startMouse:t,mouse:t,dragging:!0},function(){this.bindMouseMoveUp(),this.props.onMouseDown()})})},this.onMouseMove=e=>{if(this.props.state!=="dragging"||!this.state.dragging)return;e.preventDefault();const n=v.extractPointerLocation(e);n&&(this.animationFrameRequest=requestAnimationFrame(()=>{this.setState({mouse:n},this.props.onMouseMove)}))},this.onMouseUp=e=>{if(this.props.state!=="dragging"||!this.state.dragging)return;e.preventDefault(),v.extractPointerLocation(e)&&(this.setState({dragging:!1}),this.unbindMouseMoveUp(),this.props.onMouseUp())}}componentDidMount(){this._mounted=!0,this.isMouseMoveUpBound=!1,document.addEventListener("touchmove",this.onMouseMove,v.supportsPassiveEvents()?{passive:!1}:!1)}componentDidUpdate(e){if(this.props.state!==e.state)if(this.props.state==="animating"&&this.props.endPosition){const t=this.getCurrentPosition(),n=15*Math.sqrt(Math.sqrt(Math.pow(this.props.endPosition.left-t.left,2)+Math.pow(this.props.endPosition.top-t.top,2)));p(y.findDOMNode(this)).animate(this.props.endPosition,{duration:Math.max(n,1),complete:this.props.onAnimationEnd})}else this.props.state==="static"&&p(y.findDOMNode(this)).finish()}componentWillUnmount(){this._mounted=!1,this.isMouseMoveUpBound&&this.unbindMouseMoveUp(),this.animationFrameRequest&&cancelAnimationFrame(this.animationFrameRequest),document.removeEventListener("touchmove",this.onMouseMove)}render(){const{includePadding:e,layout:t,state:n}=this.props;let o=k.css(m.card,m.draggable,t==="horizontal"&&m.horizontalCard,t==="vertical"&&m.verticalCard,n==="dragging"&&m.dragging,n==="disabled"&&m.disabled,!e&&m.unpaddedCard)+" "+U.INTERACTIVE+" perseus-sortable-draggable";e||(o+=" perseus-sortable-draggable-unpadded");const r={position:"static"};return(this.props.state==="dragging"||this.props.state==="animating")&&i.extend(r,{position:"absolute"},this.getCurrentPosition()),this.props.width&&(r.width=this.props.width+1),this.props.height&&(r.height=this.props.height),this.props.margin!=null&&(r.margin=this.props.margin),d.jsx("li",{className:o,style:r,onMouseDown:this.onMouseDown,onTouchStart:this.onMouseDown,onTouchMove:this.onMouseMove,onTouchEnd:this.onMouseUp,onTouchCancel:this.onMouseUp,children:d.jsx(C,{content:this.props.content,linterContext:A(this.props.linterContext,"draggable"),onRender:this.props.onRender,strings:this.context.strings})})}};M.contextType=D,M.defaultProps={includePadding:!0,type:"static",linterContext:S};let w=M;const g=class g extends q.Component{constructor(e){super(e),this.remeasureItems=i.debounce(()=>{this.setState({items:g.clearItemMeasurements(this.state.items)})},20),this.state={items:g.itemsFromProps(this.props),texRendererLoaded:!1}}static itemsFromProps(e){const t=e.disabled?"disabled":"static";return e.options.map((n,o)=>({option:n,key:o,state:t,width:0,height:0}))}static clearItemMeasurements(e){return e.map(t=>({...t,width:0,height:0}))}UNSAFE_componentWillReceiveProps(e){const t=this.props;i.isEqual(e.options,t.options)?(e.layout!==t.layout||e.padding!==t.padding||e.disabled!==t.disabled||!i.isEqual(e.constraints,t.constraints))&&this.setState({items:g.clearItemMeasurements(this.state.items)}):this.setState({items:g.itemsFromProps(e)})}componentDidUpdate(){this.state.items.length&&!this.state.items[0].width&&!this.state.items[0].height&&setTimeout(()=>{this.measureItems()},0)}measureItems(){let e=[...this.state.items];const t=i.map(e,function(l){return p(y.findDOMNode(this.refs[l.key]))},this),n=i.invoke(t,"outerWidth"),o=i.invoke(t,"outerHeight"),{constraints:r,layout:u}=this.props;let a=null;r!=null&&r.width?a=i.max(n.concat(r.width)):u==="vertical"&&(a=i.max(n));let s=null;r!=null&&r.height?s=i.max(o.concat(r.height)):u==="horizontal"&&(s=i.max(o)),e=i.map(e,function(l,h){return l.width=a||n[h],l.height=s||o[h],l}),this.setState({items:e},()=>{this.props.onMeasure&&this.props.onMeasure({widths:n,heights:o})})}onMouseDown(e){const t=i.map(this.state.items,function(n){return n.key===e&&(n.state="dragging"),n});this.setState({items:t})}moveOptionToIndex(e,t){const{items:n}=this.state;if(t<0||t>n.length)throw new Error(`index ${t} out of bounds`);const o=i.clone(n),r=n.filter(a=>a.option===e)[0];if(r==null)throw new Error(`option ${e} not found`);const u=n.findIndex(a=>a.key===r.key);o.splice(u,1),o.splice(t,0,r),this.setState({items:o}),this.props.onChange&&this.props.onChange({})}onMouseMove(e){const t=p(y.findDOMNode(this.refs[e])),n=p(y.findDOMNode(this)),o=i.clone(this.state.items),r=i.findWhere(this.state.items,{key:e}),u=this.props.margin||0,a=i.indexOf(o,r);let s=0;if(o.splice(a,1),this.props.layout==="horizontal"){const l=t.offset().left-n.offset().left;let h=0,c;i.each(o,function(f){c=f.width,l>h+c/2&&(s+=1),h+=c+u})}else{const l=t.offset().top-n.offset().top;let h=0,c;i.each(o,function(f){c=f.height,l>h+c/2&&(s+=1),h+=c+u})}s!==a&&(o.splice(s,0,r),this.setState({items:o}))}onMouseUp(e){const t=requestAnimationFrame(()=>{const n=i.map(this.state.items,function(o){if(o.key===e){o.state="animating";const r=p(y.findDOMNode(this.refs["placeholder_"+e])),u=r.position(),a=P(r,u);o.endPosition=a}return o},this);this.setState({items:n}),this.props.onChange&&this.props.onChange({})});this.animationFrameRequest=t}onAnimationEnd(e){const t=i.map(this.state.items,function(n){return n.key===e&&(n.state="static"),n});this.setState({items:t})}getOptions(){return i.pluck(this.state.items,"option")}render(){var u,a;if(this.props.waitForTexRendererToLoad&&!this.state.texRendererLoaded){const{TeX:s}=I();return d.jsxs(d.Fragment,{children:[d.jsx(T,{}),d.jsx("div",{style:{display:"none"},children:d.jsx(s,{onRender:()=>this.setState({texRendererLoaded:!0}),children:"1"})})]})}const e=[],{layout:t}=this.props,n=k.css(m.sortable)+" perseus-sortable",o=((u=this.props.constraints)==null?void 0:u.width)||t==="vertical",r=((a=this.props.constraints)==null?void 0:a.height)||t==="horizontal";return i.each(this.state.items,function(s,l,h){const c=l===h.length-1,f=s.state==="static"||s.state==="disabled";let b;this.props.layout==="horizontal"?b="0 "+this.props.margin+"px 0 0":this.props.layout==="vertical"&&(b="0 0 "+this.props.margin+"px 0"),e.push(d.jsx(w,{content:s.option,state:s.state,ref:s.key,width:o?s.width:void 0,height:r?s.height:void 0,layout:t,includePadding:this.props.padding,margin:c&&f?0:b,endPosition:s.endPosition,linterContext:A(this.props.linterContext,"sortable"),onRender:this.remeasureItems,onMouseDown:this.onMouseDown.bind(this,s.key),onMouseMove:this.onMouseMove.bind(this,s.key),onMouseUp:this.onMouseUp.bind(this,s.key),onTouchMove:this.onMouseMove.bind(this,s.key),onTouchEnd:this.onMouseUp.bind(this,s.key),onTouchCancel:this.onMouseUp.bind(this,s.key),onAnimationEnd:this.onAnimationEnd.bind(this,s.key)},s.key)),(s.state==="dragging"||s.state==="animating")&&e.push(d.jsx(j,{ref:"placeholder_"+s.key,width:s.width,height:s.height,layout:t,margin:c?0:b},"placeholder_"+s.key))},this),d.jsx("ul",{className:n,children:e})}};g.defaultProps={layout:"horizontal",padding:!0,disabled:!1,constraints:{},onMeasure:function(){},margin:5,onChange:function(){},linterContext:S,waitForTexRendererToLoad:!0};let x=g;const m=k.StyleSheet.create({sortable:{boxSizing:"border-box",float:"left",padding:0,margin:0},card:{boxSizing:"border-box",background:"#fff",border:"1px solid #ddd",borderRadius:4,cursor:"pointer",minWidth:25,minHeight:44,padding:10,listStyleType:"none",userSelect:"none",touchAction:"none"},placeholder:{background:"#ddd",border:"1px solid #ccc"},draggable:{textAlign:"center"},horizontalCard:{float:"left",cursor:"ew-resize"},verticalCard:{maxWidth:"100%",cursor:"ns-resize"},unpaddedCard:{padding:0},dragging:{background:"#ffedcd",opacity:.8},disabled:{backgroundColor:"inherit",border:"1px solid transparent",cursor:"default"}});x.__docgenInfo={description:"",methods:[{name:"itemsFromProps",docblock:null,modifiers:["static"],params:[{name:"props",optional:!1,type:{name:"signature",type:"object",raw:`{ +import{j as d}from"./jsx-runtime-63Ea5SlK.js";import{l as S,R as C,p as A}from"./renderer-IhFUya5i.js";import{C as T}from"./svg-image-FcZanvM1.js";import{l as k}from"./index-awljIyHI.js";import{$ as p,_ as i}from"./jquery-yG1GhClm.js";import{r as q}from"./index-6oxdNXpR.js";import{F as y}from"./index-9gkyvru-.js";import{g as I}from"./dependencies-CP7Uh8Kq.js";import{C as U}from"./perseus-api-1-ethIrW.js";import{U as v}from"./util-AYeX86gl.js";import{P as D}from"./i18n-context-fsWEgybQ.js";const P=(R,e)=>{const t=R.offsetParent();return{top:e.top+t.scrollTop(),left:e.left+t.scrollLeft()}};class j extends q.Component{render(){const{layout:e}=this.props,t=k.css(m.card,m.placeholder,e==="horizontal"&&m.horizontalCard),n={width:this.props.width,height:this.props.height};return this.props.margin!=null&&(n.margin=this.props.margin),d.jsx("li",{className:t,style:n})}}const M=class M extends q.Component{constructor(){super(...arguments),this.animationFrameRequest=null,this.state={startPosition:{left:0,top:0},startMouse:{left:0,top:0},mouse:{left:0,top:0},dragging:!1},this.getCurrentPosition=()=>({left:this.state.startPosition.left+this.state.mouse.left-this.state.startMouse.left,top:this.state.startPosition.top+this.state.mouse.top-this.state.startMouse.top}),this.bindMouseMoveUp=()=>{this.isMouseMoveUpBound=!0,p(document).on("mousemove",this.onMouseMove),p(document).on("mouseup",this.onMouseUp)},this.unbindMouseMoveUp=()=>{this.isMouseMoveUpBound=!1,p(document).off("mousemove",this.onMouseMove),p(document).off("mouseup",this.onMouseUp)},this.onMouseDown=e=>{if(this.props.state!=="static"||!(e.button===0||e.touches!=null&&e.touches.length===1))return;e.preventDefault();const t=v.extractPointerLocation(e);this.animationFrameRequest=requestAnimationFrame(()=>{const n=p(y.findDOMNode(this)),o=n.position(),r=P(n,o);t&&this._mounted&&this.setState({startPosition:r,startMouse:t,mouse:t,dragging:!0},function(){this.bindMouseMoveUp(),this.props.onMouseDown()})})},this.onMouseMove=e=>{if(this.props.state!=="dragging"||!this.state.dragging)return;e.preventDefault();const n=v.extractPointerLocation(e);n&&(this.animationFrameRequest=requestAnimationFrame(()=>{this.setState({mouse:n},this.props.onMouseMove)}))},this.onMouseUp=e=>{if(this.props.state!=="dragging"||!this.state.dragging)return;e.preventDefault(),v.extractPointerLocation(e)&&(this.setState({dragging:!1}),this.unbindMouseMoveUp(),this.props.onMouseUp())}}componentDidMount(){this._mounted=!0,this.isMouseMoveUpBound=!1,document.addEventListener("touchmove",this.onMouseMove,v.supportsPassiveEvents()?{passive:!1}:!1)}componentDidUpdate(e){if(this.props.state!==e.state)if(this.props.state==="animating"&&this.props.endPosition){const t=this.getCurrentPosition(),n=15*Math.sqrt(Math.sqrt(Math.pow(this.props.endPosition.left-t.left,2)+Math.pow(this.props.endPosition.top-t.top,2)));p(y.findDOMNode(this)).animate(this.props.endPosition,{duration:Math.max(n,1),complete:this.props.onAnimationEnd})}else this.props.state==="static"&&p(y.findDOMNode(this)).finish()}componentWillUnmount(){this._mounted=!1,this.isMouseMoveUpBound&&this.unbindMouseMoveUp(),this.animationFrameRequest&&cancelAnimationFrame(this.animationFrameRequest),document.removeEventListener("touchmove",this.onMouseMove)}render(){const{includePadding:e,layout:t,state:n}=this.props;let o=k.css(m.card,m.draggable,t==="horizontal"&&m.horizontalCard,t==="vertical"&&m.verticalCard,n==="dragging"&&m.dragging,n==="disabled"&&m.disabled,!e&&m.unpaddedCard)+" "+U.INTERACTIVE+" perseus-sortable-draggable";e||(o+=" perseus-sortable-draggable-unpadded");const r={position:"static"};return(this.props.state==="dragging"||this.props.state==="animating")&&i.extend(r,{position:"absolute"},this.getCurrentPosition()),this.props.width&&(r.width=this.props.width+1),this.props.height&&(r.height=this.props.height),this.props.margin!=null&&(r.margin=this.props.margin),d.jsx("li",{className:o,style:r,onMouseDown:this.onMouseDown,onTouchStart:this.onMouseDown,onTouchMove:this.onMouseMove,onTouchEnd:this.onMouseUp,onTouchCancel:this.onMouseUp,children:d.jsx(C,{content:this.props.content,linterContext:A(this.props.linterContext,"draggable"),onRender:this.props.onRender,strings:this.context.strings})})}};M.contextType=D,M.defaultProps={includePadding:!0,type:"static",linterContext:S};let w=M;const g=class g extends q.Component{constructor(e){super(e),this.remeasureItems=i.debounce(()=>{this.setState({items:g.clearItemMeasurements(this.state.items)})},20),this.state={items:g.itemsFromProps(this.props),texRendererLoaded:!1}}static itemsFromProps(e){const t=e.disabled?"disabled":"static";return e.options.map((n,o)=>({option:n,key:o,state:t,width:0,height:0}))}static clearItemMeasurements(e){return e.map(t=>({...t,width:0,height:0}))}UNSAFE_componentWillReceiveProps(e){const t=this.props;i.isEqual(e.options,t.options)?(e.layout!==t.layout||e.padding!==t.padding||e.disabled!==t.disabled||!i.isEqual(e.constraints,t.constraints))&&this.setState({items:g.clearItemMeasurements(this.state.items)}):this.setState({items:g.itemsFromProps(e)})}componentDidUpdate(){this.state.items.length&&!this.state.items[0].width&&!this.state.items[0].height&&setTimeout(()=>{this.measureItems()},0)}measureItems(){let e=[...this.state.items];const t=i.map(e,function(l){return p(y.findDOMNode(this.refs[l.key]))},this),n=i.invoke(t,"outerWidth"),o=i.invoke(t,"outerHeight"),{constraints:r,layout:u}=this.props;let a=null;r!=null&&r.width?a=i.max(n.concat(r.width)):u==="vertical"&&(a=i.max(n));let s=null;r!=null&&r.height?s=i.max(o.concat(r.height)):u==="horizontal"&&(s=i.max(o)),e=i.map(e,function(l,h){return l.width=a||n[h],l.height=s||o[h],l}),this.setState({items:e},()=>{this.props.onMeasure&&this.props.onMeasure({widths:n,heights:o})})}onMouseDown(e){const t=i.map(this.state.items,function(n){return n.key===e&&(n.state="dragging"),n});this.setState({items:t})}moveOptionToIndex(e,t){const{items:n}=this.state;if(t<0||t>n.length)throw new Error(`index ${t} out of bounds`);const o=i.clone(n),r=n.filter(a=>a.option===e)[0];if(r==null)throw new Error(`option ${e} not found`);const u=n.findIndex(a=>a.key===r.key);o.splice(u,1),o.splice(t,0,r),this.setState({items:o}),this.props.onChange&&this.props.onChange({})}onMouseMove(e){const t=p(y.findDOMNode(this.refs[e])),n=p(y.findDOMNode(this)),o=i.clone(this.state.items),r=i.findWhere(this.state.items,{key:e}),u=this.props.margin||0,a=i.indexOf(o,r);let s=0;if(o.splice(a,1),this.props.layout==="horizontal"){const l=t.offset().left-n.offset().left;let h=0,c;i.each(o,function(f){c=f.width,l>h+c/2&&(s+=1),h+=c+u})}else{const l=t.offset().top-n.offset().top;let h=0,c;i.each(o,function(f){c=f.height,l>h+c/2&&(s+=1),h+=c+u})}s!==a&&(o.splice(s,0,r),this.setState({items:o}))}onMouseUp(e){const t=requestAnimationFrame(()=>{const n=i.map(this.state.items,function(o){if(o.key===e){o.state="animating";const r=p(y.findDOMNode(this.refs["placeholder_"+e])),u=r.position(),a=P(r,u);o.endPosition=a}return o},this);this.setState({items:n}),this.props.onChange&&this.props.onChange({})});this.animationFrameRequest=t}onAnimationEnd(e){const t=i.map(this.state.items,function(n){return n.key===e&&(n.state="static"),n});this.setState({items:t})}getOptions(){return i.pluck(this.state.items,"option")}render(){var u,a;if(this.props.waitForTexRendererToLoad&&!this.state.texRendererLoaded){const{TeX:s}=I();return d.jsxs(d.Fragment,{children:[d.jsx(T,{}),d.jsx("div",{style:{display:"none"},children:d.jsx(s,{onRender:()=>this.setState({texRendererLoaded:!0}),children:"1"})})]})}const e=[],{layout:t}=this.props,n=k.css(m.sortable)+" perseus-sortable",o=((u=this.props.constraints)==null?void 0:u.width)||t==="vertical",r=((a=this.props.constraints)==null?void 0:a.height)||t==="horizontal";return i.each(this.state.items,function(s,l,h){const c=l===h.length-1,f=s.state==="static"||s.state==="disabled";let b;this.props.layout==="horizontal"?b="0 "+this.props.margin+"px 0 0":this.props.layout==="vertical"&&(b="0 0 "+this.props.margin+"px 0"),e.push(d.jsx(w,{content:s.option,state:s.state,ref:s.key,width:o?s.width:void 0,height:r?s.height:void 0,layout:t,includePadding:this.props.padding,margin:c&&f?0:b,endPosition:s.endPosition,linterContext:A(this.props.linterContext,"sortable"),onRender:this.remeasureItems,onMouseDown:this.onMouseDown.bind(this,s.key),onMouseMove:this.onMouseMove.bind(this,s.key),onMouseUp:this.onMouseUp.bind(this,s.key),onTouchMove:this.onMouseMove.bind(this,s.key),onTouchEnd:this.onMouseUp.bind(this,s.key),onTouchCancel:this.onMouseUp.bind(this,s.key),onAnimationEnd:this.onAnimationEnd.bind(this,s.key)},s.key)),(s.state==="dragging"||s.state==="animating")&&e.push(d.jsx(j,{ref:"placeholder_"+s.key,width:s.width,height:s.height,layout:t,margin:c?0:b},"placeholder_"+s.key))},this),d.jsx("ul",{className:n,children:e})}};g.defaultProps={layout:"horizontal",padding:!0,disabled:!1,constraints:{},onMeasure:function(){},margin:5,onChange:function(){},linterContext:S,waitForTexRendererToLoad:!0};let x=g;const m=k.StyleSheet.create({sortable:{boxSizing:"border-box",float:"left",padding:0,margin:0},card:{boxSizing:"border-box",background:"#fff",border:"1px solid #ddd",borderRadius:4,cursor:"pointer",minWidth:25,minHeight:44,padding:10,listStyleType:"none",userSelect:"none",touchAction:"none"},placeholder:{background:"#ddd",border:"1px solid #ccc"},draggable:{textAlign:"center"},horizontalCard:{float:"left",cursor:"ew-resize"},verticalCard:{maxWidth:"100%",cursor:"ns-resize"},unpaddedCard:{padding:0},dragging:{background:"#ffedcd",opacity:.8},disabled:{backgroundColor:"inherit",border:"1px solid transparent",cursor:"default"}});x.__docgenInfo={description:"",methods:[{name:"itemsFromProps",docblock:null,modifiers:["static"],params:[{name:"props",optional:!1,type:{name:"signature",type:"object",raw:`{ disabled: boolean; options: ReadonlyArray; }`,signature:{properties:[{key:"disabled",value:{name:"boolean",required:!0}},{key:"options",value:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",required:!0}}]}}}],returns:{type:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ diff --git a/assets/sortable.stories-S0uFjUuF.js b/assets/sortable.stories-e7anpDcs.js similarity index 94% rename from assets/sortable.stories-S0uFjUuF.js rename to assets/sortable.stories-e7anpDcs.js index 2958ec4e3c..32fc59dabd 100644 --- a/assets/sortable.stories-S0uFjUuF.js +++ b/assets/sortable.stories-e7anpDcs.js @@ -1,4 +1,4 @@ -import{S as z}from"./sortable-pOpkHk6I.js";import"./jsx-runtime-63Ea5SlK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./renderer-2Ae1Nml7.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";const mr={title:"Perseus/Components/Sortable",component:z,args:{options:["Option 1","Option 2","Option 3"]}},r={args:{layout:"horizontal",options:["a","b","c"],waitForTexRendererToLoad:!1}},o={args:{layout:"vertical",options:["a","b","c"],waitForTexRendererToLoad:!1}},t={},a={args:{padding:!1}},e={args:{margin:64}},s={args:{disabled:!0}},i={args:{constraints:{height:128,width:256}}};var n,p,m;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:`{ +import{S as z}from"./sortable-Ho8icdmJ.js";import"./jsx-runtime-63Ea5SlK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./renderer-IhFUya5i.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-FcZanvM1.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";const mr={title:"Perseus/Components/Sortable",component:z,args:{options:["Option 1","Option 2","Option 3"]}},r={args:{layout:"horizontal",options:["a","b","c"],waitForTexRendererToLoad:!1}},o={args:{layout:"vertical",options:["a","b","c"],waitForTexRendererToLoad:!1}},t={},a={args:{padding:!1}},e={args:{margin:64}},s={args:{disabled:!0}},i={args:{constraints:{height:128,width:256}}};var n,p,m;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:`{ args: { layout: "horizontal", options: ["a", "b", "c"], diff --git a/assets/sorter-editor-iYjrGKmy.js b/assets/sorter-editor-twvCXJig.js similarity index 86% rename from assets/sorter-editor-iYjrGKmy.js rename to assets/sorter-editor-twvCXJig.js index 58ce3c08d0..fe7a95b23d 100644 --- a/assets/sorter-editor-iYjrGKmy.js +++ b/assets/sorter-editor-twvCXJig.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-jwwMfp2y.js";import{_ as d}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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.js";import{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{C as h}from"./index-V5gl6frG.js";import{P as i}from"./index-0C4KXdeC.js";import{r as u}from"./index-6oxdNXpR.js";const{InfoTip:a,TextListEditor:m}=c,s="horizontal",l="vertical",t=class t extends u.Component{constructor(){super(...arguments),this.onLayoutChange=o=>{this.props.onChange({layout:o.target.value})},this.serialize=()=>d.pick(this.props,"correct","layout","padding")}render(){const o=this;return e.jsxs("div",{children:[e.jsxs("div",{children:[" ","Correct answer:"," ",e.jsx(a,{children:e.jsx("p",{children:"Enter the correct answer (in the correct order) here. The preview on the right will have the cards in a randomized order, which is how the student will see them."})})]}),e.jsx(m,{options:this.props.correct,onChange:function(r,p){o.props.onChange({correct:r},p)},layout:this.props.layout}),e.jsxs("div",{children:[e.jsxs("label",{children:[" ","Layout:"," ",e.jsxs("select",{value:this.props.layout,onChange:this.onLayoutChange,children:[e.jsx("option",{value:s,children:"Horizontal"}),e.jsx("option",{value:l,children:"Vertical"})]})]}),e.jsx(a,{children:e.jsx("p",{children:"Use the horizontal layout for short text and small images. The vertical layout is best for longer text and larger images."})})]}),e.jsxs("div",{children:[e.jsx(h,{label:"Padding:",checked:this.props.padding,onChange:r=>{this.props.onChange({padding:r})}}),e.jsx(a,{children:e.jsx("p",{children:"Padding is good for text, but not needed for images."})})]})]})}};t.propTypes={correct:i.array,layout:i.oneOf([s,l]),padding:i.bool},t.widgetName="sorter",t.defaultProps={correct:["$x$","$y$","$z$"],layout:s,padding:!0};let n=t;n.__docgenInfo={description:"",methods:[{name:"onLayoutChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"SorterEditor",props:{correct:{defaultValue:{value:'["$x$", "$y$", "$z$"]',computed:!1},description:"",type:{name:"array"},required:!1},layout:{defaultValue:{value:'"horizontal"',computed:!1},description:"",type:{name:"enum",value:[{value:'"horizontal"',computed:!1},{value:'"vertical"',computed:!1}]},required:!1},padding:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1}}};export{n as S}; +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-m2DxR4DL.js";import{_ as d}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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c}from"./components-JJnZE9Qc.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.js";import"./index-smZ6iCr_.js";import{C as h}from"./index-V5gl6frG.js";import{P as i}from"./index-0C4KXdeC.js";import{r as u}from"./index-6oxdNXpR.js";const{InfoTip:a,TextListEditor:m}=c,s="horizontal",l="vertical",t=class t extends u.Component{constructor(){super(...arguments),this.onLayoutChange=o=>{this.props.onChange({layout:o.target.value})},this.serialize=()=>d.pick(this.props,"correct","layout","padding")}render(){const o=this;return e.jsxs("div",{children:[e.jsxs("div",{children:[" ","Correct answer:"," ",e.jsx(a,{children:e.jsx("p",{children:"Enter the correct answer (in the correct order) here. The preview on the right will have the cards in a randomized order, which is how the student will see them."})})]}),e.jsx(m,{options:this.props.correct,onChange:function(r,p){o.props.onChange({correct:r},p)},layout:this.props.layout}),e.jsxs("div",{children:[e.jsxs("label",{children:[" ","Layout:"," ",e.jsxs("select",{value:this.props.layout,onChange:this.onLayoutChange,children:[e.jsx("option",{value:s,children:"Horizontal"}),e.jsx("option",{value:l,children:"Vertical"})]})]}),e.jsx(a,{children:e.jsx("p",{children:"Use the horizontal layout for short text and small images. The vertical layout is best for longer text and larger images."})})]}),e.jsxs("div",{children:[e.jsx(h,{label:"Padding:",checked:this.props.padding,onChange:r=>{this.props.onChange({padding:r})}}),e.jsx(a,{children:e.jsx("p",{children:"Padding is good for text, but not needed for images."})})]})]})}};t.propTypes={correct:i.array,layout:i.oneOf([s,l]),padding:i.bool},t.widgetName="sorter",t.defaultProps={correct:["$x$","$y$","$z$"],layout:s,padding:!0};let n=t;n.__docgenInfo={description:"",methods:[{name:"onLayoutChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"SorterEditor",props:{correct:{defaultValue:{value:'["$x$", "$y$", "$z$"]',computed:!1},description:"",type:{name:"array"},required:!1},layout:{defaultValue:{value:'"horizontal"',computed:!1},description:"",type:{name:"enum",value:[{value:'"horizontal"',computed:!1},{value:'"vertical"',computed:!1}]},required:!1},padding:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1}}};export{n as S}; diff --git a/assets/sorter-editor.stories-euOWCWyM.js b/assets/sorter-editor.stories-DdYB9DV7.js similarity index 74% rename from assets/sorter-editor.stories-euOWCWyM.js rename to assets/sorter-editor.stories-DdYB9DV7.js index 41549ff3b4..30761e2b7d 100644 --- a/assets/sorter-editor.stories-euOWCWyM.js +++ b/assets/sorter-editor.stories-DdYB9DV7.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{a as p}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{S as e}from"./sorter-editor-iYjrGKmy.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";const Yr={title:"PerseusEditor/Widgets/Sorter Editor"},r=s=>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{S as e}from"./sorter-editor-twvCXJig.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./v4-yQnnJER4.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.js";import"./index-0C4KXdeC.js";const Yr={title:"PerseusEditor/Widgets/Sorter Editor"},r=s=>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/sorter.stories-eYTE7Hhe.js b/assets/sorter.stories-TdCKcYiw.js similarity index 77% rename from assets/sorter.stories-eYTE7Hhe.js rename to assets/sorter.stories-TdCKcYiw.js index 4cb5eb13f2..114a1b5fe2 100644 --- a/assets/sorter.stories-eYTE7Hhe.js +++ b/assets/sorter.stories-TdCKcYiw.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{R as p}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.js";const e={content:`**Arrange the following measurements in order from smallest to largest.** +import{j as m}from"./jsx-runtime-63Ea5SlK.js";import{R as p}from"./renderer-with-debug-ui-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.js";const e={content:`**Arrange the following measurements in order from smallest to largest.** [[☃ sorter 1]]`,images:{},widgets:{"sorter 1":{version:{major:0,minor:0},type:"sorter",graded:!0,options:{padding:!0,layout:"horizontal",correct:["$0.005$ kilograms","$15$ grams","$55$ grams"]}}}},Tr={title:"Perseus/Widgets/Sorter"},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/structured-item-diff-0iAD6MzK.js b/assets/structured-item-diff-A4k3naVl.js similarity index 99% rename from assets/structured-item-diff-0iAD6MzK.js rename to assets/structured-item-diff-A4k3naVl.js index 16f300e3f5..13634efdf6 100644 --- a/assets/structured-item-diff-0iAD6MzK.js +++ b/assets/structured-item-diff-A4k3naVl.js @@ -1,4 +1,4 @@ -import{j as n}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-jwwMfp2y.js";import{_ as b}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{d as D,e as V,g as H,s as G}from"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import{g as ae,b as ie}from"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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 q}from"./index-6oxdNXpR.js";import{T as se}from"./text-diff-LGX1DVHQ.js";import{c as oe}from"./components-ODdjt0Ld.js";import{c as O}from"./index-dnMhQZ-1.js";import{P as s}from"./index-0C4KXdeC.js";import{T as le}from"./tags-diff-CAGYiPAf.js";const _="unchanged",Q="changed",X="added",Y="removed",ue=function(a,e,r){let t;return a===e?t=_:a===void 0?t=X:e===void 0?t=Y:t=Q,{after:JSON.stringify(e),before:JSON.stringify(a),children:[],key:r,status:t}},de=function(a,e,r){const t=b.isObject(a)?b(a).keys():[],i=b.isObject(e)?b(e).keys():[],l=b.union(t,i),o=b.map(l,function(y){return Z((a||{})[y],(e||{})[y],y)});let u;return a===void 0?u=X:e===void 0?u=Y:u=b.any(o,function(p){return p.status!==_})?Q:_,{after:"",before:"",children:o,key:r,status:u}},Z=function(a,e,r){return typeof a=="object"||typeof e=="object"?de(a,e,r):ue(a,e,r)},{SvgImage:K}=oe,ee=function(a){return(a-1)*20},x="before",z="after",ye="unchanged",U=class U extends q.Component{render(){const e=O(this.props.className,{"diff-row":!0,before:this.props.side===x,after:this.props.side===z});return n.jsx("div",{className:e,children:n.jsxs("div",{style:{paddingLeft:ee(this.props.depth)},children:[this.props.showKey&&this.props.propKey+": ",n.jsx("span",{className:"inner-value dark "+this.props.className,children:this.props.value})]})})}};U.propTypes={className:s.string.isRequired,depth:s.number.isRequired,propKey:s.string.isRequired,showKey:s.bool.isRequired,side:s.oneOf([x,z]).isRequired,value:s.string};let N=U;const E=class E extends q.Component{render(){const e=this;return n.jsx("div",{onClick:e.props.onClick,style:{clear:"both"},children:b.map([x,z],function(r){return n.jsx("div",{className:"diff-row collapsed "+r,children:n.jsx("div",{style:{paddingLeft:ee(e.props.depth)},children:n.jsx("span",{children:" [ show unmodified ] "})})},r)})})}};E.propTypes={depth:s.number,onClick:s.func.isRequired},E.defaultProps={depth:0};let $=E;const A=class A extends q.Component{constructor(){super(...arguments),this.state={expanded:this.props.expanded},this.expand=()=>{this.setState({expanded:!0})}}render(){const e=this.props.entry,r=e.status==="removed",t=e.status==="added",i=e.status==="changed",l=e.children.length>0,o=O({removed:r||i&&!l,dark:r,"blank-space":t}),u=O({added:t||i&&!l,dark:t,"blank-space":r});let y;this.state.expanded?y=e.children:y=b(e.children).select(function(g){return g.status!==ye});let p=y.length1&&(o.alignment=r),l==="transformer"&&(o.graded=t),ie(l)&&(o.static=(a==null?void 0:a.static)??void 0),o},M=class M extends q.Component{render(){const{after:e,before:r,showAlignmentOptions:t,showSeparator:i,title:l}=this.props;let o,u;(r.content||e.content)&&(o=n.jsx(se,{before:r.content,after:e.content,title:l}));const y=Object.keys(r.widgets??{}).filter(v=>r.content.includes(v)),p=Object.keys(e.widgets??{}).filter(v=>e.content.includes(v));return(y.length||p.length)&&(u=b.union(y,p).map(g=>{var d,h,m,T;return n.jsx(I,{before:B((d=r.widgets)==null?void 0:d[g],t),after:B((h=e.widgets)==null?void 0:h[g],t),title:g,type:(((m=r.widgets)==null?void 0:m[g])??{}).type||(((T=e.widgets)==null?void 0:T[g])??{}).type},g)})),n.jsxs("div",{children:[o,u,i&&n.jsx("div",{className:"diff-separator"})]})}};M.defaultProps={after:{content:"",images:{},widgets:{}},before:{content:"",images:{},widgets:{}},showAlignmentOptions:!1,showSeparator:!1};let C=M;C.__docgenInfo={description:"",methods:[],displayName:"RendererDiff",props:{after:{required:!1,tsType:{name:"signature",type:"object",raw:`{ +import{j as n}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-m2DxR4DL.js";import{_ as b}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{d as D,e as V,g as H,s as G}from"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import{g as ae,b as ie}from"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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 q}from"./index-6oxdNXpR.js";import{T as se}from"./text-diff-44zRM9-e.js";import{c as oe}from"./components-JJnZE9Qc.js";import{c as O}from"./index-dnMhQZ-1.js";import{P as s}from"./index-0C4KXdeC.js";import{T as le}from"./tags-diff-GoL2kY7u.js";const _="unchanged",Q="changed",X="added",Y="removed",ue=function(a,e,r){let t;return a===e?t=_:a===void 0?t=X:e===void 0?t=Y:t=Q,{after:JSON.stringify(e),before:JSON.stringify(a),children:[],key:r,status:t}},de=function(a,e,r){const t=b.isObject(a)?b(a).keys():[],i=b.isObject(e)?b(e).keys():[],l=b.union(t,i),o=b.map(l,function(y){return Z((a||{})[y],(e||{})[y],y)});let u;return a===void 0?u=X:e===void 0?u=Y:u=b.any(o,function(p){return p.status!==_})?Q:_,{after:"",before:"",children:o,key:r,status:u}},Z=function(a,e,r){return typeof a=="object"||typeof e=="object"?de(a,e,r):ue(a,e,r)},{SvgImage:K}=oe,ee=function(a){return(a-1)*20},x="before",z="after",ye="unchanged",U=class U extends q.Component{render(){const e=O(this.props.className,{"diff-row":!0,before:this.props.side===x,after:this.props.side===z});return n.jsx("div",{className:e,children:n.jsxs("div",{style:{paddingLeft:ee(this.props.depth)},children:[this.props.showKey&&this.props.propKey+": ",n.jsx("span",{className:"inner-value dark "+this.props.className,children:this.props.value})]})})}};U.propTypes={className:s.string.isRequired,depth:s.number.isRequired,propKey:s.string.isRequired,showKey:s.bool.isRequired,side:s.oneOf([x,z]).isRequired,value:s.string};let N=U;const E=class E extends q.Component{render(){const e=this;return n.jsx("div",{onClick:e.props.onClick,style:{clear:"both"},children:b.map([x,z],function(r){return n.jsx("div",{className:"diff-row collapsed "+r,children:n.jsx("div",{style:{paddingLeft:ee(e.props.depth)},children:n.jsx("span",{children:" [ show unmodified ] "})})},r)})})}};E.propTypes={depth:s.number,onClick:s.func.isRequired},E.defaultProps={depth:0};let $=E;const A=class A extends q.Component{constructor(){super(...arguments),this.state={expanded:this.props.expanded},this.expand=()=>{this.setState({expanded:!0})}}render(){const e=this.props.entry,r=e.status==="removed",t=e.status==="added",i=e.status==="changed",l=e.children.length>0,o=O({removed:r||i&&!l,dark:r,"blank-space":t}),u=O({added:t||i&&!l,dark:t,"blank-space":r});let y;this.state.expanded?y=e.children:y=b(e.children).select(function(g){return g.status!==ye});let p=y.length1&&(o.alignment=r),l==="transformer"&&(o.graded=t),ie(l)&&(o.static=(a==null?void 0:a.static)??void 0),o},M=class M extends q.Component{render(){const{after:e,before:r,showAlignmentOptions:t,showSeparator:i,title:l}=this.props;let o,u;(r.content||e.content)&&(o=n.jsx(se,{before:r.content,after:e.content,title:l}));const y=Object.keys(r.widgets??{}).filter(v=>r.content.includes(v)),p=Object.keys(e.widgets??{}).filter(v=>e.content.includes(v));return(y.length||p.length)&&(u=b.union(y,p).map(g=>{var d,h,m,T;return n.jsx(I,{before:B((d=r.widgets)==null?void 0:d[g],t),after:B((h=e.widgets)==null?void 0:h[g],t),title:g,type:(((m=r.widgets)==null?void 0:m[g])??{}).type||(((T=e.widgets)==null?void 0:T[g])??{}).type},g)})),n.jsxs("div",{children:[o,u,i&&n.jsx("div",{className:"diff-separator"})]})}};M.defaultProps={after:{content:"",images:{},widgets:{}},before:{content:"",images:{},widgets:{}},showAlignmentOptions:!1,showSeparator:!1};let C=M;C.__docgenInfo={description:"",methods:[],displayName:"RendererDiff",props:{after:{required:!1,tsType:{name:"signature",type:"object",raw:`{ content: string; // NOTE: images and widgets may not be set for some items hints, // specifically in old revisions, which may only be loaded for diffing. diff --git a/assets/structured-item-diff.stories-MZYCBiaB.js b/assets/structured-item-diff.stories-xxCW2xVf.js similarity index 96% rename from assets/structured-item-diff.stories-MZYCBiaB.js rename to assets/structured-item-diff.stories-xxCW2xVf.js index 4f4fb0c029..408498846c 100644 --- a/assets/structured-item-diff.stories-MZYCBiaB.js +++ b/assets/structured-item-diff.stories-xxCW2xVf.js @@ -1,4 +1,4 @@ -import{_ as I}from"./iframe-C_SWW3D2.js";import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{S as c}from"./structured-item-diff-0iAD6MzK.js";import{W as b}from"./perseus-diff-wrapper-c32IFwe6.js";import"../sb-preview/runtime.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./text-diff-LGX1DVHQ.js";import"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";import"./tags-diff-CAGYiPAf.js";I(()=>Promise.resolve({}),__vite__mapDeps([0]),import.meta.url);const ut={title:"PerseusEditor/Diffs/Structured Item Diff",decorators:[i=>e.jsx(b,{children:e.jsx(i,{})})]},g={a:"a tag",b:"b tag",c:"c tag"},s=i=>{const t={before:{_multi:{directions:{__type:"content",content:"",images:{},widgets:{}},passage:{type:"content",content:"",images:{},widgets:{}},overview:{type:"content",content:"",images:{},widgets:{}},hints:[],questions:[]}},after:{_multi:{directions:{type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>g[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}};return e.jsx(c,{...t})},o=i=>{const t={before:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},after:{_multi:{directions:{type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}}],questions:[{hints:[],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>g[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}};return e.jsx(c,{...t})},p=i=>{const t={before:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}},{type:"hint",content:"hint 3",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}},{type:"hint",content:"question hint 2",images:{},widgets:{}},{type:"hint",content:"question hint 3",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},after:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1 edited",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>g[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}};return e.jsx(c,{...t})},a=i=>{const t={before:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1 edited",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},after:{_multi:{directions:{__type:"content",content:"",images:{},widgets:{}},passage:{type:"content",content:"",images:{},widgets:{}},overview:{type:"content",content:"",images:{},widgets:{}},hints:[],questions:[]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>g[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}};return e.jsx(c,{...t})};s.__docgenInfo={description:"",methods:[],displayName:"ContentAdded"};o.__docgenInfo={description:"",methods:[],displayName:"ContentAddedRemovedAndChanged"};p.__docgenInfo={description:"",methods:[],displayName:"MiscContentChanges"};a.__docgenInfo={description:"",methods:[],displayName:"ContentRemoved"};var r,m,d;s.parameters={...s.parameters,docs:{...(r=s.parameters)==null?void 0:r.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{_ as I}from"./iframe-3V2-igME.js";import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{S as c}from"./structured-item-diff-A4k3naVl.js";import{W as b}from"./perseus-diff-wrapper-c32IFwe6.js";import"../sb-preview/runtime.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./text-diff-44zRM9-e.js";import"./components-JJnZE9Qc.js";import"./index-0C4KXdeC.js";import"./tags-diff-GoL2kY7u.js";I(()=>Promise.resolve({}),__vite__mapDeps([0]),import.meta.url);const ut={title:"PerseusEditor/Diffs/Structured Item Diff",decorators:[i=>e.jsx(b,{children:e.jsx(i,{})})]},g={a:"a tag",b:"b tag",c:"c tag"},s=i=>{const t={before:{_multi:{directions:{__type:"content",content:"",images:{},widgets:{}},passage:{type:"content",content:"",images:{},widgets:{}},overview:{type:"content",content:"",images:{},widgets:{}},hints:[],questions:[]}},after:{_multi:{directions:{type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>g[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}};return e.jsx(c,{...t})},o=i=>{const t={before:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},after:{_multi:{directions:{type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}}],questions:[{hints:[],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>g[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}};return e.jsx(c,{...t})},p=i=>{const t={before:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}},{type:"hint",content:"hint 3",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}},{type:"hint",content:"question hint 2",images:{},widgets:{}},{type:"hint",content:"question hint 3",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},after:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1 edited",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>g[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}};return e.jsx(c,{...t})},a=i=>{const t={before:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1 edited",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},after:{_multi:{directions:{__type:"content",content:"",images:{},widgets:{}},passage:{type:"content",content:"",images:{},widgets:{}},overview:{type:"content",content:"",images:{},widgets:{}},hints:[],questions:[]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>g[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}};return e.jsx(c,{...t})};s.__docgenInfo={description:"",methods:[],displayName:"ContentAdded"};o.__docgenInfo={description:"",methods:[],displayName:"ContentAddedRemovedAndChanged"};p.__docgenInfo={description:"",methods:[],displayName:"MiscContentChanges"};a.__docgenInfo={description:"",methods:[],displayName:"ContentRemoved"};var r,m,d;s.parameters={...s.parameters,docs:{...(r=s.parameters)==null?void 0:r.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const props = { before: { _multi: { diff --git a/assets/svg-image-7aOK05RI.js b/assets/svg-image-FcZanvM1.js similarity index 99% rename from assets/svg-image-7aOK05RI.js rename to assets/svg-image-FcZanvM1.js index 2ee4320bd3..62eff6c66f 100644 --- a/assets/svg-image-7aOK05RI.js +++ b/assets/svg-image-FcZanvM1.js @@ -1,5 +1,5 @@ var Un=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)};var De=(i,t,e)=>(Un(i,t,"read from private field"),e?e.call(i):t.get(i)),Ri=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},Ii=(i,t,e,o)=>(Un(i,t,"write to private field"),o?o.call(i,e):t.set(i,e),e);import{j as It}from"./jsx-runtime-63Ea5SlK.js";import"./version-akiLXZts.js";import{P as Qt,E as Vt}from"./perseus-error-l3K_anoI.js";import{r as ae}from"./index-6oxdNXpR.js";import{l as uo}from"./index-awljIyHI.js";import{b as fo,V as po,R as mo}from"./index-0DbkllkJ.js";import{c as go}from"./index-dnMhQZ-1.js";import{$ as P,_ as y}from"./jquery-yG1GhClm.js";import{g as ce}from"./dependencies-CP7Uh8Kq.js";import{b as vo,e as bs,c as bo,f as yo,d as wo,K as Zt,r as xo,s as Mo,U as Pt}from"./util-AYeX86gl.js";import{F as $n}from"./fixed-to-responsive-for_tVF1.js";import{e as So}from"./index-J2t_5nK1.js";import{c as Ne}from"./index-Dfd6auV6.js";import{c as To}from"./client-Rb4DelHy.js";import{I as ko}from"./inline-icon-6fh0Wu1y.js";import{i as _o}from"./icon-paths-5JCXzGsq.js";import{I as oi}from"./image-loader-qoercD2n.js";const ze={log:(i,t)=>{ce().Log.log(i,t)},error:(i,t,e)=>{ce().Log.error(i,t,e)}};function ys(i){return i.reduce((t,e)=>t+e,0)}function Co(i){return i.reduce((t,e)=>t*e,1)}function He(...i){const t=Math.min(...i.map(o=>o.length)),e=[];for(let o=0;oa[o]));return e}function Ma(i,t){return[t(i[0],0),t(i[1],1)]}function Ao(i,t){return!Array.isArray(i)||t!==void 0&&i.length!==t?!1:i.every(vo)}function Vi(i){return Lt(i,1/en(i))}function en(i){return Math.sqrt(zi(i,i))}function zi(i,t){const o=He(i,t).map(Co);return ys(o)}function ct(...i){return He(...i).map(ys)}function ut(i,t){return He(i,t).map(e=>e[0]-e[1])}function Po(i){return i.map(t=>-t)}function Lt(i,t){return i.map(e=>e*t)}function Eo(i,t,e){return i.length===t.length&&He(i,t).every(o=>bs(o[0],o[1],e))}function Ro(i){const t=en(i);let e=Math.atan2(i[1],i[0]);return e<0&&(e+=2*Math.PI),[t,e]}function $t(i){const t=Ro(i);return[t[0],t[1]*180/Math.PI]}function Io(i,t=0){return[i*Math.cos(t),i*Math.sin(t)]}function xe(i,t=0){return Io(i,t*Math.PI/180)}function ri(i,t){const e=$t(i),o=e[1]+t;return xe(e[0],o)}function Lo(i,t){const e=zi(i,t)/zi(t,t);return Lt(t,e)}function Do(i,t){return i.map((e,o)=>bo(e,t[o]||t))}function No(i,t){return i.map((e,o)=>yo(e,t[o]||t))}function Bo(i,t){return i.map((e,o)=>wo(e,t[o]||t))}function ws(i,t){return en(ut(i,t))}function Sa(i,t){const e=ut(t[1],t[0]),o=ut(i,t[0]),a=Lo(o,e),h=ut(Lt(a,2),o);return ct(t[0],h)}const ne=Ao,Wn=ct,we=ct,nn=Eo,sn=Do,on=No,rn=Bo;function Zn(i){return[(i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2]}function pi(){return pi=Object.assign?Object.assign.bind():function(i){for(var t=1;t{if(typeof i!="string")throw new Error(`Failed to parse color: ${i}`);const t=i.match(Oo);if(t)return{r:parseInt(`${t[1]}${t[1]}`,16),g:parseInt(`${t[2]}${t[2]}`,16),b:parseInt(`${t[3]}${t[3]}`,16),a:1};const e=i.match(Fo);if(e)return{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16),a:1};const o=i.match(Go);if(o)return{r:parseFloat(o[1]),g:parseFloat(o[2]),b:parseFloat(o[3]),a:o[4]?parseFloat(o[4]):1};throw new Error(`Failed to parse color: ${i}`)},xs=i=>{const t=Math.round(i.r),e=Math.round(i.g),o=Math.round(i.b);if(i.a===1){const a=h=>{const d=h.toString(16);return d.length===1?`0${d}`:d};return`#${a(t)}${a(e)}${a(o)}`}else return`rgba(${t},${e},${o},${i.a.toFixed(2)})`},ie=(i,t)=>{if(t<0||t>1)throw new Error("Percentage must be between 0 and 1");const e=Hi(i);return xs(pi({},e,{a:e.a*t}))},Yi=(i,t)=>{const e=Hi(i),o=Hi(t);return xs({r:e.r*e.a+o.r*(1-e.a),g:e.g*e.a+o.g*(1-e.a),b:e.b*e.a+o.b*(1-e.a),a:o.a})},Wt="#21242c",ai="#ffffff",jn="#5f1e5c",Tt={blue:"#1865f2",purple:"#9059ff",green:"#00a60e",gold:"#ffb100",red:"#d92916",offBlack:Wt,offBlack64:ie(Wt,.64),offBlack50:ie(Wt,.5),offBlack32:ie(Wt,.32),offBlack16:ie(Wt,.16),offBlack8:ie(Wt,.08),offWhite:"#f7f8fa",white:ai,white64:ie(ai,.64),white50:ie(ai,.5),white32:ie(ai,.32),darkBlue:"#0b2149",teal:"#14bf96"},St=(i,t)=>Yi(ie(i,t),Tt.white),ht=pi({},Tt,{activeBlue:Yi(Tt.offBlack32,Tt.blue),fadedBlue:St(Tt.blue,.32),fadedBlue24:St(Tt.blue,.24),fadedBlue16:St(Tt.blue,.16),fadedBlue8:St(Tt.blue,.08),activeRed:Yi(Tt.offBlack32,Tt.red),fadedRed:St(Tt.red,.32),fadedRed24:St(Tt.red,.24),fadedRed16:St(Tt.red,.16),fadedRed8:St(Tt.red,.08),fadedGreen24:St(Tt.green,.24),fadedGreen16:St(Tt.green,.16),fadedGreen8:St(Tt.green,.08),fadedGold24:St(Tt.gold,.24),fadedGold16:St(Tt.gold,.16),fadedGold8:St(Tt.gold,.08),fadedPurple24:St(Tt.purple,.24),fadedPurple16:St(Tt.purple,.16),fadedPurple8:St(Tt.purple,.08),eggplant:jn,fadedEggplant8:St(jn,.08),fadedOffBlack64:St(Wt,.64),fadedOffBlack50:St(Wt,.5),fadedOffBlack32:St(Wt,.32),fadedOffBlack16:St(Wt,.16),fadedOffBlack8:St(Wt,.08)});ht.blue,ht.activeBlue,ht.red,ht.activeRed,ht.fadedOffBlack32,ht.offWhite,ht.fadedRed8,ht.red,ht.fadedGold8,ht.gold,ht.fadedGreen8,ht.green,ht.fadedBlue8,ht.blue,ht.fadedOffBlack8,ht.offBlack,ht.white,ht.offWhite,ht.blue,ht.darkBlue,ht.offBlack64,ht.offBlack,ht.fadedOffBlack64,ht.fadedOffBlack32,ht.white,ht.fadedOffBlack16,ht.fadedOffBlack8,ht.fadedOffBlack50,ht.white,ht.fadedOffBlack64,ht.offBlack,ht.white,ht.blue,ht.red,ht.eggplant,ht.fadedEggplant8,ht.purple;const Vo={xsmall:16,small:24,medium:48,large:96},zo={xsmall:"M7.237.741C7.165.393 6.95.154 6.656.053A1.01 1.01 0 0 0 6.18.01c-.053.009-.053.009-.087.017C2.553.949 0 4.214 0 7.91 0 12.36 3.598 16 8 16c4.4 0 8-3.647 8-8.112a1.02 1.02 0 0 0-.118-.423.877.877 0 0 0-.808-.48.909.909 0 0 0-.81.46c-.09.151-.13.296-.146.455-.08 3.493-2.737 6.207-6.118 6.207-3.41 0-6.118-2.74-6.118-6.196 0-2.843 1.936-5.291 4.644-6.022.1-.028.224-.082.352-.177a.928.928 0 0 0 .36-.97z",small:"M10.598.943c-.093-.449-.362-.748-.732-.875a1.314 1.314 0 0 0-.723-.033C3.83 1.417 0 6.317 0 11.864 0 18.538 5.398 24 12 24c6.598 0 12-5.471 12-12.16a1.333 1.333 0 0 0-.154-.548c-.193-.368-.544-.606-1.023-.606-.472 0-.825.229-1.035.585-.117.2-.169.39-.189.582-.124 5.472-4.294 9.73-9.599 9.73-5.349 0-9.599-4.3-9.599-9.72 0-4.46 3.036-8.299 7.28-9.444.127-.036.291-.107.458-.232.373-.28.57-.711.46-1.244z",medium:"M44.19 23.455a1.91 1.91 0 1 1 3.801 0h.003c.004.18.006.363.006.545 0 13.255-10.745 24-24 24S0 37.255 0 24 10.745 0 24 0c.182 0 .364.002.545.006V.01a1.91 1.91 0 1 1 0 3.801v.015A20.564 20.564 0 0 0 24 3.818C12.854 3.818 3.818 12.854 3.818 24c0 11.146 9.036 20.182 20.182 20.182 11.146 0 20.182-9.036 20.182-20.182 0-.182-.003-.364-.007-.545h.015z",large:"M88.38 46.91a3.818 3.818 0 1 1 7.602 0h.006c.008.362.012.725.012 1.09 0 26.51-21.49 48-48 48S0 74.51 0 48 21.49 0 48 0c.365 0 .728.004 1.09.012v.005a3.818 3.818 0 1 1 0 7.602v.032c-.362-.01-.725-.015-1.09-.015C25.708 7.636 7.636 25.708 7.636 48c0 22.292 18.072 40.364 40.364 40.364 22.292 0 40.364-18.072 40.364-40.364 0-.365-.005-.728-.015-1.09h.032z"},Kn={light:ht.white,dark:ht.offBlack16},Ho=fo("path");class Ms extends ae.Component{render(){const{size:t,light:e,style:o,testId:a}=this.props,h=Vo[t],d=zo[t],g=e?Kn.light:Kn.dark,w=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:h,height:h,viewBox:`0 0 ${h} ${h}`,"data-testid":a},ae.createElement(Ho,{style:[Jn.loadingSpinner,{fill:g}],fillRule:"nonzero",d}));return ae.createElement(po,{style:[Jn.spinnerContainer,o]},w)}}Ms.defaultProps={size:"large",light:!1};const Yo={"0%":{transform:"rotate(0deg)"},"50%":{transform:"rotate(180deg)"},"100%":{transform:"rotate(360deg)"}},Jn=uo.StyleSheet.create({spinnerContainer:{justifyContent:"center"},loadingSpinner:{transformOrigin:"50% 50%",animationName:Yo,animationDuration:"1.1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}});function qo(){const i=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(const e in t)if(i.style[e]!==void 0)return{end:t[e]};return!1}P.fn.emulateTransitionEnd=function(i){let t=!1;const e=this;return P(this).one("bsTransitionEnd",function(){t=!0}),setTimeout(function(){t||P(e).trigger(P.support.transition.end)},i),this};P(function(){P.support.transition=qo(),P.support.transition&&(P.event.special.bsTransitionEnd={bindType:P.support.transition.end,delegateType:P.support.transition.end,handle:function(i){if(P(i.target).is(this))return i.handleObj.handler.apply(this,arguments)}})});function Ss(i,t){const e=window.scrollX,o=window.scrollY,a=document.querySelector("meta[name=viewport]");a?a.setAttribute("content",i):P("head").append(``),document.body.style.opacity=.9999,setTimeout(()=>{document.body.style.opacity=1,window.scrollTo(e,o),t&&setTimeout(t,0)},0)}function jt(){}jt.prototype._initialize=function(i){this._$document||(this._activeZoom=this._initialScrollPosition=this._initialTouchPosition=this._touchMoveListener=null,this._$document=P(document),this._$window=P(window),this._$body=P(document.body),this._boundClick=P.proxy(this._clickHandler,this),this._enableMobilePinch=i)};jt.prototype.handleZoomClick=function(i,t){this._initialize(t);const e=i.target;if(!(!e||e.tagName!=="IMG")&&!this._$body.hasClass("zoom-overlay-open")){if(i.metaKey||i.ctrlKey)return window.open(i.target.src,"_blank");!t&&e.width>=window.innerWidth-Dt.getOffset()||(this._activeZoomClose(!0),t?Ss("width=device-width, initial-scale=1, minimum-scale=1",()=>this._zoom(e)):this._zoom(e),t||(this._$window.on("scroll.zoom",P.proxy(this._scrollHandler,this)),this._$document.on("keyup.zoom",P.proxy(this._keyHandler,this)),this._$document.on("touchstart.zoom",P.proxy(this._touchStart,this))),document.addEventListener("click",this._boundClick,!0),i.stopPropagation())}};jt.prototype._zoom=function(i){this._activeZoom=new Dt(i,this._enableMobilePinch),this._activeZoom.zoomImage()};jt.prototype._activeZoomClose=function(i){this._activeZoom&&(i?(this._activeZoom.dispose(),this._disposeActiveZoom()):Ss(`width=device-width, initial-scale=1, minimum-scale=1, - maximum-scale=1`,()=>{this._activeZoom&&(this._activeZoom.close(),this._disposeActiveZoom())}))};jt.prototype._disposeActiveZoom=function(){this._$window.off(".zoom"),this._$document.off(".zoom"),document.removeEventListener("click",this._boundClick,!0),this._activeZoom=null};jt.prototype._scrollHandler=function(i){this._initialScrollPosition===null&&(this._initialScrollPosition=window.scrollY);const t=this._initialScrollPosition-window.scrollY;Math.abs(t)>=40&&this._activeZoomClose()};jt.prototype._keyHandler=function(i){i.keyCode===27&&this._activeZoomClose()};jt.prototype._clickHandler=function(i){i.stopPropagation(),i.preventDefault(),this._activeZoomClose()};jt.prototype._touchStart=function(i){this._initialTouchPosition=i.originalEvent.touches[0].pageY,P(i.target).on("touchmove.zoom",P.proxy(this._touchMove,this))};jt.prototype._touchMove=function(i){Math.abs(i.originalEvent.touches[0].pageY-this._initialTouchPosition)>10&&(this._activeZoomClose(),P(i.target).off("touchmove.zoom"))};function Dt(i,t){this._fullHeight=this._fullWidth=this._overlay=null,this._targetImage=i,this._enableMobilePinch=t,this._$body=P(document.body)}Dt._OFFSET=80;Dt._MAX_WIDTH=2560;Dt._MAX_HEIGHT=4096;Dt.getOffset=function(i){return i?0:Dt._OFFSET};Dt.prototype.getOffset=function(){return Dt.getOffset(this._enableMobilePinch)};Dt.prototype.zoomImage=function(){const i=document.createElement("img"),t=P(i);i.onload=(function(){this._fullHeight=Number(i.height),this._fullWidth=Number(i.width);const e=this._imageOffset=P(this._targetImage).offset(),o=this._left=e.left-P(window).scrollLeft(),a=this._top=e.top-P(window).scrollTop();t.css({left:o,top:a,width:this._targetImage.width,height:this._targetImage.height}),this._zoomOriginal()}).bind(this),i.src=this._targetImage.src,this.$zoomedImage=t};Dt.prototype._zoomOriginal=function(){var i,t,e;this.$zoomedImage.addClass("zoom-img").attr("data-action","zoom-out"),P(this._targetImage).css("visibility","hidden"),this._backdrop=document.createElement("div"),this._backdrop.className="zoom-backdrop",(i=document.body)==null||i.appendChild(this._backdrop),this._overlay=document.createElement("div"),this._overlay.className="zoom-overlay",(t=document.body)==null||t.appendChild(this._overlay),(e=this._overlay)==null||e.appendChild(this.$zoomedImage[0]),this._calculateZoom(),this._triggerAnimation()};Dt.prototype._calculateZoom=function(){const i=this._fullWidth,t=this._fullHeight,e=window.innerHeight-this.getOffset(),o=window.innerWidth-this.getOffset(),a=i/this._targetImage.width,h=i/t,d=o/e;i{this._activeZoom&&(this._activeZoom.close(),this._disposeActiveZoom())}))};jt.prototype._disposeActiveZoom=function(){this._$window.off(".zoom"),this._$document.off(".zoom"),document.removeEventListener("click",this._boundClick,!0),this._activeZoom=null};jt.prototype._scrollHandler=function(i){this._initialScrollPosition===null&&(this._initialScrollPosition=window.scrollY);const t=this._initialScrollPosition-window.scrollY;Math.abs(t)>=40&&this._activeZoomClose()};jt.prototype._keyHandler=function(i){i.keyCode===27&&this._activeZoomClose()};jt.prototype._clickHandler=function(i){i.stopPropagation(),i.preventDefault(),this._activeZoomClose()};jt.prototype._touchStart=function(i){this._initialTouchPosition=i.originalEvent.touches[0].pageY,P(i.target).on("touchmove.zoom",P.proxy(this._touchMove,this))};jt.prototype._touchMove=function(i){Math.abs(i.originalEvent.touches[0].pageY-this._initialTouchPosition)>10&&(this._activeZoomClose(),P(i.target).off("touchmove.zoom"))};function Dt(i,t){this._fullHeight=this._fullWidth=this._overlay=null,this._targetImage=i,this._enableMobilePinch=t,this._$body=P(document.body)}Dt._OFFSET=80;Dt._MAX_WIDTH=2560;Dt._MAX_HEIGHT=4096;Dt.getOffset=function(i){return i?0:Dt._OFFSET};Dt.prototype.getOffset=function(){return Dt.getOffset(this._enableMobilePinch)};Dt.prototype.zoomImage=function(){const i=document.createElement("img"),t=P(i);i.onload=(function(){this._fullHeight=Number(i.height),this._fullWidth=Number(i.width);const e=this._imageOffset=P(this._targetImage).offset(),o=this._left=e.left-P(window).scrollLeft(),a=this._top=e.top-P(window).scrollTop();t.css({left:o,top:a,width:this._targetImage.width,height:this._targetImage.height}),this._zoomOriginal()}).bind(this),i.src=this._targetImage.src,i.alt=this._targetImage.alt,this.$zoomedImage=t};Dt.prototype._zoomOriginal=function(){var i,t,e;this.$zoomedImage.addClass("zoom-img").attr("data-action","zoom-out"),P(this._targetImage).css("visibility","hidden"),this._backdrop=document.createElement("div"),this._backdrop.className="zoom-backdrop",(i=document.body)==null||i.appendChild(this._backdrop),this._overlay=document.createElement("div"),this._overlay.className="zoom-overlay",(t=document.body)==null||t.appendChild(this._overlay),(e=this._overlay)==null||e.appendChild(this.$zoomedImage[0]),this._calculateZoom(),this._triggerAnimation()};Dt.prototype._calculateZoom=function(){const i=this._fullWidth,t=this._fullHeight,e=window.innerHeight-this.getOffset(),o=window.innerWidth-this.getOffset(),a=i/this._targetImage.width,h=i/t,d=o/e;i{this.$zoomedImage.css({transform:"scale(1)"}).addClass("zoom-transition").one(P.support.transition.end,P.proxy(this.dispose,this)).emulateTransitionEnd(300)},10)};Dt.prototype.dispose=function(){this.$zoomedImage&&this.$zoomedImage[0].parentNode&&(this.$zoomedImage.remove(),this.$zoomedImage=null,this._overlay.parentNode.removeChild(this._overlay),this._backdrop.parentNode.removeChild(this._backdrop),this._$body.removeClass("zoom-overlay-transitioning")),P(this._targetImage).css("visibility","visible"),this._targetImage.focus()};const Xo=new jt;function Qn(i,t){return i+":"+t}function Uo(i){return i.split(":")[0]}const Ts={_fireEvent:function(i,...t){for(const e of i)e.call(this,...t)},_applyConstraints:function(i,t,e){let o=!1;return y.reduce(this.state.constraints,(a,h)=>{if(a===!1)return!1;if(o)return a;const d=h.call(this,a,t,{onSkipRemaining:()=>{o=!0},...e});if(d===!1)return!1;if(ne(d,2))return d;if(d===!0||d==null)return a;throw new Qt("Constraint returned invalid result: "+d,Vt.Internal)},i,this)},draw:function(){const i=this.cloneState();Ts._fireEvent.call(this,this.state.draw,i,this.prevState),this.prevState=i},listen:function(i,t,e){this._listenerMap=this._listenerMap||{};const o=Qn(i,t),a=this._listenerMap[o]=this._listenerMap[o]||this.state[i].length;this.state[i][a]=e},unlisten:function(i,t){this._listenerMap=this._listenerMap||{};const e=Qn(i,t),o=this._listenerMap[e];if(o!==void 0){this.state[i].splice(o,1),delete this._listenerMap[e];const a=y.keys(this._listenerMap);y.each(a,function(h){Uo(h)===i&&this._listenerMap[h]>o&&this._listenerMap[h]--},this)}}};let Li=null;function $o(){const i=document.createElement("div"),t=["transform","msTransform","MozTransform","WebkitTransform","OTransform"];let e=null;return y.each(t,function(o){typeof i.style[o]<"u"&&(e=o)}),e}let Di=null;function Wo(){const i=document.createElement("div"),t=Ct.getPrefixedTransform();return i.style[t]="translateZ(0px)",!!i.style[t]}const Zo=["add","modify","draw","remove","constraints","onMoveStart","onMove","onMoveEnd","onClick"],Ct={assert:function(i,t){if(!i)throw new Qt("Assertion Error"+(t?": "+t:""),Vt.Internal)},createGettersFor:function(i,t){y.each(y.keys(t),function(e){i.prototype[e]===void 0&&(i.prototype[e]=function(){return this.state[e]})})},addMovableHelperMethodsTo:function(i){y.each(Ts,function(t,e){i.prototype[e]===void 0&&(i.prototype[e]=t)})},arrayify:function(i){return i==null?[]:y.isArray(i)?y.filter(y.flatten(i),y.identity):[i]},normalizeOptions:function(i){const t={...i};return Zo.forEach(function(e){i[e]!==void 0&&(t[e]=Ct.arrayify(i[e]))}),t},getPrefixedTransform:function(){return Li=Li||$o(),Li},getCanUse3dTransform:function(){return Di==null&&(Di=Wo()),Di}};/*! diff --git a/assets/svg-image.stories-bDXISQVm.js b/assets/svg-image.stories-tU_aScnA.js similarity index 98% rename from assets/svg-image.stories-bDXISQVm.js rename to assets/svg-image.stories-tU_aScnA.js index 37ffa15e22..7ad14ca222 100644 --- a/assets/svg-image.stories-bDXISQVm.js +++ b/assets/svg-image.stories-tU_aScnA.js @@ -1,4 +1,4 @@ -import{S as E}from"./svg-image-7aOK05RI.js";import"./jsx-runtime-63Ea5SlK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./index-awljIyHI.js";import"./index-0DbkllkJ.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.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";const ar={title:"Perseus/Components/SVG Image",component:E,args:{alt:"ALT"}},p="http://www.khanacademy.org/images/ohnoes-concerned.svg",L="https://www.khanacademy.org/images/hand-tree.new.png",B="web+graphie://ka-perseus-graphie.s3.amazonaws.com/1e06f6d4071f30cee2cc3ccb7435b3a66a62fe3f",r={parameters:{chromatic:{disableSnapshot:!0}}},e={args:{height:100,width:500,src:"http://httpstat.us/200?sleep=1000000"},parameters:{chromatic:{disableSnapshot:!0}}},s={args:{src:p}},a={args:{height:50,src:p}},t={args:{src:p,width:50}},o={args:{extraGraphie:{box:[200,200],range:[[0,10],[0,10]],labels:["ok"]},src:p}},n={args:{src:L}},c={args:{src:B}};var i,m,g;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`{ +import{S as E}from"./svg-image-FcZanvM1.js";import"./jsx-runtime-63Ea5SlK.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./version-akiLXZts.js";import"./perseus-error-l3K_anoI.js";import"./index-awljIyHI.js";import"./index-0DbkllkJ.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./dependencies-CP7Uh8Kq.js";import"./util-AYeX86gl.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";const ar={title:"Perseus/Components/SVG Image",component:E,args:{alt:"ALT"}},p="http://www.khanacademy.org/images/ohnoes-concerned.svg",L="https://www.khanacademy.org/images/hand-tree.new.png",B="web+graphie://ka-perseus-graphie.s3.amazonaws.com/1e06f6d4071f30cee2cc3ccb7435b3a66a62fe3f",r={parameters:{chromatic:{disableSnapshot:!0}}},e={args:{height:100,width:500,src:"http://httpstat.us/200?sleep=1000000"},parameters:{chromatic:{disableSnapshot:!0}}},s={args:{src:p}},a={args:{height:50,src:p}},t={args:{src:p,width:50}},o={args:{extraGraphie:{box:[200,200],range:[[0,10],[0,10]],labels:["ok"]},src:p}},n={args:{src:L}},c={args:{src:B}};var i,m,g;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`{ parameters: { /** This story doesn't provide a src url and so just shows a spinner. * Perhaps not useful, but for now we'll just disable snapshots. */ diff --git a/assets/tags-diff-CAGYiPAf.js b/assets/tags-diff-GoL2kY7u.js similarity index 95% rename from assets/tags-diff-CAGYiPAf.js rename to assets/tags-diff-GoL2kY7u.js index 03fa573158..9d3a4a665d 100644 --- a/assets/tags-diff-CAGYiPAf.js +++ b/assets/tags-diff-GoL2kY7u.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{r as d}from"./index-6oxdNXpR.js";import{T as p}from"./text-diff-LGX1DVHQ.js";const t=class t extends d.Component{render(){const{afterOnly:s,beforeOnly:n,intersection:a,showSeparator:o}=this.props,i=a.concat(n).join(` +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import{r as d}from"./index-6oxdNXpR.js";import{T as p}from"./text-diff-44zRM9-e.js";const t=class t extends d.Component{render(){const{afterOnly:s,beforeOnly:n,intersection:a,showSeparator:o}=this.props,i=a.concat(n).join(` `)+` `,l=a.concat(s).join(` `)+` diff --git a/assets/tags-diff.stories-4ElQu3PW.js b/assets/tags-diff.stories-e8MPTM6d.js similarity index 75% rename from assets/tags-diff.stories-4ElQu3PW.js rename to assets/tags-diff.stories-e8MPTM6d.js index 05a5477981..8638bd5e00 100644 --- a/assets/tags-diff.stories-4ElQu3PW.js +++ b/assets/tags-diff.stories-e8MPTM6d.js @@ -1,3 +1,3 @@ -import{j as t}from"./jsx-runtime-63Ea5SlK.js";import{T as e}from"./tags-diff-CAGYiPAf.js";import{W as s}from"./perseus-diff-wrapper-c32IFwe6.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./text-diff-LGX1DVHQ.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./components-ODdjt0Ld.js";import"./index-0C4KXdeC.js";const Yr={title:"PerseusEditor/Diffs/Tags Diff",decorators:[o=>t.jsx(s,{children:t.jsx(o,{})})]},r=o=>t.jsx(e,{title:"tags",beforeOnly:["Math","Biology","History"],afterOnly:["World War I"],intersection:["Physics","Chemistry"]});r.__docgenInfo={description:"",methods:[],displayName:"Example"};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 t}from"./jsx-runtime-63Ea5SlK.js";import{T as e}from"./tags-diff-GoL2kY7u.js";import{W as s}from"./perseus-diff-wrapper-c32IFwe6.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./text-diff-44zRM9-e.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.js";import"./index-0C4KXdeC.js";const Yr={title:"PerseusEditor/Diffs/Tags Diff",decorators:[o=>t.jsx(s,{children:t.jsx(o,{})})]},r=o=>t.jsx(e,{title:"tags",beforeOnly:["Math","Biology","History"],afterOnly:["World War I"],intersection:["Physics","Chemistry"]});r.__docgenInfo={description:"",methods:[],displayName:"Example"};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 Zr=["Example"];export{r as Example,Zr as __namedExportsOrder,Yr as default}; diff --git a/assets/test-dependencies-fOZQW4nE.js b/assets/test-dependencies-iQhk5A81.js similarity index 96% rename from assets/test-dependencies-fOZQW4nE.js rename to assets/test-dependencies-iQhk5A81.js index 658a39ef65..e751701c7b 100644 --- a/assets/test-dependencies-fOZQW4nE.js +++ b/assets/test-dependencies-iQhk5A81.js @@ -1 +1 @@ -import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{r as u}from"./register-all-widgets-for-testing-IqvoTTry.js";import{d as c}from"./key-translator-hixns6dh.js";import{r as s}from"./index-6oxdNXpR.js";const o=new c.MathJaxRenderer({shouldFixUnicodeLayout:!0,fontURL:"https://cdn.kastatic.org/fonts/mathjax",locale:"en"});function a({children:e,onRender:t}){const n=s.useRef(null),{domElement:i,addLabelWhenPresentational:d}=s.useMemo(()=>o.render(e),[e]);return s.useLayoutEffect(()=>{n.current&&(d(n.current),n.current.innerHTML="",n.current.appendChild(i))}),s.useEffect(()=>{o.updateStyles(),t==null||t()},[e,t]),r.jsx("span",{ref:n})}a.__docgenInfo={description:"",methods:[],displayName:"TestMathjax",props:{children:{required:!0,tsType:{name:"string"},description:""},onRender:{required:!1,tsType:{name:"signature",type:"function",raw:"(root?: any) => unknown",signature:{arguments:[{type:{name:"any"},name:"root"}],return:{name:"unknown"}}},description:""}}};u();const l={log:()=>{},error:()=>{}},p={JIPT:{useJIPT:!1},graphieMovablesJiptLabels:{addLabel:(e,t)=>{}},svgImageJiptLabels:{addLabel:(e,t)=>{}},rendererTranslationComponents:{addComponent:e=>-1,removeComponentAtIndex:e=>{}},logKaTeXError:(e,t)=>Promise.resolve({}),TeX:({children:e})=>r.jsx("span",{className:"mock-TeX",children:e}),staticUrl:e=>`mockStaticUrl(${e})`,useVideo:(e,t)=>e==="YoutubeId"&&t==="YOUTUBE_ID"?{status:"success",data:{video:{id:"YoutubeVideo",contentId:"contentId",youtubeId:"YoutubeId",title:"Youtube Video Title",__typename:"Video"}}}:e==="slug-video-id"&&t==="READABLE_ID"?{status:"success",data:{video:{title:"Slug Video Title",id:"VideoId",youtubeId:"YoutubeId",contentId:"contentId",__typename:"Video"}}}:{status:"loading"},InitialRequestUrl:{origin:"origin-test-interface",host:"host-test-interface",protocol:"protocol-test-interface"},isDevServer:!1,kaLocale:"en",Log:l},m={analytics:{onAnalyticsEvent:async()=>{}},useVideo:()=>({status:"success",data:{video:null}})},T={...p,TeX:a,staticUrl:e=>e},b={...m,analytics:{onAnalyticsEvent:async e=>{console.log("⚡️ Sending analytics event:",e)}}};export{T as a,b as s}; +import{j as r}from"./jsx-runtime-63Ea5SlK.js";import{r as u}from"./register-all-widgets-for-testing-0z8sJlZ3.js";import{d as c}from"./key-translator-hixns6dh.js";import{r as s}from"./index-6oxdNXpR.js";const o=new c.MathJaxRenderer({shouldFixUnicodeLayout:!0,fontURL:"https://cdn.kastatic.org/fonts/mathjax",locale:"en"});function a({children:e,onRender:t}){const n=s.useRef(null),{domElement:i,addLabelWhenPresentational:d}=s.useMemo(()=>o.render(e),[e]);return s.useLayoutEffect(()=>{n.current&&(d(n.current),n.current.innerHTML="",n.current.appendChild(i))}),s.useEffect(()=>{o.updateStyles(),t==null||t()},[e,t]),r.jsx("span",{ref:n})}a.__docgenInfo={description:"",methods:[],displayName:"TestMathjax",props:{children:{required:!0,tsType:{name:"string"},description:""},onRender:{required:!1,tsType:{name:"signature",type:"function",raw:"(root?: any) => unknown",signature:{arguments:[{type:{name:"any"},name:"root"}],return:{name:"unknown"}}},description:""}}};u();const l={log:()=>{},error:()=>{}},p={JIPT:{useJIPT:!1},graphieMovablesJiptLabels:{addLabel:(e,t)=>{}},svgImageJiptLabels:{addLabel:(e,t)=>{}},rendererTranslationComponents:{addComponent:e=>-1,removeComponentAtIndex:e=>{}},logKaTeXError:(e,t)=>Promise.resolve({}),TeX:({children:e})=>r.jsx("span",{className:"mock-TeX",children:e}),staticUrl:e=>`mockStaticUrl(${e})`,useVideo:(e,t)=>e==="YoutubeId"&&t==="YOUTUBE_ID"?{status:"success",data:{video:{id:"YoutubeVideo",contentId:"contentId",youtubeId:"YoutubeId",title:"Youtube Video Title",__typename:"Video"}}}:e==="slug-video-id"&&t==="READABLE_ID"?{status:"success",data:{video:{title:"Slug Video Title",id:"VideoId",youtubeId:"YoutubeId",contentId:"contentId",__typename:"Video"}}}:{status:"loading"},InitialRequestUrl:{origin:"origin-test-interface",host:"host-test-interface",protocol:"protocol-test-interface"},isDevServer:!1,kaLocale:"en",Log:l},m={analytics:{onAnalyticsEvent:async()=>{}},useVideo:()=>({status:"success",data:{video:null}})},T={...p,TeX:a,staticUrl:e=>e},b={...m,analytics:{onAnalyticsEvent:async e=>{console.log("⚡️ Sending analytics event:",e)}}};export{T as a,b as s}; diff --git a/assets/text-diff-LGX1DVHQ.js b/assets/text-diff-44zRM9-e.js similarity index 95% rename from assets/text-diff-LGX1DVHQ.js rename to assets/text-diff-44zRM9-e.js index 642a9dab9d..24491f56be 100644 --- a/assets/text-diff-LGX1DVHQ.js +++ b/assets/text-diff-44zRM9-e.js @@ -1,4 +1,4 @@ -import{j as c}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-jwwMfp2y.js";import{_ as d}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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.js";import{c as K}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 q}from"./index-dnMhQZ-1.js";import{P as C}from"./index-0C4KXdeC.js";import{r as G}from"./index-6oxdNXpR.js";function A(t){return{newPos:t.newPos,components:t.components.slice(0)}}function U(t){for(var e=[],s=0;s/g,">"),e=e.replace(/"/g,"""),e}var w=function(t){this.ignoreWhitespace=t};w.prototype={diff:function(t,e){if(e===t)return[{value:e}];if(!e)return[{value:t,removed:!0}];if(!t)return[{value:e,added:!0}];e=this.tokenize(e),t=this.tokenize(t);var s=e.length,r=t.length,a=s+r,i=[{newPos:-1,components:[]}],n=this.extractCommon(i[0],e,t,0);if(i[0].newPos+1>=s&&n+1>=r)return i[0].components;for(var p=1;p<=a;p++)for(var o=-1*p;o<=p;o+=2){var f,u=i[o-1],l=i[o+1];n=(l?l.newPos:0)-o,u&&(i[o-1]=void 0);var m=u&&u.newPos+1=s&&n+1>=r)return f.components;i[o]=f}},pushComponent:function(t,e,s,r){var a=t[t.length-1];a&&a.added===s&&a.removed===r?t[t.length-1]={value:this.join(a.value,e),added:s,removed:r}:t.push({value:e,added:s,removed:r})},extractCommon:function(t,e,s,r){for(var a=e.length,i=s.length,n=t.newPos,p=n-r;n+1/g,">"),e=e.replace(/"/g,"""),e}var w=function(t){this.ignoreWhitespace=t};w.prototype={diff:function(t,e){if(e===t)return[{value:e}];if(!e)return[{value:t,removed:!0}];if(!t)return[{value:e,added:!0}];e=this.tokenize(e),t=this.tokenize(t);var s=e.length,r=t.length,a=s+r,i=[{newPos:-1,components:[]}],n=this.extractCommon(i[0],e,t,0);if(i[0].newPos+1>=s&&n+1>=r)return i[0].components;for(var p=1;p<=a;p++)for(var o=-1*p;o<=p;o+=2){var f,u=i[o-1],l=i[o+1];n=(l?l.newPos:0)-o,u&&(i[o-1]=void 0);var m=u&&u.newPos+1=s&&n+1>=r)return f.components;i[o]=f}},pushComponent:function(t,e,s,r){var a=t[t.length-1];a&&a.added===s&&a.removed===r?t[t.length-1]={value:this.join(a.value,e),added:s,removed:r}:t.push({value:e,added:s,removed:r})},extractCommon:function(t,e,s,r){for(var a=e.length,i=s.length,n=t.newPos,p=n-r;n+1"u"?"":" "+r)),i.push("+++ "+t+(typeof a>"u"?"":" "+a));var n=R.diff(e,s);n[n.length-1].value||n.pop(),n.push({value:"",lines:[]});function p(j){return j.map(function(E){return" "+E})}function o(j,E,k){var I=n[n.length-2],B=E===n.length-2,J=E===n.length-3&&(k.added!==I.added||k.removed!==I.removed);!/\n$/.test(k.value)&&(B||J)&&j.push("\\ No newline at end of file")}for(var f=0,u=0,l=[],m=1,v=1,x=0;xt.jsx(s,{children:t.jsx(o,{})})]},r=o=>t.jsx(e,{title:"A day in the life of a text diff",before:"🥱 Hello world!",after:"😴 Goodbye world!"});r.__docgenInfo={description:"",methods:[],displayName:"Example"};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 t}from"./jsx-runtime-63Ea5SlK.js";import{T as e}from"./text-diff-44zRM9-e.js";import{W as s}from"./perseus-diff-wrapper-c32IFwe6.js";import"./index-6oxdNXpR.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.js";import"./index-0C4KXdeC.js";const Xr={title:"PerseusEditor/Diffs/Text Diff",decorators:[o=>t.jsx(s,{children:t.jsx(o,{})})]},r=o=>t.jsx(e,{title:"A day in the life of a text diff",before:"🥱 Hello world!",after:"😴 Goodbye world!"});r.__docgenInfo={description:"",methods:[],displayName:"Example"};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 Yr=["Example"];export{r as Example,Yr as __namedExportsOrder,Xr as default}; diff --git a/assets/util-WOIF_4W1.js b/assets/util-uQZZCXuL.js similarity index 88% rename from assets/util-WOIF_4W1.js rename to assets/util-uQZZCXuL.js index b82a47bde4..9c9196b4e5 100644 --- a/assets/util-WOIF_4W1.js +++ b/assets/util-uQZZCXuL.js @@ -1 +1 @@ -import{j as d}from"./jsx-runtime-63Ea5SlK.js";import{l as a,m as u}from"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.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 f}from"./index-0DbkllkJ.js";import{c,s}from"./index-deFLJwr4.js";import{l as h}from"./index-awljIyHI.js";import{d as w}from"./key-translator-hixns6dh.js";import{w as p}from"./index-J2t_5nK1.js";const m=e=>{const{color:t,filled:o=!0,decorative:r=!1}=e;return d.jsx(f,{"aria-label":r?void 0:`${t}, ${o?"filled":"open"}`,style:[y.colorSwatch,{border:`4px solid ${a[t]}`,backgroundColor:o?a[t]:c.white}]})},y=h.StyleSheet.create({colorSwatch:{outline:`2px solid ${c.offWhite}`,borderRadius:"50%",width:s.large_24,height:s.large_24}}),Y=m;m.__docgenInfo={description:"",methods:[],displayName:"ColorSwatch",props:{color:{required:!0,tsType:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},description:""},filled:{required:!1,tsType:{name:"boolean"},description:""},decorative:{required:!1,tsType:{name:"boolean"},description:""}}};const i="grayH";function l(e){switch(e){case"point":return{type:"point",coord:[0,0],color:i,filled:!0};case"line":return{type:"line",kind:"line",points:[l("point"),{...l("point"),coord:[2,2]}],color:i,lineStyle:"solid",showPoint1:!1,showPoint2:!1};case"vector":return{type:"vector",points:[[0,0],[2,2]],color:i};case"ellipse":return{type:"ellipse",center:[0,0],radius:[1,1],angle:0,color:i,fillStyle:"none",strokeStyle:"solid"};case"polygon":return{type:"polygon",points:[[0,2],[-1,0],[1,0]],color:i,showVertices:!1,fillStyle:"none",strokeStyle:"solid"};case"function":return{type:"function",color:i,strokeStyle:"solid",equation:"x^2",directionalAxis:"x"};case"label":return{type:"label",coord:[0,0],text:"",color:i,size:"medium"};default:throw new p(e)}}function Z(e,t="solid",o){const r=e==="grayH"?"gray":e;switch(o){case"none":return`. Appearance ${t} ${r} border, with no fill.`;case"white":return`. Appearance ${t} ${r} border, with a white fill.`;case"solid":case"translucent":return`. Appearance ${t} ${r} border, with a ${o} ${r} fill.`;case void 0:return`. Appearance ${t} ${r}.`;default:throw new p(o)}}async function g(e){const t=await w.SpeechRuleEngine.setup("en");let o="";const r=u(e);for(const n of r)switch(n.type){case"math":o+=t.texToSpeech(n.content);break;case"specialCharacter":n.content.length>1?o+=n.content.slice(1):o+=n.content;break;default:o+=n.content;break}return o}async function ee(e){if(!e||e.length===0)return"";const t=e.map(r=>g(r.text));return` ${(await Promise.all(t)).join(", ")}`}export{Y as C,Z as a,l as g,ee as j}; +import{j as d}from"./jsx-runtime-63Ea5SlK.js";import{l as a,m as u}from"./article-renderer-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.js";import"./svg-image-FcZanvM1.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 f}from"./index-0DbkllkJ.js";import{c,s}from"./index-deFLJwr4.js";import{l as h}from"./index-awljIyHI.js";import{d as w}from"./key-translator-hixns6dh.js";import{w as p}from"./index-J2t_5nK1.js";const m=e=>{const{color:t,filled:o=!0,decorative:r=!1}=e;return d.jsx(f,{"aria-label":r?void 0:`${t}, ${o?"filled":"open"}`,style:[y.colorSwatch,{border:`4px solid ${a[t]}`,backgroundColor:o?a[t]:c.white}]})},y=h.StyleSheet.create({colorSwatch:{outline:`2px solid ${c.offWhite}`,borderRadius:"50%",width:s.large_24,height:s.large_24}}),Y=m;m.__docgenInfo={description:"",methods:[],displayName:"ColorSwatch",props:{color:{required:!0,tsType:{name:"unknown[number]",raw:"(typeof lockedFigureColorNames)[number]"},description:""},filled:{required:!1,tsType:{name:"boolean"},description:""},decorative:{required:!1,tsType:{name:"boolean"},description:""}}};const i="grayH";function l(e){switch(e){case"point":return{type:"point",coord:[0,0],color:i,filled:!0};case"line":return{type:"line",kind:"line",points:[l("point"),{...l("point"),coord:[2,2]}],color:i,lineStyle:"solid",showPoint1:!1,showPoint2:!1};case"vector":return{type:"vector",points:[[0,0],[2,2]],color:i};case"ellipse":return{type:"ellipse",center:[0,0],radius:[1,1],angle:0,color:i,fillStyle:"none",strokeStyle:"solid"};case"polygon":return{type:"polygon",points:[[0,2],[-1,0],[1,0]],color:i,showVertices:!1,fillStyle:"none",strokeStyle:"solid"};case"function":return{type:"function",color:i,strokeStyle:"solid",equation:"x^2",directionalAxis:"x"};case"label":return{type:"label",coord:[0,0],text:"",color:i,size:"medium"};default:throw new p(e)}}function Z(e,t="solid",o){const r=e==="grayH"?"gray":e;switch(o){case"none":return`. Appearance ${t} ${r} border, with no fill.`;case"white":return`. Appearance ${t} ${r} border, with a white fill.`;case"solid":case"translucent":return`. Appearance ${t} ${r} border, with a ${o} ${r} fill.`;case void 0:return`. Appearance ${t} ${r}.`;default:throw new p(o)}}async function g(e){const t=await w.SpeechRuleEngine.setup("en");let o="";const r=u(e);for(const n of r)switch(n.type){case"math":o+=t.texToSpeech(n.content);break;case"specialCharacter":n.content.length>1?o+=n.content.slice(1):o+=n.content;break;default:o+=n.content;break}return o}async function ee(e){if(!e||e.length===0)return"";const t=e.map(r=>g(r.text));return` ${(await Promise.all(t)).join(", ")}`}export{Y as C,Z as a,l as g,ee as j}; diff --git a/assets/video.stories-ao_2OTPZ.js b/assets/video.stories-SKPn9ZDM.js similarity index 83% rename from assets/video.stories-ao_2OTPZ.js rename to assets/video.stories-SKPn9ZDM.js index 9e3a4c49c8..4a9c17e284 100644 --- a/assets/video.stories-ao_2OTPZ.js +++ b/assets/video.stories-SKPn9ZDM.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-63Ea5SlK.js";import{R as e}from"./renderer-with-debug-ui-rlAJ1oPQ.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-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.js";import"./shared-4TdECMLk.js";import"./choice-none-above-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./register-all-widgets-for-testing-IqvoTTry.js";const h={content:`Watch the Biogeography: Where Life Lives video to find the answer. +import{j as i}from"./jsx-runtime-63Ea5SlK.js";import{R as e}from"./renderer-with-debug-ui-Hlx8S3_1.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-m2DxR4DL.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-IhFUya5i.js";import"./asset-context-H6Iqp7Gi.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.js";import"./shared-4TdECMLk.js";import"./choice-none-above-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./side-by-side-MBJuyilC.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./register-all-widgets-for-testing-0z8sJlZ3.js";const h={content:`Watch the Biogeography: Where Life Lives video to find the answer. [[☃ video 1]] diff --git a/assets/viewport-resizer-TJi7eV3F.js b/assets/viewport-resizer-0KQVCsZT.js similarity index 80% rename from assets/viewport-resizer-TJi7eV3F.js rename to assets/viewport-resizer-0KQVCsZT.js index 72fcc9aa2c..c18644dfae 100644 --- a/assets/viewport-resizer-TJi7eV3F.js +++ b/assets/viewport-resizer-0KQVCsZT.js @@ -1,2 +1,2 @@ -import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-jwwMfp2y.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-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./renderer-2Ae1Nml7.js";import"./base-radio-ZvkGSpa4.js";import{c as a}from"./components-ODdjt0Ld.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-7aOK05RI.js";import"./index-smZ6iCr_.js";import{d as t}from"./constants-p_UgHLsb.js";import{d as p,e as l,f as m}from"./icon-paths-EoBkHOLI.js";const{ButtonGroup:c,InlineIcon:n}=a,u=o=>{const i=e.jsxs("span",{children:[e.jsx(n,{...p})," Phone"]}),s=e.jsxs("span",{children:[e.jsx(n,{...l})," Tablet"]}),r=e.jsxs("span",{children:[e.jsx(n,{...m})," Desktop"]});return e.jsxs("span",{className:"viewport-resizer",children:["Viewport:"," ",e.jsx(c,{value:o.deviceType,allowEmpty:!1,buttons:[{value:t.PHONE,content:i},{value:t.TABLET,content:s},{value:t.DESKTOP,content:r}],onChange:o.onViewportSizeChanged})]})};u.__docgenInfo={description:"",methods:[],displayName:"ViewportResizer",props:{deviceType:{required:!0,tsType:{name:"union",raw:'"phone" | "tablet" | "desktop"',elements:[{name:"literal",value:'"phone"'},{name:"literal",value:'"tablet"'},{name:"literal",value:'"desktop"'}]},description:"The current device type that is selected."},onViewportSizeChanged:{required:!0,tsType:{name:"signature",type:"function",raw:"(deviceType: DeviceType) => unknown",signature:{arguments:[{type:{name:"union",raw:'"phone" | "tablet" | "desktop"',elements:[{name:"literal",value:'"phone"'},{name:"literal",value:'"tablet"'},{name:"literal",value:'"desktop"'}]},name:"deviceType"}],return:{name:"unknown"}}},description:`A callback that is passed (width, height) as the dimensions of the +import{j as e}from"./jsx-runtime-63Ea5SlK.js";import"./article-renderer-m2DxR4DL.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-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./renderer-IhFUya5i.js";import"./base-radio-DUduhCT2.js";import{c as a}from"./components-JJnZE9Qc.js";import"./index-k-0mNqHS.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.js";import"./index-smZ6iCr_.js";import{d as t}from"./constants-p_UgHLsb.js";import{d as p,e as l,f as m}from"./icon-paths-EoBkHOLI.js";const{ButtonGroup:c,InlineIcon:n}=a,u=o=>{const i=e.jsxs("span",{children:[e.jsx(n,{...p})," Phone"]}),s=e.jsxs("span",{children:[e.jsx(n,{...l})," Tablet"]}),r=e.jsxs("span",{children:[e.jsx(n,{...m})," Desktop"]});return e.jsxs("span",{className:"viewport-resizer",children:["Viewport:"," ",e.jsx(c,{value:o.deviceType,allowEmpty:!1,buttons:[{value:t.PHONE,content:i},{value:t.TABLET,content:s},{value:t.DESKTOP,content:r}],onChange:o.onViewportSizeChanged})]})};u.__docgenInfo={description:"",methods:[],displayName:"ViewportResizer",props:{deviceType:{required:!0,tsType:{name:"union",raw:'"phone" | "tablet" | "desktop"',elements:[{name:"literal",value:'"phone"'},{name:"literal",value:'"tablet"'},{name:"literal",value:'"desktop"'}]},description:"The current device type that is selected."},onViewportSizeChanged:{required:!0,tsType:{name:"signature",type:"function",raw:"(deviceType: DeviceType) => unknown",signature:{arguments:[{type:{name:"union",raw:'"phone" | "tablet" | "desktop"',elements:[{name:"literal",value:'"phone"'},{name:"literal",value:'"tablet"'},{name:"literal",value:'"desktop"'}]},name:"deviceType"}],return:{name:"unknown"}}},description:`A callback that is passed (width, height) as the dimensions of the viewport to resize to.`}}};export{u as V}; diff --git a/assets/viewport-resizer.stories-DrRDwzBx.js b/assets/viewport-resizer.stories--Brnpkwf.js similarity index 77% rename from assets/viewport-resizer.stories-DrRDwzBx.js rename to assets/viewport-resizer.stories--Brnpkwf.js index 069187cca2..8e1529a867 100644 --- a/assets/viewport-resizer.stories-DrRDwzBx.js +++ b/assets/viewport-resizer.stories--Brnpkwf.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-63Ea5SlK.js";import{a}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{r as c}from"./index-6oxdNXpR.js";import{V as m}from"./viewport-resizer-TJi7eV3F.js";import"./v4-yQnnJER4.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-jwwMfp2y.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-2Ae1Nml7.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-D8O3Xswb.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-ZvkGSpa4.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-OdYPsA-W.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-SJp9oQsg.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-sirTJF7M.js";import"./answer-pill-ZZeQEGrZ.js";import"./sortable-pOpkHk6I.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-9YLLcbpB.js";import"./hints-renderer-dH4zQ5yQ.js";import"./components-ODdjt0Ld.js";import"./constants-p_UgHLsb.js";import"./icon-paths-EoBkHOLI.js";const rt={component:m,title:"PerseusEditor/Components/Viewport Resizer"},o=()=>{const[e,n]=c.useState("phone");return s.jsx(m,{deviceType:e,onViewportSizeChanged:t=>{a("onViewportSizeChanged")(t),n(t)}})};o.__docgenInfo={description:"",methods:[],displayName:"Controlled"};var r,i,p;o.parameters={...o.parameters,docs:{...(r=o.parameters)==null?void 0:r.docs,source:{originalSource:`() => { +import{j as s}from"./jsx-runtime-63Ea5SlK.js";import{a}from"./chunk-D5ZWXAHU-vR62DWf0.js";import{r as c}from"./index-6oxdNXpR.js";import{V as m}from"./viewport-resizer-0KQVCsZT.js";import"./v4-yQnnJER4.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-m2DxR4DL.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-IhFUya5i.js";import"./index-dnMhQZ-1.js";import"./asset-context-H6Iqp7Gi.js";import"./i18n-context-fsWEgybQ.js";import"./svg-image-FcZanvM1.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-cAdD85Lh.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-DUduhCT2.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-cKXRS8bE.js";import"./phet-simulation-_7qOO4_B.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-BvCuCrDd.js";import"./button-group-G5CZaedn.js";import"./graph-4ZDD3NK_.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-zOWMpEAL.js";import"./answer-pill-1rH5rJkp.js";import"./sortable-Ho8icdmJ.js";import"./video-transcript-link-_gpkjmR8.js";import"./perseus-item-N_w_I8xw.js";import"./hints-renderer-b_P2F9w3.js";import"./components-JJnZE9Qc.js";import"./constants-p_UgHLsb.js";import"./icon-paths-EoBkHOLI.js";const rt={component:m,title:"PerseusEditor/Components/Viewport Resizer"},o=()=>{const[e,n]=c.useState("phone");return s.jsx(m,{deviceType:e,onViewportSizeChanged:t=>{a("onViewportSizeChanged")(t),n(t)}})};o.__docgenInfo={description:"",methods:[],displayName:"Controlled"};var r,i,p;o.parameters={...o.parameters,docs:{...(r=o.parameters)==null?void 0:r.docs,source:{originalSource:`() => { const [deviceType, setDeviceType] = React.useState("phone"); return { action("onViewportSizeChanged")(newDeviceType); diff --git a/iframe.html b/iframe.html index 7dac95840c..5d6c7f1c26 100644 --- a/iframe.html +++ b/iframe.html @@ -575,7 +575,7 @@ } - + diff --git a/preview-stats.json b/preview-stats.json index 77582b8681..7e07b0fca8 100644 --- a/preview-stats.json +++ b/preview-stats.json @@ -1239,18 +1239,6 @@ } ] }, - { - "id": "./packages/math-input/src/components/tabbar/item.tsx", - "name": "./packages/math-input/src/components/tabbar/item.tsx", - "reasons": [ - { - "moduleName": "./packages/math-input/src/components/tabbar/tabbaritem.stories.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/tabbar/tabbar.tsx" - } - ] - }, { "id": "./packages/perseus-editor/src/tex-error-view.tsx", "name": "./packages/perseus-editor/src/tex-error-view.tsx", @@ -1264,29 +1252,26 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/phet-simulation-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/phet-simulation-editor.tsx", + "id": "./packages/math-input/src/components/tabbar/item.tsx", + "name": "./packages/math-input/src/components/tabbar/item.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/phet-simulation-editor.stories.tsx" + "moduleName": "./packages/math-input/src/components/tabbar/tabbaritem.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./packages/math-input/src/components/tabbar/tabbar.tsx" } ] }, { - "id": "./packages/perseus/src/components/graph.tsx", - "name": "./packages/perseus/src/components/graph.tsx", + "id": "./packages/perseus-editor/src/widgets/phet-simulation-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/phet-simulation-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/graph.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/components.ts" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/phet-simulation-editor.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, @@ -1303,29 +1288,17 @@ ] }, { - "id": "./packages/perseus/src/components/math-input.tsx", - "name": "./packages/perseus/src/components/math-input.tsx", + "id": "./packages/perseus/src/components/input-with-examples.tsx", + "name": "./packages/perseus/src/components/input-with-examples.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/math-input.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/components.ts" + "moduleName": "./packages/perseus/src/components/__stories__/input-with-examples.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/components/stub-tag-editor.tsx", - "name": "./packages/perseus/src/components/stub-tag-editor.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/components/__stories__/stub-tag-editor.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" }, { - "moduleName": "./packages/perseus/src/perseus-api.tsx" + "moduleName": "./packages/perseus/src/widgets/input-number/input-number.tsx" } ] }, @@ -1342,9 +1315,6 @@ { "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group-answer-bar.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/label-image/marker.tsx" }, @@ -1356,6 +1326,9 @@ }, { "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group-answer-bar.tsx" } ] }, @@ -1378,98 +1351,89 @@ ] }, { - "id": "./packages/perseus/src/components/simple-keypad-input.tsx", - "name": "./packages/perseus/src/components/simple-keypad-input.tsx", + "id": "./packages/perseus/src/components/math-input.tsx", + "name": "./packages/perseus/src/components/math-input.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/simple-keypad-input.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/math-input.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/table/table.tsx" + "moduleName": "./packages/perseus/src/components.ts" }, { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" + "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/components/inline-icon.tsx", + "name": "./packages/perseus/src/components/inline-icon.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/components/__stories__/inline-icon.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" + "moduleName": "./packages/perseus/src/components.ts" }, { - "moduleName": "./packages/perseus/src/widgets/input-number/input-number.tsx" + "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/matrix/matrix.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/components/sortable.tsx", - "name": "./packages/perseus/src/components/sortable.tsx", - "reasons": [ + "moduleName": "./packages/perseus/src/components/lint.tsx" + }, { - "moduleName": "./packages/perseus/src/components/__stories__/sortable.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/sorter/sorter.tsx" + "moduleName": "./packages/perseus/src/widgets/categorizer/categorizer.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/matcher/matcher.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group-answer-bar.tsx" } ] }, { - "id": "./packages/perseus/src/components/range-input.tsx", - "name": "./packages/perseus/src/components/range-input.tsx", + "id": "./packages/perseus/src/components/graph.tsx", + "name": "./packages/perseus/src/components/graph.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/range-input.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/graph.stories.tsx" }, { "moduleName": "./packages/perseus/src/components.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" } ] }, { - "id": "./packages/perseus/src/components/inline-icon.tsx", - "name": "./packages/perseus/src/components/inline-icon.tsx", + "id": "./packages/perseus/src/components/range-input.tsx", + "name": "./packages/perseus/src/components/range-input.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/inline-icon.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/range-input.stories.tsx" }, { "moduleName": "./packages/perseus/src/components.ts" - }, - { - "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group-answer-bar.tsx" - }, - { - "moduleName": "./packages/perseus/src/components/lint.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/categorizer/categorizer.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.tsx" } ] }, { - "id": "./packages/perseus/src/components/input-with-examples.tsx", - "name": "./packages/perseus/src/components/input-with-examples.tsx", + "id": "./packages/perseus/src/components/sortable.tsx", + "name": "./packages/perseus/src/components/sortable.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/input-with-examples.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/sortable.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" + "moduleName": "./packages/perseus/src/widgets/sorter/sorter.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/input-number/input-number.tsx" + "moduleName": "./packages/perseus/src/widgets/matcher/matcher.tsx" } ] }, @@ -1524,6 +1488,42 @@ } ] }, + { + "id": "./packages/perseus/src/components/stub-tag-editor.tsx", + "name": "./packages/perseus/src/components/stub-tag-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/components/__stories__/stub-tag-editor.stories.tsx" + }, + { + "moduleName": "./packages/perseus/src/perseus-api.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/components/simple-keypad-input.tsx", + "name": "./packages/perseus/src/components/simple-keypad-input.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/components/__stories__/simple-keypad-input.stories.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/table/table.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/input-number/input-number.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/matrix/matrix.tsx" + } + ] + }, { "id": "./packages/perseus/src/components/tex.tsx", "name": "./packages/perseus/src/components/tex.tsx", @@ -1633,15 +1633,15 @@ { "moduleName": "./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx" }, - { - "moduleName": "./packages/math-input/src/components/key-handlers/handle-arrow.ts" - }, { "moduleName": "./packages/math-input/src/components/key-handlers/handle-jump-out.ts" }, { "moduleName": "./packages/math-input/src/components/key-handlers/handle-exponent.ts" }, + { + "moduleName": "./packages/math-input/src/components/key-handlers/handle-arrow.ts" + }, { "moduleName": "./packages/math-input/src/components/input/math-wrapper.ts" }, @@ -1682,10 +1682,10 @@ "moduleName": "./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx" }, { - "moduleName": "./packages/math-input/src/components/key-handlers/handle-arrow.ts" + "moduleName": "./packages/math-input/src/components/key-handlers/handle-jump-out.ts" }, { - "moduleName": "./packages/math-input/src/components/key-handlers/handle-jump-out.ts" + "moduleName": "./packages/math-input/src/components/key-handlers/handle-arrow.ts" }, { "moduleName": "./packages/math-input/src/components/input/math-wrapper.ts" @@ -1796,10 +1796,10 @@ "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/fractions-page.tsx" }, { - "moduleName": "./packages/math-input/src/components/keypad/utils.ts" + "moduleName": "./packages/math-input/src/components/keypad/shared-keys.tsx" }, { - "moduleName": "./packages/math-input/src/components/keypad/shared-keys.tsx" + "moduleName": "./packages/math-input/src/components/keypad/utils.ts" }, { "moduleName": "./packages/math-input/src/components/keypad/navigation-pad.tsx" @@ -1864,9 +1864,6 @@ { "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" }, @@ -1874,25 +1871,28 @@ "moduleName": "./packages/perseus/src/widgets/orderer/orderer.tsx" }, { - "moduleName": "./packages/perseus/src/hints-renderer.tsx" + "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.tsx" }, { - "moduleName": "./packages/perseus/src/server-item-renderer.tsx" + "moduleName": "./packages/perseus/src/hints-renderer.tsx" }, { "moduleName": "./packages/perseus/src/components/sortable.tsx" }, + { + "moduleName": "./packages/perseus/src/server-item-renderer.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" + "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" }, { "moduleName": "./packages/perseus/src/widgets/input-number/input-number.tsx" @@ -2009,10 +2009,10 @@ "moduleName": "./packages/perseus/src/components/input-with-examples.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/label-image/answer-choices.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/choice-none-above.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/radio/choice-none-above.tsx" + "moduleName": "./packages/perseus/src/widgets/label-image/answer-choices.tsx" }, { "moduleName": "./packages/perseus/src/article-renderer.tsx" @@ -2021,16 +2021,16 @@ "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/definition/definition.tsx" + "moduleName": "./packages/perseus/src/widgets/image/image.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/group/group.tsx" + "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/image/image.tsx" + "moduleName": "./packages/perseus/src/widgets/definition/definition.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" + "moduleName": "./packages/perseus/src/widgets/group/group.tsx" }, { "moduleName": "./packages/perseus/src/widgets/table/table.tsx" @@ -2039,10 +2039,10 @@ "moduleName": "./packages/perseus/src/widgets/orderer/orderer.tsx" }, { - "moduleName": "./packages/perseus/src/server-item-renderer.tsx" + "moduleName": "./packages/perseus/src/components/sortable.tsx" }, { - "moduleName": "./packages/perseus/src/components/sortable.tsx" + "moduleName": "./packages/perseus/src/server-item-renderer.tsx" }, { "moduleName": "./packages/perseus/src/widgets/label-image/answer-pill.tsx" @@ -2059,6 +2059,9 @@ { "moduleName": "./packages/perseus/src/multi-items/multi-renderer.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/explanation/explanation.tsx" }, @@ -2068,9 +2071,6 @@ { "moduleName": "./packages/perseus/src/widgets/label-image/label-image.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/matcher/matcher.tsx" } @@ -2104,17 +2104,14 @@ { "moduleName": "./packages/perseus/src/index.ts" }, - { - "moduleName": "./packages/perseus/src/item-version.ts" - }, { "moduleName": "./packages/perseus/src/init.ts" }, { - "moduleName": "./packages/perseus/src/renderer-util.ts" + "moduleName": "./packages/perseus/src/item-version.ts" }, { - "moduleName": "./packages/perseus/src/a11y.ts" + "moduleName": "./packages/perseus/src/renderer-util.ts" }, { "moduleName": "./packages/perseus/src/renderability.ts" @@ -2125,6 +2122,9 @@ { "moduleName": "./packages/perseus/src/traversal.ts" }, + { + "moduleName": "./packages/perseus/src/a11y.ts" + }, { "moduleName": "./packages/perseus/src/util/extract-perseus-data.ts" }, @@ -2348,19 +2348,19 @@ "moduleName": "./packages/perseus/src/components/__stories__/fixed-to-responsive.stories.tsx" }, { - "moduleName": "./packages/perseus/src/components/tex.tsx" + "moduleName": "./packages/perseus/src/components/image-loader.tsx" }, { - "moduleName": "./packages/perseus/src/components/image-loader.tsx" + "moduleName": "./packages/perseus/src/components/tex.tsx" }, { "moduleName": "./packages/perseus/src/logging/log.ts" }, { - "moduleName": "./packages/perseus/src/widgets/grapher/util.tsx" + "moduleName": "./packages/perseus/src/perseus-markdown.tsx" }, { - "moduleName": "./packages/perseus/src/perseus-markdown.tsx" + "moduleName": "./packages/perseus/src/widgets/grapher/util.tsx" }, { "moduleName": "./packages/perseus/src/article-renderer.tsx" @@ -2375,10 +2375,10 @@ "moduleName": "./packages/perseus/src/util/tex.ts" }, { - "moduleName": "./packages/perseus/src/widgets/iframe/iframe.tsx" + "moduleName": "./packages/perseus/src/widgets/video/video.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/video/video.tsx" + "moduleName": "./packages/perseus/src/widgets/iframe/iframe.tsx" }, { "moduleName": "./packages/perseus/src/renderer.tsx" @@ -2390,34 +2390,34 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" }, { - "moduleName": "./packages/perseus/src/server-item-renderer.tsx" + "moduleName": "./packages/perseus/src/components/sortable.tsx" }, { - "moduleName": "./packages/perseus/src/components/sortable.tsx" + "moduleName": "./packages/perseus/src/server-item-renderer.tsx" }, { "moduleName": "./packages/perseus/src/widgets/phet-simulation/phet-simulation.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/video/video-transcript-link.tsx" + "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" + "moduleName": "./packages/perseus/src/widgets/video/video-transcript-link.tsx" }, { "moduleName": "./packages/perseus/src/multi-items/multi-renderer.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.tsx" + "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" }, { "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/label-image/label-image.tsx" + "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" + "moduleName": "./packages/perseus/src/widgets/label-image/label-image.tsx" }, { "moduleName": "./packages/perseus/src/widgets/matcher/matcher.tsx" @@ -2495,19 +2495,19 @@ "moduleName": "./packages/perseus/src/util/graphie.ts" }, { - "moduleName": "./packages/perseus/src/util/answer-types.ts" + "moduleName": "./packages/perseus/src/interactive2/wrapped-line.ts" }, { "moduleName": "./packages/perseus/src/util/geometry.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/wrapped-line.ts" + "moduleName": "./packages/perseus/src/util/answer-types.ts" }, { - "moduleName": "./packages/perseus/src/util/tex.ts" + "moduleName": "./packages/perseus/src/util/interactive.ts" }, { - "moduleName": "./packages/perseus/src/util/interactive.ts" + "moduleName": "./packages/perseus/src/util/tex.ts" }, { "moduleName": "./packages/perseus/src/components/number-input.tsx" @@ -2612,10 +2612,10 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-label.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-function.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-ellipse.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-ellipse.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-function.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-line.tsx" @@ -2639,10 +2639,10 @@ "moduleName": "./packages/perseus/src/index.ts" }, { - "moduleName": "./packages/perseus/src/a11y.ts" + "moduleName": "./packages/perseus/src/renderability.ts" }, { - "moduleName": "./packages/perseus/src/renderability.ts" + "moduleName": "./packages/perseus/src/a11y.ts" } ] }, @@ -2674,15 +2674,15 @@ { "moduleName": "./packages/perseus/src/widgets/radio/__stories__/focus-ring.stories.tsx" }, - { - "moduleName": "./testing/side-by-side.tsx" - }, { "moduleName": "./packages/perseus/src/styles/media-queries.ts" }, { "moduleName": "./packages/perseus/src/util/sizing-utils.ts" }, + { + "moduleName": "./testing/side-by-side.tsx" + }, { "moduleName": "./packages/perseus/src/components/fixed-to-responsive.tsx" }, @@ -2695,17 +2695,14 @@ { "moduleName": "./packages/perseus/src/widget-container.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group-answer-bar.tsx" - }, { "moduleName": "./packages/perseus/src/hints-renderer.tsx" }, { - "moduleName": "./packages/perseus/src/components/lint.tsx" + "moduleName": "./packages/perseus/src/components/hud.tsx" }, { - "moduleName": "./packages/perseus/src/components/hud.tsx" + "moduleName": "./packages/perseus/src/components/lint.tsx" }, { "moduleName": "./packages/perseus/src/widgets/phet-simulation/phet-simulation.tsx" @@ -2725,15 +2722,18 @@ { "moduleName": "./packages/perseus/src/styles/shared.ts" }, - { - "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.tsx" }, { "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group-answer-bar.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/legacy-grid.tsx" } @@ -2759,10 +2759,10 @@ "moduleName": "./packages/perseus/src/components/input-with-examples.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/label-image/answer-choices.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/choice-none-above.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/radio/choice-none-above.tsx" + "moduleName": "./packages/perseus/src/widgets/label-image/answer-choices.tsx" }, { "moduleName": "./packages/perseus/src/article-renderer.tsx" @@ -2771,34 +2771,34 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" }, { - "moduleName": "./packages/perseus/src/components/number-input.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" + "moduleName": "./packages/perseus/src/components/number-input.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/definition/definition.tsx" + "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/deprecated-standin/deprecated-standin.tsx" + "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/group/group.tsx" + "moduleName": "./packages/perseus/src/widgets/video/video.tsx" }, { "moduleName": "./packages/perseus/src/widgets/image/image.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" + "moduleName": "./packages/perseus/src/widgets/deprecated-standin/deprecated-standin.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/video/video.tsx" + "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" + "moduleName": "./packages/perseus/src/widgets/definition/definition.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" + "moduleName": "./packages/perseus/src/widgets/group/group.tsx" }, { "moduleName": "./packages/perseus/src/renderer.tsx" @@ -2809,9 +2809,6 @@ { "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" }, @@ -2819,10 +2816,10 @@ "moduleName": "./packages/perseus/src/widgets/orderer/orderer.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" + "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group-answer-bar.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" }, { "moduleName": "./packages/perseus/src/widgets/passage/passage-markdown.tsx" @@ -2834,10 +2831,10 @@ "moduleName": "./packages/perseus/src/components/math-input.tsx" }, { - "moduleName": "./packages/perseus/src/server-item-renderer.tsx" + "moduleName": "./packages/perseus/src/components/sortable.tsx" }, { - "moduleName": "./packages/perseus/src/components/sortable.tsx" + "moduleName": "./packages/perseus/src/server-item-renderer.tsx" }, { "moduleName": "./packages/perseus/src/widgets/label-image/marker.tsx" @@ -2852,25 +2849,25 @@ "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" }, { - "moduleName": "./packages/perseus/src/hint-renderer.tsx" + "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/video/video-transcript-link.tsx" + "moduleName": "./packages/perseus/src/hint-renderer.tsx" }, { "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/radio/option-status.tsx" + "moduleName": "./packages/perseus/src/widgets/video/video-transcript-link.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/option-status.tsx" }, { "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx" }, { "moduleName": "./packages/perseus/src/widgets/input-number/input-number.tsx" @@ -2884,6 +2881,9 @@ { "moduleName": "./packages/perseus/src/multi-items/multi-renderer.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/explanation/explanation.tsx" }, @@ -2897,10 +2897,10 @@ "moduleName": "./packages/perseus/src/widgets/label-image/label-image.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" + "moduleName": "./packages/perseus/src/widgets/matcher/matcher.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/matcher/matcher.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group-answer-bar.tsx" }, { "moduleName": "./packages/perseus/src/widgets/label-image/hide-answers-toggle.tsx" @@ -2939,10 +2939,10 @@ "moduleName": "./packages/perseus/src/article-renderer.tsx" }, { - "moduleName": "./packages/perseus/src/components/graph.tsx" + "moduleName": "./packages/perseus/src/components/graphie.tsx" }, { - "moduleName": "./packages/perseus/src/components/graphie.tsx" + "moduleName": "./packages/perseus/src/components/graph.tsx" }, { "moduleName": "./packages/perseus/src/components/svg-image.tsx" @@ -2953,17 +2953,14 @@ { "moduleName": "./dev/flipbook.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/radio/radio.ts" - }, { "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/score-interactive-graph.ts" + "moduleName": "./packages/perseus/src/widgets/radio/radio.ts" }, { - "moduleName": "./packages/perseus/src/util/geometry.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/score-interactive-graph.ts" }, { "moduleName": "./packages/perseus/src/util/is-real-json-parse.ts" @@ -2972,22 +2969,25 @@ "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" }, { - "moduleName": "./packages/perseus/src/components/number-input.tsx" + "moduleName": "./packages/perseus/src/util/geometry.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" }, { "moduleName": "./packages/perseus/src/widgets/plotter/score-plotter.ts" }, { - "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" + "moduleName": "./packages/perseus/src/components/number-input.tsx" }, { "moduleName": "./packages/perseus/src/widgets/iframe/iframe.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" + "moduleName": "./packages/perseus/src/widgets/sorter/sorter.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/sorter/sorter.tsx" + "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" }, { "moduleName": "./packages/perseus/src/renderer.tsx" @@ -2998,23 +2998,20 @@ { "moduleName": "./packages/perseus/src/widgets/orderer/orderer.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/plotter/validate-plotter.ts" - }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts" }, { - "moduleName": "./packages/perseus/src/widgets/sorter/score-sorter.ts" + "moduleName": "./packages/perseus/src/widgets/plotter/validate-plotter.ts" }, { "moduleName": "./packages/perseus/src/hints-renderer.tsx" }, { - "moduleName": "./packages/perseus/src/server-item-renderer.tsx" + "moduleName": "./packages/perseus/src/components/sortable.tsx" }, { - "moduleName": "./packages/perseus/src/components/sortable.tsx" + "moduleName": "./packages/perseus/src/server-item-renderer.tsx" }, { "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" @@ -3033,6 +3030,9 @@ }, { "moduleName": "./packages/perseus/src/widgets/matcher/matcher.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/sorter/score-sorter.ts" } ] }, @@ -3143,10 +3143,10 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-labels.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-label.tsx" @@ -3260,17 +3260,20 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/grid.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/legacy-grid.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-ticks.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/legacy-grid.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-ticks.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/sinusoid.tsx" }, @@ -3278,19 +3281,19 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/arrowhead.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-line.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-transform.ts" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-polygon.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-line.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-transform.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-polygon.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/arrowhead.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-draggable.ts" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" @@ -3304,9 +3307,6 @@ { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/angle-indicators.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-draggable.ts" - }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/use-control-point.tsx" }, @@ -3338,25 +3338,25 @@ "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/group/group.tsx" + "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/image/image.tsx" + "moduleName": "./packages/perseus/src/widgets/video/video.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/iframe/iframe.tsx" + "moduleName": "./packages/perseus/src/widgets/image/image.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" + "moduleName": "./packages/perseus/src/widgets/iframe/iframe.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" + "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/video/video.tsx" + "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" + "moduleName": "./packages/perseus/src/widgets/group/group.tsx" }, { "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" @@ -3367,9 +3367,6 @@ { "moduleName": "./packages/perseus/src/widgets/categorizer/categorizer.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/explanation/explanation.tsx" }, @@ -3378,6 +3375,9 @@ }, { "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.tsx" } ] }, @@ -3413,10 +3413,10 @@ "moduleName": "./packages/perseus/src/index.ts" }, { - "moduleName": "./packages/perseus/src/a11y.ts" + "moduleName": "./packages/perseus/src/renderability.ts" }, { - "moduleName": "./packages/perseus/src/renderability.ts" + "moduleName": "./packages/perseus/src/a11y.ts" } ] }, @@ -3469,533 +3469,533 @@ ] }, { - "id": "./packages/perseus/src/index.ts", - "name": "./packages/perseus/src/index.ts", + "id": "./packages/keypad-context/src/keypad-context.tsx", + "name": "./packages/keypad-context/src/keypad-context.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/util/register-all-widgets-and-editors-for-testing.ts" - }, + "moduleName": "./packages/keypad-context/src/index.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/version.ts", + "name": "./packages/perseus-editor/src/version.ts", + "reasons": [ { "moduleName": "./packages/perseus-editor/src/index.ts" - }, - { - "moduleName": "./packages/perseus-editor/src/__stories__/flags-for-api-options.ts" - }, + } + ] + }, + { + "id": "./packages/perseus-editor/src/article-editor.tsx", + "name": "./packages/perseus-editor/src/article-editor.tsx", + "reasons": [ { - "moduleName": "./.storybook/preview.tsx" + "moduleName": "./packages/perseus-editor/src/index.ts" }, { "moduleName": "./packages/perseus-editor/src/__stories__/article-editor.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/components/__stories__/section-control-button.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/categorizer-editor.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/components/viewport-resizer.tsx" - }, + } + ] + }, + { + "id": "./packages/perseus-editor/src/components/device-framer.tsx", + "name": "./packages/perseus-editor/src/components/device-framer.tsx", + "reasons": [ { - "moduleName": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx" + "moduleName": "./packages/perseus-editor/src/index.ts" }, { - "moduleName": "./packages/perseus-editor/src/widgets/python-program-editor.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/phet-simulation-editor.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/device-framer.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/article-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/image-editor.tsx" + "moduleName": "./packages/perseus-editor/src/item-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/input-number-editor.tsx" - }, + "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/components/viewport-resizer.tsx", + "name": "./packages/perseus-editor/src/components/viewport-resizer.tsx", + "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/numeric-input-editor.tsx" + "moduleName": "./packages/perseus-editor/src/index.ts" }, { - "moduleName": "./testing/server-item-renderer-with-debug-ui.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" }, { - "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/viewport-resizer.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/i18n.ts" - }, + "moduleName": "./packages/perseus-editor/src/editor-page.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/diffs/article-diff.tsx", + "name": "./packages/perseus-editor/src/diffs/article-diff.tsx", + "reasons": [ { - "moduleName": "./packages/perseus-editor/src/iframe-content-renderer.tsx" - }, + "moduleName": "./packages/perseus-editor/src/index.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/diffs/item-diff.tsx", + "name": "./packages/perseus-editor/src/diffs/item-diff.tsx", + "reasons": [ { - "moduleName": "./testing/renderer-with-debug-ui.tsx" - }, + "moduleName": "./packages/perseus-editor/src/index.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx", + "name": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx", + "reasons": [ { - "moduleName": "./packages/perseus-editor/src/diffs/renderer-diff.tsx" + "moduleName": "./packages/perseus-editor/src/index.ts" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/interaction-editor.tsx" - }, + "moduleName": "./packages/perseus-editor/src/diffs/__stories__/structured-item-diff.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/editor-page.tsx", + "name": "./packages/perseus-editor/src/editor-page.tsx", + "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/util.ts" + "moduleName": "./packages/perseus-editor/src/index.ts" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" - }, + "moduleName": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/editor.tsx", + "name": "./packages/perseus-editor/src/editor.tsx", + "reasons": [ { - "moduleName": "./packages/perseus-editor/src/editor-page.tsx" + "moduleName": "./packages/perseus-editor/src/index.ts" }, { - "moduleName": "./dev/flipbook.tsx" + "moduleName": "./packages/perseus-editor/src/article-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/deprecated-standin-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/image-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/grapher-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/numeric-input-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/editor.tsx" + "moduleName": "./packages/perseus-editor/src/item-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/widget-select.tsx" + "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/element-container.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/definition-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/function-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/explanation-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/label-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/radio/editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/line-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/group-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-line-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/matrix-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-point-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/passage-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/parametric-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/table-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/point-editor.tsx" + "moduleName": "./packages/perseus-editor/src/multirenderer-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/rectangle-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/graded-group-editor.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/i18n.ts", + "name": "./packages/perseus-editor/src/i18n.ts", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/index.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/iframe-content-renderer.tsx", + "name": "./packages/perseus-editor/src/iframe-content-renderer.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/index.ts" }, { - "moduleName": "./packages/perseus-editor/src/components/widget-editor.tsx" + "moduleName": "./packages/perseus-editor/src/article-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/item-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/multirenderer-editor.tsx", + "name": "./packages/perseus-editor/src/multirenderer-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/index.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/styles/perseus-editor.less", + "name": "./packages/perseus-editor/src/styles/perseus-editor.less", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/index.ts" }, { - "moduleName": "./packages/perseus-editor/src/widgets/definition-editor.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/categorizer-editor.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/item-editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/diffs/text-diff.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/__stories__/structured-item-diff.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/index.ts", + "name": "./packages/perseus/src/index.ts", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/index.ts" }, { - "moduleName": "./packages/perseus-editor/src/widgets/explanation-editor.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/flags-for-api-options.ts" }, { - "moduleName": "./packages/perseus-editor/src/widgets/sorter-editor.tsx" + "moduleName": "./packages/perseus-editor/src/util/register-all-widgets-and-editors-for-testing.ts" }, { - "moduleName": "./packages/perseus-editor/src/widgets/matcher-editor.tsx" + "moduleName": "./.storybook/preview.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/number-line-editor.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/radio/editor.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/article-editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/graded-group-set-editor.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/section-control-button.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/molecule-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/categorizer-editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/measurer-editor.tsx" + "moduleName": "./packages/perseus-editor/src/components/viewport-resizer.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/matrix-editor.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/cs-program-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/python-program-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/group-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/phet-simulation-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/iframe-editor.tsx" + "moduleName": "./packages/perseus-editor/src/article-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/orderer-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/input-number-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/passage-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/image-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/passage-ref-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/numeric-input-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/passage-ref-target-editor.tsx" + "moduleName": "./testing/server-item-renderer-with-debug-ui.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/table-editor.tsx" + "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/video-editor.tsx" + "moduleName": "./packages/perseus-editor/src/i18n.ts" }, { - "moduleName": "./packages/perseus-editor/src/diffs/widget-diff.tsx" + "moduleName": "./packages/perseus-editor/src/iframe-content-renderer.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/color-picker.tsx" + "moduleName": "./testing/renderer-with-debug-ui.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/dash-picker.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/renderer-diff.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/arrow-picker.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/interaction-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/constraint-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/util.ts" }, { - "moduleName": "./packages/perseus-editor/src/components/graph-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/dropdown-editor.tsx" + "moduleName": "./packages/perseus-editor/src/editor-page.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/plotter-editor.tsx" + "moduleName": "./dev/flipbook.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/image-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/deprecated-standin-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/item-extras-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/grapher-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/element-container.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-select.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/function-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-swatch.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/line-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/label-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-line-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/content-preview.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-point-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/parametric-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/section-control-button.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/point-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/rectangle-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/expression-editor.tsx" + "moduleName": "./packages/perseus-editor/src/editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/label-image-editor.tsx" + "moduleName": "./packages/perseus-editor/src/components/widget-select.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/behavior.tsx" + "moduleName": "./packages/perseus-editor/src/components/widget-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/question-markers.tsx" + "moduleName": "./packages/perseus-editor/src/item-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx" + "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/select-image.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/categorizer-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/definition-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/ellipse-swatch.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/text-diff.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-swatch.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/explanation-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-aria.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/matcher-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/polygon-swatch.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/number-line-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/dropdown-option.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/sorter-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/multirenderer-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/radio/editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/graded-group-editor.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/widget-diff.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/util.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/all-editors.ts", - "name": "./packages/perseus-editor/src/all-editors.ts", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/widgets/cs-program-editor.tsx" + }, { - "moduleName": "./packages/perseus-editor/src/util/register-all-widgets-and-editors-for-testing.ts" + "moduleName": "./packages/perseus-editor/src/widgets/graded-group-set-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/index.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/version.ts", - "name": "./packages/perseus-editor/src/version.ts", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/index.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/article-editor.tsx", - "name": "./packages/perseus-editor/src/article-editor.tsx", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/widgets/group-editor.tsx" + }, { - "moduleName": "./packages/perseus-editor/src/index.ts" + "moduleName": "./packages/perseus-editor/src/widgets/iframe-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/article-editor.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/components/device-framer.tsx", - "name": "./packages/perseus-editor/src/components/device-framer.tsx", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/widgets/matrix-editor.tsx" + }, { - "moduleName": "./packages/perseus-editor/src/index.ts" + "moduleName": "./packages/perseus-editor/src/widgets/molecule-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/__stories__/device-framer.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/measurer-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/orderer-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/article-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/passage-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/item-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/passage-ref-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/components/viewport-resizer.tsx", - "name": "./packages/perseus-editor/src/components/viewport-resizer.tsx", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/widgets/passage-ref-target-editor.tsx" + }, { - "moduleName": "./packages/perseus-editor/src/index.ts" + "moduleName": "./packages/perseus-editor/src/widgets/table-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/video-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/__stories__/viewport-resizer.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/color-picker.tsx" }, { - "moduleName": "./packages/perseus-editor/src/editor-page.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/diffs/article-diff.tsx", - "name": "./packages/perseus-editor/src/diffs/article-diff.tsx", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/dash-picker.tsx" + }, { - "moduleName": "./packages/perseus-editor/src/index.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/diffs/item-diff.tsx", - "name": "./packages/perseus-editor/src/diffs/item-diff.tsx", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/arrow-picker.tsx" + }, { - "moduleName": "./packages/perseus-editor/src/index.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx", - "name": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/constraint-editor.tsx" + }, { - "moduleName": "./packages/perseus-editor/src/index.ts" + "moduleName": "./packages/perseus-editor/src/components/graph-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/diffs/__stories__/structured-item-diff.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/editor-page.tsx", - "name": "./packages/perseus-editor/src/editor-page.tsx", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/widgets/dropdown-editor.tsx" + }, { - "moduleName": "./packages/perseus-editor/src/index.ts" + "moduleName": "./packages/perseus-editor/src/widgets/plotter-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/editor.tsx", - "name": "./packages/perseus-editor/src/editor.tsx", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/image-editor.stories.tsx" + }, { - "moduleName": "./packages/perseus-editor/src/index.ts" + "moduleName": "./packages/perseus-editor/src/item-extras-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/article-editor.tsx" + "moduleName": "./packages/perseus-editor/src/content-preview.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/image-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-swatch.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/numeric-input-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-select.tsx" }, { - "moduleName": "./packages/perseus-editor/src/item-editor.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx" }, { - "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/definition-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/explanation-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/radio/editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/matrix-editor.tsx" + "moduleName": "./packages/perseus-editor/src/components/section-control-button.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/group-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/expression-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/passage-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/table-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx" }, { - "moduleName": "./packages/perseus-editor/src/multirenderer-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/behavior.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/graded-group-editor.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/i18n.ts", - "name": "./packages/perseus-editor/src/i18n.ts", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/widgets/label-image/question-markers.tsx" + }, { - "moduleName": "./packages/perseus-editor/src/index.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/iframe-content-renderer.tsx", - "name": "./packages/perseus-editor/src/iframe-content-renderer.tsx", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/widgets/label-image/select-image.tsx" + }, { - "moduleName": "./packages/perseus-editor/src/index.ts" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/article-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-aria.tsx" }, { - "moduleName": "./packages/perseus-editor/src/item-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/ellipse-swatch.tsx" }, { - "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/multirenderer-editor.tsx", - "name": "./packages/perseus-editor/src/multirenderer-editor.tsx", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-swatch.tsx" + }, { - "moduleName": "./packages/perseus-editor/src/index.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/styles/perseus-editor.less", - "name": "./packages/perseus-editor/src/styles/perseus-editor.less", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/polygon-swatch.tsx" + }, { - "moduleName": "./packages/perseus-editor/src/index.ts" + "moduleName": "./packages/perseus-editor/src/components/dropdown-option.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/item-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/multirenderer-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/graded-group-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/diffs/__stories__/structured-item-diff.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/util.ts" } ] }, { - "id": "./packages/keypad-context/src/keypad-context.tsx", - "name": "./packages/keypad-context/src/keypad-context.tsx", + "id": "./packages/perseus-editor/src/all-editors.ts", + "name": "./packages/perseus-editor/src/all-editors.ts", "reasons": [ { - "moduleName": "./packages/keypad-context/src/index.ts" + "moduleName": "./packages/perseus-editor/src/index.ts" + }, + { + "moduleName": "./packages/perseus-editor/src/util/register-all-widgets-and-editors-for-testing.ts" } ] }, @@ -4009,15 +4009,15 @@ { "moduleName": "./packages/math-input/src/components/key-handlers/key-translator.ts" }, - { - "moduleName": "./packages/math-input/src/components/key-handlers/handle-arrow.ts" - }, { "moduleName": "./packages/math-input/src/components/key-handlers/handle-jump-out.ts" }, { "moduleName": "./packages/math-input/src/components/key-handlers/handle-exponent.ts" }, + { + "moduleName": "./packages/math-input/src/components/key-handlers/handle-arrow.ts" + }, { "moduleName": "./packages/math-input/src/components/key-handlers/handle-backspace.ts" } @@ -4162,11 +4162,11 @@ ] }, { - "id": "./packages/math-input/src/components/keypad/keypad-pages/geometry-page.tsx", - "name": "./packages/math-input/src/components/keypad/keypad-pages/geometry-page.tsx", + "id": "./packages/math-input/src/components/keypad/navigation-pad.tsx", + "name": "./packages/math-input/src/components/keypad/navigation-pad.tsx", "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/keypad-pages.stories.tsx" + "moduleName": "./packages/math-input/src/components/keypad/navigation-pad.stories.tsx" }, { "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" @@ -4174,54 +4174,129 @@ ] }, { - "id": "./packages/math-input/src/components/keypad/keypad-pages/numbers-page.tsx", - "name": "./packages/math-input/src/components/keypad/keypad-pages/numbers-page.tsx", + "id": "./packages/math-input/src/strings.ts", + "name": "./packages/math-input/src/strings.ts", "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/keypad-pages.stories.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad-button.stories.tsx" }, { - "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/i18n-context.tsx" } ] }, { - "id": "./packages/math-input/src/components/keypad/keypad-pages/operators-page.tsx", - "name": "./packages/math-input/src/components/keypad/keypad-pages/operators-page.tsx", + "id": "./packages/math-input/src/components/keypad/keypad-button.tsx", + "name": "./packages/math-input/src/components/keypad/keypad-button.tsx", "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/keypad-pages.stories.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad-button.stories.tsx" }, { - "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/geometry-page.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/numbers-page.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/operators-page.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/extras-page.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/fractions-page.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/shared-keys.tsx" } ] }, { - "id": "./packages/math-input/src/components/tabbar/tabbar.tsx", - "name": "./packages/math-input/src/components/tabbar/tabbar.tsx", + "id": "./packages/perseus/src/__testdata__/article-renderer.testdata.ts", + "name": "./packages/perseus/src/__testdata__/article-renderer.testdata.ts", "reasons": [ { - "moduleName": "./packages/math-input/src/components/tabbar/tabbar.stories.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" }, { - "moduleName": "./packages/math-input/src/components/tabbar/index.ts" + "moduleName": "./packages/perseus/src/__stories__/article-renderer.stories.tsx" } ] }, { - "id": "./packages/perseus-editor/src/util/register-all-widgets-and-editors-for-testing.ts", - "name": "./packages/perseus-editor/src/util/register-all-widgets-and-editors-for-testing.ts", + "id": "./packages/perseus/src/strings.ts", + "name": "./packages/perseus/src/strings.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/__stories__/editor-page.stories.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/article-editor.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/interactive-graph-regression.stories.tsx" + }, + { + "moduleName": "./packages/perseus/src/components/i18n-context.tsx" + }, + { + "moduleName": "./testing/renderer-with-debug-ui.tsx" + }, + { + "moduleName": "./dev/flipbook.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/radio/__tests__/radio.testdata.ts", + "name": "./packages/perseus/src/widgets/radio/__tests__/radio.testdata.ts", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/radio/__stories__/radio.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/content-preview.tsx", + "name": "./packages/perseus-editor/src/content-preview.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" + } + ] + }, + { + "id": "./packages/math-input/src/components/tabbar/tabbar.tsx", + "name": "./packages/math-input/src/components/tabbar/tabbar.tsx", + "reasons": [ + { + "moduleName": "./packages/math-input/src/components/tabbar/tabbar.stories.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/tabbar/index.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/util/register-all-widgets-and-editors-for-testing.ts", + "name": "./packages/perseus-editor/src/util/register-all-widgets-and-editors-for-testing.ts", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/__stories__/editor-page.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" }, + { + "moduleName": "./packages/perseus-editor/src/__stories__/article-editor.stories.tsx" + }, { "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" } @@ -4240,41 +4315,71 @@ ] }, { - "id": "./packages/perseus-editor/src/item-extras-editor.tsx", - "name": "./packages/perseus-editor/src/item-extras-editor.tsx", + "id": "./packages/perseus-editor/src/index.ts", + "name": "./packages/perseus-editor/src/index.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/__stories__/item-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/item-editor.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" } ] }, { - "id": "./packages/math-input/src/components/keypad/navigation-pad.tsx", - "name": "./packages/math-input/src/components/keypad/navigation-pad.tsx", + "id": "./testing/side-by-side.tsx", + "name": "./testing/side-by-side.tsx", "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/navigation-pad.stories.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" }, { - "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" + "moduleName": "./testing/server-item-renderer-with-debug-ui.tsx" + }, + { + "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" + }, + { + "moduleName": "./testing/renderer-with-debug-ui.tsx" } ] }, { - "id": "./packages/math-input/src/strings.ts", - "name": "./packages/math-input/src/strings.ts", + "id": "./packages/perseus-editor/src/__testdata__/input-number.testdata.ts", + "name": "./packages/perseus-editor/src/__testdata__/input-number.testdata.ts", "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/__stories__/flags-for-api-options.ts", + "name": "./packages/perseus-editor/src/__stories__/flags-for-api-options.ts", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" }, { - "moduleName": "./packages/math-input/src/components/keypad/keypad-button.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/interactive-graph-editor.stories.tsx" }, { - "moduleName": "./packages/math-input/src/components/i18n-context.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/item-extras-editor.tsx", + "name": "./packages/perseus-editor/src/item-extras-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/__stories__/item-editor.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/item-editor.tsx" } ] }, @@ -4331,16 +4436,16 @@ "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-figures-section.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figures-section.tsx" @@ -4354,243 +4459,138 @@ ] }, { - "id": "./packages/perseus-editor/src/components/graph-settings.tsx", - "name": "./packages/perseus-editor/src/components/graph-settings.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-select.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-select.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/__stories__/graph-settings.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/interaction-editor.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/color-select.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/grapher-editor.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/components/__stories__/graph-settings.argtypes.ts", - "name": "./packages/perseus-editor/src/components/__stories__/graph-settings.argtypes.ts", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/components/__stories__/graph-settings.stories.tsx" - } - ] - }, - { - "id": "./packages/math-input/src/components/keypad/keypad-button.tsx", - "name": "./packages/math-input/src/components/keypad/keypad-button.tsx", - "reasons": [ - { - "moduleName": "./packages/math-input/src/components/keypad/keypad-button.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" }, { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/geometry-page.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" }, { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/numbers-page.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" }, { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/operators-page.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" }, { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/extras-page.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" }, { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/fractions-page.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" }, { - "moduleName": "./packages/math-input/src/components/keypad/shared-keys.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-select.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-select.tsx", + "id": "./packages/perseus-editor/src/components/blur-input.tsx", + "name": "./packages/perseus-editor/src/components/blur-input.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/__stories__/color-select.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/blur-input.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/input-number-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/image-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/cs-program-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/iframe-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/video-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/plotter-editor.tsx" } ] }, { - "id": "./packages/perseus-editor/src/index.ts", - "name": "./packages/perseus-editor/src/index.ts", + "id": "./packages/perseus-editor/src/components/graph-settings.tsx", + "name": "./packages/perseus-editor/src/components/graph-settings.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/graph-settings.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/interaction-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/grapher-editor.tsx" } ] }, { - "id": "./testing/side-by-side.tsx", - "name": "./testing/side-by-side.tsx", + "id": "./packages/perseus-editor/src/components/__stories__/graph-settings.argtypes.ts", + "name": "./packages/perseus-editor/src/components/__stories__/graph-settings.argtypes.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" - }, - { - "moduleName": "./testing/server-item-renderer-with-debug-ui.tsx" - }, - { - "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" - }, - { - "moduleName": "./testing/renderer-with-debug-ui.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/graph-settings.stories.tsx" } ] }, { - "id": "./packages/perseus-editor/src/__testdata__/input-number.testdata.ts", - "name": "./packages/perseus-editor/src/__testdata__/input-number.testdata.ts", + "id": "./packages/math-input/src/components/keypad/keypad-pages/geometry-page.tsx", + "name": "./packages/math-input/src/components/keypad/keypad-pages/geometry-page.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/keypad-pages.stories.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" } ] }, { - "id": "./packages/perseus-editor/src/__stories__/flags-for-api-options.ts", - "name": "./packages/perseus-editor/src/__stories__/flags-for-api-options.ts", + "id": "./packages/math-input/src/components/keypad/keypad-pages/numbers-page.tsx", + "name": "./packages/math-input/src/components/keypad/keypad-pages/numbers-page.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/interactive-graph-editor.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/keypad-pages.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" } ] }, { - "id": "./packages/perseus/src/__testdata__/article-renderer.testdata.ts", - "name": "./packages/perseus/src/__testdata__/article-renderer.testdata.ts", + "id": "./packages/math-input/src/components/keypad/keypad-pages/operators-page.tsx", + "name": "./packages/math-input/src/components/keypad/keypad-pages/operators-page.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/keypad-pages.stories.tsx" }, { - "moduleName": "./packages/perseus/src/__stories__/article-renderer.stories.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" } ] }, { - "id": "./packages/perseus/src/strings.ts", - "name": "./packages/perseus/src/strings.ts", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/interactive-graph-settings.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/interactive-graph-regression.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/components/i18n-context.tsx" - }, - { - "moduleName": "./testing/renderer-with-debug-ui.tsx" - }, - { - "moduleName": "./dev/flipbook.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/radio/__tests__/radio.testdata.ts", - "name": "./packages/perseus/src/widgets/radio/__tests__/radio.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/radio/__stories__/radio.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/content-preview.tsx", - "name": "./packages/perseus-editor/src/content-preview.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/components/blur-input.tsx", - "name": "./packages/perseus-editor/src/components/blur-input.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/components/__stories__/blur-input.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/image-editor.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/input-number-editor.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/cs-program-editor.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/iframe-editor.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/video-editor.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/plotter-editor.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/components/__stories__/interactive-graph-settings.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/components/__stories__/interactive-graph-settings.argtypes.ts", - "name": "./packages/perseus-editor/src/components/__stories__/interactive-graph-settings.argtypes.ts", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/components/__stories__/interactive-graph-settings.argtypes.ts", + "name": "./packages/perseus-editor/src/components/__stories__/interactive-graph-settings.argtypes.ts", + "reasons": [ { "moduleName": "./packages/perseus-editor/src/components/__stories__/interactive-graph-settings.stories.tsx" } @@ -4631,16 +4631,16 @@ "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" @@ -4749,30 +4749,6 @@ } ] }, - { - "id": "./packages/perseus-editor/src/widgets/definition-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/definition-editor.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/definition-editor.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/categorizer-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/categorizer-editor.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/categorizer-editor.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" - } - ] - }, { "id": "./packages/perseus-editor/src/diffs/tags-diff.tsx", "name": "./packages/perseus-editor/src/diffs/tags-diff.tsx", @@ -4816,11 +4792,23 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/dropdown-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/dropdown-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/categorizer-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/categorizer-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/dropdown-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/categorizer-editor.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/all-editors.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/definition-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/definition-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/definition-editor.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -4839,6 +4827,18 @@ } ] }, + { + "id": "./packages/perseus-editor/src/widgets/dropdown-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/dropdown-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/dropdown-editor.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/all-editors.ts" + } + ] + }, { "id": "./packages/perseus-editor/src/widgets/input-number-editor.tsx", "name": "./packages/perseus-editor/src/widgets/input-number-editor.tsx", @@ -4900,11 +4900,11 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/python-program-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/python-program-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/numeric-input-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/numeric-input-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/python-program-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/numeric-input-editor.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -4912,11 +4912,11 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/sorter-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/sorter-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/python-program-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/python-program-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/sorter-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/python-program-editor.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -4924,11 +4924,11 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/numeric-input-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/numeric-input-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/sorter-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/sorter-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/numeric-input-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/sorter-editor.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -5005,77 +5005,77 @@ ] }, { - "id": "./packages/perseus/src/components/lint.tsx", - "name": "./packages/perseus/src/components/lint.tsx", + "id": "./packages/perseus/src/__testdata__/graphie.testdata.ts", + "name": "./packages/perseus/src/__testdata__/graphie.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/lint.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/perseus-markdown.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/graphie.stories.tsx" } ] }, { - "id": "./packages/perseus/src/components/fixed-to-responsive.tsx", - "name": "./packages/perseus/src/components/fixed-to-responsive.tsx", + "id": "./packages/perseus/src/components/graphie.tsx", + "name": "./packages/perseus/src/components/graphie.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/fixed-to-responsive.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/graphie.stories.tsx" + }, + { + "moduleName": "./packages/perseus/src/components.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/grapher/util.tsx" }, { "moduleName": "./packages/perseus/src/components/svg-image.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/video/video.tsx" + "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" } ] }, { - "id": "./packages/perseus/src/components/info-tip/index.tsx", - "name": "./packages/perseus/src/components/info-tip/index.tsx", + "id": "./packages/perseus/src/components/lint.tsx", + "name": "./packages/perseus/src/components/lint.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/info-tip.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/lint.stories.tsx" }, { - "moduleName": "./packages/perseus/src/components.ts" + "moduleName": "./packages/perseus/src/perseus-markdown.tsx" } ] }, { - "id": "./packages/perseus/src/__testdata__/graphie.testdata.ts", - "name": "./packages/perseus/src/__testdata__/graphie.testdata.ts", + "id": "./packages/perseus/src/components/info-tip/index.tsx", + "name": "./packages/perseus/src/components/info-tip/index.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/graphie.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/info-tip.stories.tsx" + }, + { + "moduleName": "./packages/perseus/src/components.ts" } ] }, { - "id": "./packages/perseus/src/components/graphie.tsx", - "name": "./packages/perseus/src/components/graphie.tsx", + "id": "./packages/perseus/src/components/fixed-to-responsive.tsx", + "name": "./packages/perseus/src/components/fixed-to-responsive.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/graphie.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/grapher/util.tsx" - }, - { - "moduleName": "./packages/perseus/src/components.ts" + "moduleName": "./packages/perseus/src/components/__stories__/fixed-to-responsive.stories.tsx" }, { "moduleName": "./packages/perseus/src/components/svg-image.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" + "moduleName": "./packages/perseus/src/widgets/video/video.tsx" } ] }, @@ -5171,47 +5171,50 @@ "name": "./testing/renderer-with-debug-ui.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/grapher/grapher.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/categorizer/categorizer.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/deprecated-standin/__stories__/deprecated-standin.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/iframe/iframe.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/group/group.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/explanation/explanation.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/deprecated-standin/__stories__/deprecated-standin.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/explanation/explanation.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/group/group.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/iframe/iframe.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/categorizer/categorizer.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/grapher/grapher.stories.tsx" }, { "moduleName": "./packages/perseus/src/widgets/definition/definition.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/image/image.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/interaction/interaction.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interaction/interaction.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/image/image.stories.tsx" }, { "moduleName": "./packages/perseus/src/widgets/input-number/input-number.stories.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/matrix/matrix.stories.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/interactive-graph.stories.tsx" }, @@ -5222,22 +5225,19 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-functions.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/matrix/matrix.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.stories.tsx" }, { "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.stories.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.stories.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/orderer/orderer.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/passage/passage.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/passage/passage.stories.tsx" }, { "moduleName": "./packages/perseus/src/widgets/plotter/plotter.stories.tsx" @@ -5249,10 +5249,10 @@ "moduleName": "./packages/perseus/src/widgets/python-program/python-program.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/video/video.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/sorter/sorter.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/sorter/sorter.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/video/video.stories.tsx" }, { "moduleName": "./packages/perseus/src/widgets/radio/__stories__/radio.stories.tsx" @@ -5263,47 +5263,38 @@ ] }, { - "id": "./packages/perseus/src/widgets/grapher/grapher.testdata.ts", - "name": "./packages/perseus/src/widgets/grapher/grapher.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/grapher/grapher.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.testdata.ts", - "name": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.testdata.ts", + "id": "./packages/perseus/src/widgets/cs-program/cs-program.testdata.ts", + "name": "./packages/perseus/src/widgets/cs-program/cs-program.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/group/group.testdata.ts", - "name": "./packages/perseus/src/widgets/group/group.testdata.ts", + "id": "./packages/perseus/src/widgets/categorizer/categorizer.testdata.ts", + "name": "./packages/perseus/src/widgets/categorizer/categorizer.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/group/group.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/categorizer/categorizer.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/graded-group/graded-group.testdata.ts", - "name": "./packages/perseus/src/widgets/graded-group/graded-group.testdata.ts", + "id": "./packages/perseus/src/widgets/iframe/iframe.testdata.ts", + "name": "./packages/perseus/src/widgets/iframe/iframe.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/iframe/iframe.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/cs-program/cs-program.testdata.ts", - "name": "./packages/perseus/src/widgets/cs-program/cs-program.testdata.ts", + "id": "./packages/perseus/src/widgets/dropdown/dropdown.testdata.ts", + "name": "./packages/perseus/src/widgets/dropdown/dropdown.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.stories.tsx" } ] }, @@ -5317,29 +5308,20 @@ ] }, { - "id": "./packages/perseus/src/widgets/dropdown/dropdown.testdata.ts", - "name": "./packages/perseus/src/widgets/dropdown/dropdown.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/iframe/iframe.testdata.ts", - "name": "./packages/perseus/src/widgets/iframe/iframe.testdata.ts", + "id": "./packages/perseus/src/widgets/group/group.testdata.ts", + "name": "./packages/perseus/src/widgets/group/group.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/iframe/iframe.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/group/group.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/categorizer/categorizer.testdata.ts", - "name": "./packages/perseus/src/widgets/categorizer/categorizer.testdata.ts", + "id": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.testdata.ts", + "name": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/categorizer/categorizer.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.stories.tsx" } ] }, @@ -5365,11 +5347,20 @@ ] }, { - "id": "./packages/perseus/src/widgets/image/image.testdata.ts", - "name": "./packages/perseus/src/widgets/image/image.testdata.ts", + "id": "./packages/perseus/src/widgets/graded-group/graded-group.testdata.ts", + "name": "./packages/perseus/src/widgets/graded-group/graded-group.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/image/image.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/grapher/grapher.testdata.ts", + "name": "./packages/perseus/src/widgets/grapher/grapher.testdata.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/grapher/grapher.stories.tsx" } ] }, @@ -5382,6 +5373,15 @@ } ] }, + { + "id": "./packages/perseus/src/widgets/image/image.testdata.ts", + "name": "./packages/perseus/src/widgets/image/image.testdata.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/image/image.stories.tsx" + } + ] + }, { "id": "./packages/perseus/src/widgets/input-number/input-number.testdata.ts", "name": "./packages/perseus/src/widgets/input-number/input-number.testdata.ts", @@ -5391,6 +5391,15 @@ } ] }, + { + "id": "./packages/perseus/src/widgets/matrix/matrix.testdata.ts", + "name": "./packages/perseus/src/widgets/matrix/matrix.testdata.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/matrix/matrix.stories.tsx" + } + ] + }, { "id": "./dev/flipbook.tsx", "name": "./dev/flipbook.tsx", @@ -5425,11 +5434,11 @@ ] }, { - "id": "./packages/perseus/src/widgets/matrix/matrix.testdata.ts", - "name": "./packages/perseus/src/widgets/matrix/matrix.testdata.ts", + "id": "./packages/perseus/src/widgets/number-line/number-line.testdata.ts", + "name": "./packages/perseus/src/widgets/number-line/number-line.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/matrix/matrix.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.stories.tsx" } ] }, @@ -5455,29 +5464,20 @@ ] }, { - "id": "./packages/perseus/src/widgets/orderer/orderer.testdata.ts", - "name": "./packages/perseus/src/widgets/orderer/orderer.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/orderer/orderer.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/number-line/number-line.testdata.ts", - "name": "./packages/perseus/src/widgets/number-line/number-line.testdata.ts", + "id": "./packages/perseus/src/widgets/passage-ref/passage-ref.testdata.ts", + "name": "./packages/perseus/src/widgets/passage-ref/passage-ref.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/passage-ref/passage-ref.testdata.ts", - "name": "./packages/perseus/src/widgets/passage-ref/passage-ref.testdata.ts", + "id": "./packages/perseus/src/widgets/orderer/orderer.testdata.ts", + "name": "./packages/perseus/src/widgets/orderer/orderer.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/orderer/orderer.stories.tsx" } ] }, @@ -5542,20 +5542,59 @@ ] }, { - "id": "./testing/test-mathjax.tsx", - "name": "./testing/test-mathjax.tsx", + "id": "./packages/perseus-editor/src/styles/constants.ts", + "name": "./packages/perseus-editor/src/styles/constants.ts", "reasons": [ { - "moduleName": "./testing/test-dependencies.tsx" + "moduleName": "./packages/perseus-editor/src/components/device-framer.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/components/viewport-resizer.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/content-preview.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/video/video.testdata.ts", - "name": "./packages/perseus/src/widgets/video/video.testdata.ts", + "id": "./packages/perseus-editor/src/styles/icon-paths.ts", + "name": "./packages/perseus-editor/src/styles/icon-paths.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/video/video.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/viewport-resizer.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/article-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/numeric-input-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/element-container.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/components/widget-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/radio/editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/dropdown-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/graded-group-editor.tsx" + } + ] + }, + { + "id": "./testing/test-mathjax.tsx", + "name": "./testing/test-mathjax.tsx", + "reasons": [ + { + "moduleName": "./testing/test-dependencies.tsx" } ] }, @@ -5581,20 +5620,32 @@ ] }, { - "id": "./packages/perseus/src/widgets/radio/__tests__/base-radio.testdata.ts", - "name": "./packages/perseus/src/widgets/radio/__tests__/base-radio.testdata.ts", + "id": "./packages/perseus/src/widgets/video/video.testdata.ts", + "name": "./packages/perseus/src/widgets/video/video.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/radio/__stories__/base-radio.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/video/video.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx", - "name": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx", + "id": "./packages/perseus/src/widgets/radio/choice-none-above.tsx", + "name": "./packages/perseus/src/widgets/radio/choice-none-above.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/radio/__stories__/choice-icon.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/__stories__/choice-none-above.stories.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/radio/option-status.tsx", + "name": "./packages/perseus/src/widgets/radio/option-status.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/radio/__stories__/option-status.stories.tsx" }, { "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" @@ -5614,134 +5665,83 @@ ] }, { - "id": "./packages/perseus/src/widgets/radio/option-status.tsx", - "name": "./packages/perseus/src/widgets/radio/option-status.tsx", + "id": "./packages/perseus/src/widgets/radio/__tests__/base-radio.testdata.ts", + "name": "./packages/perseus/src/widgets/radio/__tests__/base-radio.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/radio/__stories__/option-status.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/__stories__/base-radio.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/radio/choice-none-above.tsx", - "name": "./packages/perseus/src/widgets/radio/choice-none-above.tsx", + "id": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx", + "name": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/radio/__stories__/choice-none-above.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/__stories__/choice-icon.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" } ] }, { - "id": "./packages/perseus-editor/src/styles/constants.ts", - "name": "./packages/perseus-editor/src/styles/constants.ts", + "id": "./packages/perseus/src/widgets/radio/choice.tsx", + "name": "./packages/perseus/src/widgets/radio/choice.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/device-framer.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/__stories__/choice.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/viewport-resizer.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/choice-none-above.tsx" }, { - "moduleName": "./packages/perseus-editor/src/content-preview.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/radio/choice.tsx", - "name": "./packages/perseus/src/widgets/radio/choice.tsx", + "id": "./packages/perseus-editor/src/diffs/renderer-diff.tsx", + "name": "./packages/perseus-editor/src/diffs/renderer-diff.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/radio/__stories__/choice.stories.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/radio/choice-none-above.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/article-diff.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/item-diff.tsx" } ] }, { - "id": "./packages/perseus-editor/src/styles/icon-paths.ts", - "name": "./packages/perseus-editor/src/styles/icon-paths.ts", + "id": "./packages/perseus-linter/src/index.ts", + "name": "./packages/perseus-linter/src/index.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/viewport-resizer.tsx" + "moduleName": "./packages/perseus/src/components/input-with-examples.tsx" }, { - "moduleName": "./packages/perseus-editor/src/article-editor.tsx" + "moduleName": "./packages/perseus/src/article-renderer.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/numeric-input-editor.tsx" + "moduleName": "./packages/perseus/src/translation-linter.ts" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/element-container.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/widget-editor.tsx" + "moduleName": "./packages/perseus/src/widgets/image/image.tsx" }, { - "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" + "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/radio/editor.tsx" + "moduleName": "./packages/perseus/src/widgets/sorter/sorter.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/dropdown-editor.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/graded-group-editor.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/diffs/renderer-diff.tsx", - "name": "./packages/perseus-editor/src/diffs/renderer-diff.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/diffs/article-diff.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/diffs/item-diff.tsx" - } - ] - }, - { - "id": "./packages/perseus-linter/src/index.ts", - "name": "./packages/perseus-linter/src/index.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/components/input-with-examples.tsx" - }, - { - "moduleName": "./packages/perseus/src/article-renderer.tsx" - }, - { - "moduleName": "./packages/perseus/src/translation-linter.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/group/group.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/image/image.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/sorter/sorter.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" + "moduleName": "./packages/perseus/src/widgets/group/group.tsx" }, { "moduleName": "./packages/perseus/src/renderer.tsx" @@ -5759,19 +5759,19 @@ "moduleName": "./packages/perseus/src/hints-renderer.tsx" }, { - "moduleName": "./packages/perseus/src/server-item-renderer.tsx" + "moduleName": "./packages/perseus/src/components/sortable.tsx" }, { - "moduleName": "./packages/perseus/src/components/sortable.tsx" + "moduleName": "./packages/perseus/src/server-item-renderer.tsx" }, { "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" }, { - "moduleName": "./packages/perseus/src/hint-renderer.tsx" + "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" + "moduleName": "./packages/perseus/src/hint-renderer.tsx" }, { "moduleName": "./packages/perseus/src/widgets/input-number/input-number.tsx" @@ -5782,6 +5782,9 @@ { "moduleName": "./packages/perseus/src/widgets/categorizer/categorizer.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/explanation/explanation.tsx" }, @@ -5791,9 +5794,6 @@ { "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/matcher/matcher.tsx" } @@ -5835,39 +5835,48 @@ } ] }, + { + "id": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx", + "name": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx", + "reasons": [ + { + "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad.tsx" + } + ] + }, { "id": "./packages/perseus-core/src/index.ts", "name": "./packages/perseus-core/src/index.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/components/text-input.tsx" + "moduleName": "./packages/math-input/src/version.ts" }, { - "moduleName": "./packages/perseus-editor/src/article-editor.tsx" + "moduleName": "./packages/perseus/src/version.ts" }, { - "moduleName": "./packages/math-input/src/version.ts" + "moduleName": "./packages/perseus/src/renderability.ts" }, { - "moduleName": "./packages/perseus/src/version.ts" + "moduleName": "./packages/perseus/src/multi-items/items.ts" }, { - "moduleName": "./packages/perseus/src/widgets.ts" + "moduleName": "./packages/perseus/src/multi-items/trees.ts" }, { - "moduleName": "./packages/perseus/src/renderability.ts" + "moduleName": "./packages/perseus/src/components/text-input.tsx" }, { - "moduleName": "./packages/perseus/src/util.ts" + "moduleName": "./packages/perseus-editor/src/version.ts" }, { - "moduleName": "./packages/perseus/src/multi-items/trees.ts" + "moduleName": "./packages/perseus-editor/src/article-editor.tsx" }, { - "moduleName": "./packages/perseus/src/multi-items/items.ts" + "moduleName": "./packages/perseus/src/widgets.ts" }, { - "moduleName": "./packages/perseus-editor/src/version.ts" + "moduleName": "./packages/perseus/src/util.ts" }, { "moduleName": "./packages/perseus/src/components/graphie.tsx" @@ -5878,11 +5887,14 @@ { "moduleName": "./packages/perseus/src/components/graphie-classes.ts" }, + { + "moduleName": "./packages/perseus/src/interactive2/interactive-util.ts" + }, { "moduleName": "./packages/perseus/src/util/graphie.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/interactive-util.ts" + "moduleName": "./packages/perseus/src/widgets/expression/score-expression.ts" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" @@ -5890,35 +5902,35 @@ { "moduleName": "./packages/perseus/src/util/answer-types.ts" }, + { + "moduleName": "./packages/kmath/src/version.ts" + }, { "moduleName": "./packages/perseus-editor/src/editor.tsx" }, { - "moduleName": "./packages/kmath/src/version.ts" + "moduleName": "./packages/perseus/src/error-boundary.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/expression/score-expression.ts" + "moduleName": "./packages/perseus-linter/src/version.ts" }, { "moduleName": "./packages/kas/src/version.ts" }, { - "moduleName": "./packages/perseus-linter/src/rule.ts" + "moduleName": "./packages/perseus-linter/src/tree-transformer.ts" }, { - "moduleName": "./packages/perseus-linter/src/version.ts" + "moduleName": "./packages/perseus-linter/src/rule.ts" }, { - "moduleName": "./packages/perseus-linter/src/tree-transformer.ts" + "moduleName": "./packages/perseus/src/util/interactive.ts" }, { "moduleName": "./packages/perseus/src/interactive2/movable-helper-methods.ts" }, { - "moduleName": "./packages/perseus/src/error-boundary.tsx" - }, - { - "moduleName": "./packages/perseus/src/util/interactive.ts" + "moduleName": "./packages/pure-markdown/src/version.ts" }, { "moduleName": "./packages/perseus/src/interactive2/movable.ts" @@ -5929,9 +5941,6 @@ { "moduleName": "./packages/perseus/src/widgets/grapher/score-grapher.ts" }, - { - "moduleName": "./packages/pure-markdown/src/version.ts" - }, { "moduleName": "./packages/simple-markdown/src/version.ts" }, @@ -5967,21 +5976,6 @@ } ] }, - { - "id": "./packages/perseus-editor/src/components/json-editor.tsx", - "name": "./packages/perseus-editor/src/components/json-editor.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/article-editor.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/editor-page.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/multirenderer-editor.tsx" - } - ] - }, { "id": "./packages/perseus/src/basic-widgets.ts", "name": "./packages/perseus/src/basic-widgets.ts", @@ -6006,57 +6000,6 @@ } ] }, - { - "id": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx", - "name": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx", - "reasons": [ - { - "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad.tsx" - } - ] - }, - { - "id": "./testing/ke-score-ui.tsx", - "name": "./testing/ke-score-ui.tsx", - "reasons": [ - { - "moduleName": "./testing/server-item-renderer-with-debug-ui.tsx" - }, - { - "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/multi-items/__testdata__/multi-renderer.testdata.ts", - "name": "./packages/perseus/src/multi-items/__testdata__/multi-renderer.testdata.ts", - "reasons": [ - { - "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" - }, - { - "moduleName": "./packages/perseus/src/multi-items/__stories__/multi-renderer.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/radio/radio.ts", - "name": "./packages/perseus/src/widgets/radio/radio.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/radio/index.ts" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/input-number/input-number.tsx", - "name": "./packages/perseus/src/widgets/input-number/input-number.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/input-number/index.ts" - } - ] - }, { "id": "./packages/perseus/src/interactive2/objective_.ts", "name": "./packages/perseus/src/interactive2/objective_.ts", @@ -6082,20 +6025,20 @@ ] }, { - "id": "./packages/perseus/src/widgets/plotter/plotter.tsx", - "name": "./packages/perseus/src/widgets/plotter/plotter.tsx", + "id": "./packages/perseus/src/widgets/input-number/input-number.tsx", + "name": "./packages/perseus/src/widgets/input-number/input-number.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/plotter/index.ts" + "moduleName": "./packages/perseus/src/widgets/input-number/index.ts" } ] }, { - "id": "./packages/perseus/src/widgets/categorizer/categorizer.tsx", - "name": "./packages/perseus/src/widgets/categorizer/categorizer.tsx", + "id": "./packages/perseus/src/widgets/radio/radio.ts", + "name": "./packages/perseus/src/widgets/radio/radio.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/categorizer/index.ts" + "moduleName": "./packages/perseus/src/widgets/radio/index.ts" } ] }, @@ -6124,62 +6067,50 @@ ] }, { - "id": "./packages/perseus/src/util/answer-types.ts", - "name": "./packages/perseus/src/util/answer-types.ts", + "id": "./packages/perseus/src/widgets/categorizer/categorizer.tsx", + "name": "./packages/perseus/src/widgets/categorizer/categorizer.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/util.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/numeric-input/score-numeric-input.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/expression/score-expression.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/input-number/score-input-number.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/matrix/score-matrix.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/table/score-table.ts" + "moduleName": "./packages/perseus/src/widgets/categorizer/index.ts" } ] }, { - "id": "./packages/perseus/src/util.graphie.ts", - "name": "./packages/perseus/src/util.graphie.ts", + "id": "./packages/perseus/src/widgets/plotter/plotter.tsx", + "name": "./packages/perseus/src/widgets/plotter/plotter.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/util.ts" + "moduleName": "./packages/perseus/src/widgets/plotter/index.ts" } ] }, { - "id": "./packages/perseus/src/util/is-real-json-parse.ts", - "name": "./packages/perseus/src/util/is-real-json-parse.ts", + "id": "./packages/perseus/src/widgets/grapher/grapher.tsx", + "name": "./packages/perseus/src/widgets/grapher/grapher.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/index.ts" + "moduleName": "./packages/perseus/src/widgets/grapher/index.ts" } ] }, { - "id": "./packages/perseus/src/util/parse-perseus-json/parse.ts", - "name": "./packages/perseus/src/util/parse-perseus-json/parse.ts", + "id": "./packages/simple-markdown/src/index.ts", + "name": "./packages/simple-markdown/src/index.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/index.ts" - } - ] - }, - { - "id": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/perseus-item.ts", - "name": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/perseus-item.ts", - "reasons": [ + "moduleName": "./packages/perseus/src/jipt-paragraphs.ts" + }, { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/index.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/utils.ts" + }, + { + "moduleName": "./packages/perseus/src/perseus-markdown.tsx" + }, + { + "moduleName": "./packages/pure-markdown/src/index.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/passage/passage-markdown.tsx" } ] }, @@ -6274,110 +6205,284 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/cs-program-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/cs-program-editor.tsx", - "reasons": [ + "id": "./packages/pure-markdown/src/index.ts", + "name": "./packages/pure-markdown/src/index.ts", + "reasons": [ { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/utils.ts" + }, + { + "moduleName": "./packages/perseus/src/perseus-markdown.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/deprecated-standin-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/deprecated-standin-editor.tsx", + "id": "./packages/perseus/src/util/is-real-json-parse.ts", + "name": "./packages/perseus/src/util/is-real-json-parse.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./packages/perseus/src/util/parse-perseus-json/index.ts" } ] }, { - "id": "./packages/perseus-editor/src/widgets/expression-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/expression-editor.tsx", + "id": "./packages/perseus/src/util/parse-perseus-json/parse.ts", + "name": "./packages/perseus/src/util/parse-perseus-json/parse.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" - }, + "moduleName": "./packages/perseus/src/util/parse-perseus-json/index.ts" + } + ] + }, + { + "id": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/perseus-item.ts", + "name": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/perseus-item.ts", + "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/expression-editor.stories.tsx" + "moduleName": "./packages/perseus/src/util/parse-perseus-json/index.ts" } ] }, { - "id": "./packages/perseus-editor/src/widgets/graded-group-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/graded-group-editor.tsx", + "id": "./packages/perseus/src/multi-items/multi-renderer.tsx", + "name": "./packages/perseus/src/multi-items/multi-renderer.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./packages/perseus/src/multi-items.ts" + } + ] + }, + { + "id": "./packages/perseus/src/multi-items/prop-type-builders.ts", + "name": "./packages/perseus/src/multi-items/prop-type-builders.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/multi-items.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/components/json-editor.tsx", + "name": "./packages/perseus-editor/src/components/json-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/article-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/graded-group-set-editor.tsx" + "moduleName": "./packages/perseus-editor/src/editor-page.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/multirenderer-editor.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/graded-group-set-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/graded-group-set-editor.tsx", + "id": "./packages/kmath/src/index.ts", + "name": "./packages/kmath/src/index.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./packages/perseus/src/widgets/grapher/util.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/util.ts" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" + }, + { + "moduleName": "./packages/perseus/src/components/graph.tsx" + }, + { + "moduleName": "./packages/perseus/src/util/math.ts" + }, + { + "moduleName": "./packages/perseus/src/util/graphie.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/score-interactive-graph.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" + }, + { + "moduleName": "./packages/perseus/src/interactive2/wrapped-line.ts" + }, + { + "moduleName": "./packages/perseus/src/util/geometry.ts" + }, + { + "moduleName": "./packages/perseus/src/util/interactive.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable-helper-methods.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable-line.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" + }, + { + "moduleName": "./packages/perseus/src/interactive2/wrapped-drawing.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/number-line-editor.tsx" + }, + { + "moduleName": "./packages/perseus/src/components/number-input.tsx" + }, + { + "moduleName": "./packages/perseus/src/interactive2/arrowhead.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/wrapped-ellipse.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/plotter-editor.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable-line-options.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable-point-options.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable-polygon-options.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/get-clip-point.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/number-line/score-number-line.ts" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/grapher-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/grapher-editor.tsx", + "id": "./packages/perseus/src/util/answer-types.ts", + "name": "./packages/perseus/src/util/answer-types.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./packages/perseus/src/util.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/numeric-input/score-numeric-input.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/expression/score-expression.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/input-number/score-input-number.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/table/score-table.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/matrix/score-matrix.ts" } ] }, { - "id": "./packages/perseus-editor/src/widgets/group-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/group-editor.tsx", + "id": "./packages/perseus/src/util.graphie.ts", + "name": "./packages/perseus/src/util.graphie.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./packages/perseus/src/util.ts" } ] }, { - "id": "./packages/perseus-editor/src/widgets/iframe-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/iframe-editor.tsx", + "id": "./testing/ke-score-ui.tsx", + "name": "./testing/ke-score-ui.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./testing/server-item-renderer-with-debug-ui.tsx" + }, + { + "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/image-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/image-editor.tsx", + "id": "./packages/perseus/src/multi-items/__testdata__/multi-renderer.testdata.ts", + "name": "./packages/perseus/src/multi-items/__testdata__/multi-renderer.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/image-editor.stories.tsx" + "moduleName": "./packages/perseus/src/multi-items/__stories__/multi-renderer.stories.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/label-image-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/label-image-editor.tsx", + "id": "./packages/perseus-core/src/utils/add-library-version-to-perseus-debug.ts", + "name": "./packages/perseus-core/src/utils/add-library-version-to-perseus-debug.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./packages/perseus-core/src/index.ts" }, { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/label-image-editor.stories.tsx" + "moduleName": "./packages/perseus-core/src/version.ts" } ] }, { - "id": "./packages/perseus-editor/src/widgets/matrix-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/matrix-editor.tsx", + "id": "./packages/perseus-core/src/version.ts", + "name": "./packages/perseus-core/src/version.ts", + "reasons": [ + { + "moduleName": "./packages/perseus-core/src/index.ts" + } + ] + }, + { + "id": "./packages/perseus-core/src/error/errors.ts", + "name": "./packages/perseus-core/src/error/errors.ts", + "reasons": [ + { + "moduleName": "./packages/perseus-core/src/index.ts" + } + ] + }, + { + "id": "./packages/perseus-core/src/error/perseus-error.ts", + "name": "./packages/perseus-core/src/error/perseus-error.ts", + "reasons": [ + { + "moduleName": "./packages/perseus-core/src/index.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/cs-program-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/cs-program-editor.tsx", "reasons": [ { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -6385,8 +6490,8 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/measurer-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/measurer-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/deprecated-standin-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/deprecated-standin-editor.tsx", "reasons": [ { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -6394,26 +6499,32 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/molecule-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/molecule-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/expression-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/expression-editor.tsx", "reasons": [ { "moduleName": "./packages/perseus-editor/src/all-editors.ts" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/expression-editor.stories.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/orderer-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/orderer-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/graded-group-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/graded-group-editor.tsx", "reasons": [ { "moduleName": "./packages/perseus-editor/src/all-editors.ts" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/graded-group-set-editor.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/passage-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/passage-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/graded-group-set-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/graded-group-set-editor.tsx", "reasons": [ { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -6421,8 +6532,8 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/passage-ref-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/passage-ref-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/grapher-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/grapher-editor.tsx", "reasons": [ { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -6430,8 +6541,8 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/passage-ref-target-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/passage-ref-target-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/group-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/group-editor.tsx", "reasons": [ { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -6439,8 +6550,8 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/plotter-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/plotter-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/iframe-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/iframe-editor.tsx", "reasons": [ { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -6448,29 +6559,32 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/radio/editor.tsx", - "name": "./packages/perseus-editor/src/widgets/radio/editor.tsx", + "id": "./packages/perseus-editor/src/widgets/image-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/image-editor.tsx", "reasons": [ { "moduleName": "./packages/perseus-editor/src/all-editors.ts" }, { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/radio-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/image-editor.stories.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/table-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/table-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/label-image-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/label-image-editor.tsx", "reasons": [ { "moduleName": "./packages/perseus-editor/src/all-editors.ts" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/label-image-editor.stories.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/video-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/video-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/matrix-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/matrix-editor.tsx", "reasons": [ { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -6478,209 +6592,95 @@ ] }, { - "id": "./packages/perseus/src/widgets/grapher/grapher.tsx", - "name": "./packages/perseus/src/widgets/grapher/grapher.tsx", + "id": "./packages/perseus-editor/src/widgets/measurer-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/measurer-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/grapher/index.ts" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, { - "id": "./packages/pure-markdown/src/index.ts", - "name": "./packages/pure-markdown/src/index.ts", + "id": "./packages/perseus-editor/src/widgets/molecule-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/molecule-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/utils.ts" - }, - { - "moduleName": "./packages/perseus/src/perseus-markdown.tsx" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, { - "id": "./packages/simple-markdown/src/index.ts", - "name": "./packages/simple-markdown/src/index.ts", + "id": "./packages/perseus-editor/src/widgets/orderer-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/orderer-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/utils.ts" - }, - { - "moduleName": "./packages/perseus/src/jipt-paragraphs.ts" - }, - { - "moduleName": "./packages/perseus/src/perseus-markdown.tsx" - }, - { - "moduleName": "./packages/pure-markdown/src/index.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/passage/passage-markdown.tsx" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, { - "id": "./packages/perseus/src/multi-items/multi-renderer.tsx", - "name": "./packages/perseus/src/multi-items/multi-renderer.tsx", + "id": "./packages/perseus-editor/src/widgets/passage-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/passage-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/multi-items.ts" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, { - "id": "./packages/perseus/src/multi-items/prop-type-builders.ts", - "name": "./packages/perseus/src/multi-items/prop-type-builders.ts", + "id": "./packages/perseus-editor/src/widgets/passage-ref-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/passage-ref-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/multi-items.ts" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, { - "id": "./packages/kmath/src/index.ts", - "name": "./packages/kmath/src/index.ts", + "id": "./packages/perseus-editor/src/widgets/passage-ref-target-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/passage-ref-target-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/grapher/util.tsx" - }, - { - "moduleName": "./packages/perseus/src/components/graph.tsx" - }, - { - "moduleName": "./packages/perseus/src/util/math.ts" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/util.ts" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" - }, - { - "moduleName": "./packages/perseus/src/util/graphie.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/score-interactive-graph.ts" - }, - { - "moduleName": "./packages/perseus/src/util/geometry.ts" - }, - { - "moduleName": "./packages/perseus/src/interactive2/wrapped-line.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" - }, - { - "moduleName": "./packages/perseus/src/interactive2/movable-helper-methods.ts" - }, - { - "moduleName": "./packages/perseus/src/util/interactive.ts" - }, - { - "moduleName": "./packages/perseus/src/interactive2/movable-line.ts" - }, - { - "moduleName": "./packages/perseus/src/interactive2/movable.ts" - }, - { - "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" - }, - { - "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" - }, - { - "moduleName": "./packages/perseus/src/interactive2/wrapped-drawing.ts" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/number-line-editor.tsx" - }, - { - "moduleName": "./packages/perseus/src/components/number-input.tsx" - }, - { - "moduleName": "./packages/perseus/src/interactive2/arrowhead.ts" - }, - { - "moduleName": "./packages/perseus/src/interactive2/wrapped-ellipse.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/plotter-editor.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" - }, - { - "moduleName": "./packages/perseus/src/interactive2/movable-line-options.ts" - }, - { - "moduleName": "./packages/perseus/src/interactive2/movable-point-options.ts" - }, - { - "moduleName": "./packages/perseus/src/interactive2/movable-polygon-options.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts" - }, - { - "moduleName": "./packages/perseus/src/interactive2/get-clip-point.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/number-line/score-number-line.ts" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, { - "id": "./packages/perseus-core/src/utils/add-library-version-to-perseus-debug.ts", - "name": "./packages/perseus-core/src/utils/add-library-version-to-perseus-debug.ts", + "id": "./packages/perseus-editor/src/widgets/plotter-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/plotter-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-core/src/index.ts" - }, - { - "moduleName": "./packages/perseus-core/src/version.ts" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, { - "id": "./packages/perseus-core/src/version.ts", - "name": "./packages/perseus-core/src/version.ts", + "id": "./packages/perseus-editor/src/widgets/radio/editor.tsx", + "name": "./packages/perseus-editor/src/widgets/radio/editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-core/src/index.ts" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/radio-editor.stories.tsx" } ] }, { - "id": "./packages/perseus-core/src/error/errors.ts", - "name": "./packages/perseus-core/src/error/errors.ts", + "id": "./packages/perseus-editor/src/widgets/table-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/table-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-core/src/index.ts" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, { - "id": "./packages/perseus-core/src/error/perseus-error.ts", - "name": "./packages/perseus-core/src/error/perseus-error.ts", + "id": "./packages/perseus-editor/src/widgets/video-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/video-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-core/src/index.ts" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, @@ -6695,10 +6695,10 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/score-interactive-graph.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/angles.ts" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/math/angles.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/score-interactive-graph.ts" }, { "moduleName": "./packages/perseus/src/util/interactive.ts" @@ -6731,10 +6731,10 @@ "moduleName": "./packages/kmath/src/index.ts" }, { - "moduleName": "./packages/kmath/src/point.ts" + "moduleName": "./packages/kmath/src/vector.ts" }, { - "moduleName": "./packages/kmath/src/vector.ts" + "moduleName": "./packages/kmath/src/point.ts" } ] }, @@ -6746,13 +6746,13 @@ "moduleName": "./packages/kmath/src/index.ts" }, { - "moduleName": "./packages/kmath/src/ray.ts" + "moduleName": "./packages/kmath/src/line.ts" }, { - "moduleName": "./packages/kmath/src/point.ts" + "moduleName": "./packages/kmath/src/ray.ts" }, { - "moduleName": "./packages/kmath/src/line.ts" + "moduleName": "./packages/kmath/src/point.ts" } ] }, @@ -6764,10 +6764,10 @@ "moduleName": "./packages/kmath/src/index.ts" }, { - "moduleName": "./packages/kmath/src/ray.ts" + "moduleName": "./packages/kmath/src/line.ts" }, { - "moduleName": "./packages/kmath/src/line.ts" + "moduleName": "./packages/kmath/src/ray.ts" } ] }, @@ -6922,104 +6922,143 @@ ] }, { - "id": "./packages/perseus/src/util/graph-utils.ts", - "name": "./packages/perseus/src/util/graph-utils.ts", + "id": "./packages/perseus-linter/src/rule.ts", + "name": "./packages/perseus-linter/src/rule.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/components/graph.tsx" + "moduleName": "./packages/perseus-linter/src/index.ts" + }, + { + "moduleName": "./packages/perseus-linter/src/rules/blockquoted-math.ts" + }, + { + "moduleName": "./packages/perseus-linter/src/rules/blockquoted-widget.ts" + }, + { + "moduleName": "./packages/perseus-linter/src/rules/absolute-url.ts" + }, + { + "moduleName": "./packages/perseus-linter/src/rules/double-spacing-after-terminal.ts" + }, + { + "moduleName": "./packages/perseus-linter/src/rules/expression-widget.ts" + }, + { + "moduleName": "./packages/perseus-linter/src/rules/extra-content-spacing.ts" + }, + { + "moduleName": "./packages/perseus-linter/src/rules/heading-level-1.ts" + }, + { + "moduleName": "./packages/perseus-linter/src/rules/heading-sentence-case.ts" + }, + { + "moduleName": "./packages/perseus-linter/src/rules/heading-level-skip.ts" + }, + { + "moduleName": "./packages/perseus-linter/src/rules/image-in-table.ts" }, { - "moduleName": "./packages/perseus/src/components/graphie.tsx" + "moduleName": "./packages/perseus-linter/src/rules/heading-title-case.ts" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" + "moduleName": "./packages/perseus-linter/src/rules/image-alt-text.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" + "moduleName": "./packages/perseus-linter/src/rules/image-spaces-around-urls.ts" }, { - "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" + "moduleName": "./packages/perseus-linter/src/rules/link-click-here.ts" }, { - "moduleName": "./packages/perseus/src/widgets/measurer/measurer.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/interactive2/interactive-util.ts", - "name": "./packages/perseus/src/interactive2/interactive-util.ts", - "reasons": [ + "moduleName": "./packages/perseus-linter/src/rules/long-paragraph.ts" + }, { - "moduleName": "./packages/perseus/src/components/graphie.tsx" + "moduleName": "./packages/perseus-linter/src/rules/image-widget.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/wrapped-line.ts" + "moduleName": "./packages/perseus-linter/src/rules/math-adjacent.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-line.ts" + "moduleName": "./packages/perseus-linter/src/rules/math-align-extra-break.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable.ts" + "moduleName": "./packages/perseus-linter/src/rules/math-empty.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" + "moduleName": "./packages/perseus-linter/src/rules/math-align-linebreaks.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" + "moduleName": "./packages/perseus-linter/src/rules/math-frac.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/wrapped-drawing.ts" + "moduleName": "./packages/perseus-linter/src/rules/math-nested.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/wrapped-ellipse.ts" + "moduleName": "./packages/perseus-linter/src/rules/math-starts-with-space.ts" }, { - "moduleName": "./packages/perseus/src/widgets/table/table.tsx" + "moduleName": "./packages/perseus-linter/src/rules/math-font-size.ts" }, { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" + "moduleName": "./packages/perseus-linter/src/rules/math-text-empty.ts" }, { - "moduleName": "./packages/perseus/src/widgets/matrix/matrix.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/util/graphie.ts", - "name": "./packages/perseus/src/util/graphie.ts", - "reasons": [ + "moduleName": "./packages/perseus-linter/src/rules/math-without-dollars.ts" + }, { - "moduleName": "./packages/perseus/src/components/graphie.tsx" + "moduleName": "./packages/perseus-linter/src/rules/nested-lists.ts" }, { - "moduleName": "./packages/perseus/src/util/graph-utils.ts" + "moduleName": "./packages/perseus-linter/src/rules/unbalanced-code-delimiters.ts" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" + "moduleName": "./packages/perseus-linter/src/rules/static-widget-in-question-stem.ts" }, { - "moduleName": "./packages/perseus/src/util/interactive.ts" + "moduleName": "./packages/perseus-linter/src/rules/unescaped-dollar.ts" + }, + { + "moduleName": "./packages/perseus-linter/src/rules/table-missing-cells.ts" + }, + { + "moduleName": "./packages/perseus-linter/src/rules/widget-in-table.ts" } ] }, { - "id": "./packages/perseus/src/components/graphie-classes.ts", - "name": "./packages/perseus/src/components/graphie-classes.ts", + "id": "./packages/perseus-linter/src/rules/all-rules.ts", + "name": "./packages/perseus-linter/src/rules/all-rules.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/components/graphie.tsx" - }, + "moduleName": "./packages/perseus-linter/src/index.ts" + } + ] + }, + { + "id": "./packages/perseus-linter/src/tree-transformer.ts", + "name": "./packages/perseus-linter/src/tree-transformer.ts", + "reasons": [ { - "moduleName": "./packages/perseus/src/components/graphie-movables.ts" + "moduleName": "./packages/perseus-linter/src/index.ts" } ] }, { - "id": "./packages/perseus/src/components/graphie-movables.ts", - "name": "./packages/perseus/src/components/graphie-movables.ts", + "id": "./packages/perseus-linter/src/version.ts", + "name": "./packages/perseus-linter/src/version.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/components/graphie.tsx" + "moduleName": "./packages/perseus-linter/src/index.ts" + } + ] + }, + { + "id": "./packages/perseus-linter/src/proptypes.ts", + "name": "./packages/perseus-linter/src/proptypes.ts", + "reasons": [ + { + "moduleName": "./packages/perseus-linter/src/index.ts" } ] }, @@ -7034,10 +7073,10 @@ "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figures-section.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figures-section.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-description.tsx" @@ -7129,152 +7168,188 @@ ] }, { - "id": "./packages/perseus-linter/src/rule.ts", - "name": "./packages/perseus-linter/src/rule.ts", + "id": "./packages/perseus/src/interactive2/interactive-util.ts", + "name": "./packages/perseus/src/interactive2/interactive-util.ts", "reasons": [ { - "moduleName": "./packages/perseus-linter/src/index.ts" - }, - { - "moduleName": "./packages/perseus-linter/src/rules/blockquoted-math.ts" - }, - { - "moduleName": "./packages/perseus-linter/src/rules/blockquoted-widget.ts" - }, - { - "moduleName": "./packages/perseus-linter/src/rules/double-spacing-after-terminal.ts" + "moduleName": "./packages/perseus/src/components/graphie.tsx" }, { - "moduleName": "./packages/perseus-linter/src/rules/extra-content-spacing.ts" + "moduleName": "./packages/perseus/src/interactive2/wrapped-line.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/absolute-url.ts" + "moduleName": "./packages/perseus/src/interactive2/movable.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/heading-level-1.ts" + "moduleName": "./packages/perseus/src/interactive2/movable-line.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/heading-sentence-case.ts" + "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" }, { - "moduleName": "./packages/perseus-linter/src/rules/heading-level-skip.ts" + "moduleName": "./packages/perseus/src/interactive2/wrapped-drawing.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/heading-title-case.ts" + "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/image-in-table.ts" + "moduleName": "./packages/perseus/src/interactive2/wrapped-ellipse.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/image-alt-text.ts" + "moduleName": "./packages/perseus/src/widgets/table/table.tsx" }, { - "moduleName": "./packages/perseus-linter/src/rules/link-click-here.ts" + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" }, { - "moduleName": "./packages/perseus-linter/src/rules/image-spaces-around-urls.ts" - }, + "moduleName": "./packages/perseus/src/widgets/matrix/matrix.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/util/graph-utils.ts", + "name": "./packages/perseus/src/util/graph-utils.ts", + "reasons": [ { - "moduleName": "./packages/perseus-linter/src/rules/image-widget.ts" + "moduleName": "./packages/perseus/src/components/graphie.tsx" }, { - "moduleName": "./packages/perseus-linter/src/rules/expression-widget.ts" + "moduleName": "./packages/perseus/src/components/graph.tsx" }, { - "moduleName": "./packages/perseus-linter/src/rules/math-adjacent.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" }, { - "moduleName": "./packages/perseus-linter/src/rules/math-align-extra-break.ts" + "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/long-paragraph.ts" + "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" }, { - "moduleName": "./packages/perseus-linter/src/rules/math-empty.ts" - }, + "moduleName": "./packages/perseus/src/widgets/measurer/measurer.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/util/graphie.ts", + "name": "./packages/perseus/src/util/graphie.ts", + "reasons": [ { - "moduleName": "./packages/perseus-linter/src/rules/math-align-linebreaks.ts" + "moduleName": "./packages/perseus/src/components/graphie.tsx" }, { - "moduleName": "./packages/perseus-linter/src/rules/math-font-size.ts" + "moduleName": "./packages/perseus/src/util/graph-utils.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/math-frac.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" }, { - "moduleName": "./packages/perseus-linter/src/rules/math-nested.ts" - }, + "moduleName": "./packages/perseus/src/util/interactive.ts" + } + ] + }, + { + "id": "./packages/perseus/src/components/graphie-classes.ts", + "name": "./packages/perseus/src/components/graphie-classes.ts", + "reasons": [ { - "moduleName": "./packages/perseus-linter/src/rules/math-starts-with-space.ts" + "moduleName": "./packages/perseus/src/components/graphie.tsx" }, { - "moduleName": "./packages/perseus-linter/src/rules/math-text-empty.ts" - }, + "moduleName": "./packages/perseus/src/components/graphie-movables.ts" + } + ] + }, + { + "id": "./packages/perseus/src/components/graphie-movables.ts", + "name": "./packages/perseus/src/components/graphie-movables.ts", + "reasons": [ { - "moduleName": "./packages/perseus-linter/src/rules/math-without-dollars.ts" - }, + "moduleName": "./packages/perseus/src/components/graphie.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/zoom.ts", + "name": "./packages/perseus/src/zoom.ts", + "reasons": [ { - "moduleName": "./packages/perseus-linter/src/rules/nested-lists.ts" - }, + "moduleName": "./packages/perseus/src/components/svg-image.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/util/interactive.ts", + "name": "./packages/perseus/src/util/interactive.ts", + "reasons": [ { - "moduleName": "./packages/perseus-linter/src/rules/unbalanced-code-delimiters.ts" - }, + "moduleName": "./packages/perseus/src/util/graph-utils.ts" + } + ] + }, + { + "id": "./packages/perseus/src/interactive2.ts", + "name": "./packages/perseus/src/interactive2.ts", + "reasons": [ { - "moduleName": "./packages/perseus-linter/src/rules/unescaped-dollar.ts" + "moduleName": "./packages/perseus/src/components/graphie-movables.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/table-missing-cells.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" }, { - "moduleName": "./packages/perseus-linter/src/rules/static-widget-in-question-stem.ts" + "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" }, { - "moduleName": "./packages/perseus-linter/src/rules/widget-in-table.ts" + "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" } ] }, { - "id": "./packages/perseus-linter/src/rules/all-rules.ts", - "name": "./packages/perseus-linter/src/rules/all-rules.ts", + "id": "./packages/perseus/src/interactive2/movable-helper-methods.ts", + "name": "./packages/perseus/src/interactive2/movable-helper-methods.ts", "reasons": [ { - "moduleName": "./packages/perseus-linter/src/index.ts" + "moduleName": "./packages/perseus/src/interactive2/interactive-util.ts" } ] }, { - "id": "./packages/perseus-linter/src/tree-transformer.ts", - "name": "./packages/perseus-linter/src/tree-transformer.ts", + "id": "./vendor/raphael/raphael.js", + "name": "./vendor/raphael/raphael.js", "reasons": [ { - "moduleName": "./packages/perseus-linter/src/index.ts" + "moduleName": "./packages/perseus/src/util/graphie.ts" } ] }, { - "id": "./packages/perseus-linter/src/version.ts", - "name": "./packages/perseus-linter/src/version.ts", + "id": "./packages/perseus/src/util/drawing-transform.ts", + "name": "./packages/perseus/src/util/drawing-transform.ts", "reasons": [ { - "moduleName": "./packages/perseus-linter/src/index.ts" + "moduleName": "./packages/perseus/src/util/graphie.ts" } ] }, { - "id": "./packages/perseus-linter/src/proptypes.ts", - "name": "./packages/perseus-linter/src/proptypes.ts", + "id": "./packages/perseus/src/util/graph-bounds.ts", + "name": "./packages/perseus/src/util/graph-bounds.ts", "reasons": [ { - "moduleName": "./packages/perseus-linter/src/index.ts" + "moduleName": "./packages/perseus/src/util/graphie.ts" } ] }, { - "id": "./packages/perseus/src/zoom.ts", - "name": "./packages/perseus/src/zoom.ts", + "id": "./packages/perseus/src/util/tex.ts", + "name": "./packages/perseus/src/util/tex.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/components/svg-image.tsx" + "moduleName": "./packages/perseus/src/util/graphie.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" } ] }, @@ -7300,77 +7375,107 @@ ] }, { - "id": "./packages/perseus/src/util/interactive.ts", - "name": "./packages/perseus/src/util/interactive.ts", + "id": "./dev/cache.ts", + "name": "./dev/cache.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/util/graph-utils.ts" + "moduleName": "./dev/flipbook-model.ts" } ] }, { - "id": "./packages/perseus/src/interactive2.ts", - "name": "./packages/perseus/src/interactive2.ts", + "id": "./packages/perseus/src/widgets/interactive-graphs/mafs-supported-graph-types.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/mafs-supported-graph-types.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/components/graphie-movables.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" - }, + "moduleName": "./dev/flipbook.tsx" + } + ] + }, + { + "id": "./dev/editable-controlled-input.tsx", + "name": "./dev/editable-controlled-input.tsx", + "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" + "moduleName": "./dev/flipbook.tsx" } ] }, { - "id": "./vendor/raphael/raphael.js", - "name": "./vendor/raphael/raphael.js", + "id": "./dev/flipbook-model.ts", + "name": "./dev/flipbook-model.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/util/graphie.ts" + "moduleName": "./dev/flipbook.tsx" } ] }, { - "id": "./packages/perseus/src/util/drawing-transform.ts", - "name": "./packages/perseus/src/util/drawing-transform.ts", + "id": "./dev/header.tsx", + "name": "./dev/header.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/util/graphie.ts" + "moduleName": "./dev/flipbook.tsx" } ] }, { - "id": "./packages/perseus/src/util/graph-bounds.ts", - "name": "./packages/perseus/src/util/graph-bounds.ts", + "id": "./packages/perseus/src/styles/perseus-renderer.less", + "name": "./packages/perseus/src/styles/perseus-renderer.less", "reasons": [ { - "moduleName": "./packages/perseus/src/util/graphie.ts" + "moduleName": "./dev/flipbook.tsx" + }, + { + "moduleName": "./packages/perseus/src/renderer.tsx" } ] }, { - "id": "./packages/perseus/src/util/tex.ts", - "name": "./packages/perseus/src/util/tex.ts", + "id": "./packages/math-input/src/components/keypad/utils.ts", + "name": "./packages/math-input/src/components/keypad/utils.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/util/graphie.ts" + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/fractions-page.tsx" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" + "moduleName": "./packages/math-input/src/components/keypad/shared-keys.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx" } ] }, { - "id": "./packages/perseus/src/interactive2/movable-helper-methods.ts", - "name": "./packages/perseus/src/interactive2/movable-helper-methods.ts", + "id": "./packages/perseus/src/widget-ai-utils/unsupported-widget.ts", + "name": "./packages/perseus/src/widget-ai-utils/unsupported-widget.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/interactive2/interactive-util.ts" + "moduleName": "./packages/perseus/src/widget-ai-utils/phet-simulation/phet-simulation-ai-utils.ts" + }, + { + "moduleName": "./packages/perseus/src/widget-ai-utils/plotter/plotter-ai-utils.ts" + }, + { + "moduleName": "./packages/perseus/src/widget-ai-utils/python-program/python-ai-utils.ts" + }, + { + "moduleName": "./packages/perseus/src/widget-ai-utils/measurer/measurer-ai-utils.ts" + }, + { + "moduleName": "./packages/perseus/src/widget-ai-utils/video/video-ai-utils.ts" + }, + { + "moduleName": "./packages/perseus/src/widget-ai-utils/iframe/iframe-ai-utils.ts" + }, + { + "moduleName": "./packages/perseus/src/widget-ai-utils/interaction/interaction-ai-utils.ts" + }, + { + "moduleName": "./packages/perseus/src/widget-ai-utils/cs-program/cs-program-ai-utils.ts" } ] }, @@ -7582,50 +7687,14 @@ ] }, { - "id": "./packages/perseus/src/widget-ai-utils/unsupported-widget.ts", - "name": "./packages/perseus/src/widget-ai-utils/unsupported-widget.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widget-ai-utils/phet-simulation/phet-simulation-ai-utils.ts" - }, - { - "moduleName": "./packages/perseus/src/widget-ai-utils/plotter/plotter-ai-utils.ts" - }, - { - "moduleName": "./packages/perseus/src/widget-ai-utils/cs-program/cs-program-ai-utils.ts" - }, - { - "moduleName": "./packages/perseus/src/widget-ai-utils/iframe/iframe-ai-utils.ts" - }, - { - "moduleName": "./packages/perseus/src/widget-ai-utils/interaction/interaction-ai-utils.ts" - }, - { - "moduleName": "./packages/perseus/src/widget-ai-utils/python-program/python-ai-utils.ts" - }, - { - "moduleName": "./packages/perseus/src/widget-ai-utils/measurer/measurer-ai-utils.ts" - }, - { - "moduleName": "./packages/perseus/src/widget-ai-utils/video/video-ai-utils.ts" - } - ] - }, - { - "id": "./packages/math-input/src/components/keypad/utils.ts", - "name": "./packages/math-input/src/components/keypad/utils.ts", + "id": "./packages/math-input/src/components/input/cursor-styles.ts", + "name": "./packages/math-input/src/components/input/cursor-styles.ts", "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/fractions-page.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/keypad/shared-keys.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" + "moduleName": "./packages/math-input/src/components/input/cursor-handle.tsx" }, { - "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx" + "moduleName": "./packages/math-input/src/components/input/math-input.tsx" } ] }, @@ -7639,113 +7708,68 @@ ] }, { - "id": "./packages/math-input/src/components/input/cursor-styles.ts", - "name": "./packages/math-input/src/components/input/cursor-styles.ts", + "id": "./packages/perseus/src/tex-wrangler.ts", + "name": "./packages/perseus/src/tex-wrangler.ts", "reasons": [ { - "moduleName": "./packages/math-input/src/components/input/cursor-handle.tsx" + "moduleName": "./packages/perseus/src/widgets/numeric-input/score-numeric-input.ts" }, { - "moduleName": "./packages/math-input/src/components/input/math-input.tsx" - } - ] - }, - { - "id": "./packages/math-input/src/fake-react-native-web/view.tsx", - "name": "./packages/math-input/src/fake-react-native-web/view.tsx", - "reasons": [ - { - "moduleName": "./packages/math-input/src/fake-react-native-web/index.ts" + "moduleName": "./packages/perseus/src/widgets/input-number/score-input-number.ts" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/mafs-supported-graph-types.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/mafs-supported-graph-types.ts", + "id": "./packages/kas/src/index.ts", + "name": "./packages/kas/src/index.ts", "reasons": [ { - "moduleName": "./dev/flipbook.tsx" - } - ] - }, - { - "id": "./dev/editable-controlled-input.tsx", - "name": "./dev/editable-controlled-input.tsx", - "reasons": [ + "moduleName": "./packages/perseus/src/widgets/expression/score-expression.ts" + }, { - "moduleName": "./dev/flipbook.tsx" - } - ] - }, - { - "id": "./dev/flipbook-model.ts", - "name": "./dev/flipbook-model.ts", - "reasons": [ + "moduleName": "./packages/perseus/src/util/answer-types.ts" + }, { - "moduleName": "./dev/flipbook.tsx" - } - ] - }, - { - "id": "./dev/header.tsx", - "name": "./dev/header.tsx", - "reasons": [ + "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" + }, { - "moduleName": "./dev/flipbook.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/styles/perseus-renderer.less", - "name": "./packages/perseus/src/styles/perseus-renderer.less", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/widgets/expression-editor.tsx" + }, { - "moduleName": "./dev/flipbook.tsx" + "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" }, { - "moduleName": "./packages/perseus/src/renderer.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-function.tsx" } ] }, { - "id": "./dev/cache.ts", - "name": "./dev/cache.ts", + "id": "./packages/perseus/src/widgets/expression/get-decimal-separator.ts", + "name": "./packages/perseus/src/widgets/expression/get-decimal-separator.ts", "reasons": [ { - "moduleName": "./dev/flipbook-model.ts" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/radio/radio-component.tsx", - "name": "./packages/perseus/src/widgets/radio/radio-component.tsx", - "reasons": [ + "moduleName": "./packages/perseus/src/widgets/expression/score-expression.ts" + }, { - "moduleName": "./packages/perseus/src/widgets/radio/radio.ts" + "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/radio/score-radio.ts", - "name": "./packages/perseus/src/widgets/radio/score-radio.ts", + "id": "./packages/perseus/src/widgets/expression/validate-expression.ts", + "name": "./packages/perseus/src/widgets/expression/validate-expression.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/radio/radio.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" + "moduleName": "./packages/perseus/src/widgets/expression/score-expression.ts" } ] }, { - "id": "./packages/perseus/src/tex-wrangler.ts", - "name": "./packages/perseus/src/tex-wrangler.ts", + "id": "./packages/math-input/src/fake-react-native-web/view.tsx", + "name": "./packages/math-input/src/fake-react-native-web/view.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/numeric-input/score-numeric-input.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/input-number/score-input-number.ts" + "moduleName": "./packages/math-input/src/fake-react-native-web/index.ts" } ] }, @@ -7796,7 +7820,28 @@ "name": "./packages/perseus/src/widgets/interactive-graphs/score-interactive-graph.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/radio/radio-component.tsx", + "name": "./packages/perseus/src/widgets/radio/radio-component.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/radio/radio.ts" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/radio/score-radio.ts", + "name": "./packages/perseus/src/widgets/radio/score-radio.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/radio/radio.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" } ] }, @@ -7819,9 +7864,6 @@ { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/widgets-map.ts" }, - { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/cs-program-widget.ts" - }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/categorizer-widget.ts" }, @@ -7829,13 +7871,13 @@ "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/definition-widget.ts" }, { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/dropdown-widget.ts" + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/cs-program-widget.ts" }, { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/explanation-widget.ts" + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/dropdown-widget.ts" }, { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/expression-widget.ts" + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/explanation-widget.ts" }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/graded-group-set-widget.ts" @@ -7843,6 +7885,9 @@ { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/graded-group-widget.ts" }, + { + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/expression-widget.ts" + }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/group-widget.ts" }, @@ -7850,10 +7895,10 @@ "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/iframe-widget.ts" }, { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/grapher-widget.ts" + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/image-widget.ts" }, { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/image-widget.ts" + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/grapher-widget.ts" }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/input-number-widget.ts" @@ -7861,11 +7906,14 @@ { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/interaction-widget.ts" }, + { + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/label-image-widget.ts" + }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/matcher-widget.ts" }, { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/label-image-widget.ts" + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/interactive-graph-widget.ts" }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/measurer-widget.ts" @@ -7879,17 +7927,14 @@ { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/number-line-widget.ts" }, - { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/interactive-graph-widget.ts" - }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/passage-ref-widget.ts" }, { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/numeric-input-widget.ts" + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/orderer-widget.ts" }, { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/orderer-widget.ts" + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/numeric-input-widget.ts" }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/passage-widget.ts" @@ -7903,15 +7948,15 @@ { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/plotter-widget.ts" }, - { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/radio-widget.ts" - }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/sorter-widget.ts" }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/table-widget.ts" }, + { + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/radio-widget.ts" + }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/video-widget.ts" }, @@ -7986,6 +8031,24 @@ } ] }, + { + "id": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/index.ts" + } + ] + }, + { + "id": "./packages/pure-markdown/src/version.ts", + "name": "./packages/pure-markdown/src/version.ts", + "reasons": [ + { + "moduleName": "./packages/pure-markdown/src/index.ts" + } + ] + }, { "id": "./packages/perseus/src/util/parse-perseus-json/error-tracking-parse-context.ts", "name": "./packages/perseus/src/util/parse-perseus-json/error-tracking-parse-context.ts", @@ -8036,10 +8099,10 @@ "moduleName": "./packages/perseus/src/util/parse-perseus-json/general-purpose-parsers/record.ts" }, { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/general-purpose-parsers/trio.ts" + "moduleName": "./packages/perseus/src/util/parse-perseus-json/general-purpose-parsers/union.ts" }, { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/general-purpose-parsers/union.ts" + "moduleName": "./packages/perseus/src/util/parse-perseus-json/general-purpose-parsers/trio.ts" } ] }, @@ -8080,35 +8143,20 @@ ] }, { - "id": "./packages/kas/src/index.ts", - "name": "./packages/kas/src/index.ts", + "id": "./packages/perseus/src/widget-ai-utils/grapher/grapher-ai-utils.ts", + "name": "./packages/perseus/src/widget-ai-utils/grapher/grapher-ai-utils.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/util/answer-types.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/expression/score-expression.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/expression-editor.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-function.tsx" + "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx", + "id": "./packages/perseus/src/widgets/grapher/score-grapher.ts", + "name": "./packages/perseus/src/widgets/grapher/score-grapher.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/index.ts" + "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" } ] }, @@ -8127,78 +8175,6 @@ } ] }, - { - "id": "./packages/perseus-editor/src/katex-mhchem/index.js", - "name": "./packages/perseus-editor/src/katex-mhchem/index.js", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/editor.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/components/drag-target.tsx", - "name": "./packages/perseus-editor/src/components/drag-target.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/editor.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/components/widget-editor.tsx", - "name": "./packages/perseus-editor/src/components/widget-editor.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/editor.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/components/widget-select.tsx", - "name": "./packages/perseus-editor/src/components/widget-select.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/editor.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/katex-mhchem/parser.js", - "name": "./packages/perseus-editor/src/katex-mhchem/parser.js", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/katex-mhchem/index.js" - } - ] - }, - { - "id": "./packages/perseus/src/widget-ai-utils/grapher/grapher-ai-utils.ts", - "name": "./packages/perseus/src/widget-ai-utils/grapher/grapher-ai-utils.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/grapher/score-grapher.ts", - "name": "./packages/perseus/src/widgets/grapher/score-grapher.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" - } - ] - }, - { - "id": "./packages/pure-markdown/src/version.ts", - "name": "./packages/pure-markdown/src/version.ts", - "reasons": [ - { - "moduleName": "./packages/pure-markdown/src/index.ts" - } - ] - }, { "id": "./packages/simple-markdown/src/version.ts", "name": "./packages/simple-markdown/src/version.ts", @@ -8208,27 +8184,6 @@ } ] }, - { - "id": "./packages/perseus/src/widgets/expression/get-decimal-separator.ts", - "name": "./packages/perseus/src/widgets/expression/get-decimal-separator.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/expression/score-expression.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/expression/validate-expression.ts", - "name": "./packages/perseus/src/widgets/expression/validate-expression.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/expression/score-expression.ts" - } - ] - }, { "id": "./packages/perseus-editor/src/widgets/interaction-editor/color-picker.tsx", "name": "./packages/perseus-editor/src/widgets/interaction-editor/color-picker.tsx", @@ -8237,10 +8192,10 @@ "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/function-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/label-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/line-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/line-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/label-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/parametric-editor.tsx" @@ -8276,10 +8231,10 @@ "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/function-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/label-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/line-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/line-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/label-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-line-editor.tsx" @@ -8323,11 +8278,47 @@ ] }, { - "id": "./packages/perseus-linter/src/selector.ts", - "name": "./packages/perseus-linter/src/selector.ts", + "id": "./packages/perseus-editor/src/katex-mhchem/index.js", + "name": "./packages/perseus-editor/src/katex-mhchem/index.js", "reasons": [ { - "moduleName": "./packages/perseus-linter/src/rule.ts" + "moduleName": "./packages/perseus-editor/src/editor.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/components/drag-target.tsx", + "name": "./packages/perseus-editor/src/components/drag-target.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/editor.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/components/widget-editor.tsx", + "name": "./packages/perseus-editor/src/components/widget-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/editor.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/components/widget-select.tsx", + "name": "./packages/perseus-editor/src/components/widget-select.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/editor.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/katex-mhchem/parser.js", + "name": "./packages/perseus-editor/src/katex-mhchem/parser.js", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/katex-mhchem/index.js" } ] }, @@ -8620,14 +8611,11 @@ ] }, { - "id": "./packages/perseus/src/util/react-render.tsx", - "name": "./packages/perseus/src/util/react-render.tsx", + "id": "./packages/perseus-linter/src/selector.ts", + "name": "./packages/perseus-linter/src/selector.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/util/tex.ts" - }, - { - "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" + "moduleName": "./packages/perseus-linter/src/rule.ts" } ] }, @@ -8653,89 +8641,107 @@ ] }, { - "id": "./packages/perseus/src/interactive2/wrapped-ellipse.ts", - "name": "./packages/perseus/src/interactive2/wrapped-ellipse.ts", + "id": "./packages/perseus/src/interactive2/wrapped-ellipse.ts", + "name": "./packages/perseus/src/interactive2/wrapped-ellipse.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/util/interactive.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable-point-options.ts" + } + ] + }, + { + "id": "./packages/perseus/src/util/react-render.tsx", + "name": "./packages/perseus/src/util/react-render.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/util/interactive.ts" + "moduleName": "./packages/perseus/src/util/tex.ts" }, { "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" - }, - { - "moduleName": "./packages/perseus/src/interactive2/movable-point-options.ts" } ] }, { - "id": "./packages/perseus/src/widgets/cs-program/cs-program.tsx", - "name": "./packages/perseus/src/widgets/cs-program/cs-program.tsx", + "id": "./packages/perseus/src/widgets/python-program/python-program.tsx", + "name": "./packages/perseus/src/widgets/python-program/python-program.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/cs-program/index.ts" + "moduleName": "./packages/perseus/src/widgets/python-program/index.ts" } ] }, { - "id": "./packages/perseus/src/widgets/definition/definition.tsx", - "name": "./packages/perseus/src/widgets/definition/definition.tsx", + "id": "./packages/perseus/src/widgets/number-line/number-line.tsx", + "name": "./packages/perseus/src/widgets/number-line/number-line.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/definition/index.ts" + "moduleName": "./packages/perseus/src/widgets/number-line/index.ts" } ] }, { - "id": "./packages/perseus/src/widgets/deprecated-standin/deprecated-standin.tsx", - "name": "./packages/perseus/src/widgets/deprecated-standin/deprecated-standin.tsx", + "id": "./packages/perseus/src/widgets/passage/passage.tsx", + "name": "./packages/perseus/src/widgets/passage/passage.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/deprecated-standin/index.tsx" + "moduleName": "./packages/perseus/src/widgets/passage/index.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/passage/utils.ts" } ] }, { - "id": "./packages/perseus/src/widgets/dropdown/dropdown.tsx", - "name": "./packages/perseus/src/widgets/dropdown/dropdown.tsx", + "id": "./packages/perseus/src/widgets/orderer/orderer.tsx", + "name": "./packages/perseus/src/widgets/orderer/orderer.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/dropdown/index.ts" + "moduleName": "./packages/perseus/src/widgets/orderer/index.ts" } ] }, { - "id": "./packages/perseus/src/widgets/explanation/explanation.tsx", - "name": "./packages/perseus/src/widgets/explanation/explanation.tsx", + "id": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx", + "name": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/explanation/index.ts" + "moduleName": "./packages/perseus/src/widgets/passage-ref/index.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.tsx", - "name": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.tsx", + "id": "./packages/perseus/src/widgets/molecule/molecule.tsx", + "name": "./packages/perseus/src/widgets/molecule/molecule.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/graded-group-set/index.ts" + "moduleName": "./packages/perseus/src/widgets/molecule/index.ts" } ] }, { - "id": "./packages/perseus/src/widgets/group/group.tsx", - "name": "./packages/perseus/src/widgets/group/group.tsx", + "id": "./packages/perseus/src/widgets/measurer/measurer.tsx", + "name": "./packages/perseus/src/widgets/measurer/measurer.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/group/index.ts" + "moduleName": "./packages/perseus/src/widgets/measurer/index.ts" } ] }, { - "id": "./packages/perseus/src/widgets/iframe/iframe.tsx", - "name": "./packages/perseus/src/widgets/iframe/iframe.tsx", + "id": "./packages/perseus/src/widgets/video/video.tsx", + "name": "./packages/perseus/src/widgets/video/video.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/iframe/index.ts" + "moduleName": "./packages/perseus/src/widgets/video/index.ts" } ] }, @@ -8751,6 +8757,24 @@ } ] }, + { + "id": "./packages/perseus/src/widgets/explanation/explanation.tsx", + "name": "./packages/perseus/src/widgets/explanation/explanation.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/explanation/index.ts" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.tsx", + "name": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/graded-group-set/index.ts" + } + ] + }, { "id": "./packages/perseus/src/widgets/image/image.tsx", "name": "./packages/perseus/src/widgets/image/image.tsx", @@ -8770,125 +8794,131 @@ ] }, { - "id": "./packages/perseus/src/widgets/label-image/label-image.tsx", - "name": "./packages/perseus/src/widgets/label-image/label-image.tsx", + "id": "./packages/perseus/src/widgets/iframe/iframe.tsx", + "name": "./packages/perseus/src/widgets/iframe/iframe.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/label-image/index.ts" + "moduleName": "./packages/perseus/src/widgets/iframe/index.ts" } ] }, { - "id": "./packages/perseus/src/widgets/matcher/matcher.tsx", - "name": "./packages/perseus/src/widgets/matcher/matcher.tsx", + "id": "./packages/perseus/src/widgets/deprecated-standin/deprecated-standin.tsx", + "name": "./packages/perseus/src/widgets/deprecated-standin/deprecated-standin.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/matcher/index.ts" + "moduleName": "./packages/perseus/src/widgets/deprecated-standin/index.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/number-line/number-line.tsx", - "name": "./packages/perseus/src/widgets/number-line/number-line.tsx", + "id": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx", + "name": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/number-line/index.ts" + "moduleName": "./packages/perseus/src/widgets/passage-ref-target/index.ts" } ] }, { - "id": "./packages/perseus/src/widgets/orderer/orderer.tsx", - "name": "./packages/perseus/src/widgets/orderer/orderer.tsx", + "id": "./packages/perseus/src/widgets/sorter/sorter.tsx", + "name": "./packages/perseus/src/widgets/sorter/sorter.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/orderer/index.ts" + "moduleName": "./packages/perseus/src/widgets/sorter/index.ts" } ] }, { - "id": "./packages/perseus/src/widgets/passage/passage.tsx", - "name": "./packages/perseus/src/widgets/passage/passage.tsx", + "id": "./packages/perseus/src/widgets/dropdown/dropdown.tsx", + "name": "./packages/perseus/src/widgets/dropdown/dropdown.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/passage/index.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/passage/utils.ts" + "moduleName": "./packages/perseus/src/widgets/dropdown/index.ts" } ] }, { - "id": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx", - "name": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx", + "id": "./packages/perseus/src/widgets/definition/definition.tsx", + "name": "./packages/perseus/src/widgets/definition/definition.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/passage-ref/index.ts" - }, + "moduleName": "./packages/perseus/src/widgets/definition/index.ts" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/cs-program/cs-program.tsx", + "name": "./packages/perseus/src/widgets/cs-program/cs-program.tsx", + "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" + "moduleName": "./packages/perseus/src/widgets/cs-program/index.ts" } ] }, { - "id": "./packages/perseus/src/widgets/python-program/python-program.tsx", - "name": "./packages/perseus/src/widgets/python-program/python-program.tsx", + "id": "./packages/perseus/src/widgets/matcher/matcher.tsx", + "name": "./packages/perseus/src/widgets/matcher/matcher.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/python-program/index.ts" + "moduleName": "./packages/perseus/src/widgets/matcher/index.ts" } ] }, { - "id": "./packages/perseus/src/widgets/video/video.tsx", - "name": "./packages/perseus/src/widgets/video/video.tsx", + "id": "./packages/perseus/src/widgets/group/group.tsx", + "name": "./packages/perseus/src/widgets/group/group.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/video/index.ts" + "moduleName": "./packages/perseus/src/widgets/group/index.ts" } ] }, { - "id": "./packages/perseus/src/widgets/sorter/sorter.tsx", - "name": "./packages/perseus/src/widgets/sorter/sorter.tsx", + "id": "./packages/perseus/src/widgets/label-image/label-image.tsx", + "name": "./packages/perseus/src/widgets/label-image/label-image.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/sorter/index.ts" + "moduleName": "./packages/perseus/src/widgets/label-image/index.ts" } ] }, { - "id": "./packages/perseus/src/widgets/measurer/measurer.tsx", - "name": "./packages/perseus/src/widgets/measurer/measurer.tsx", + "id": "./packages/perseus/src/widgets/radio/validate-radio.ts", + "name": "./packages/perseus/src/widgets/radio/validate-radio.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/measurer/index.ts" + "moduleName": "./packages/perseus/src/widgets/radio/score-radio.ts" } ] }, { - "id": "./packages/perseus/src/widgets/molecule/molecule.tsx", - "name": "./packages/perseus/src/widgets/molecule/molecule.tsx", + "id": "./packages/perseus/src/widgets/table/utils.ts", + "name": "./packages/perseus/src/widgets/table/utils.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/molecule/index.ts" + "moduleName": "./packages/perseus/src/widgets/table/score-table.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/table/validate-table.ts" } ] }, { - "id": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx", - "name": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx", + "id": "./packages/perseus/src/widgets/table/validate-table.ts", + "name": "./packages/perseus/src/widgets/table/validate-table.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/passage-ref-target/index.ts" + "moduleName": "./packages/perseus/src/widgets/table/score-table.ts" } ] }, { - "id": "./packages/perseus/src/widgets/radio/validate-radio.ts", - "name": "./packages/perseus/src/widgets/radio/validate-radio.ts", + "id": "./packages/perseus/src/widgets/matrix/validate-matrix.ts", + "name": "./packages/perseus/src/widgets/matrix/validate-matrix.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/radio/score-radio.ts" + "moduleName": "./packages/perseus/src/widgets/matrix/score-matrix.ts" } ] }, @@ -8930,7 +8960,94 @@ "name": "./packages/perseus/src/util/parse-perseus-json/object-path.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/parse-failure-detail.ts" + "moduleName": "./packages/perseus/src/util/parse-perseus-json/parse-failure-detail.ts" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/interactive-graphs/mafs-state-to-interactive-graph.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/mafs-state-to-interactive-graph.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-action.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-action.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/linear-system.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/segment.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/linear.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/sinusoid.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/quadratic.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/ray.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-state.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-state.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-state-to-interactive-graph.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" } ] }, @@ -9121,119 +9238,38 @@ ] }, { - "id": "./packages/perseus/src/widgets/matrix/validate-matrix.ts", - "name": "./packages/perseus/src/widgets/matrix/validate-matrix.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/matrix/score-matrix.ts" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/interactive-graphs/mafs-state-to-interactive-graph.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/mafs-state-to-interactive-graph.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-action.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-action.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/linear.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/linear-system.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/ray.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/segment.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/quadratic.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/sinusoid.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts", + "id": "./packages/perseus/src/widget-ai-utils/radio/radio-ai-utils.ts", + "name": "./packages/perseus/src/widget-ai-utils/radio/radio-ai-utils.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-state.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-state.ts", + "id": "./packages/perseus-editor/src/diffs/split-diff.ts", + "name": "./packages/perseus-editor/src/diffs/split-diff.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-state-to-interactive-graph.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/text-diff.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/table/utils.ts", - "name": "./packages/perseus/src/widgets/table/utils.ts", + "id": "./packages/perseus-editor/src/diffs/string-array-diff.ts", + "name": "./packages/perseus-editor/src/diffs/string-array-diff.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/table/score-table.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/table/validate-table.ts" + "moduleName": "./packages/perseus-editor/src/diffs/text-diff.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/table/validate-table.ts", - "name": "./packages/perseus/src/widgets/table/validate-table.ts", + "id": "./packages/perseus-editor/src/diffs/widget-diff-performer.ts", + "name": "./packages/perseus-editor/src/diffs/widget-diff-performer.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/table/score-table.ts" + "moduleName": "./packages/perseus-editor/src/diffs/widget-diff.tsx" } ] }, @@ -9247,29 +9283,20 @@ ] }, { - "id": "./packages/perseus-editor/src/diffs/split-diff.ts", - "name": "./packages/perseus-editor/src/diffs/split-diff.ts", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/diffs/text-diff.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/diffs/string-array-diff.ts", - "name": "./packages/perseus-editor/src/diffs/string-array-diff.ts", + "id": "./packages/perseus/src/widgets/plotter/validate-plotter.ts", + "name": "./packages/perseus/src/widgets/plotter/validate-plotter.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/diffs/text-diff.tsx" + "moduleName": "./packages/perseus/src/widgets/plotter/score-plotter.ts" } ] }, { - "id": "./packages/perseus-editor/src/diffs/widget-diff-performer.ts", - "name": "./packages/perseus-editor/src/diffs/widget-diff-performer.ts", + "id": "./packages/perseus-linter/src/rules/lint-utils.ts", + "name": "./packages/perseus-linter/src/rules/lint-utils.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/diffs/widget-diff.tsx" + "moduleName": "./packages/perseus-linter/src/rules/absolute-url.ts" } ] }, @@ -9291,24 +9318,6 @@ } ] }, - { - "id": "./packages/perseus-linter/src/rules/lint-utils.ts", - "name": "./packages/perseus-linter/src/rules/lint-utils.ts", - "reasons": [ - { - "moduleName": "./packages/perseus-linter/src/rules/absolute-url.ts" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/plotter/validate-plotter.ts", - "name": "./packages/perseus/src/widgets/plotter/validate-plotter.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/plotter/score-plotter.ts" - } - ] - }, { "id": "./packages/perseus/src/interactive2/get-clip-point.ts", "name": "./packages/perseus/src/interactive2/get-clip-point.ts", @@ -9331,32 +9340,11 @@ ] }, { - "id": "./packages/perseus/src/widget-ai-utils/radio/radio-ai-utils.ts", - "name": "./packages/perseus/src/widget-ai-utils/radio/radio-ai-utils.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/definition-context.tsx", - "name": "./packages/perseus/src/definition-context.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/definition/definition.tsx" - }, - { - "moduleName": "./packages/perseus/src/renderer.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widget-ai-utils/definition/definition-ai-utils.ts", - "name": "./packages/perseus/src/widget-ai-utils/definition/definition-ai-utils.ts", + "id": "./packages/perseus/src/widget-ai-utils/passage-ref/passage-ref-ai-utils.ts", + "name": "./packages/perseus/src/widget-ai-utils/passage-ref/passage-ref-ai-utils.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/definition/definition.tsx" + "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" } ] }, @@ -9365,112 +9353,85 @@ "name": "./packages/perseus/src/widgets/__shared__/score-noop.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/definition/definition.tsx" + "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/deprecated-standin/deprecated-standin.tsx" + "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/image/image.tsx" + "moduleName": "./packages/perseus/src/widgets/video/video.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" + "moduleName": "./packages/perseus/src/widgets/image/image.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" + "moduleName": "./packages/perseus/src/widgets/deprecated-standin/deprecated-standin.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/video/video.tsx" + "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" + "moduleName": "./packages/perseus/src/widgets/definition/definition.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" + "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" }, { "moduleName": "./packages/perseus/src/widgets/measurer/measurer.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/explanation/explanation.tsx" + "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" + "moduleName": "./packages/perseus/src/widgets/explanation/explanation.tsx" } ] }, { - "id": "./packages/perseus/src/widget-ai-utils/group/group-ai-utils.ts", - "name": "./packages/perseus/src/widget-ai-utils/group/group-ai-utils.ts", + "id": "./packages/perseus/src/widgets/passage/utils.ts", + "name": "./packages/perseus/src/widgets/passage/utils.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/group/group.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widget-ai-utils/image/image-ai-utils.ts", - "name": "./packages/perseus/src/widget-ai-utils/image/image-ai-utils.ts", - "reasons": [ + "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" + }, { - "moduleName": "./packages/perseus/src/widgets/image/image.tsx" + "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" } ] }, { - "id": "./packages/perseus/src/widget-ai-utils/iframe/iframe-ai-utils.ts", - "name": "./packages/perseus/src/widget-ai-utils/iframe/iframe-ai-utils.ts", + "id": "./packages/perseus/src/widgets/molecule/molecule-drawing.ts", + "name": "./packages/perseus/src/widgets/molecule/molecule-drawing.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/iframe/iframe.tsx" + "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/iframe/score-iframe.ts", - "name": "./packages/perseus/src/widgets/iframe/score-iframe.ts", + "id": "./packages/perseus/src/widgets/molecule/molecule-layout.ts", + "name": "./packages/perseus/src/widgets/molecule/molecule-layout.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/iframe/iframe.tsx" + "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" } ] }, { - "id": "./packages/perseus/src/widget-ai-utils/interaction/interaction-ai-utils.ts", - "name": "./packages/perseus/src/widget-ai-utils/interaction/interaction-ai-utils.ts", + "id": "./packages/perseus/src/widgets/molecule/smiles-parser.ts", + "name": "./packages/perseus/src/widgets/molecule/smiles-parser.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" + "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" } ] }, { "id": "./packages/math-input/src/components/aphrodite-css-transition-group/transition-child.tsx", "name": "./packages/math-input/src/components/aphrodite-css-transition-group/transition-child.tsx", - "reasons": [ - { - "moduleName": "./packages/math-input/src/components/aphrodite-css-transition-group/index.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widget-ai-utils/passage-ref/passage-ref-ai-utils.ts", - "name": "./packages/perseus/src/widget-ai-utils/passage-ref/passage-ref-ai-utils.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/passage/utils.ts", - "name": "./packages/perseus/src/widgets/passage/utils.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" - }, + "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" + "moduleName": "./packages/math-input/src/components/aphrodite-css-transition-group/index.tsx" } ] }, @@ -9504,6 +9465,33 @@ } ] }, + { + "id": "./packages/perseus/src/widget-ai-utils/image/image-ai-utils.ts", + "name": "./packages/perseus/src/widget-ai-utils/image/image-ai-utils.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/image/image.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widget-ai-utils/iframe/iframe-ai-utils.ts", + "name": "./packages/perseus/src/widget-ai-utils/iframe/iframe-ai-utils.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/iframe/iframe.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/iframe/score-iframe.ts", + "name": "./packages/perseus/src/widgets/iframe/score-iframe.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/iframe/iframe.tsx" + } + ] + }, { "id": "./packages/perseus/src/widget-ai-utils/sorter/sorter-ai-utils.ts", "name": "./packages/perseus/src/widget-ai-utils/sorter/sorter-ai-utils.ts", @@ -9523,29 +9511,41 @@ ] }, { - "id": "./packages/perseus/src/widgets/molecule/molecule-drawing.ts", - "name": "./packages/perseus/src/widgets/molecule/molecule-drawing.ts", + "id": "./packages/perseus/src/definition-context.tsx", + "name": "./packages/perseus/src/definition-context.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" + "moduleName": "./packages/perseus/src/widgets/definition/definition.tsx" + }, + { + "moduleName": "./packages/perseus/src/renderer.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/molecule/molecule-layout.ts", - "name": "./packages/perseus/src/widgets/molecule/molecule-layout.ts", + "id": "./packages/perseus/src/widget-ai-utils/definition/definition-ai-utils.ts", + "name": "./packages/perseus/src/widget-ai-utils/definition/definition-ai-utils.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" + "moduleName": "./packages/perseus/src/widgets/definition/definition.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/molecule/smiles-parser.ts", - "name": "./packages/perseus/src/widgets/molecule/smiles-parser.ts", + "id": "./packages/perseus/src/widget-ai-utils/interaction/interaction-ai-utils.ts", + "name": "./packages/perseus/src/widget-ai-utils/interaction/interaction-ai-utils.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" + "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widget-ai-utils/group/group-ai-utils.ts", + "name": "./packages/perseus/src/widget-ai-utils/group/group-ai-utils.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/group/group.tsx" } ] }, @@ -9642,24 +9642,6 @@ } ] }, - { - "id": "./packages/perseus/src/widget-ai-utils/dropdown/dropdown-ai-utils.ts", - "name": "./packages/perseus/src/widget-ai-utils/dropdown/dropdown-ai-utils.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/dropdown/score-dropdown.ts", - "name": "./packages/perseus/src/widgets/dropdown/score-dropdown.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.tsx" - } - ] - }, { "id": "./packages/perseus/src/widget-ai-utils/number-line/number-line-ai-utils.ts", "name": "./packages/perseus/src/widget-ai-utils/number-line/number-line-ai-utils.ts", @@ -9705,6 +9687,24 @@ } ] }, + { + "id": "./packages/perseus/src/widget-ai-utils/dropdown/dropdown-ai-utils.ts", + "name": "./packages/perseus/src/widget-ai-utils/dropdown/dropdown-ai-utils.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/dropdown/score-dropdown.ts", + "name": "./packages/perseus/src/widgets/dropdown/score-dropdown.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.tsx" + } + ] + }, { "id": "./packages/math-input/src/components/aphrodite-css-transition-group/util.ts", "name": "./packages/math-input/src/components/aphrodite-css-transition-group/util.ts", @@ -10192,21 +10192,24 @@ { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-labels.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-arrows.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-labels.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-ticks.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" }, @@ -10214,20 +10217,17 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-transform.ts" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-label.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-transform.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-draggable.ts" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-draggable.ts" - }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/use-control-point.tsx" }, @@ -10245,15 +10245,6 @@ } ] }, - { - "id": "./packages/perseus/src/widgets/dropdown/validate-dropdown.ts", - "name": "./packages/perseus/src/widgets/dropdown/validate-dropdown.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/dropdown/score-dropdown.ts" - } - ] - }, { "id": "./packages/perseus/src/widgets/orderer/validate-orderer.ts", "name": "./packages/perseus/src/widgets/orderer/validate-orderer.ts", @@ -10263,15 +10254,6 @@ } ] }, - { - "id": "./packages/perseus/src/widgets/sorter/validate-sorter.ts", - "name": "./packages/perseus/src/widgets/sorter/validate-sorter.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/sorter/score-sorter.ts" - } - ] - }, { "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figures-section.tsx", "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figures-section.tsx", @@ -10309,11 +10291,11 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/label-image/question-markers.tsx", - "name": "./packages/perseus-editor/src/widgets/label-image/question-markers.tsx", + "id": "./packages/perseus-editor/src/widgets/label-image/select-image.tsx", + "name": "./packages/perseus-editor/src/widgets/label-image/select-image.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/__stories__/question-markers.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/__stories__/select-image.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/label-image-editor.tsx" @@ -10321,11 +10303,11 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/label-image/select-image.tsx", - "name": "./packages/perseus-editor/src/widgets/label-image/select-image.tsx", + "id": "./packages/perseus-editor/src/widgets/label-image/question-markers.tsx", + "name": "./packages/perseus-editor/src/widgets/label-image/question-markers.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/__stories__/select-image.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/__stories__/question-markers.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/label-image-editor.tsx" @@ -10353,15 +10335,6 @@ } ] }, - { - "id": "./packages/math-input/src/components/tabbar/icons.tsx", - "name": "./packages/math-input/src/components/tabbar/icons.tsx", - "reasons": [ - { - "moduleName": "./packages/math-input/src/components/tabbar/item.tsx" - } - ] - }, { "id": "./packages/math-input/src/components/keypad/navigation-button.tsx", "name": "./packages/math-input/src/components/keypad/navigation-button.tsx", @@ -10384,23 +10357,35 @@ ] }, { - "id": "./packages/perseus-editor/src/components/perseus-editor-accordion.tsx", - "name": "./packages/perseus-editor/src/components/perseus-editor-accordion.tsx", + "id": "./packages/math-input/src/components/tabbar/icons.tsx", + "name": "./packages/math-input/src/components/tabbar/icons.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" - }, + "moduleName": "./packages/math-input/src/components/tabbar/item.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/components/angle-input.tsx", + "name": "./packages/perseus-editor/src/components/angle-input.tsx", + "reasons": [ { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" - }, + } + ] + }, + { + "id": "./packages/perseus-editor/src/components/coordinate-pair-input.tsx", + "name": "./packages/perseus-editor/src/components/coordinate-pair-input.tsx", + "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" @@ -10409,187 +10394,196 @@ "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-multiline.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-stroke-select.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-stroke-select.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-angle.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-multiline.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-line.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-swatch.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-swatch.tsx", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-circle.tsx" + }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-point.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-quadratic.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-sinusoid.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-aria.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-aria.tsx", + "id": "./packages/perseus-editor/src/components/perseus-editor-accordion.tsx", + "name": "./packages/perseus-editor/src/components/perseus-editor-accordion.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-multiline.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings-actions.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings-actions.tsx", + "id": "./packages/perseus-editor/src/components/util.ts", + "name": "./packages/perseus-editor/src/components/util.ts", "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" - }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" + "moduleName": "./packages/perseus-editor/src/components/angle-input.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + "moduleName": "./packages/perseus-editor/src/components/dropdown-option.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-examples.ts", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-examples.ts", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/ellipse-swatch.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/ellipse-swatch.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" } ] }, { - "id": "./packages/perseus-editor/src/components/angle-input.tsx", - "name": "./packages/perseus-editor/src/components/angle-input.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-stroke-select.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-stroke-select.tsx", "reasons": [ { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" } ] }, { - "id": "./packages/perseus-editor/src/components/coordinate-pair-input.tsx", - "name": "./packages/perseus-editor/src/components/coordinate-pair-input.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-aria.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-aria.tsx", "reasons": [ { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" - }, + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings-actions.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings-actions.tsx", + "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-angle.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-circle.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-line.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-multiline.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-point.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-quadratic.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-sinusoid.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" } ] }, { - "id": "./packages/perseus-editor/src/components/util.ts", - "name": "./packages/perseus-editor/src/components/util.ts", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-swatch.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-swatch.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/angle-input.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/dropdown-option.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/ellipse-swatch.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/ellipse-swatch.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-switch.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-switch.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-switch.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-switch.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-row.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-row.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-examples.ts", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-examples.ts", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" } ] }, @@ -10620,18 +10614,6 @@ } ] }, - { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-row.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-row.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" - } - ] - }, { "id": "./vendor/hubble/hubble.js", "name": "./vendor/hubble/hubble.js", @@ -10675,11 +10657,11 @@ ] }, { - "id": "./packages/perseus-editor/src/components/checkbox.tsx", - "name": "./packages/perseus-editor/src/components/checkbox.tsx", + "id": "./packages/perseus-editor/src/components/link.ts", + "name": "./packages/perseus-editor/src/components/link.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/behavior.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx" } ] }, @@ -10688,13 +10670,13 @@ "name": "./packages/perseus-editor/src/styles/global-colors.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/behavior.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/question-markers.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/behavior.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/question-markers.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/label-image/select-image.tsx" @@ -10714,11 +10696,11 @@ ] }, { - "id": "./packages/perseus-editor/src/components/link.ts", - "name": "./packages/perseus-editor/src/components/link.ts", + "id": "./packages/perseus-editor/src/components/checkbox.tsx", + "name": "./packages/perseus-editor/src/components/checkbox.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/behavior.tsx" } ] }, @@ -10821,15 +10803,6 @@ } ] }, - { - "id": "./packages/perseus/src/widget-ai-utils/phet-simulation/phet-simulation-ai-utils.ts", - "name": "./packages/perseus/src/widget-ai-utils/phet-simulation/phet-simulation-ai-utils.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/phet-simulation/phet-simulation.tsx" - } - ] - }, { "id": "./packages/math-input/src/components/tabbar/index.ts", "name": "./packages/math-input/src/components/tabbar/index.ts", @@ -10866,6 +10839,15 @@ } ] }, + { + "id": "./packages/perseus/src/widget-ai-utils/phet-simulation/phet-simulation-ai-utils.ts", + "name": "./packages/perseus/src/widget-ai-utils/phet-simulation/phet-simulation-ai-utils.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/phet-simulation/phet-simulation.tsx" + } + ] + }, { "id": "./packages/math-input/src/fake-react-native-web/index.ts", "name": "./packages/math-input/src/fake-react-native-web/index.ts", @@ -10933,71 +10915,71 @@ ] }, { - "id": "./packages/perseus/src/util/scroll-utils.ts", - "name": "./packages/perseus/src/util/scroll-utils.ts", + "id": "./packages/perseus/src/widget-ai-utils/expression/expression-ai-utils.ts", + "name": "./packages/perseus/src/widget-ai-utils/expression/expression-ai-utils.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" + "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/radio/util.ts", - "name": "./packages/perseus/src/widgets/radio/util.ts", + "id": "./packages/perseus/src/widgets/expression/score-expression.ts", + "name": "./packages/perseus/src/widgets/expression/score-expression.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" + "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/radio/choice-icon/cross-out-line.tsx", - "name": "./packages/perseus/src/widgets/radio/choice-icon/cross-out-line.tsx", + "id": "./packages/perseus/src/util/scroll-utils.ts", + "name": "./packages/perseus/src/util/scroll-utils.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/radio/choice-icon/shared-styles.ts", - "name": "./packages/perseus/src/widgets/radio/choice-icon/shared-styles.ts", + "id": "./packages/perseus/src/widgets/radio/choice-a11y-text.ts", + "name": "./packages/perseus/src/widgets/radio/choice-a11y-text.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/radio/choice-icon/cross-out-line.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/radio/choice-a11y-text.ts", - "name": "./packages/perseus/src/widgets/radio/choice-a11y-text.ts", + "id": "./packages/perseus/src/widgets/radio/util.ts", + "name": "./packages/perseus/src/widgets/radio/util.ts", "reasons": [ { "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx" } ] }, { - "id": "./packages/perseus/src/widget-ai-utils/expression/expression-ai-utils.ts", - "name": "./packages/perseus/src/widget-ai-utils/expression/expression-ai-utils.ts", + "id": "./packages/perseus/src/widgets/radio/choice-icon/cross-out-line.tsx", + "name": "./packages/perseus/src/widgets/radio/choice-icon/cross-out-line.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/expression/score-expression.ts", - "name": "./packages/perseus/src/widgets/expression/score-expression.ts", + "id": "./packages/perseus/src/widgets/radio/choice-icon/shared-styles.ts", + "name": "./packages/perseus/src/widgets/radio/choice-icon/shared-styles.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/radio/choice-icon/cross-out-line.tsx" } ] }, @@ -11083,41 +11065,50 @@ ] }, { - "id": "./packages/perseus/src/util/mobile-native-utils.ts", - "name": "./packages/perseus/src/util/mobile-native-utils.ts", + "id": "./packages/perseus/src/util/url-utils.ts", + "name": "./packages/perseus/src/util/url-utils.ts", "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/python-program/python-program.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.tsx" } ] }, { - "id": "./packages/perseus/src/util/url-utils.ts", - "name": "./packages/perseus/src/util/url-utils.ts", + "id": "./packages/perseus/src/widget-ai-utils/python-program/python-ai-utils.ts", + "name": "./packages/perseus/src/widget-ai-utils/python-program/python-ai-utils.ts", "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/python-program/python-program.tsx" } ] }, { - "id": "./packages/perseus/src/widget-ai-utils/cs-program/cs-program-ai-utils.ts", - "name": "./packages/perseus/src/widget-ai-utils/cs-program/cs-program-ai-utils.ts", + "id": "./packages/perseus/src/components/highlighting/highlightable-content.tsx", + "name": "./packages/perseus/src/components/highlighting/highlightable-content.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.tsx" + "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/cs-program/score-cs-program.ts", - "name": "./packages/perseus/src/widgets/cs-program/score-cs-program.ts", + "id": "./packages/perseus/src/widget-ai-utils/passage/passage-ai-utils.ts", + "name": "./packages/perseus/src/widget-ai-utils/passage/passage-ai-utils.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.tsx" + "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/passage/passage-markdown.tsx", + "name": "./packages/perseus/src/widgets/passage/passage-markdown.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" } ] }, @@ -11158,65 +11149,56 @@ ] }, { - "id": "./packages/perseus/src/widget-ai-utils/label-image/label-image-ai-utils.ts", - "name": "./packages/perseus/src/widget-ai-utils/label-image/label-image-ai-utils.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/label-image/label-image.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/label-image/hide-answers-toggle.tsx", - "name": "./packages/perseus/src/widgets/label-image/hide-answers-toggle.tsx", + "id": "./packages/perseus/src/util/mobile-native-utils.ts", + "name": "./packages/perseus/src/util/mobile-native-utils.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/label-image/label-image.tsx" + "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/label-image/score-label-image.ts", - "name": "./packages/perseus/src/widgets/label-image/score-label-image.ts", + "id": "./packages/perseus/src/widget-ai-utils/cs-program/cs-program-ai-utils.ts", + "name": "./packages/perseus/src/widget-ai-utils/cs-program/cs-program-ai-utils.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/label-image/label-image.tsx" + "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.tsx" } ] }, { - "id": "./packages/perseus/src/widget-ai-utils/python-program/python-ai-utils.ts", - "name": "./packages/perseus/src/widget-ai-utils/python-program/python-ai-utils.ts", + "id": "./packages/perseus/src/widgets/cs-program/score-cs-program.ts", + "name": "./packages/perseus/src/widgets/cs-program/score-cs-program.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/python-program/python-program.tsx" + "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.tsx" } ] }, { - "id": "./packages/perseus/src/components/highlighting/highlightable-content.tsx", - "name": "./packages/perseus/src/components/highlighting/highlightable-content.tsx", + "id": "./packages/perseus/src/widget-ai-utils/label-image/label-image-ai-utils.ts", + "name": "./packages/perseus/src/widget-ai-utils/label-image/label-image-ai-utils.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" + "moduleName": "./packages/perseus/src/widgets/label-image/label-image.tsx" } ] }, { - "id": "./packages/perseus/src/widget-ai-utils/passage/passage-ai-utils.ts", - "name": "./packages/perseus/src/widget-ai-utils/passage/passage-ai-utils.ts", + "id": "./packages/perseus/src/widgets/label-image/hide-answers-toggle.tsx", + "name": "./packages/perseus/src/widgets/label-image/hide-answers-toggle.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" + "moduleName": "./packages/perseus/src/widgets/label-image/label-image.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/passage/passage-markdown.tsx", - "name": "./packages/perseus/src/widgets/passage/passage-markdown.tsx", + "id": "./packages/perseus/src/widgets/label-image/score-label-image.ts", + "name": "./packages/perseus/src/widgets/label-image/score-label-image.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/passage/passage.tsx" + "moduleName": "./packages/perseus/src/widgets/label-image/label-image.tsx" } ] }, @@ -11265,13 +11247,28 @@ } ] }, + { + "id": "./packages/perseus/src/widgets/sorter/validate-sorter.ts", + "name": "./packages/perseus/src/widgets/sorter/validate-sorter.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/sorter/score-sorter.ts" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/dropdown/validate-dropdown.ts", + "name": "./packages/perseus/src/widgets/dropdown/validate-dropdown.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/dropdown/score-dropdown.ts" + } + ] + }, { "id": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/widget.ts", "name": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/widget.ts", "reasons": [ - { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/cs-program-widget.ts" - }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/categorizer-widget.ts" }, @@ -11279,13 +11276,13 @@ "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/definition-widget.ts" }, { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/dropdown-widget.ts" + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/cs-program-widget.ts" }, { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/explanation-widget.ts" + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/dropdown-widget.ts" }, { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/expression-widget.ts" + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/explanation-widget.ts" }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/graded-group-set-widget.ts" @@ -11293,6 +11290,9 @@ { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/graded-group-widget.ts" }, + { + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/expression-widget.ts" + }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/group-widget.ts" }, @@ -11300,10 +11300,10 @@ "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/iframe-widget.ts" }, { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/grapher-widget.ts" + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/image-widget.ts" }, { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/image-widget.ts" + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/grapher-widget.ts" }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/input-number-widget.ts" @@ -11311,11 +11311,14 @@ { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/interaction-widget.ts" }, + { + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/label-image-widget.ts" + }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/matcher-widget.ts" }, { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/label-image-widget.ts" + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/interactive-graph-widget.ts" }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/measurer-widget.ts" @@ -11329,17 +11332,14 @@ { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/number-line-widget.ts" }, - { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/interactive-graph-widget.ts" - }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/passage-ref-widget.ts" }, { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/numeric-input-widget.ts" + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/orderer-widget.ts" }, { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/orderer-widget.ts" + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/numeric-input-widget.ts" }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/passage-widget.ts" @@ -11353,15 +11353,15 @@ { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/plotter-widget.ts" }, - { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/radio-widget.ts" - }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/sorter-widget.ts" }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/table-widget.ts" }, + { + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/radio-widget.ts" + }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/video-widget.ts" } @@ -11377,11 +11377,71 @@ { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/interaction-widget.ts" }, + { + "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/interactive-graph-widget.ts" + }, { "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/measurer-widget.ts" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/arrowhead.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/arrowhead.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-arrows.tsx" }, { - "moduleName": "./packages/perseus/src/util/parse-perseus-json/perseus-parsers/interactive-graph-widget.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-line.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/vector.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-transform.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-transform.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-labels.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-ticks.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/arrowhead.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-label.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-line.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/vector.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point-view.tsx" } ] }, @@ -11449,47 +11509,68 @@ ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-transform.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-transform.ts", + "id": "./packages/perseus/src/util/svg.ts", + "name": "./packages/perseus/src/util/svg.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-labels.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" - }, + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/arrowhead.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-draggable.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-draggable.ts", + "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-ticks.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/use-control-point.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/interactive-graphs/protractor.css", + "name": "./packages/perseus/src/widgets/interactive-graphs/protractor.css", + "reasons": [ { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" - }, + } + ] + }, + { + "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx", + "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-label.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-line.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/arrowhead.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/sinusoid.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/vector.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/quadratic.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point-view.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" } ] }, @@ -11497,35 +11578,20 @@ "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx", "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx", "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/linear.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/linear-system.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/ray.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/segment.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/arrowhead.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/arrowhead.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-arrows.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-line.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/linear.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/vector.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/ray.tsx" } ] }, @@ -11541,30 +11607,6 @@ } ] }, - { - "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/quadratic.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/sinusoid.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" - } - ] - }, { "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/svg-line.tsx", "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/svg-line.tsx", @@ -11616,27 +11658,6 @@ } ] }, - { - "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-draggable.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-draggable.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/use-control-point.tsx" - } - ] - }, { "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/screenreader-text.ts", "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/screenreader-text.ts", @@ -11649,27 +11670,6 @@ } ] }, - { - "id": "./packages/perseus/src/util/svg.ts", - "name": "./packages/perseus/src/util/svg.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/arrowhead.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/interactive-graphs/protractor.css", - "name": "./packages/perseus/src/widgets/interactive-graphs/protractor.css", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" - } - ] - }, { "id": "./packages/perseus/src/components/highlighting/ranges.ts", "name": "./packages/perseus/src/components/highlighting/ranges.ts", @@ -11720,10 +11720,10 @@ "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/use-control-point.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" } ] }, diff --git a/project.json b/project.json index 2d01a1864e..1010974340 100644 --- a/project.json +++ b/project.json @@ -1 +1 @@ -{"generatedAt":1733260346028,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":true,"hasStorybookEslint":true,"refCount":0,"testPackages":{"@cypress/code-coverage":"3.12.24","@cypress/react":"8.0.0","@jest/globals":"29.7.0","@testing-library/dom":"10.3.1","@testing-library/jest-dom":"6.4.6","@testing-library/react":"16.0.0","@testing-library/user-event":null,"@types/jest":"29.5.0","babel-jest":"29.7.0","cypress":"13.6.5","cypress-jest-adapter":"0.1.1","cypress-real-events":"1.12.0","cypress-wait-until":"3.0.1","eslint-plugin-cypress":"2.15.1","eslint-plugin-jest":"27.9.0","eslint-plugin-testing-library":"6.2.2","jest":"29.7.0","jest-environment-jsdom":"29.7.0","jest-serializer-html":"7.1.0","jest-specific-snapshot":"5.0.0"},"monorepo":"Workspaces","packageManager":{"type":"yarn","version":"1.22.22"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/react","portableStoriesFileCount":0,"storybookVersion":"8.4.6","storybookVersionSpecifier":"^8.4.5","language":"typescript","storybookPackages":{"@storybook/addon-actions":{"version":"8.4.6"},"@storybook/addon-controls":{"version":"8.4.6"},"@storybook/addon-viewport":{"version":"8.4.6"},"@storybook/react":{"version":"8.4.6"},"@storybook/react-vite":{"version":"8.4.6"},"eslint-plugin-storybook":{"version":"0.8.0"},"storybook":{"version":"8.4.6"}},"addons":{"@storybook/addon-links":{"version":"8.4.6"},"@storybook/addon-essentials":{"version":"8.4.6"},"@storybook/addon-a11y":{"version":"8.4.6"}}} \ No newline at end of file +{"generatedAt":1733260988616,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":true,"hasStorybookEslint":true,"refCount":0,"testPackages":{"@cypress/code-coverage":"3.12.24","@cypress/react":"8.0.0","@jest/globals":"29.7.0","@testing-library/dom":"10.3.1","@testing-library/jest-dom":"6.4.6","@testing-library/react":"16.0.0","@testing-library/user-event":null,"@types/jest":"29.5.0","babel-jest":"29.7.0","cypress":"13.6.5","cypress-jest-adapter":"0.1.1","cypress-real-events":"1.12.0","cypress-wait-until":"3.0.1","eslint-plugin-cypress":"2.15.1","eslint-plugin-jest":"27.9.0","eslint-plugin-testing-library":"6.2.2","jest":"29.7.0","jest-environment-jsdom":"29.7.0","jest-serializer-html":"7.1.0","jest-specific-snapshot":"5.0.0"},"monorepo":"Workspaces","packageManager":{"type":"yarn","version":"1.22.22"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/react","portableStoriesFileCount":0,"storybookVersion":"8.4.6","storybookVersionSpecifier":"^8.4.5","language":"typescript","storybookPackages":{"@storybook/addon-actions":{"version":"8.4.6"},"@storybook/addon-controls":{"version":"8.4.6"},"@storybook/addon-viewport":{"version":"8.4.6"},"@storybook/react":{"version":"8.4.6"},"@storybook/react-vite":{"version":"8.4.6"},"eslint-plugin-storybook":{"version":"0.8.0"},"storybook":{"version":"8.4.6"}},"addons":{"@storybook/addon-links":{"version":"8.4.6"},"@storybook/addon-essentials":{"version":"8.4.6"},"@storybook/addon-a11y":{"version":"8.4.6"}}} \ No newline at end of file