1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,78137,e=>{"use strict";var t=e.i(985585),r=e.i(199335),s=e.i(354371),a=e.i(584586);let i=({contributor:e,className:i,imageSize:n=76})=>(0,t.jsx)(a.CldImage,{src:"https://res.cloudinary.com/dezn0ffbx/image/upload/v1760621497/antonio-thumbs-up_2x_r4upxk.png",alt:r.default.author,width:n,height:n,quality:100,className:(0,s.cn)("",i)});e.s(["Contributor",0,({className:e,withBio:a=!1,imageSize:n=40})=>(0,t.jsxs)("div",{className:(0,s.cn)("flex items-center gap-2 font-normal",e),children:[(0,t.jsx)(i,{imageSize:n}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"text-foreground/90",children:r.default.author}),a&&(0,t.jsx)("p",{className:"text-foreground/75 text-sm",children:"Antonio is a passionate coder and the creative mind behind codewithantonio.com."})]})]}),"ContributorImage",0,i])},514393,295810,e=>{"use strict";class t{constructor(e,t){this.operator=e,this.value=t,Object.defineProperty(this,"t",{writable:!0})}get notes(){return this.t}addNote(e){this.t=this.t||[],this.t.push(e)}}class r extends t{}class s extends r{constructor(e,t){if(!Array.isArray(t))throw Error(`"${e}" operator expects to receive an array of conditions`);super(e,t)}}let a="__itself__";class i extends t{constructor(e,t,r){super(e,r),this.field=t}}let n=new r("__null__",null),l=Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty);function o(e,t){return 1===t.length?t[0]:new s(e,function e(t,r,a){let i=a||[];for(let a=0,n=r.length;a<n;a++){let n=r[a];n instanceof s&&n.operator===t?e(t,n.value,i):i.push(n)}return i}(e,t))}let c=e=>e,d=Object.defineProperty(Object.create(null),"__@type@__",{value:"ignore value"});function u(e){let t=[];for(let r in e)l(e,r)&&e[r]!==d&&t.push(r);return t}function h(e,t){t!==n&&e.push(t)}let m=e=>o("and",e),f={compound(e,t,r){let a=(Array.isArray(t)?t:[t]).map(e=>r.parse(e));return new s(e.name,a)},field:(e,t,r)=>new i(e.name,r.field,t),document:(e,t)=>new r(e.name,t)};class p{constructor(e,t=Object.create(null)){this.o=void 0,this.s=void 0,this.i=void 0,this.u=void 0,this.h=void 0,this.parse=this.parse.bind(this),this.u={operatorToConditionName:t.operatorToConditionName||c,defaultOperatorName:t.defaultOperatorName||"eq",mergeFinalConditions:t.mergeFinalConditions||m},this.o=Object.keys(e).reduce((t,r)=>(t[r]=Object.assign({name:this.u.operatorToConditionName(r)},e[r]),t),{}),this.s=Object.assign({},t.fieldContext,{field:"",query:{},parse:this.parse,hasOperators:e=>(function(e,t,r=!1){if(!e||e&&e.constructor!==Object)return!1;for(let s in e)if(l(e,s)&&l(t,s)&&(!r||e[s]!==d))return!0;return!1})(e,this.o,t.useIgnoreValue)}),this.i=Object.assign({},t.documentContext,{parse:this.parse,query:{}}),this.h=t.useIgnoreValue?u:Object.keys}setParse(e){this.parse=e,this.s.parse=e,this.i.parse=e}parseField(e,t,r,s){let a=this.o[t];if(!a)throw Error(`Unsupported operator "${t}"`);if("field"!==a.type)throw Error(`Unexpected ${a.type} operator "${t}" at field level`);return this.s.field=e,this.s.query=s,this.parseInstruction(a,r,this.s)}parseInstruction(e,t,r){return"function"==typeof e.validate&&e.validate(e,t),(e.parse||f[e.type])(e,t,r)}parseFieldOperators(e,t){let r=[],s=this.h(t);for(let a=0,i=s.length;a<i;a++){let i=s[a];if(!this.o[i])throw Error(`Field query for "${e}" may contain only operators or a plain object as a value`);h(r,this.parseField(e,i,t[i],t))}return r}parse(e){let t=[],r=this.h(e);this.i.query=e;for(let s=0,a=r.length;s<a;s++){let a=r[s],i=e[a],n=this.o[a];if(n){if("document"!==n.type&&"compound"!==n.type)throw Error(`Cannot use parsing instruction for operator "${a}" in "document" context as it is supposed to be used in "${n.type}" context`);h(t,this.parseInstruction(n,i,this.i))}else this.s.hasOperators(i)?t.push(...this.parseFieldOperators(a,i)):h(t,this.parseField(a,this.u.defaultOperatorName,i,e))}return this.u.mergeFinalConditions(t)}}function x(e,t){let r=e[t];if("function"!=typeof r)throw Error(`Unable to interpret "${t}" condition. Did you forget to register interpreter for it?`);return r}function g(e){return e.operator}function b(e,t){if(!Array.isArray(t))throw Error(`"${e.name}" expects value to be an array`)}function v(e,t){if(b(e,t),!t.length)throw Error(`"${e.name}" expects to have at least one element in array`)}p.prototype.parseInstruction;let y=e=>(t,r)=>{if(typeof r!==e)throw Error(`"${t.name}" expects value to be a "${e}"`)},j={type:"compound",validate:v,parse(e,t,{parse:r}){let s=t.map(e=>r(e));return o(e.name,s)}},w={type:"field",validate(e,t){if(!t||t.constructor!==Object)throw Error(`"${e.name}" expects to receive an object with nested query or field level operators`)},parse(e,t,{parse:r,field:s,hasOperators:n}
1){let l=n(t)?r(t,{field:a}):r(t);return new i(e.name,s,l)}},N={type:"field",validate:y("number")},k={type:"field",validate:b},_={type:"field",validate:y("boolean")},$={type:"field",validate:function(e,t){if(!("string"==typeof t||"number"==typeof t||t instanceof Date))throw Error(`"${e.name}" expects value to be comparable (i.e., string, number or date)`)}},O={type:"field"},A={type:"field",validate(e,t){if(!(t instanceof RegExp)&&"string"!=typeof t)throw Error(`"${e.name}" expects value to be a regular expression or a string that represents regular expression`)},parse(e,t,r){let s="string"==typeof t?new RegExp(t,r.query.$options||""):t;return new i(e.name,r.field,s)}},C={type:"field",parse:()=>n},M={type:"document",validate:y("function")};var F=Object.freeze({__proto__:null,$and:j,$or:j,$nor:{type:"compound",validate:v},$not:{type:"field",validate(e,t){if(!(t&&(t instanceof RegExp||t.constructor===Object)))throw Error(`"${e.name}" expects to receive either regular expression or object of field operators`)},parse(e,t,r){let a=t instanceof RegExp?new i("regex",r.field,t):r.parse(t,r);return new s(e.name,[a])}},$elemMatch:w,$size:N,$in:k,$nin:k,$all:k,$mod:{type:"field",validate(e,t){if(!Array.isArray(t)||2!==t.length)throw Error(`"${e.name}" expects an array with 2 numeric elements`)}},$exists:_,$gte:$,$gt:$,$lt:$,$lte:$,$eq:O,$ne:O,$regex:A,$options:C,$where:M});class S extends p{constructor(e){super(e,{defaultOperatorName:"$eq",operatorToConditionName:e=>e.slice(1)})}parse(e,t){return t&&t.field?m(this.parseFieldOperators(t.field,e)):super.parse(e)}}function E(e,t,r){for(let s=0,a=e.length;s<a;s++)if(0===r(e[s],t))return!0;return!1}function z(e,t){return Array.isArray(e)&&Number.isNaN(Number(t))}function T(e,t,r){if(!z(e,t))return r(e,t);let s=[];for(let a=0;a<e.length;a++){let i=r(e[a],t);void 0!==i&&(s=s.concat(i))}return s}function I(e){return(t,r,s)=>{let a=s.get(r,t.field);return Array.isArray(a)?a.some(r=>e(t,r,s)):e(t,a,s)}}let R=Object.hasOwn||Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty),L=(e,t)=>e[t];function q(e,t,r){let s=t.lastIndexOf(".");return -1===s?[e,t]:[r(e,t.slice(0,s)),t.slice(s+1)]}function D(e,t,r=L){if(t===a)return e;if(!e)throw Error(`Unable to get field "${t}" out of ${String(e)}.`);if(-1===t.indexOf("."))return T(e,t,r);let s=t.split("."),i=e;for(let e=0,t=s.length;e<t;e++)if(!(i=T(i,s[e],r))||"object"!=typeof i)return e<t-1?void 0:i;return i}function P(e,t){return e===t?0:e>t?1:-1}function B(e,t={}){return function(e,t){let r,s=t&&t.getInterpreterName||g;switch(t?t.numberOfArguments:0){case 1:r=r=>x(e,s(r,t))(r,a);break;case 3:r=(r,i,n)=>x(e,s(r,t))(r,i,n,a);break;default:r=(r,i)=>x(e,s(r,t))(r,i,a)}let a=Object.assign({},t,{interpret:r});return a.interpret}(e,Object.assign({get:D,compare:P},t))}let V=(e,t,{interpret:r})=>e.value.some(e=>r(e,t)),U=(e,t,{interpret:r})=>e.value.every(e=>r(e,t)),H=(e,t,{compare:r,get:s})=>{let a=s(t,e.field);return Array.isArray(a)&&!Array.isArray(e.value)?E(a,e.value,r):0===r(a,e.value)},Q=(e,t,r)=>!H(e,t,r),Y=I((e,t,r)=>{let s=r.compare(t,e.value);return 0===s||-1===s}),K=I((e,t,r)=>-1===r.compare(t,e.value)),Z=I((e,t,r)=>1===r.compare(t,e.value)),G=I((e,t,r)=>{let s=r.compare(t,e.value);return 0===s||1===s}),J=(e,t,{get:r})=>{if(e.field===a)return void 0!==t;let[s,i]=q(t,e.field,r),n=t=>null==t?!!t===e.value:R(t,i)===e.value;return z(s,i)?s.some(n):n(s)},W=I((e,t)=>"number"==typeof t&&t%e.value[0]===e.value[1]),X=(e,t,{get:r})=>{let[s,i]=q(t,e.field,r),n=t=>{let s=r(t,i);return Array.isArray(s)&&s.length===e.value};return e.field!==a&&z(s,i)?s.some(n):n(s)},ee=I((e,t)=>"string"==typeof t&&e.value.test(t)),et=I((e,t,{compare:r})=>E(e.value,t,r)),er=(e,t,r)=>!et(e,t,r),es=(e,t,{compare:r,get:s})=>{let a=s(t,e.field);return Array.isArray(a)&&e.value.every(e=>E(a,e,r))},ea=(e,t,{interpret:r,get:s})=>{let a=s(t,e.field);return Array.isArray(a)&&a.some(t=>r(e.value,t))},ei=Object.assign({},Object.freeze({__proto__:null,or:V,nor:(e,t,r)=>!V(e,t,r),and:U,not:(e,t,{interpret:r})=>!r(e.value[0],t),eq:H,ne:Q,lte:Y,lt:K,gt:Z,gte:G,exists:J,mod:W,size:X,regex:ee,within:et,nin:er,all:es,elemMatch:ea,where:(e,t)=>
1e.value.call(t)}),{in:et});function en(e){return null===e||"object"!=typeof e?e:e instanceof Date?e.getTime():e&&"function"==typeof e.toJSON?e.toJSON():e}B(ei);let el=(e,t)=>P(en(e),en(t));function eo(e,t,r){var s;let i=new S(e),n=B(t,Object.assign({compare:el},r));if(r&&r.forPrimitives){let e={field:a},t=i.parse;i.setParse(r=>t(r,e))}return s=i.parse,(e,...t)=>{let r=s(e,...t),a=n.bind(null,r);return a.ast=r,a}}eo(F,ei),eo(["$and","$or"].reduce((e,t)=>(e[t]=Object.assign({},e[t],{type:"field"}),e),Object.assign({},F,{$nor:Object.assign({},F.$nor,{type:"field",parse:f.compound})})),ei,{forPrimitives:!0});let ec=Object.hasOwn||((e,t)=>Object.prototype.hasOwnProperty.call(e,t));function ed(e){return Array.isArray(e)?e:[e]}let eu="__caslSubjectType__",eh=e=>{let t=typeof e;return"string"===t||"function"===t};function em(e){let t;return ec(e,eu)?e[eu]:(t=e.constructor).modelName||t.name}let ef={function:e=>e.constructor,string:em};function ep(e,t,r){for(let s=r;s<t.length;s++)e.push(t[s])}function ex(e,t){if(!e||!e.length)return t||[];if(!t||!t.length)return e||[];let r=0,s=0,a=[];for(;r<e.length&&s<t.length;)e[r].priority<t[s].priority?(a.push(e[r]),r++):(e[r].priority>t[s].priority?a.push(t[s]):(a.push(e[r]),r++),s++);return ep(a,e,r),ep(a,t,s),a}function eg(e,t,r){let s=e.get(t);return s||(s=r(),e.set(t,s)),s}let eb=e=>e;class ev{constructor(e,t,r=0){!function(e,t){if(Array.isArray(e.fields)&&!e.fields.length)throw Error("`rawRule.fields` cannot be an empty array. https://bit.ly/390miLa");if(e.fields&&!t.fieldMatcher)throw Error('You need to pass "fieldMatcher" option in order to restrict access by fields');if(e.conditions&&!t.conditionsMatcher)throw Error('You need to pass "conditionsMatcher" option in order to restrict access by conditions')}(e,t),this.action=t.resolveAction(e.action),this.subject=e.subject,this.inverted=!!e.inverted,this.conditions=e.conditions,this.reason=e.reason,this.origin=e,this.fields=e.fields?ed(e.fields):void 0,this.priority=r,this.t=t}i(){return this.conditions&&!this.o&&(this.o=this.t.conditionsMatcher(this.conditions)),this.o}get ast(){let e=this.i();return e?e.ast:void 0}matchesConditions(e){return!this.conditions||(!e||eh(e)?!this.inverted:this.i()(e))}matchesField(e){return!this.fields||(e?(this.u||(this.u=this.t.fieldMatcher(this.fields)),this.u(e)):!this.inverted)}}let ey=()=>({rules:[],merged:!1}),ej=()=>new Map;class ew{constructor(e=[],t={}){this.h=!1,this.l=new Map,this.p={conditionsMatcher:t.conditionsMatcher,fieldMatcher:t.fieldMatcher,resolveAction:t.resolveAction||eb},this.$=t.anyAction||"manage",this.A=t.anySubjectType||"all",this.m=e,this.M=!!t.detectSubjectType,this.j=t.detectSubjectType||em,this.v(e)}get rules(){return this.m}detectSubjectType(e){return eh(e)?e:e?this.j(e):this.A}update(e){let t={rules:e,ability:this,target:this};return this._("update",t),this.m=e,this.v(e),this._("updated",t),this}v(e){let t,r=new Map;for(let s=e.length-1;s>=0;s--){let a=e.length-s-1,i=new ev(e[s],this.p,a),n=ed(i.action),l=ed(i.subject||this.A);!this.h&&i.fields&&(this.h=!0);for(let e=0;e<l.length;e++){let s=eg(r,l[e],ej);void 0===t&&(t=typeof l[e]),typeof l[e]!==t&&"mixed"!==t&&(t="mixed");for(let e=0;e<n.length;e++)eg(s,n[e],ey).rules.push(i)}}if(this.l=r,"mixed"!==t&&!this.M){let e=ef[t]||ef.string;this.j=e}}possibleRulesFor(e,t=this.A){if(!eh(t))throw Error('"possibleRulesFor" accepts only subject types (i.e., string or class) as the 2nd parameter');let r=eg(this.l,t,ej),s=eg(r,e,ey);if(s.merged)return s.rules;let a=e!==this.$&&r.has(this.$)?r.get(this.$).rules:void 0,i=ex(s.rules,a);return t!==this.A&&(i=ex(i,this.possibleRulesFor(e,this.A))),s.rules=i,s.merged=!0,i}rulesFor(e,t,r){let s=this.possibleRulesFor(e,t);if(r&&"string"!=typeof r)throw Error("The 3rd, `field` parameter is expected to be a string. See https://stalniy.github.io/casl/en/api/casl-ability#can-of-pure-ability for details");return this.h?function(e,t){let r;for(let s=0;s<e.length;s++){let a=t(e[s]);r&&a&&r.push(e[s]),a||(r??=e.slice(0,s))}return r||e}(s,e=>e.matchesField(r)):s}actionsFor(e){if(!eh(e))throw Error('"actionsFor" accepts only subject types (i.e., string or class) as a parameter');let t=new Set,r=this.l.get(e);
1r&&Array.from(r.keys()).forEach(e=>t.add(e));let s=e!==this.A?this.l.get(this.A):void 0;return s&&Array.from(s.keys()).forEach(e=>t.add(e)),Array.from(t)}on(e,t){var r;let s;this.F=this.F||new Map;let a=this.F,i=(s={value:t,prev:r=a.get(e)||null,next:null},r&&(r.next=s),s);return a.set(e,i),()=>{let t=a.get(e);i.next||i.prev||t!==i?i===t&&a.set(e,i.prev):a.delete(e),i.next&&(i.next.prev=i.prev),i.prev&&(i.prev.next=i.next),i.next=i.prev=null}}_(e,t){if(!this.F)return;let r=this.F.get(e)||null,s=[];for(;null!==r;)s.push(r.value),r=r.prev;for(let e=0;e<s.length;e++)s[e](t)}}class eN extends ew{can(e,t,r){let s=this.relevantRuleFor(e,t,r);return!!s&&!s.inverted}relevantRuleFor(e,t,r){let s=this.detectSubjectType(t),a=this.rulesFor(e,s,r);for(let e=0,r=a.length;e<r;e++)if(a[e].matchesConditions(t))return a[e];return null}cannot(e,t,r){return!this.can(e,t,r)}}let ek=eo({$eq:O,$ne:O,$lt:$,$lte:$,$gt:$,$gte:$,$in:k,$nin:k,$all:k,$size:N,$regex:A,$options:C,$elemMatch:w,$exists:_},{eq:H,ne:Q,lt:K,lte:Y,gt:Z,gte:G,in:et,nin:er,all:es,size:X,regex:ee,elemMatch:ea,exists:J,and:U}),e_=/[-/\\^$+?.()|[\]{}]/g,e$=/\.?\*+\.?/g,eO=/\*+/,eA=/\./g;function eC(e,t,r){let s="*"===r[0]||"."===e[0]&&"."===e[e.length-1]?"+":"*",a=-1===e.indexOf("**")?"[^.]":".",i=e.replace(eA,"\\$&").replace(eO,a+s);return t+e.length===r.length?`(?:${i})?`:i}function eM(e,t,r){return"."===e&&("*"===r[t-1]||"*"===r[t+1])?e:`\\${e}`}let eF=e=>{let t;return r=>{let s,a;return void 0===t&&(t=e.every(e=>-1===e.indexOf("*"))?null:(a=(s=e.map(e=>e.replace(e_,eM).replace(e$,eC))).length>1?`(?:${s.join("|")})`:s[0],RegExp(`^${a}$`))),null===t?-1!==e.indexOf(r):t.test(r)}};function eS(e=[],t={}){return new eN(e,Object.assign({conditionsMatcher:ek,fieldMatcher:eF},t))}Object.create(Error.prototype),Object.freeze({__proto__:null}),e.s(["createMongoAbility",0,eS,"subject",0,function(e,t){if(t)if(ec(t,eu)){if(e!==t[eu])throw Error(`Trying to cast object to subject type ${e} but previously it was casted to ${t[eu]}`)}else Object.defineProperty(t,eu,{value:e});return t}],295810);var eE=e.i(18182);e.i(735087),e.i(486965).userSchema.merge(eE.default.object({role:eE.default.enum(["admin","user","contributor"]).nullish(),email:eE.default.string().nullish(),fields:eE.default.any().optional(),entitlements:eE.default.array(eE.default.object({type:eE.default.string(),expires:eE.default.coerce.date().nullish(),metadata:eE.default.record(eE.default.string(),eE.default.any())})).optional(),organizationRoles:eE.default.array(eE.default.object({organizationId:eE.default.string(),name:eE.default.string()})).nullish(),memberships:eE.default.array(eE.default.object({id:eE.default.string(),organizationId:eE.default.string()})).nullish(),roles:eE.default.array(eE.default.object({name:eE.default.string()})).nullish()})),e.s(["createAppAbility",0,eS],514393)},202023,e=>{"use strict";var t=e.i(985585),r=e.i(949532),s=e.i(554125),a=e.i(689954),i=e.i(115415);let n=(0,i.createServerReference)("4091d8f5533d7571852a8184b0d2d1d595a404ca26",i.callServer,void 0,i.findSourceMapURL,"subscribeToNewsletter");var l=e.i(24995),o=e.i(920614),c=e.i(631737),d=e.i(817422);let u=d.z.object({email:d.z.string().email("Invalid email address").min(1,"Required"),first_name:d.z.string().optional()});var h=e.i(199924);e.i(813912);var m=e.i(95184),f=e.i(949831),p=e.i(688834);e.s(["SubscribeForm",0,({submitButtonElem:e,errorMessage:i=(0,t.jsx)("p",{children:"Something went wrong."}),successMessage:d=(0,t.jsx)("p",{children:"Thanks!"}),actionLabel:x="Subscribe",onError:g=()=>{},onSuccess:b=()=>{},id:v,className:y,validationSchema:j,mode:w,emailPlaceholder:N="[email protected]",redirectTo:k="/confirm",..._})=>{let $=(0,s.useRouter)(),{isSubmitting:O,status:A,register:C,handleSubmit:M,errors:F,touched:S}=function({onSuccess:e,onError:t,validationSchema:s,mode:a="onSubmit"}){let[i,d]=(0,r.useState)(""),h=(0,c.useForm)({resolver:(0,l.zodResolver)(s||u),defaultValues:{email:"",first_name:""},mode:a}),m=h.handleSubmit(async r=>{try{let s,a=await n({email:r.email,firstName:r.first_name});if(!a.success){d("error"),t(a.error);return}try{s=(await o.default.post("/api/coursebuilder/subscribe-to-list/convertkit",{email:r.email,name:r.first_name})).data}catch(e){console.error("ConvertKit sync failed:",e)}d("success"),e({...a,subscriber:s},r.email)}catch(e){d("error"),t(e instanceof Error?e.message:"An error occurred"),console.error(e)}});return{...h,handleSubmit:m,status:i,isSubmitting:h.formState.isSubmitting,errors:h.formState.errors,touched:h.formState.touchedFields}}({onSuccess:(e,t)=>{if(b(e,t),k){let t=h.default.stringifyUrl({url:k,query:{ck_subscriber_id:e.subscriber?.id,email:e.email}});$.push(t)}},onError:g,validationSchema:j,mode:w});return(0,t.jsxs)("form",{"data-sr-subscribe-form":A,onSubmit:M,className:y,..._,children:[(0,t.jsxs)("div",{"data-sr-fieldset":"",className:"w-full",children:[(0,t.jsx)(p.Label,{"data-sr-input-label":"",htmlFor:v?`first_name_${v}`:"first_name",children:"First Name"}),(0,t.jsx)(f.Input,{"data-input-with-error":!!(S.first_name&&F.first_name),className:"h-auto",id:v?`first_name_${v}`:"first_name",placeholder:"Name",type:"text",...C("first_name")}
1),j&&S.first_name&&F.first_name&&(0,t.jsx)("p",{"data-input-error-message":!0,children:F.first_name?.message})]}),(0,t.jsxs)("div",{"data-sr-fieldset":"",className:"w-full",children:[(0,t.jsx)(p.Label,{"data-sr-input-label":"",htmlFor:v?`email_${v}`:"email",children:"Email*"}),(0,t.jsx)(f.Input,{"data-input-with-error":!!(S.email&&F.email),className:"h-auto",id:v?`email_${v}`:"email",placeholder:N,type:"email",required:!0,...C("email")}),j&&S.email&&F.email&&(0,t.jsx)("p",{"data-input-error-message":!0,children:F.email?.message})]}),e?r.default.cloneElement(e,{type:"submit",disabled:!!O,children:O?(0,t.jsx)(a.default,{className:"h-5 w-5"}):e.props.children}):(0,t.jsx)(m.Button,{"data-sr-button":"default",variant:"default",size:"lg",disabled:!!F.first_name||!!F.email||!!O,type:"submit",formNoValidate:!!j,children:O?(0,t.jsx)(a.default,{className:"h-5 w-5"}):x}),"success"===A&&(r.default.isValidElement(d)?d:(0,t.jsx)("p",{children:d})),"error"===A&&(r.default.isValidElement(i)?i:(0,t.jsx)("p",{children:i}))]})}],202023)},908151,e=>{"use strict";var t=e.i(985585),r=e.i(591178),s=e.i(949532),a=e.i(472967),i=e.i(554125),n=e.i(251064),l=e.i(652902),o=e.i(857209),c=e.i(170440),d=e.i(517509);e.i(813912);var u=e.i(949831),h=e.i(156373),m=e.i(14395),f=e.i(354371),p=e.i(89334),x=e.i(584586),g=e.i(78137),b=e.i(238939);let v=({expires:e})=>e?(0,t.jsx)(b.default,{date:e,renderer:({days:e,hours:r,minutes:s,seconds:a,completed:i})=>i?"Offer has ended":(0,t.jsx)(t.Fragment,{children:e>1?(0,t.jsxs)(t.Fragment,{children:[e," ",1===e?"day":"days"]}):r>1?(0,t.jsxs)(t.Fragment,{children:[e>0&&(0,t.jsxs)(t.Fragment,{children:[e," ",1===e?"day":"days",","," "]}),r," ",1===r?"hour":"hours"]}):s>1?(0,t.jsxs)(t.Fragment,{children:[e>0&&(0,t.jsxs)(t.Fragment,{children:[e," ",1===e?"day":"days",","," "]}),r>0&&(0,t.jsxs)(t.Fragment,{children:[r," ",1===r?"hour":"hours",","," "]}),s," ",1===s?"minute":"minutes"]}):(0,t.jsxs)(t.Fragment,{children:[e>0&&(0,t.jsxs)(t.Fragment,{children:[e," ",1===e?"day":"days",","," "]}),r>0&&(0,t.jsxs)(t.Fragment,{children:[r," ",1===r?"hour":"hours",","," "]}),s>0&&(0,t.jsxs)(t.Fragment,{children:[s," ",1===s?"minute":"minutes",", and"," "]}),a," ",1===a?"second":"seconds"]})})}):null;var y=e.i(645046);let j=({isRoot:e=!1})=>{let{resolvedTheme:r}=(0,y.useTheme)(),i=s.useRef(null),n=s.useRef(null),l=s.useRef(null),o=s.useRef(null),c=s.useRef(null),[d,u]=s.useState(!1),[h,m]=s.useState(!1),p=()=>"dark"===r?l:n;s.useEffect(()=>{let e=n.current,t=l.current,r=()=>{u(!0)};return(e&&e.readyState>=3||t&&t.readyState>=3)&&u(!0),e?.addEventListener("canplay",r),e?.addEventListener("loadeddata",r),t?.addEventListener("canplay",r),t?.addEventListener("loadeddata",r),()=>{e?.removeEventListener("canplay",r),e?.removeEventListener("loadeddata",r),t?.removeEventListener("canplay",r),t?.removeEventListener("loadeddata",r)}},[]);let g=()=>{o.current&&(clearTimeout(o.current),o.current=null),c.current&&(cancelAnimationFrame(c.current),c.current=null)};return s.useEffect(()=>()=>{g()},[]),(0,t.jsx)("span",{ref:i,onMouseEnter:()=>{g();let e=p().current;d&&e&&(m(!0),e.play())},onMouseLeave:()=>{let e=p().current;e&&(e.pause(),g(),o.current=setTimeout(()=>{(()=>{let e=p().current;if(!e)return;let t=performance.now(),r=s=>{if(s-t>=33.333333333333336&&(t=s,e.currentTime=Math.max(0,e.currentTime-33.333333333333336/1e3),e.currentTime<=0)){e.currentTime=0;return}c.current=requestAnimationFrame(r)};c.current=requestAnimationFrame(r)})()},300))},children:(0,t.jsxs)(a.default,{prefetch:!0,tabIndex:e?-1:0,href:"/",className:"relative flex size-[77px]",children:[(0,t.jsx)(x.CldImage,{src:"https://res.cloudinary.com/dezn0ffbx/image/upload/v1760518174/antonio-waving_2x_sq5xrb.png",width:77,height:77,alt:"Code with Antonio",className:(0,f.cn)("absolute inset-0 transition-opacity duration-300",h&&"opacity-0")}),(0,t.jsx)("video",{ref:n,width:77,height:77,playsInline:!0,muted:!0,loop:!0,preload:"auto",className:"absolute inset-0 block dark:hidden",children:(0,t.jsx)("source",{src:"https://res.cloudinary.com/dezn0ffbx/video/upload/v1760519973/social_vojtaholik_httpss.mj.runQHYS71uFze0_character_waving_hand_in__f9dbcc9f-0364-4eb0-bd4c-dc35cbc73a2d_1_uld57k.mp4",type:"video/mp4"})}
1),(0,t.jsx)("video",{ref:l,width:77,height:77,playsInline:!0,muted:!0,loop:!0,preload:"auto",className:"absolute inset-0 hidden dark:block",children:(0,t.jsx)("source",{src:"https://res.cloudinary.com/dezn0ffbx/video/upload/v1760527323/social_vojtaholik_httpss-mj-runQHYS71uFze0_character_waving_hand_in__f9dbcc9f-0364-4eb0-bd4c-dc35cbc73a2d_1_4_mgtnv3.mp4",type:"video/mp4"})})]})})};var w=e.i(354165),N=e.i(514393);let k=s.forwardRef(function({title:e,titleId:t,...r},a){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},r),e?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 9V5.25A2.25 2.25 0 0 1 10.5 3h6a2.25 2.25 0 0 1 2.25 2.25v13.5A2.25 2.25 0 0 1 16.5 21h-6a2.25 2.25 0 0 1-2.25-2.25V15M12 9l3 3m0 0-3 3m3-3H2.25"}))});var _=e.i(965883);let $=(0,_.default)("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]),O=(0,_.default)("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);var A=e.i(264482),C=e.i(89340),M=e.i(95184),F=e.i(330750),S=e.i(152072),E=e.i(817422);E.z.object({href:E.z.string().optional(),label:E.z.union([E.z.string(),E.z.any()]),onClick:E.z.function().optional(),className:E.z.string().optional(),icon:E.z.any().optional(),variant:E.z.enum(["nav","menu"]).default("nav").optional(),textLabel:E.z.string().optional()});let z=({href:e,label:r,onClick:s,className:n,icon:c,textLabel:d,variant:u="nav"})=>{let h=(0,i.usePathname)(),m=e&&h===e.replace(/\/$/,""),p=(0,t.jsxs)(t.Fragment,{children:[c&&c,(0,t.jsx)("span",{children:r})]});return(0,t.jsx)("li",{className:"flex items-stretch",children:(0,t.jsx)(M.Button,{className:(0,f.cn)({nav:"text-foreground hover:bg-muted relative flex h-full items-center px-5 w-full justify-start text-base sm:text-sm transition hover:no-underline sm:px-5",menu:"text-foreground hover:bg-muted flex w-full items-center justify-start text-xl hover:no-underline px-3 sm:text-sm"}[u],{"":m,"bg-muted":m&&"menu"===u},n),asChild:!s,variant:"link",onClick:s,children:s?p:(0,t.jsxs)(a.default,{prefetch:!0,href:e,onClick:()=>{(0,l.track)("nav-link-clicked",{label:"string"==typeof r?r:d,href:e}),s&&s()},children:[m&&(0,t.jsx)(o.ChevronRight,{className:"text-primary md:hidden"})," ",p]})})})};var T=e.i(787416);let I=(0,_.default)("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),R=(0,_.default)("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);var L=e.i(860507);function q({className:e}){let{setTheme:a,theme:i}=(0,y.useTheme)(),[n,l]=s.useState(!1);return s.useEffect(()=>{l(!0)},[]),(0,t.jsxs)(L.DropdownMenu,{modal:!1,children:[(0,t.jsx)(L.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)(M.Button,{variant:"link",className:(0,r.cn)("text-foreground flex gap-2 rounded-none py-0 sm:h-full sm:items-stretch",e),children:[(0,t.jsxs)("div",{className:"text-muted-foreground flex h-full w-full items-center justify-center",children:[(0,t.jsx)(R,{className:"h-3.5 w-3.5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,t.jsx)(I,{className:"absolute h-3.5 w-3.5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"})]}),(0,t.jsxs)("span",{className:"text-base capitalize sm:sr-only",children:[n&&i," Theme"]})]})}),(0,t.jsxs)(L.DropdownMenuContent,{align:"end",children:[(0,t.jsx)(L.DropdownMenuLabel,{children:"Theme"}),(0,t.jsxs)(L.DropdownMenuItem,{onClick:()=>a("light"),className:"flex items-center justify-between gap-2",children:["Light ","light"===i&&(0,t.jsx)(T.Check,{className:"h-4 w-4"})]}),(0,t.jsxs)(L.DropdownMenuItem,{onClick:()=>a("dark"),className:"flex items-center justify-between gap-2",children:["Dark ","dark"===i&&(0,t.jsx)(T.Check,{className:"h-4 w-4"})]}),(0,t.jsxs)(L.DropdownMenuItem,{onClick:()=>a("system"),className:"flex items-center justify-between gap-2",children:["System ","system"===i&&(0,t.jsx)(T.Check,{className:"h-4 w-4"})]})]})]})}function D(){let e={type:"workshop",slug:"build-and-deploy-a-full-stack-elevenlabs-clone",title:"Build and Deploy a Full Stack ElevenLabs Clone",description:"In this course, we're building an ElevenLabs clone, a full-stack AI voice platform, from start to finish.",image:"https://res.cloudinary.com/dezn0ffbx/image/upload/c_limit,w_3840/f_auto/q_auto/v1772728477/workshops/workshop~14636e/fa600f97-6cf2-4759-8641-3093d13591bf-6rrk6b"},{data:t}=n.api.pricing.defaultCoupon.useQuery(),r=t?.product?.resources?.[0]?.resource;return t&&r?.fields.slug===e.slug&&(e={...e,badge:`Save ${100*t.percentageDiscount}%`,expires:t.expires?new Date(t.expires):null}),{browse:{featured:e,items:[{href:"/browse?type=workshop",title:"Self
1-paced Courses",description:"Learn by building real-world projects with modern stack and AI."},{href:"/browse",title:"Browse All",description:"View all resources across all categories."}]}}}let P=({isMobileMenuOpen:e,setIsMobileMenuOpen:r,subscriber:s})=>{let a=D(),{data:i,status:l}=(0,d.useSession)(),{setIsFeedbackDialogOpen:o}=(0,m.useFeedback)(),{data:c}=n.api.ability.getCurrentAbilityRules.useQuery(),u=(0,N.createAppAbility)(c||[]),h=u.can("invite","Team"),f=u.can("create","Content"),p=u.can("read","Invoice"),x=u.can("view","ProBadge"),g=u.can("manage","all"),b=i?.user?.image?(0,t.jsx)(w.default,{src:i.user.image,alt:i.user.name||"",width:48,height:48,className:"rounded-full"}):(0,t.jsx)(F.Gravatar,{className:"h-[48px] w-[48px] rounded-full",email:i?.user?.email||"",default:"mp"});return(0,t.jsxs)("div",{className:"flex items-stretch md:hidden",children:[(0,t.jsx)(M.Button,{variant:"ghost",className:"flex aspect-square h-full shrink-0 items-center justify-center px-5",type:"button",onClick:()=>r(!e),children:e?(0,t.jsx)(A.X,{className:"size-6"}):(0,t.jsx)($,{className:"size-6"})}),(0,t.jsx)(S.Sheet,{modal:!1,onOpenChange:r,open:e,children:(0,t.jsx)(S.SheetContent,{side:"right",className:"bg-card overflow-y-auto px-0 py-5 [&>button>svg]:h-7 [&>button>svg]:w-7 [&>button]:flex [&>button]:h-12 [&>button]:w-12 [&>button]:items-center [&>button]:justify-center",children:(0,t.jsxs)("nav",{"aria-label":"Primary Mobile Navigation",className:"flex h-full flex-col items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex w-full flex-col",children:["authenticated"===l&&(0,t.jsxs)("div",{className:"mb-4 flex w-full flex-row items-center gap-3 border-b px-5 py-5",children:[b,(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-xl font-bold",children:i.user.name?`Hey there, ${i.user.name?.split(" ")[0]}`:"Hey there"}),x&&(0,t.jsx)(C.Badge,{variant:"default",className:"w-fit bg-gradient-to-r from-amber-500 to-orange-500 px-1.5 py-0 text-[10px] font-bold text-white shadow-sm shadow-orange-500/20",children:"PRO MEMBER"})]})]}),"unauthenticated"===l&&(0,t.jsx)("div",{className:"mb-4 flex w-full flex-row items-center gap-1 border-b py-5",children:(0,t.jsx)("span",{className:"text-xl font-bold",children:(0,t.jsx)(z,{className:"",icon:(0,t.jsx)("div",{className:"border-primary mr-3 flex h-12 w-12 rounded-full border border-dashed"}),label:"Login",href:"/login"})})}),"unauthenticated"===l&&!s&&(0,t.jsx)(z,{href:"/newsletter",className:"[&_span]:flex [&_span]:items-center",label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(O,{className:"mr-2 w-3 text-indigo-600 dark:text-orange-300"}),"Newsletter"]})}),(0,t.jsxs)("div",{className:"flex w-full flex-col gap-3",children:[a.browse.items.length>0&&(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"text-muted-foreground px-5 py-2 text-xs font-semibold uppercase tracking-wider",children:"Courses"}),(0,t.jsx)("ul",{className:"flex flex-col gap-1",children:a.browse.items.map(e=>(0,t.jsx)(z,{className:"",href:e.href,label:e.title},e.href))})]}
1),(0,t.jsxs)("ul",{className:"border-foreground/20 flex flex-col gap-1 border-t pt-2",children:["authenticated"===l&&(0,t.jsx)(z,{className:"",label:"Send Feedback",onClick:()=>o(!0)}),h&&!g&&(0,t.jsx)(z,{className:"",label:"Invite Team",href:"/team"}),p&&(0,t.jsx)(z,{className:"",href:"/invoices",label:"Invoices"}),"authenticated"===l&&(0,t.jsx)(z,{className:"",href:"/profile",label:"Profile"}),f&&(0,t.jsx)(z,{className:"",href:"/admin/pages",label:"Admin"})]})]})]}),(0,t.jsxs)("div",{className:"flex w-full flex-col items-start justify-start border-t pt-3",children:["authenticated"===l&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(z,{className:"pl-4",href:"#",label:"Log out",onClick:()=>(0,d.signOut)(),icon:(0,t.jsx)(k,{className:"mr-2 h-5 w-5"})})}),(0,t.jsx)(q,{className:"text-lg [&_svg]:h-5 [&_svg]:w-5"})]})]})})})]})};var B=e.i(835061),V=e.i(921126);let U=()=>{let{data:e,status:r}=(0,d.useSession)(),{data:s}=n.api.ability.getCurrentAbilityRules.useQuery(),a=(0,N.createAppAbility)(s||[]),i=a.can("invite","Team"),l=a.can("create","Content"),o=a.can("read","Invoice"),c=a.can("view","ProBadge"),u=a.can("manage","all");if("loading"===r)return(0,t.jsx)("div",{className:"flex items-stretch",children:(0,t.jsx)("div",{className:"flex h-full items-center justify-center px-5",children:(0,t.jsx)(V.Skeleton,{className:"bg-foreground
1/10 h-2 w-10 rounded"})})});if(!e?.user?.email)return(0,t.jsx)(z,{className:"",label:"Log in",href:"/login"});let h=e.user.image?(0,t.jsx)(w.default,{src:e.user.image,alt:e.user.name||"",width:28,height:28,className:"rounded-full"}):(0,t.jsx)(F.Gravatar,{className:"h-7 w-7 rounded-full",email:e.user.email,default:"mp"});return(0,t.jsxs)(t.Fragment,{children:[i&&!u&&(0,t.jsx)(z,{label:"Invite Team",href:"/team"}),(0,t.jsx)("li",{className:"hidden shrink-0 items-stretch sm:flex",children:(0,t.jsxs)(L.DropdownMenu,{modal:!1,children:[(0,t.jsxs)(L.DropdownMenuTrigger,{className:"hover:bg-muted flex items-center gap-1 rounded-lg px-2 text-sm font-medium",children:[h,(0,t.jsx)("span",{className:"w-full max-w-[20ch] truncate overflow-ellipsis",children:e.user.name?.split(" ")[0]||"Account"}),c&&(0,t.jsx)(C.Badge,{variant:"default",className:"bg-gradient-to-r from-amber-500 to-orange-500 px-1.5 py-0 text-[10px] font-bold text-white shadow-sm shadow-orange-500/20",children:"PRO"}),(0,t.jsx)(B.ChevronDownIcon,{className:"size-4"})]}),(0,t.jsxs)(L.DropdownMenuContent,{children:[(0,t.jsx)(L.DropdownMenuLabel,{children:e.user.email||"Account"}),(0,t.jsx)(L.DropdownMenuSeparator,{}),(0,t.jsxs)("ul",{className:"flex flex-col",children:[o&&(0,t.jsx)(z,{variant:"menu",href:"/invoices",label:"Invoices"}),(0,t.jsx)(z,{variant:"menu",href:"/profile",label:"Profile"}),l&&(0,t.jsx)(z,{variant:"menu",href:"/admin/dashboard",label:"Admin"}),(0,t.jsx)("hr",{className:"my-1"}),(0,t.jsx)(z,{variant:"menu",href:"#",label:"Log out",onClick:()=>(0,d.signOut)(),icon:(0,t.jsx)(k,{className:"mr-2 h-4 w-4"})})]})]})]})})]})},H=({className:e,withContainer:r=!0})=>{let b=D(),y=(0,i.usePathname)(),w="/"===y;y.includes("/edit");let N=(0,i.useParams)(),k=(0,i.useRouter)(),{setIsFeedbackDialogOpen:_}=(0,m.useFeedback)();N.lesson&&N.module;let[$,O]=s.useState(!1);s.useEffect(()=>{O(!1)},[y]);let{data:A,status:C}=(0,d.useSession)(),{data:M,status:F}=n.api.ability.getCurrentSubscriberFromCookie.useQuery(),[S,E]=s.useTransition(),T="/browse"!==y;return(0,t.jsx)("header",{className:(0,f.cn)("dark:border-border relative z-50 w-full shadow-sm dark:shadow-[0_1px_0_0_var(--border)]",e),children:(0,t.jsxs)("div",{className:(0,f.cn)("flex items-center justify-between",{container:r}),children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(j,{isRoot:w}),(0,t.jsx)(h.NavigationMenu,{delayDuration:0,skipDelayDuration:0,viewport:!0,className:"ml-3 hidden items-center md:flex",children:(0,t.jsx)(h.NavigationMenuList,{className:"divide-border flex h-full items-center gap-0 divide-x",children:b.browse.items.length>0&&(0,t.jsxs)(h.NavigationMenuItem,{className:"items-center",children:[(0,t.jsx)(h.NavigationMenuTrigger,{className:"flex items-center",children:"Browse"}),(0,t.jsx)(h.NavigationMenuContent,{className:"w-full shrink-0 p-5",children:(0,t.jsxs)("div",{className:"grid w-[300px] grid-cols-5 gap-3 md:w-[550px] lg:w-[550px]",children:[(0,t.jsx)(h.NavigationMenuLink,{asChild:!0,className:"border-border col-span-2 overflow-hidden border p-0",children:b.browse.featured&&(0,t.jsxs)(a.default,{prefetch:!0,href:(0,p.getResourcePath)(b.browse.featured.type,b.browse.featured.slug),className:"flex flex-col justify-between",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1 p-4",children:[b.browse.featured.metadata&&(0,t.jsx)("div",{className:"text-xs font-medium opacity-80",children:b.browse.featured.metadata}),b.browse.featured.image&&(0,t.jsx)("div",{className:"relative mb-2 aspect-video",children:(0,t.jsx)(x.CldImage,{src:b.browse.featured.image,alt:b.browse.featured.title,fill:!0,className:"rounded-lg object-cover"})}),(0,t.jsx)("div",{className:"line-clamp-3 text-lg font-semibold leading-tight",children:b.browse.featured.title})]}),b.browse.featured.badge&&(0,t.jsxs)("div",{className:"bg-primary text-primary-foreground flex w-full justify-between px-5 pt-2",children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"text-lg font-semibold",children:b.browse.featured.badge}),(0,t.jsx)("div",{className:"tex-sm",children:b.browse.featured.expires&&(0,t.jsxs)(t.Fragment,{children:["Offer ends in"," ",(0,t.jsx)(v,{expires:b.browse.featured.expires})]})})]}),(0,t.jsx)(g.ContributorImage,{})]})]})}),(0,t.jsx)("ul",{className:"col-span-3",children:b.browse.items.map(e=>(0,t.jsx)(h.NavigationMenuLink,{asChild:!0,children:(0,t.jsxs)(a.default,{prefetch:!0,href:e.href,onClick:()=>{(0,l.track)("navigation_menu_item_click",{resource:e.title,type:"cohort",category:"navigation"})},className:"relative flex flex-row items-center gap-5 pr-8",children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"text-lg font-semibold",children:e.title}),(0,t.jsx)("div",{className:"text-muted-foreground",children:e.description})]}),(0,t.jsx)(o.ChevronRight,{className:"text-foreground absolute right-3 top-1/2 -translate-y-1/2"})]})},e.href))})]})})]})})}),T&&(0,t.jsxs)("form",{className:"relative flex w-full max-w-xs sm:shrink-0",onSubmit:e=>{e.preventDefault();let t=new FormData(e.currentTarget).getAll("query").map(e=>"string"==typeof e?e.trim():"").find(Boolean);t&&((0,l.track)("search_submitted",{query:t,location:"navigation"}),E(()=>{k.push(`/browse?q=${encodeURIComponent(t)}`)}))},children:[(0,t.jsx)(c.SearchIcon,{className:"text-muted-foreground absolute left-6 top-1/2 size-4 -translate-y-1/2"}),(0,t.jsx)(u.Input,{name:"query",placeholder:"What do you want to learn today?",className:"bg-input border-border ml-3 hidden w-full rounded-full border pl-10 sm:flex",type:"search",disabled:S}),(0,t.jsx)(u.Input,{name:"query",placeholder:"Search",className:"bg-input border-border ml-3 flex w-full rounded-full border pl-10 sm:hidden",type:"search",disabled:S}),(0,t.jsx)("button",{type:"submit",className:"sr-only",children:"Search"})]})]}),(0,t.jsx)("nav",{className:"flex items-stretch","aria-label":"User navigation",children:(0,t.jsxs)("ul",{className:"hidden items-stretch md:flex",children:["authenticated"===C&&(0,t.jsx)(z,{label:"Feedback",onClick:()=>{_(!0)}}),(0,t.jsx)(U,{})]})}),(0,t.jsx)(P,{isMobileMenuOpen:$,setIsMobileMenuOpen:O,subscriber:M})]})})};var Q=e.i(202023);function Y({withContainer:e=!0}){let r=(0,i.usePathname)().includes("/edit"),{resolvedTheme:l,setTheme:o}
1=(0,y.useTheme)(),[c,d]=(0,s.useState)(!1);(0,s.useEffect)(()=>{d(!0)},[]);let{data:u,status:h}=n.api.ability.getCurrentSubscriberFromCookie.useQuery();return r?null:(0,t.jsx)("footer",{className:"flex w-full flex-col items-center justify-center px-5 py-10 sm:py-24",children:(0,t.jsxs)("div",{className:(0,f.cn)("flex w-full flex-col gap-12",{container:e}),children:[(0,t.jsxs)("div",{className:"flex w-full flex-col items-start justify-between gap-8 lg:flex-row lg:items-center",children:[(0,t.jsxs)("div",{className:"flex w-full flex-col items-center gap-8 md:items-start lg:flex-row lg:items-center lg:gap-12",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(j,{}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-[9.3px] font-medium leading-tight",children:"Code with"}),(0,t.jsx)("span",{className:"text-foreground text-[19.7px] font-bold leading-tight",children:"Antonio"})]})]}),(0,t.jsxs)("nav",{className:"text-muted-foreground flex flex-col items-center gap-8 text-base md:flex-row",children:[(0,t.jsx)(a.default,{href:"/",className:"hover:text-foreground transition",children:"Home"}),(0,t.jsx)(a.default,{href:"/browse",className:"hover:text-foreground transition",children:"Browse"}),(0,t.jsx)(a.default,{href:"/contact",className:"hover:text-foreground transition",children:"Contact"})]})]}),"pending"===h?(0,t.jsx)("div",{className:"w-full"}):u?(0,t.jsx)(a.default,{className:"hover:text-foreground text-muted-foreground shrink-0 transition",href:"/login",children:"Log in"}):(0,t.jsx)(Q.SubscribeForm,{emailPlaceholder:"Your email",className:"flex w-full flex-row items-start gap-3 text-left sm:max-w-[350px] sm:flex-col lg:flex-row lg:items-end [&_[data-sr-fieldset]]:first-of-type:hidden [&_button]:px-4 [&_input]:h-10 [&_input]:flex-1 [&_label]:sr-only"})]}),(0,t.jsx)("div",{className:"border-border h-px w-full border-t"}),(0,t.jsxs)("div",{className:"flex flex-col items-start justify-between gap-4 lg:flex-row lg:items-center",children:[(0,t.jsxs)("p",{className:"text-muted-foreground text-sm",children:[new Date().getFullYear()," © codewithantonio.com"]}),(0,t.jsxs)("div",{className:"flex items-center gap-8",children:[(0,t.jsx)(a.default,{href:"/privacy",className:"text-muted-foreground hover:text-foreground text-sm transition",children:"Terms of Service"}),(0,t.jsx)("button",{onClick:()=>o("dark"===l?"light":"dark"),className:"border-border bg-background relative flex h-6 w-12 items-center rounded-full border transition-colors","aria-label":"Toggle theme",children:(0,t.jsx)("div",{className:(0,f.cn)("border-border bg-background absolute h-6 w-6 rounded-full border transition-transform duration-200",c&&"dark"===l?"translate-x-6":"translate-x-0"),children:(0,t.jsxs)("div",{className:"flex h-full w-full items-center justify-center",children:[(0,t.jsx)(R,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,t.jsx)(I,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"})]})})})]})]})]})})}let K=(0,_.default)("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]),Z=({saleBannerData:e,isCommerceEnabled:r})=>{if(!e||!r)return null;let{productPath:s}=e;return(0,t.jsxs)(a.default,{href:s,className:"bg-foreground text-background flex items-center justify-center text-balance px-2 py-2 text-center text-xs sm:text-sm",children:["New"," ","self-paced"===e.productType?`course 㻠Save ${e.percentOff}% on ${e.productName}`:`cohort open 㻠Register for the "${e.productName}" today and save ${e.percentOff}%`,(0,t.jsx)(K,{className:"size-4"})]})};e.s(["default",0,function({children:e,withContainer:s=!1,withNavContainer:a=!0,withFooterContainer:i=!0,className:n,saleBannerData:l,isCommerceEnabled:o=!0,withFooter:c=!0,withNavigation:d=!0}){return(0,t.jsxs)("div",{className:(0,r.cn)("w-full",!d&&"[--nav-height:0px]"),children:[l&&(0,t.jsx)(Z,{saleBannerData:l,isCommerceEnabled:o}),d&&(0,t.jsx)(H,{withContainer:a||s}),(0,t.jsx)("main",{className:(0,r.cn)("min-h-[calc(100dvh-var(--nav-height))]",n,{container:s}),children:e}),c&&(0,t.jsx)(Y,{withContainer:i||s})]})}],908151)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.