(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,48435,e=>{"use strict";var t=e.i(70942),r=e.i(29301),n=e.i(41674);let a=(...e)=>e.map(e=>e?.trim?.()).filter(Boolean).join(" "),i=/^on[A-Z]/;function o(...e){let t={};for(let r of e){for(let e in t){if(i.test(e)&&"function"==typeof t[e]&&"function"==typeof r[e]){t[e]=function(...e){return function(...t){e.forEach(e=>e?.(...t))}}(t[e],r[e]);continue}if("className"===e||"class"===e){t[e]=a(t[e],r[e]);continue}if("style"===e){t[e]=Object.assign({},t[e]??{},r[e]??{});continue}t[e]=void 0!==r[e]?r[e]:t[e]}for(let e in r)void 0===t[e]&&(t[e]=r[e])}return t}var s=e.i(41469);let l=Object.freeze({});Object.freeze({}),e.i(91392);var c=e.i(26891),d=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,p=(0,c.default)(function(e){return d.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&91>e.charCodeAt(2)}),h=e.i(150),h=h,u=h,m=e.i(12016),f=e.i(39558),g=e.i(49759);let y=parseInt(r.version.split(".")[0],10)>=19;function x(e,t){if(null!=e){if("function"==typeof e)return e(t);try{e.current=t}catch(r){throw Error(`Cannot assign value '${t}' to ref '${e}'`)}}}var k=e.i(62759),b=e.i(91364),v=e.i(96697),w=e.i(51625),P=e.i(70434);let C=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]),j=p.default||p,S=e=>"theme"!==e,T="undefined"!=typeof document,A=({cache:e,serialized:r,isStringTag:n})=>{(0,g.registerStyles)(e,r,n);let a=(0,f.useInsertionEffectAlwaysWithSyncFallback)(()=>(0,g.insertStyles)(e,r,n));if(!T&&void 0!==a){let n=r.name,i=r.next;for(;void 0!==i;)n=(0,s.cx)(n,i.name),i=i.next;return(0,t.jsx)("style",{...{"data-emotion":(0,s.cx)(e.key,n),dangerouslySetInnerHTML:{__html:a},nonce:e.sheet.nonce}})}return null},_={path:["d"],text:["x","y"],circle:["cx","cy","r"],rect:["width","height","x","y","rx","ry"],ellipse:["cx","cy","rx","ry"],g:["transform"],stop:["offset","stopOpacity"]},R=((e,n={},a={})=>{let i,l;if(Object.prototype.hasOwnProperty.call(_,e)){a.forwardProps||(a.forwardProps=[]);let t=_[e];a.forwardProps=(0,v.uniq)([...a.forwardProps,...t])}let c=e.__emotion_real===e,d=c&&e.__emotion_base||e;void 0!==a&&(i=a.label,l=a.target);let p=[],f=(0,h.w)((i,h,f)=>{let v,{cva:T,isValidProperty:_}=(0,w.useChakraContext)(),R=n.__cva__?n:T(n),N=M(e.__emotion_cva,R);!a.shouldForwardProp&&a.forwardProps&&(v=a.forwardProps,a.shouldForwardProp=(e,t)=>!!v.includes(e)||!t?.includes(e)&&!_(e));let E=((e,t,r)=>{let n;if(t){let r=t.shouldForwardProp;n=e.__emotion_forwardProp&&r?t=>e.__emotion_forwardProp(t)&&r(t):r}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n})(e,a,c)||((t,r)=>{let n="string"==typeof e&&e.charCodeAt(0)>96?j:S,a=!r?.includes(t)&&!_(t);return n(t)&&a}),{props:O,styles:F}=function(e,t,n){let{css:a,isValidProperty:i}=(0,w.useChakraContext)(),{children:o,...s}=e,l=(0,r.useMemo)(()=>{let[e,r]=(0,P.splitProps)(s,e=>n(e,t.variantKeys)),[a,o]=(0,P.splitProps)(r,t.variantKeys),[l,c]=(0,P.splitProps)(o,i);return{forwardedProps:e,variantProps:a,styleProps:l,elementProps:c}},[t.variantKeys,n,s,i]),{css:c,...d}=l.styleProps,p=(0,r.useMemo)(()=>{let e={...l.variantProps},r=t.variantKeys.includes("colorPalette"),n=t.variantKeys.includes("orientation");return r||(e.colorPalette=s.colorPalette),n||(e.orientation=s.orientation),t(e)},[t,l.variantProps,s.colorPalette,s.orientation]);return{styles:(0,r.useMemo)(()=>{let e;return a(p,...(Array.isArray(e=c)?e:[e]).filter(Boolean).flat(),d)},[a,p,c,d]),props:{...l.forwardedProps,...l.elementProps,children:o}}}(r.useMemo(()=>Object.assign({},a.defaultProps,(0,k.compact)(i)),[i]),N,E),L="",z=[F],I=O;if(null==O.theme){for(let e in I={},O)I[e]=O[e];I.theme=r.useContext(u.T)}"string"==typeof O.className?L=(0,g.getRegisteredStyles)(h.registered,z,O.className):null!=O.className&&(L=(0,s.cx)(L,O.className));let H=(0,m.serializeStyles)(p.concat(z),h.registered,I);H.styles&&(L=(0,s.cx)(L,`${h.key}-${H.name}`)),void 0!==l&&(L=(0,s.cx)(L,l));let U=!E("as"),B=U&&O.as||d,$={};for(let e in O)if(!U||"as"!==e){if("string"==typeof e&&C.has(e)){$[e.replace("html","").toLowerCase()]=O[e];continue}E(e)&&($[e]=O[e])}let W=L.trim();W?$.className=W:Reflect.deleteProperty($,"className"),$.ref=f;let q=a.forwardAsChild||a.forwardProps?.includes("asChild");if(O.asChild&&!q){let e,t=r.isValidElement(O.children)?r.Children.only(O.children):r.Children.toArray(O.children).find(r.isValidElement);if(!t)throw Error("[chakra-ui > factory] No valid child found");B=t.type,$.children=null,Reflect.deleteProperty($,"asChild"),($=o($,t.props)).ref=function(...e){let t=e.filter(e=>null!=e);if(!y)return e=>{t.forEach(t=>{x(t,e)})};{let e=new Map;return r=>(t.forEach(t=>{let n=x(t,r);n&&e.set(t,n)}),()=>{t.forEach(t=>{let r=e.get(t);r&&"function"==typeof r?r():x(t,null)}),e.clear()})}}(f,(e=r.version,!(0,b.isString)(e)||e.startsWith("18.")?t?.ref:t?.props?.ref))}return $.as&&q?($.as=void 0,(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)(A,{cache:h,serialized:H,isStringTag:"string"==typeof B}),(0,t.jsx)(B,{asChild:!0,...$,children:(0,t.jsx)(O.as,{children:$.children})})]})):(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)(A,{cache:h,serialized:H,isStringTag:"string"==typeof B}),(0,t.jsx)(B,{...$})]})});return f.displayName=void 0!==i?i:`chakra(${"string"==typeof d?d:d.displayName||d.name||"Component"})`,f.__emotion_real=f,f.__emotion_base=d,f.__emotion_forwardProp=a.shouldForwardProp,f.__emotion_cva=n,Object.defineProperty(f,"toString",{value:()=>`.${l}`}),f}).bind(),N=new Map,E=new Proxy(R,{apply:(e,t,r)=>R(...r),get:(e,t)=>(N.has(t)||N.set(t,R(t)),N.get(t))}),M=(e,t)=>e&&!t?e:!e&&t?t:e.merge(t),{withContext:O,PropsProvider:F}=function(e){let a,{key:i,recipe:c}=e,d=(a=i||c.className||"Component").charAt(0).toUpperCase()+a.slice(1),[p,h]=(0,n.createContext)({strict:!1,name:`${d}PropsContext`,providerName:`${d}PropsContext`});function u(e){let{unstyled:t,...n}=e,a=function(e){let{key:t,recipe:n}=e,a=(0,w.useChakraContext)();return(0,r.useMemo)(()=>{let e=n||(null!=t?a.getRecipe(t):{});return a.cva(structuredClone(e))},[t,n,a])}({key:i,recipe:n.recipe||c}),[o,s]=(0,r.useMemo)(()=>a.splitVariantProps(n),[a,n]);return{styles:t?l:a(o),className:a.className,props:s}}return{withContext:(e,n)=>{let a=E(e,{},n),i=(0,r.forwardRef)((e,n)=>{let i=h(),l=(0,r.useMemo)(()=>o(i,e),[e,i]),{styles:c,className:d,props:p}=u(l);return(0,t.jsx)(a,{...p,ref:n,css:[c,l.css],className:(0,s.cx)(d,l.className)})});return i.displayName=e.displayName||e.name,i},PropsProvider:p,withPropsProvider:function(){return p},usePropsContext:h,useRecipeResult:u}}({key:"link"}),L=O("a");L.displayName="Link";let z=E("div");function I(){return(0,t.jsx)(z,{p:4,bg:"teal.300",borderRadius:"md",boxShadow:"md",mx:"auto",maxWidth:"calc(100% - 6in)",children:(0,t.jsxs)("p",{children:["| ",(0,t.jsx)(L,{href:"/index.html",color:"black",children:"Home Grammar Check "})," |",(0,t.jsx)(L,{href:"/scary.html",color:"black",children:"Nightmares are made of These"})," |",(0,t.jsx)(L,{href:"/flags.html",color:"black",children:"Fun with Flags"})," |",(0,t.jsx)(L,{href:"/bedtime.html",color:"black",children:"Bedtime"})," |",(0,t.jsx)(L,{href:"/romance.html",color:"black",children:"Romance"})," |"]})})}function H(){let[e,n]=(0,r.useState)("No response yet."),[a,i]=(0,r.useState)([{number:0,change:"none",reason:"none"}]),[o,s]=(0,r.useState)(!1),[l,c]=(0,r.useState)("helo, MY name iss funny,."),d=async()=>{s(!0);try{let e=await fetch(`https://eglutkq0fc.execute-api.us-east-2.amazonaws.com/prod/items?param1='${l}'`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!e.ok)throw Error(`HTTP error! status: ${e.status}`);let t=await e.json();try{let e=JSON.parse(t.generatedText);i(e.list),n(e.FinalSentence)}catch(e){n(t.generatedText)}}catch(e){console.error("Error fetching API:",e),n(`Error: ${e.message}`)}finally{s(!1)}};return(0,t.jsxs)("div",{className:"flex min-h-screen items-center justify-center bg-zinc-50 font-sans dark:bg-black",children:[(0,t.jsx)(I,{}),(0,t.jsxs)("main",{className:"flex min-h-screen w-full max-w-3xl flex-col items-center justify-between py-32 px-16 bg-white dark:bg-black sm:items-start",children:[(0,t.jsx)("title",{children:"EdgarAI: Grammar and Spelling Checker"}),(0,t.jsx)("h1",{style:{marginTop:"20px"},children:"EdgarAI: Grammar and Spell Checker"}),(0,t.jsx)("input",{type:"text",value:l,onChange:e=>{c(e.target.value)},placeholder:"Enter your Sentence"}),(0,t.jsxs)("p",{children:["Current sentence: ",l]}),(0,t.jsx)("button",{onClick:d,disabled:o,style:{padding:"10px 15px",fontSize:"16px",cursor:"pointer"},children:o?"Loading ... ":"Ask Edgar to Fix Sentence."}),(0,t.jsx)("h2",{style:{marginTop:"20px"},children:"Edgar Response:"}),(0,t.jsx)("pre",{style:{backgroundColor:"#f4f4f4",padding:"15px",border:"1px solid #ddd",borderRadius:"5px",whiteSpace:"pre-wrap",wordWrap:"break-word"},children:e}),(0,t.jsx)(()=>(0,t.jsxs)("table",{children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:"Number"}),(0,t.jsx)("th",{children:"Change"}),(0,t.jsx)("th",{children:"Reason"})]})}),(0,t.jsx)("tbody",{children:a.map(e=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:e.number}),(0,t.jsx)("td",{children:e.change}),(0,t.jsx)("td",{children:e.reason})]},e.number))})]}),{})]})]})}z.displayName="Box",e.s(["default",()=>H],48435)}]);