eslint-plugin-qwik 1.1.5-dev20230613125931 → 1.1.5-dev20230616144423
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +48 -39
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";var Rn=Object.create;var K=Object.defineProperty;var Ln=Object.getOwnPropertyDescriptor;var Un=Object.getOwnPropertyNames;var Jn=Object.getPrototypeOf,Dn=Object.prototype.hasOwnProperty;var p=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Vn=(e,r)=>{for(var t in r)K(e,t,{get:r[t],enumerable:!0})},Ar=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of Un(r))!Dn.call(e,o)&&o!==t&&K(e,o,{get:()=>r[o],enumerable:!(n=Ln(r,o))||n.enumerable});return e};var D=(e,r,t)=>(t=e!=null?Rn(Jn(e)):{},Ar(r||!e||!e.__esModule?K(t,"default",{value:e,enumerable:!0}):t,e)),Bn=e=>Ar(K({},"__esModule",{value:!0}),e);var Or=p((As,Pr)=>{"use strict";Pr.exports=e=>{let r=e.match(/^[ \t]*(?=\S)/gm);return r?r.reduce((t,n)=>Math.min(t,n.length),1/0):0}});var z=p(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.default=ro;function ro(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!e.type||e.type!=="JSXAttribute")throw new Error("The prop must be a JSXAttribute collected by the AST parser.");return e.name.type==="JSXNamespacedName"?e.name.namespace.name+":"+e.name.name.name:e.name.name}});var Fr=p(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.default=ve;B.hasAnyProp=oo;B.hasEveryProp=ao;var to=z(),Cr=no(to);function no(e){return e&&e.__esModule?e:{default:e}}var he={spreadStrict:!0,ignoreCase:!0};function ve(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:he,n=t.ignoreCase?r.toUpperCase():r;return e.some(function(o){if(o.type==="JSXSpreadAttribute")return!t.spreadStrict;var a=t.ignoreCase?(0,Cr.default)(o).toUpperCase():(0,Cr.default)(o);return n===a})}function oo(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:he,n=typeof r=="string"?r.split(" "):r;return n.some(function(o){return ve(e,o,t)})}function ao(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:he,n=typeof r=="string"?r.split(" "):r;return n.every(function(o){return ve(e,o,t)})}});var Mr=p(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.default=io;function Nr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.type==="JSXMemberExpression"?Nr(e.object,e.property)+"."+r.name:e.name+"."+r.name}function io(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.name;if(e.type==="JSXOpeningFragment")return"<>";if(!r)throw new Error("The argument provided is not a JSXElement node.");if(r.type==="JSXMemberExpression"){var t=r.object,n=t===void 0?{}:t,o=r.property,a=o===void 0?{}:o;return Nr(n,a)}return r.type==="JSXNamespacedName"?r.namespace.name+":"+r.name.name:e.name.name}});var Rr=p(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});var be={clipboard:["onCopy","onCut","onPaste"],composition:["onCompositionEnd","onCompositionStart","onCompositionUpdate"],keyboard:["onKeyDown","onKeyPress","onKeyUp"],focus:["onFocus","onBlur"],form:["onChange","onInput","onSubmit"],mouse:["onClick","onContextMenu","onDblClick","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"],selection:["onSelect"],touch:["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],ui:["onScroll"],wheel:["onWheel"],media:["onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting"],image:["onLoad","onError"],animation:["onAnimationStart","onAnimationEnd","onAnimationIteration"],transition:["onTransitionEnd"]},so=Object.keys(be).reduce(function(e,r){return e.concat(be[r])},[]);Q.default=so;Q.eventHandlersByType=be});var Ur=p(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});var lo=function(){function e(r,t){var n=[],o=!0,a=!1,i=void 0;try{for(var l=r[Symbol.iterator](),y;!(o=(y=l.next()).done)&&(n.push(y.value),!(t&&n.length===t));o=!0);}catch(h){a=!0,i=h}finally{try{!o&&l.return&&l.return()}finally{if(a)throw i}}return n}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),q=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e};Se.default=mo;var uo=z(),po=co(uo);function co(e){return e&&e.__esModule?e:{default:e}}function Lr(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}var fo={ignoreCase:!0};function mo(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:fo;function n(l){return t.ignoreCase?l.toUpperCase():l}var o=n(r);function a(l){return l.type==="Property"&&l.key.type==="Identifier"&&o===n(l.key.name)}var i=e.find(function(l){return l.type==="JSXSpreadAttribute"?l.argument.type==="ObjectExpression"&&o!==n("key")&&l.argument.properties.some(a):o===n((0,po.default)(l))});return i&&i.type==="JSXSpreadAttribute"?yo(i.argument.properties.find(a)):i}function yo(e){var r=e.key,t=e.value;return q({type:"JSXAttribute",name:q({type:"JSXIdentifier",name:r.name},Ee(r)),value:t.type==="Literal"?H(t):q({type:"JSXExpressionContainer",expression:go(t)},Ee(t))},Ee(e))}function H(e){var r=e.range||[e.start,e.end],t=lo(r,2),n=t[0],o=t[1];return q({},e,{end:void 0,range:[n,o],start:void 0})}function go(e){var r=e.expressions,t=e.quasis,n=Lr(e,["expressions","quasis"]);return q({},H(n),r?{expressions:r.map(H)}:{},t?{quasis:t.map(H)}:{})}function Ee(e){var r=e.loc,t=Lr(e,["loc"]),n=H(t),o=n.range;return{loc:ho(r),range:o}}function ho(e){var r=e.start,t=e.end,n=e.source,o=e.filename;return q({start:r,end:t},n!==void 0?{source:n}:{},o!==void 0?{filename:o}:{})}});var Ae=p(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.default=vo;function vo(e){var r=e.value,t=typeof r=="string"&&r.toLowerCase();return t==="true"?!0:t==="false"?!1:r}});var Oe=p(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.default=xo;function xo(e){var r=Y().default,t=e.openingElement.name.name;return e.openingElement.selfClosing?"<"+t+" />":"<"+t+">"+[].concat(e.children).map(function(n){return r(n)}).join("")+"</"+t+">"}});var ke=p(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.default=bo;function bo(e){return e.raw}});var Jr=p(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.default=Eo;function Eo(e){var r=Y().default;return e.children.length===0?"<></>":"<>"+[].concat(e.children).map(function(t){return r(t)}).join("")+"</>"}});var Vr=p(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.default=So;var Dr={Array,Date,Infinity:1/0,Math,Number,Object,String,undefined:void 0};function So(e){var r=e.name;return Object.hasOwnProperty.call(Dr,r)?Dr[r]:r}});var qe=p($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.default=Ao;function wo(e,r){return(e.range?e.range[0]:e.start)-(r.range?r.range[0]:r.start)}function Ao(e){var r=e.quasis,t=e.expressions,n=r.concat(t);return n.sort(wo).reduce(function(o,a){var i=a.type;return i==="TemplateElement"?o+a.value.raw:i==="Identifier"?a.name==="undefined"?""+o+a.name:o+"{"+a.name+"}":i.indexOf("Expression")>-1?o+"{"+i+"}":o},"")}});var Br=p(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.default=ko;var Po=qe(),Oo=_o(Po);function _o(e){return e&&e.__esModule?e:{default:e}}function ko(e){return(0,Oo.default)(e.quasi)}});var Hr=p(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.default=To;function To(e){return function(){return e}}});var Xr=p(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.default=jo;function jo(e){var r=w().default,t=e.operator,n=e.left,o=e.right,a=r(n),i=r(o);return t==="&&"?a&&i:t==="??"?a===null||typeof a>"u"?i:a:a||i}});var Gr=p(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.default=$o;function $o(e){var r=w().default;return""+r(e.object)+(e.optional?"?.":".")+r(e.property)}});var Wr=p(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.default=qo;function qo(e){var r=w().default;return r(e.expression||e)}});var Kr=p(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.default=Io;function Io(e){var r=w().default;return r(e.callee)+"?.("+e.arguments.map(function(t){return r(t)}).join(", ")+")"}});var zr=p(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.default=Co;function Co(e){var r=w().default;return r(e.object)+"?."+r(e.property)}});var Qr=p(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.default=Fo;function Fo(e){var r=w().default,t=Array.isArray(e.arguments)?e.arguments.map(function(n){return r(n)}).join(", "):"";return""+r(e.callee)+(e.optional?"?.":"")+"("+t+")"}});var Yr=p(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.default=No;function No(e){var r=w().default,t=e.operator,n=e.argument;switch(t){case"-":return-r(n);case"+":return+r(n);case"!":return!r(n);case"~":return~r(n);case"delete":return!0;case"typeof":case"void":default:return}}});var Ve=p(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.default=Mo;function Mo(){return"this"}});var Zr=p(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.default=Ro;function Ro(e){var r=w().default,t=e.test,n=e.alternate,o=e.consequent;return r(t)?r(o):r(n)}});var et=p(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.default=Lo;function Lo(e){var r=w().default,t=e.operator,n=e.left,o=e.right,a=r(n),i=r(o);switch(t){case"==":return a==i;case"!=":return a!=i;case"===":return a===i;case"!==":return a!==i;case"<":return a<i;case"<=":return a<=i;case">":return a>i;case">=":return a>=i;case"<<":return a<<i;case">>":return a>>i;case">>>":return a>>>i;case"+":return a+i;case"-":return a-i;case"*":return a*i;case"/":return a/i;case"%":return a%i;case"|":return a|i;case"^":return a^i;case"&":return a&i;case"in":try{return a in i}catch{return!1}case"instanceof":return typeof i!="function"?!1:a instanceof i;default:return}}});var Xe=p((gl,tt)=>{"use strict";var rt=Object.prototype.toString;tt.exports=function(r){var t=rt.call(r),n=t==="[object Arguments]";return n||(n=t!=="[object Array]"&&r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&rt.call(r.callee)==="[object Function]"),n}});var ct=p((hl,pt)=>{"use strict";var ut;Object.keys||(X=Object.prototype.hasOwnProperty,Ge=Object.prototype.toString,nt=Xe(),We=Object.prototype.propertyIsEnumerable,ot=!We.call({toString:null},"toString"),at=We.call(function(){},"prototype"),G=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Z=function(e){var r=e.constructor;return r&&r.prototype===e},it={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},st=function(){if(typeof window>"u")return!1;for(var e in window)try{if(!it["$"+e]&&X.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{Z(window[e])}catch{return!0}}catch{return!0}return!1}(),lt=function(e){if(typeof window>"u"||!st)return Z(e);try{return Z(e)}catch{return!1}},ut=function(r){var t=r!==null&&typeof r=="object",n=Ge.call(r)==="[object Function]",o=nt(r),a=t&&Ge.call(r)==="[object String]",i=[];if(!t&&!n&&!o)throw new TypeError("Object.keys called on a non-object");var l=at&&n;if(a&&r.length>0&&!X.call(r,0))for(var y=0;y<r.length;++y)i.push(String(y));if(o&&r.length>0)for(var h=0;h<r.length;++h)i.push(String(h));else for(var d in r)!(l&&d==="prototype")&&X.call(r,d)&&i.push(String(d));if(ot)for(var f=lt(r),u=0;u<G.length;++u)!(f&&G[u]==="constructor")&&X.call(r,G[u])&&i.push(G[u]);return i});var X,Ge,nt,We,ot,at,G,Z,it,st,lt;pt.exports=ut});var Ke=p((vl,mt)=>{"use strict";var Uo=Array.prototype.slice,Jo=Xe(),dt=Object.keys,ee=dt?function(r){return dt(r)}:ct(),ft=Object.keys;ee.shim=function(){if(Object.keys){var r=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);r||(Object.keys=function(n){return Jo(n)?ft(Uo.call(n)):ft(n)})}else Object.keys=ee;return Object.keys||ee};mt.exports=ee});var ze=p((xl,yt)=>{"use strict";yt.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;r[t]=o;for(t 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 a=Object.getOwnPropertySymbols(r);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(r,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(r,t);if(i.value!==o||i.enumerable!==!0)return!1}return!0}});var vt=p((bl,ht)=>{"use strict";var gt=typeof Symbol<"u"&&Symbol,Do=ze();ht.exports=function(){return typeof gt!="function"||typeof Symbol!="function"||typeof gt("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Do()}});var Et=p((El,bt)=>{"use strict";var xt={foo:{}},Vo=Object;bt.exports=function(){return{__proto__:xt}.foo===xt.foo&&!({__proto__:null}instanceof Vo)}});var wt=p((Sl,St)=>{"use strict";var Bo="Function.prototype.bind called on incompatible ",Qe=Array.prototype.slice,Ho=Object.prototype.toString,Xo="[object Function]";St.exports=function(r){var t=this;if(typeof t!="function"||Ho.call(t)!==Xo)throw new TypeError(Bo+t);for(var n=Qe.call(arguments,1),o,a=function(){if(this instanceof o){var d=t.apply(this,n.concat(Qe.call(arguments)));return Object(d)===d?d:this}else return t.apply(r,n.concat(Qe.call(arguments)))},i=Math.max(0,t.length-n.length),l=[],y=0;y<i;y++)l.push("$"+y);if(o=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(a),t.prototype){var h=function(){};h.prototype=t.prototype,o.prototype=new h,h.prototype=null}return o}});var re=p((wl,At)=>{"use strict";var Go=wt();At.exports=Function.prototype.bind||Go});var Ot=p((Al,Pt)=>{"use strict";var Wo=re();Pt.exports=Wo.call(Function.call,Object.prototype.hasOwnProperty)});var oe=p((Pl,$t)=>{"use strict";var m,N=SyntaxError,jt=Function,F=TypeError,Ye=function(e){try{return jt('"use strict"; return ('+e+").constructor;")()}catch{}},T=Object.getOwnPropertyDescriptor;if(T)try{T({},"")}catch{T=null}var Ze=function(){throw new F},Ko=T?function(){try{return arguments.callee,Ze}catch{try{return T(arguments,"callee").get}catch{return Ze}}}():Ze,I=vt()(),zo=Et()(),A=Object.getPrototypeOf||(zo?function(e){return e.__proto__}:null),C={},Qo=typeof Uint8Array>"u"||!A?m:A(Uint8Array),j={"%AggregateError%":typeof AggregateError>"u"?m:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?m:ArrayBuffer,"%ArrayIteratorPrototype%":I&&A?A([][Symbol.iterator]()):m,"%AsyncFromSyncIteratorPrototype%":m,"%AsyncFunction%":C,"%AsyncGenerator%":C,"%AsyncGeneratorFunction%":C,"%AsyncIteratorPrototype%":C,"%Atomics%":typeof Atomics>"u"?m:Atomics,"%BigInt%":typeof BigInt>"u"?m:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?m:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?m:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?m:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?m:Float32Array,"%Float64Array%":typeof Float64Array>"u"?m:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?m:FinalizationRegistry,"%Function%":jt,"%GeneratorFunction%":C,"%Int8Array%":typeof Int8Array>"u"?m:Int8Array,"%Int16Array%":typeof Int16Array>"u"?m:Int16Array,"%Int32Array%":typeof Int32Array>"u"?m:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":I&&A?A(A([][Symbol.iterator]())):m,"%JSON%":typeof JSON=="object"?JSON:m,"%Map%":typeof Map>"u"?m:Map,"%MapIteratorPrototype%":typeof Map>"u"||!I||!A?m:A(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?m:Promise,"%Proxy%":typeof Proxy>"u"?m:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?m:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?m:Set,"%SetIteratorPrototype%":typeof Set>"u"||!I||!A?m:A(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?m:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I&&A?A(""[Symbol.iterator]()):m,"%Symbol%":I?Symbol:m,"%SyntaxError%":N,"%ThrowTypeError%":Ko,"%TypedArray%":Qo,"%TypeError%":F,"%Uint8Array%":typeof Uint8Array>"u"?m:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?m:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?m:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?m:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?m:WeakMap,"%WeakRef%":typeof WeakRef>"u"?m:WeakRef,"%WeakSet%":typeof WeakSet>"u"?m:WeakSet};if(A)try{null.error}catch(e){_t=A(A(e)),j["%Error.prototype%"]=_t}var _t,Yo=function e(r){var t;if(r==="%AsyncFunction%")t=Ye("async function () {}");else if(r==="%GeneratorFunction%")t=Ye("function* () {}");else if(r==="%AsyncGeneratorFunction%")t=Ye("async function* () {}");else if(r==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(r==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&A&&(t=A(o.prototype))}return j[r]=t,t},kt={"%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"]},W=re(),te=Ot(),Zo=W.call(Function.call,Array.prototype.concat),ea=W.call(Function.apply,Array.prototype.splice),Tt=W.call(Function.call,String.prototype.replace),ne=W.call(Function.call,String.prototype.slice),ra=W.call(Function.call,RegExp.prototype.exec),ta=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,na=/\\(\\)?/g,oa=function(r){var t=ne(r,0,1),n=ne(r,-1);if(t==="%"&&n!=="%")throw new N("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new N("invalid intrinsic syntax, expected opening `%`");var o=[];return Tt(r,ta,function(a,i,l,y){o[o.length]=l?Tt(y,na,"$1"):i||a}),o},aa=function(r,t){var n=r,o;if(te(kt,n)&&(o=kt[n],n="%"+o[0]+"%"),te(j,n)){var a=j[n];if(a===C&&(a=Yo(n)),typeof a>"u"&&!t)throw new F("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:a}}throw new N("intrinsic "+r+" does not exist!")};$t.exports=function(r,t){if(typeof r!="string"||r.length===0)throw new F("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new F('"allowMissing" argument must be a boolean');if(ra(/^%?[^%]*%?$/,r)===null)throw new N("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=oa(r),o=n.length>0?n[0]:"",a=aa("%"+o+"%",t),i=a.name,l=a.value,y=!1,h=a.alias;h&&(o=h[0],ea(n,Zo([0,1],h)));for(var d=1,f=!0;d<n.length;d+=1){var u=n[d],v=ne(u,0,1),s=ne(u,-1);if((v==='"'||v==="'"||v==="`"||s==='"'||s==="'"||s==="`")&&v!==s)throw new N("property names with quotes must have matching quotes");if((u==="constructor"||!f)&&(y=!0),o+="."+u,i="%"+o+"%",te(j,i))l=j[i];else if(l!=null){if(!(u in l)){if(!t)throw new F("base intrinsic for "+r+" exists, but the property is not available.");return}if(T&&d+1>=n.length){var c=T(l,u);f=!!c,f&&"get"in c&&!("originalValue"in c.get)?l=c.get:l=l[u]}else f=te(l,u),l=l[u];f&&!y&&(j[i]=l)}}return l}});var It=p((Ol,qt)=>{"use strict";var ia=oe(),er=ia("%Object.defineProperty%",!0),rr=function(){if(er)try{return er({},"a",{value:1}),!0}catch{return!1}return!1};rr.hasArrayLengthDefineBug=function(){if(!rr())return null;try{return er([],"length",{value:1}).length!==1}catch{return!0}};qt.exports=rr});var tr=p((_l,Mt)=>{"use strict";var sa=Ke(),la=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",ua=Object.prototype.toString,pa=Array.prototype.concat,Ct=Object.defineProperty,ca=function(e){return typeof e=="function"&&ua.call(e)==="[object Function]"},da=It()(),Ft=Ct&&da,fa=function(e,r,t,n){if(r in e){if(n===!0){if(e[r]===t)return}else if(!ca(n)||!n())return}Ft?Ct(e,r,{configurable:!0,enumerable:!1,value:t,writable:!0}):e[r]=t},Nt=function(e,r){var t=arguments.length>2?arguments[2]:{},n=sa(r);la&&(n=pa.call(n,Object.getOwnPropertySymbols(r)));for(var o=0;o<n.length;o+=1)fa(e,n[o],r[n[o]],t[n[o]])};Nt.supportsDescriptors=!!Ft;Mt.exports=Nt});var or=p((kl,ae)=>{"use strict";var nr=re(),M=oe(),Ut=M("%Function.prototype.apply%"),Jt=M("%Function.prototype.call%"),Dt=M("%Reflect.apply%",!0)||nr.call(Jt,Ut),Rt=M("%Object.getOwnPropertyDescriptor%",!0),$=M("%Object.defineProperty%",!0),ma=M("%Math.max%");if($)try{$({},"a",{value:1})}catch{$=null}ae.exports=function(r){var t=Dt(nr,Jt,arguments);if(Rt&&$){var n=Rt(t,"length");n.configurable&&$(t,"length",{value:1+ma(0,r.length-(arguments.length-1))})}return t};var Lt=function(){return Dt(nr,Ut,arguments)};$?$(ae.exports,"apply",{value:Lt}):ae.exports.apply=Lt});var Xt=p((Tl,Ht)=>{"use strict";var Vt=oe(),Bt=or(),ya=Bt(Vt("String.prototype.indexOf"));Ht.exports=function(r,t){var n=Vt(r,!!t);return typeof n=="function"&&ya(r,".prototype.")>-1?Bt(n):n}});var ar=p((jl,Qt)=>{"use strict";var ga=Ke(),Kt=ze()(),zt=Xt(),Gt=Object,ha=zt("Array.prototype.push"),Wt=zt("Object.prototype.propertyIsEnumerable"),va=Kt?Object.getOwnPropertySymbols:null;Qt.exports=function(r,t){if(r==null)throw new TypeError("target must be an object");var n=Gt(r);if(arguments.length===1)return n;for(var o=1;o<arguments.length;++o){var a=Gt(arguments[o]),i=ga(a),l=Kt&&(Object.getOwnPropertySymbols||va);if(l)for(var y=l(a),h=0;h<y.length;++h){var d=y[h];Wt(a,d)&&ha(i,d)}for(var f=0;f<i.length;++f){var u=i[f];if(Wt(a,u)){var v=a[u];n[u]=v}}}return n}});var sr=p(($l,Yt)=>{"use strict";var ir=ar(),xa=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",r=e.split(""),t={},n=0;n<r.length;++n)t[r[n]]=r[n];var o=Object.assign({},t),a="";for(var i in o)a+=i;return e!==a},ba=function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch{return e[1]==="y"}return!1};Yt.exports=function(){return!Object.assign||xa()||ba()?ir:Object.assign}});var en=p((ql,Zt)=>{"use strict";var Ea=tr(),Sa=sr();Zt.exports=function(){var r=Sa();return Ea(Object,{assign:r},{assign:function(){return Object.assign!==r}}),r}});var on=p((Il,nn)=>{"use strict";var wa=tr(),Aa=or(),Pa=ar(),rn=sr(),Oa=en(),_a=Aa.apply(rn()),tn=function(r,t){return _a(Object,arguments)};wa(tn,{getPolyfill:rn,implementation:Pa,shim:Oa});nn.exports=tn});var sn=p(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});var ka=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e};lr.default=an;var Ta=on(),ja=$a(Ta);function $a(e){return e&&e.__esModule?e:{default:e}}function an(e){var r=w().default;return e.properties.reduce(function(t,n){var o=ka({},t);if(/^(?:Experimental)?Spread(?:Property|Element)$/.test(n.type)){if(n.argument.type==="ObjectExpression")return(0,ja.default)(o,an(n.argument))}else o[r(n.key)]=r(n.value);return o},{})}});var ln=p(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.default=qa;function qa(){return new Object}});var un=p(pr=>{"use strict";Object.defineProperty(pr,"__esModule",{value:!0});pr.default=Ia;function Ia(e){var r=w().default,t=e.operator,n=e.argument,o=e.prefix,a=r(n);switch(t){case"++":return o?++a:a++;case"--":return o?--a:a--;default:return}}});var pn=p(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.default=Ca;function Ca(e){var r=w().default;return e.elements.map(function(t){if(t!==null)return r(t)})}});var cn=p(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.default=Fa;function Fa(e){var r=w().default,t=r(e.callee),n=e.object===null?r(e.callee.object):r(e.object);return e.object&&e.object.property?n+"."+t+".bind("+n+")":t+".bind("+n+")"}});var dn=p(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.default=Na;function Na(){}});var fn=p(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.default=Ma;function Ma(e){var r=w().default;return r(e.expression)}});var mn=p(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.default=Ra;function Ra(e){var r=w().default;return e.expressions.map(function(t){return r(t)})}});var gn=p(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.default=_;var La=Ve().default;function yn(e,r,t){return t.computed?t.optional?e+"?.["+r+"]":e+"["+r+"]":t.optional?e+"?."+r:e+"."+r}function _(e){var r="The prop value with an expression type of TSNonNullExpression could not be resolved. Please file an issue ( https://github.com/jsx-eslint/jsx-ast-utils/issues/new ) to get this fixed immediately.";if(e.type==="Identifier"){var t=e.name;return t}if(e.type==="Literal")return e.value;if(e.type==="TSAsExpression")return _(e.expression);if(e.type==="ThisExpression")return La();if(e.type==="TSNonNullExpression"&&(!e.extra||e.extra.parenthesized===!1)){var n=e.expression;return _(n)+"!"}if(e.type==="TSNonNullExpression"&&e.extra&&e.extra.parenthesized===!0){var o=e.expression;return"("+_(o)+"!)"}if(e.type==="MemberExpression"){if(!e.extra||e.extra.parenthesized===!1)return yn(_(e.object),_(e.property),e);if(e.extra&&e.extra.parenthesized===!0){var a=yn(_(e.object),_(e.property),e);return"("+a+")"}}if(e.expression)for(var i=e.expression;i;){if(i.type==="Identifier")return console.error(r),i.name;var l=i;i=l.expression}return console.error(r),""}});var hn=p(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.default=Ua;function Ua(e){var r=w().default;return r(e.left)+" "+e.operator+" "+r(e.right)}});var w=p(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});var Ja=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e};ie.default=Vi;ie.extractLiteral=Bi;var Da=Ae(),Va=x(Da),Ba=Oe(),Ha=x(Ba),Xa=Jr(),Ga=x(Xa),Wa=ke(),Ka=x(Wa),za=Vr(),Qa=x(za),Ya=Br(),Za=x(Ya),ei=qe(),ri=x(ei),ti=Hr(),vn=x(ti),ni=Xr(),oi=x(ni),ai=Gr(),ii=x(ai),si=Wr(),li=x(si),ui=Kr(),pi=x(ui),ci=zr(),di=x(ci),fi=Qr(),mi=x(fi),yi=Yr(),gi=x(yi),hi=Ve(),vi=x(hi),xi=Zr(),bi=x(xi),Ei=et(),Si=x(Ei),wi=sn(),Ai=x(wi),Pi=ln(),Oi=x(Pi),_i=un(),ki=x(_i),Ti=pn(),ji=x(Ti),$i=cn(),qi=x($i),Ii=dn(),Ci=x(Ii),Fi=fn(),Ni=x(Fi),Mi=mn(),Ri=x(Mi),Li=gn(),Ui=x(Li),Ji=hn(),Di=x(Ji);function x(e){return e&&e.__esModule?e:{default:e}}var k={Identifier:Qa.default,Literal:Va.default,JSXElement:Ha.default,JSXFragment:Ga.default,JSXText:Ka.default,TaggedTemplateExpression:Za.default,TemplateLiteral:ri.default,ArrowFunctionExpression:vn.default,FunctionExpression:vn.default,LogicalExpression:oi.default,MemberExpression:ii.default,ChainExpression:li.default,OptionalCallExpression:pi.default,OptionalMemberExpression:di.default,CallExpression:mi.default,UnaryExpression:gi.default,ThisExpression:vi.default,ConditionalExpression:bi.default,BinaryExpression:Si.default,ObjectExpression:Ai.default,NewExpression:Oi.default,UpdateExpression:ki.default,ArrayExpression:ji.default,BindExpression:qi.default,SpreadElement:Ci.default,TypeCastExpression:Ni.default,SequenceExpression:Ri.default,TSNonNullExpression:Ui.default,AssignmentExpression:Di.default},S=function(){return null},bn=function(r){return"The prop value with an expression type of "+r+" could not be resolved. Please file an issue ( https://github.com/jsx-eslint/jsx-ast-utils/issues/new ) to get this fixed immediately."};function Vi(e){var r=void 0;typeof e.expression!="boolean"&&e.expression?r=e.expression:r=e;var t=r,n=t.type;for(r.object&&r.object.type==="TSNonNullExpression"&&(n="TSNonNullExpression");n==="TSAsExpression";){var o=r;if(n=o.type,r.expression){var a=r;r=a.expression}}return k[n]===void 0?(console.error(bn(n)),null):k[n](r)}var xn=Ja({},k,{Literal:function(r){var t=k.Literal.call(void 0,r),n=t===null;return n?"null":t},Identifier:function(r){var t=k.Identifier.call(void 0,r)===void 0;return t?void 0:null},JSXElement:S,JSXFragment:S,JSXText:S,ArrowFunctionExpression:S,FunctionExpression:S,LogicalExpression:S,MemberExpression:S,OptionalCallExpression:S,OptionalMemberExpression:S,CallExpression:S,UnaryExpression:function(r){var t=k.UnaryExpression.call(void 0,r);return t===void 0?null:t},UpdateExpression:function(r){var t=k.UpdateExpression.call(void 0,r);return t===void 0?null:t},ThisExpression:S,ConditionalExpression:S,BinaryExpression:S,ObjectExpression:S,NewExpression:S,ArrayExpression:function(r){var t=k.ArrayExpression.call(void 0,r);return t.filter(function(n){return n!==null})},BindExpression:S,SpreadElement:S,TSNonNullExpression:S,TSAsExpression:S,TypeCastExpression:S,SequenceExpression:S,ChainExpression:S});function Bi(e){var r=e.expression||e,t=r.type;return xn[t]===void 0?(console.error(bn(t)),null):xn[t](r)}});var Y=p(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});var Hi=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e};le.default=es;le.getLiteralValue=rs;var Xi=Ae(),Gi=se(Xi),Wi=Oe(),Ki=se(Wi),zi=ke(),Qi=se(zi),En=w(),Yi=se(En);function se(e){return e&&e.__esModule?e:{default:e}}var Sn={Literal:Gi.default,JSXElement:Ki.default,JSXExpressionContainer:Yi.default,JSXText:Qi.default},Zi=Hi({},Sn,{JSXElement:function(){return null},JSXExpressionContainer:En.extractLiteral});function es(e){return Sn[e.type](e)}function rs(e){return Zi[e.type](e)}});var Pn=p(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.default=os;ue.getLiteralPropValue=as;var wn=Y(),ts=ns(wn);function ns(e){return e&&e.__esModule?e:{default:e}}var An=function(r,t){if(r&&r.type==="JSXAttribute")return r.value===null?!0:t(r.value)};function os(e){return An(e,ts.default)}function as(e){return An(e,wn.getLiteralValue)}});var pe=p((Gl,kn)=>{"use strict";var vr=Fr(),is=R(vr),ss=Mr(),ls=R(ss),On=Rr(),us=R(On),ps=Ur(),cs=R(ps),_n=Pn(),ds=R(_n),fs=z(),ms=R(fs);function R(e){return e&&e.__esModule?e:{default:e}}kn.exports={hasProp:is.default,hasAnyProp:vr.hasAnyProp,hasEveryProp:vr.hasEveryProp,elementType:ls.default,eventHandlers:us.default,eventHandlersByType:On.eventHandlersByType,getProp:cs.default,getPropValue:ds.default,getLiteralPropValue:_n.getLiteralPropValue,propName:ms.default}});var Ss={};Vn(Ss,{configs:()=>Es,rules:()=>bs});module.exports=Bn(Ss);var ye=require("@typescript-eslint/utils"),P=D(require("typescript"));var _r=D(Or(),1);function de(e){let r=(0,_r.default)(e);if(r===0)return e;let t=new RegExp(`^[ \\t]{${r}}`,"gm");return e.replace(t,"")}function fe(e,r=1,t={}){let{indent:n=" ",includeEmptyLines:o=!1}=t;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof r!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof r}\``);if(r<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${r}\``);if(typeof n!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof n}\``);if(r===0)return e;let a=o?/^/gm:/^(?!\s*$)/gm;return e.replace(a,n.repeat(r))}function me(e,r=0,t={}){return fe(de(e),r,t)}var Hn=ye.ESLintUtils.RuleCreator(()=>"https://qwik.builder.io/docs/advanced/dollar/"),kr=Hn({name:"valid-lexical-scope",defaultOptions:[{allowAny:!0}],meta:{type:"problem",docs:{description:"Used the tsc typechecker to detect the capture of unserializable data in dollar ($) scopes.",recommended:"error",url:"https://qwik.builder.io/docs/advanced/eslint/#valid-lexical-scope"},schema:[{type:"object",properties:{allowAny:{type:"boolean"}},default:{allowAny:!0}}],messages:{referencesOutside:`Seems like you are referencing "{{varName}}" inside a different scope ({{dollarName}}), when this happens, Qwik needs to serialize the value, however {{reason}}.
|
|
1
|
+
"use strict";var Ln=Object.create;var K=Object.defineProperty;var Rn=Object.getOwnPropertyDescriptor;var Un=Object.getOwnPropertyNames;var Jn=Object.getPrototypeOf,Dn=Object.prototype.hasOwnProperty;var p=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Vn=(e,r)=>{for(var t in r)K(e,t,{get:r[t],enumerable:!0})},Ar=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of Un(r))!Dn.call(e,o)&&o!==t&&K(e,o,{get:()=>r[o],enumerable:!(n=Rn(r,o))||n.enumerable});return e};var D=(e,r,t)=>(t=e!=null?Ln(Jn(e)):{},Ar(r||!e||!e.__esModule?K(t,"default",{value:e,enumerable:!0}):t,e)),Bn=e=>Ar(K({},"__esModule",{value:!0}),e);var Or=p((Os,Pr)=>{"use strict";Pr.exports=e=>{let r=e.match(/^[ \t]*(?=\S)/gm);return r?r.reduce((t,n)=>Math.min(t,n.length),1/0):0}});var z=p(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.default=ro;function ro(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!e.type||e.type!=="JSXAttribute")throw new Error("The prop must be a JSXAttribute collected by the AST parser.");return e.name.type==="JSXNamespacedName"?e.name.namespace.name+":"+e.name.name.name:e.name.name}});var Fr=p(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.default=ve;B.hasAnyProp=oo;B.hasEveryProp=io;var to=z(),Cr=no(to);function no(e){return e&&e.__esModule?e:{default:e}}var he={spreadStrict:!0,ignoreCase:!0};function ve(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:he,n=t.ignoreCase?r.toUpperCase():r;return e.some(function(o){if(o.type==="JSXSpreadAttribute")return!t.spreadStrict;var i=t.ignoreCase?(0,Cr.default)(o).toUpperCase():(0,Cr.default)(o);return n===i})}function oo(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:he,n=typeof r=="string"?r.split(" "):r;return n.some(function(o){return ve(e,o,t)})}function io(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:he,n=typeof r=="string"?r.split(" "):r;return n.every(function(o){return ve(e,o,t)})}});var Mr=p(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.default=ao;function Nr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.type==="JSXMemberExpression"?Nr(e.object,e.property)+"."+r.name:e.name+"."+r.name}function ao(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.name;if(e.type==="JSXOpeningFragment")return"<>";if(!r)throw new Error("The argument provided is not a JSXElement node.");if(r.type==="JSXMemberExpression"){var t=r.object,n=t===void 0?{}:t,o=r.property,i=o===void 0?{}:o;return Nr(n,i)}return r.type==="JSXNamespacedName"?r.namespace.name+":"+r.name.name:e.name.name}});var Lr=p(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});var be={clipboard:["onCopy","onCut","onPaste"],composition:["onCompositionEnd","onCompositionStart","onCompositionUpdate"],keyboard:["onKeyDown","onKeyPress","onKeyUp"],focus:["onFocus","onBlur"],form:["onChange","onInput","onSubmit"],mouse:["onClick","onContextMenu","onDblClick","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"],selection:["onSelect"],touch:["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],ui:["onScroll"],wheel:["onWheel"],media:["onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting"],image:["onLoad","onError"],animation:["onAnimationStart","onAnimationEnd","onAnimationIteration"],transition:["onTransitionEnd"]},so=Object.keys(be).reduce(function(e,r){return e.concat(be[r])},[]);Q.default=so;Q.eventHandlersByType=be});var Ur=p(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});var lo=function(){function e(r,t){var n=[],o=!0,i=!1,a=void 0;try{for(var l=r[Symbol.iterator](),y;!(o=(y=l.next()).done)&&(n.push(y.value),!(t&&n.length===t));o=!0);}catch(g){i=!0,a=g}finally{try{!o&&l.return&&l.return()}finally{if(i)throw a}}return n}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),q=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e};Se.default=mo;var uo=z(),po=co(uo);function co(e){return e&&e.__esModule?e:{default:e}}function Rr(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}var fo={ignoreCase:!0};function mo(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:fo;function n(l){return t.ignoreCase?l.toUpperCase():l}var o=n(r);function i(l){return l.type==="Property"&&l.key.type==="Identifier"&&o===n(l.key.name)}var a=e.find(function(l){return l.type==="JSXSpreadAttribute"?l.argument.type==="ObjectExpression"&&o!==n("key")&&l.argument.properties.some(i):o===n((0,po.default)(l))});return a&&a.type==="JSXSpreadAttribute"?yo(a.argument.properties.find(i)):a}function yo(e){var r=e.key,t=e.value;return q({type:"JSXAttribute",name:q({type:"JSXIdentifier",name:r.name},Ee(r)),value:t.type==="Literal"?X(t):q({type:"JSXExpressionContainer",expression:go(t)},Ee(t))},Ee(e))}function X(e){var r=e.range||[e.start,e.end],t=lo(r,2),n=t[0],o=t[1];return q({},e,{end:void 0,range:[n,o],start:void 0})}function go(e){var r=e.expressions,t=e.quasis,n=Rr(e,["expressions","quasis"]);return q({},X(n),r?{expressions:r.map(X)}:{},t?{quasis:t.map(X)}:{})}function Ee(e){var r=e.loc,t=Rr(e,["loc"]),n=X(t),o=n.range;return{loc:ho(r),range:o}}function ho(e){var r=e.start,t=e.end,n=e.source,o=e.filename;return q({start:r,end:t},n!==void 0?{source:n}:{},o!==void 0?{filename:o}:{})}});var Ae=p(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.default=vo;function vo(e){var r=e.value,t=typeof r=="string"&&r.toLowerCase();return t==="true"?!0:t==="false"?!1:r}});var Oe=p(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.default=xo;function xo(e){var r=Y().default,t=e.openingElement.name.name;return e.openingElement.selfClosing?"<"+t+" />":"<"+t+">"+[].concat(e.children).map(function(n){return r(n)}).join("")+"</"+t+">"}});var _e=p(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.default=bo;function bo(e){return e.raw}});var Jr=p(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.default=Eo;function Eo(e){var r=Y().default;return e.children.length===0?"<></>":"<>"+[].concat(e.children).map(function(t){return r(t)}).join("")+"</>"}});var Vr=p($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.default=So;var Dr={Array,Date,Infinity:1/0,Math,Number,Object,String,undefined:void 0};function So(e){var r=e.name;return Object.hasOwnProperty.call(Dr,r)?Dr[r]:r}});var qe=p(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.default=Ao;function wo(e,r){return(e.range?e.range[0]:e.start)-(r.range?r.range[0]:r.start)}function Ao(e){var r=e.quasis,t=e.expressions,n=r.concat(t);return n.sort(wo).reduce(function(o,i){var a=i.type;return a==="TemplateElement"?o+i.value.raw:a==="Identifier"?i.name==="undefined"?""+o+i.name:o+"{"+i.name+"}":a.indexOf("Expression")>-1?o+"{"+a+"}":o},"")}});var Br=p(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.default=_o;var Po=qe(),Oo=To(Po);function To(e){return e&&e.__esModule?e:{default:e}}function _o(e){return(0,Oo.default)(e.quasi)}});var Xr=p(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.default=ko;function ko(e){return function(){return e}}});var Hr=p(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.default=$o;function $o(e){var r=w().default,t=e.operator,n=e.left,o=e.right,i=r(n),a=r(o);return t==="&&"?i&&a:t==="??"?i===null||typeof i>"u"?a:i:i||a}});var Gr=p(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.default=jo;function jo(e){var r=w().default;return""+r(e.object)+(e.optional?"?.":".")+r(e.property)}});var Wr=p(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.default=qo;function qo(e){var r=w().default;return r(e.expression||e)}});var Kr=p(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.default=Io;function Io(e){var r=w().default;return r(e.callee)+"?.("+e.arguments.map(function(t){return r(t)}).join(", ")+")"}});var zr=p(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.default=Co;function Co(e){var r=w().default;return r(e.object)+"?."+r(e.property)}});var Qr=p(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.default=Fo;function Fo(e){var r=w().default,t=Array.isArray(e.arguments)?e.arguments.map(function(n){return r(n)}).join(", "):"";return""+r(e.callee)+(e.optional?"?.":"")+"("+t+")"}});var Yr=p(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.default=No;function No(e){var r=w().default,t=e.operator,n=e.argument;switch(t){case"-":return-r(n);case"+":return+r(n);case"!":return!r(n);case"~":return~r(n);case"delete":return!0;case"typeof":case"void":default:return}}});var Ve=p(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.default=Mo;function Mo(){return"this"}});var Zr=p(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.default=Lo;function Lo(e){var r=w().default,t=e.test,n=e.alternate,o=e.consequent;return r(t)?r(o):r(n)}});var et=p(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.default=Ro;function Ro(e){var r=w().default,t=e.operator,n=e.left,o=e.right,i=r(n),a=r(o);switch(t){case"==":return i==a;case"!=":return i!=a;case"===":return i===a;case"!==":return i!==a;case"<":return i<a;case"<=":return i<=a;case">":return i>a;case">=":return i>=a;case"<<":return i<<a;case">>":return i>>a;case">>>":return i>>>a;case"+":return i+a;case"-":return i-a;case"*":return i*a;case"/":return i/a;case"%":return i%a;case"|":return i|a;case"^":return i^a;case"&":return i&a;case"in":try{return i in a}catch{return!1}case"instanceof":return typeof a!="function"?!1:i instanceof a;default:return}}});var He=p((vl,tt)=>{"use strict";var rt=Object.prototype.toString;tt.exports=function(r){var t=rt.call(r),n=t==="[object Arguments]";return n||(n=t!=="[object Array]"&&r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&rt.call(r.callee)==="[object Function]"),n}});var ct=p((xl,pt)=>{"use strict";var ut;Object.keys||(H=Object.prototype.hasOwnProperty,Ge=Object.prototype.toString,nt=He(),We=Object.prototype.propertyIsEnumerable,ot=!We.call({toString:null},"toString"),it=We.call(function(){},"prototype"),G=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Z=function(e){var r=e.constructor;return r&&r.prototype===e},at={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},st=function(){if(typeof window>"u")return!1;for(var e in window)try{if(!at["$"+e]&&H.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{Z(window[e])}catch{return!0}}catch{return!0}return!1}(),lt=function(e){if(typeof window>"u"||!st)return Z(e);try{return Z(e)}catch{return!1}},ut=function(r){var t=r!==null&&typeof r=="object",n=Ge.call(r)==="[object Function]",o=nt(r),i=t&&Ge.call(r)==="[object String]",a=[];if(!t&&!n&&!o)throw new TypeError("Object.keys called on a non-object");var l=it&&n;if(i&&r.length>0&&!H.call(r,0))for(var y=0;y<r.length;++y)a.push(String(y));if(o&&r.length>0)for(var g=0;g<r.length;++g)a.push(String(g));else for(var d in r)!(l&&d==="prototype")&&H.call(r,d)&&a.push(String(d));if(ot)for(var f=lt(r),u=0;u<G.length;++u)!(f&&G[u]==="constructor")&&H.call(r,G[u])&&a.push(G[u]);return a});var H,Ge,nt,We,ot,it,G,Z,at,st,lt;pt.exports=ut});var Ke=p((bl,mt)=>{"use strict";var Uo=Array.prototype.slice,Jo=He(),dt=Object.keys,ee=dt?function(r){return dt(r)}:ct(),ft=Object.keys;ee.shim=function(){if(Object.keys){var r=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);r||(Object.keys=function(n){return Jo(n)?ft(Uo.call(n)):ft(n)})}else Object.keys=ee;return Object.keys||ee};mt.exports=ee});var ze=p((El,yt)=>{"use strict";yt.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;r[t]=o;for(t 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]!==t||!Object.prototype.propertyIsEnumerable.call(r,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(r,t);if(a.value!==o||a.enumerable!==!0)return!1}return!0}});var vt=p((Sl,ht)=>{"use strict";var gt=typeof Symbol<"u"&&Symbol,Do=ze();ht.exports=function(){return typeof gt!="function"||typeof Symbol!="function"||typeof gt("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Do()}});var Et=p((wl,bt)=>{"use strict";var xt={foo:{}},Vo=Object;bt.exports=function(){return{__proto__:xt}.foo===xt.foo&&!({__proto__:null}instanceof Vo)}});var wt=p((Al,St)=>{"use strict";var Bo="Function.prototype.bind called on incompatible ",Qe=Array.prototype.slice,Xo=Object.prototype.toString,Ho="[object Function]";St.exports=function(r){var t=this;if(typeof t!="function"||Xo.call(t)!==Ho)throw new TypeError(Bo+t);for(var n=Qe.call(arguments,1),o,i=function(){if(this instanceof o){var d=t.apply(this,n.concat(Qe.call(arguments)));return Object(d)===d?d:this}else return t.apply(r,n.concat(Qe.call(arguments)))},a=Math.max(0,t.length-n.length),l=[],y=0;y<a;y++)l.push("$"+y);if(o=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(i),t.prototype){var g=function(){};g.prototype=t.prototype,o.prototype=new g,g.prototype=null}return o}});var re=p((Pl,At)=>{"use strict";var Go=wt();At.exports=Function.prototype.bind||Go});var Ot=p((Ol,Pt)=>{"use strict";var Wo=re();Pt.exports=Wo.call(Function.call,Object.prototype.hasOwnProperty)});var oe=p((Tl,jt)=>{"use strict";var m,N=SyntaxError,$t=Function,F=TypeError,Ye=function(e){try{return $t('"use strict"; return ('+e+").constructor;")()}catch{}},k=Object.getOwnPropertyDescriptor;if(k)try{k({},"")}catch{k=null}var Ze=function(){throw new F},Ko=k?function(){try{return arguments.callee,Ze}catch{try{return k(arguments,"callee").get}catch{return Ze}}}():Ze,I=vt()(),zo=Et()(),A=Object.getPrototypeOf||(zo?function(e){return e.__proto__}:null),C={},Qo=typeof Uint8Array>"u"||!A?m:A(Uint8Array),$={"%AggregateError%":typeof AggregateError>"u"?m:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?m:ArrayBuffer,"%ArrayIteratorPrototype%":I&&A?A([][Symbol.iterator]()):m,"%AsyncFromSyncIteratorPrototype%":m,"%AsyncFunction%":C,"%AsyncGenerator%":C,"%AsyncGeneratorFunction%":C,"%AsyncIteratorPrototype%":C,"%Atomics%":typeof Atomics>"u"?m:Atomics,"%BigInt%":typeof BigInt>"u"?m:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?m:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?m:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?m:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?m:Float32Array,"%Float64Array%":typeof Float64Array>"u"?m:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?m:FinalizationRegistry,"%Function%":$t,"%GeneratorFunction%":C,"%Int8Array%":typeof Int8Array>"u"?m:Int8Array,"%Int16Array%":typeof Int16Array>"u"?m:Int16Array,"%Int32Array%":typeof Int32Array>"u"?m:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":I&&A?A(A([][Symbol.iterator]())):m,"%JSON%":typeof JSON=="object"?JSON:m,"%Map%":typeof Map>"u"?m:Map,"%MapIteratorPrototype%":typeof Map>"u"||!I||!A?m:A(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?m:Promise,"%Proxy%":typeof Proxy>"u"?m:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?m:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?m:Set,"%SetIteratorPrototype%":typeof Set>"u"||!I||!A?m:A(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?m:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I&&A?A(""[Symbol.iterator]()):m,"%Symbol%":I?Symbol:m,"%SyntaxError%":N,"%ThrowTypeError%":Ko,"%TypedArray%":Qo,"%TypeError%":F,"%Uint8Array%":typeof Uint8Array>"u"?m:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?m:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?m:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?m:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?m:WeakMap,"%WeakRef%":typeof WeakRef>"u"?m:WeakRef,"%WeakSet%":typeof WeakSet>"u"?m:WeakSet};if(A)try{null.error}catch(e){Tt=A(A(e)),$["%Error.prototype%"]=Tt}var Tt,Yo=function e(r){var t;if(r==="%AsyncFunction%")t=Ye("async function () {}");else if(r==="%GeneratorFunction%")t=Ye("function* () {}");else if(r==="%AsyncGeneratorFunction%")t=Ye("async function* () {}");else if(r==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(r==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&A&&(t=A(o.prototype))}return $[r]=t,t},_t={"%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"]},W=re(),te=Ot(),Zo=W.call(Function.call,Array.prototype.concat),ei=W.call(Function.apply,Array.prototype.splice),kt=W.call(Function.call,String.prototype.replace),ne=W.call(Function.call,String.prototype.slice),ri=W.call(Function.call,RegExp.prototype.exec),ti=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ni=/\\(\\)?/g,oi=function(r){var t=ne(r,0,1),n=ne(r,-1);if(t==="%"&&n!=="%")throw new N("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new N("invalid intrinsic syntax, expected opening `%`");var o=[];return kt(r,ti,function(i,a,l,y){o[o.length]=l?kt(y,ni,"$1"):a||i}),o},ii=function(r,t){var n=r,o;if(te(_t,n)&&(o=_t[n],n="%"+o[0]+"%"),te($,n)){var i=$[n];if(i===C&&(i=Yo(n)),typeof i>"u"&&!t)throw new F("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new N("intrinsic "+r+" does not exist!")};jt.exports=function(r,t){if(typeof r!="string"||r.length===0)throw new F("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new F('"allowMissing" argument must be a boolean');if(ri(/^%?[^%]*%?$/,r)===null)throw new N("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=oi(r),o=n.length>0?n[0]:"",i=ii("%"+o+"%",t),a=i.name,l=i.value,y=!1,g=i.alias;g&&(o=g[0],ei(n,Zo([0,1],g)));for(var d=1,f=!0;d<n.length;d+=1){var u=n[d],v=ne(u,0,1),s=ne(u,-1);if((v==='"'||v==="'"||v==="`"||s==='"'||s==="'"||s==="`")&&v!==s)throw new N("property names with quotes must have matching quotes");if((u==="constructor"||!f)&&(y=!0),o+="."+u,a="%"+o+"%",te($,a))l=$[a];else if(l!=null){if(!(u in l)){if(!t)throw new F("base intrinsic for "+r+" exists, but the property is not available.");return}if(k&&d+1>=n.length){var c=k(l,u);f=!!c,f&&"get"in c&&!("originalValue"in c.get)?l=c.get:l=l[u]}else f=te(l,u),l=l[u];f&&!y&&($[a]=l)}}return l}});var It=p((_l,qt)=>{"use strict";var ai=oe(),er=ai("%Object.defineProperty%",!0),rr=function(){if(er)try{return er({},"a",{value:1}),!0}catch{return!1}return!1};rr.hasArrayLengthDefineBug=function(){if(!rr())return null;try{return er([],"length",{value:1}).length!==1}catch{return!0}};qt.exports=rr});var tr=p((kl,Mt)=>{"use strict";var si=Ke(),li=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",ui=Object.prototype.toString,pi=Array.prototype.concat,Ct=Object.defineProperty,ci=function(e){return typeof e=="function"&&ui.call(e)==="[object Function]"},di=It()(),Ft=Ct&&di,fi=function(e,r,t,n){if(r in e){if(n===!0){if(e[r]===t)return}else if(!ci(n)||!n())return}Ft?Ct(e,r,{configurable:!0,enumerable:!1,value:t,writable:!0}):e[r]=t},Nt=function(e,r){var t=arguments.length>2?arguments[2]:{},n=si(r);li&&(n=pi.call(n,Object.getOwnPropertySymbols(r)));for(var o=0;o<n.length;o+=1)fi(e,n[o],r[n[o]],t[n[o]])};Nt.supportsDescriptors=!!Ft;Mt.exports=Nt});var or=p(($l,ie)=>{"use strict";var nr=re(),M=oe(),Ut=M("%Function.prototype.apply%"),Jt=M("%Function.prototype.call%"),Dt=M("%Reflect.apply%",!0)||nr.call(Jt,Ut),Lt=M("%Object.getOwnPropertyDescriptor%",!0),j=M("%Object.defineProperty%",!0),mi=M("%Math.max%");if(j)try{j({},"a",{value:1})}catch{j=null}ie.exports=function(r){var t=Dt(nr,Jt,arguments);if(Lt&&j){var n=Lt(t,"length");n.configurable&&j(t,"length",{value:1+mi(0,r.length-(arguments.length-1))})}return t};var Rt=function(){return Dt(nr,Ut,arguments)};j?j(ie.exports,"apply",{value:Rt}):ie.exports.apply=Rt});var Ht=p((jl,Xt)=>{"use strict";var Vt=oe(),Bt=or(),yi=Bt(Vt("String.prototype.indexOf"));Xt.exports=function(r,t){var n=Vt(r,!!t);return typeof n=="function"&&yi(r,".prototype.")>-1?Bt(n):n}});var ir=p((ql,Qt)=>{"use strict";var gi=Ke(),Kt=ze()(),zt=Ht(),Gt=Object,hi=zt("Array.prototype.push"),Wt=zt("Object.prototype.propertyIsEnumerable"),vi=Kt?Object.getOwnPropertySymbols:null;Qt.exports=function(r,t){if(r==null)throw new TypeError("target must be an object");var n=Gt(r);if(arguments.length===1)return n;for(var o=1;o<arguments.length;++o){var i=Gt(arguments[o]),a=gi(i),l=Kt&&(Object.getOwnPropertySymbols||vi);if(l)for(var y=l(i),g=0;g<y.length;++g){var d=y[g];Wt(i,d)&&hi(a,d)}for(var f=0;f<a.length;++f){var u=a[f];if(Wt(i,u)){var v=i[u];n[u]=v}}}return n}});var sr=p((Il,Yt)=>{"use strict";var ar=ir(),xi=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",r=e.split(""),t={},n=0;n<r.length;++n)t[r[n]]=r[n];var o=Object.assign({},t),i="";for(var a in o)i+=a;return e!==i},bi=function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch{return e[1]==="y"}return!1};Yt.exports=function(){return!Object.assign||xi()||bi()?ar:Object.assign}});var en=p((Cl,Zt)=>{"use strict";var Ei=tr(),Si=sr();Zt.exports=function(){var r=Si();return Ei(Object,{assign:r},{assign:function(){return Object.assign!==r}}),r}});var on=p((Fl,nn)=>{"use strict";var wi=tr(),Ai=or(),Pi=ir(),rn=sr(),Oi=en(),Ti=Ai.apply(rn()),tn=function(r,t){return Ti(Object,arguments)};wi(tn,{getPolyfill:rn,implementation:Pi,shim:Oi});nn.exports=tn});var sn=p(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});var _i=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e};lr.default=an;var ki=on(),$i=ji(ki);function ji(e){return e&&e.__esModule?e:{default:e}}function an(e){var r=w().default;return e.properties.reduce(function(t,n){var o=_i({},t);if(/^(?:Experimental)?Spread(?:Property|Element)$/.test(n.type)){if(n.argument.type==="ObjectExpression")return(0,$i.default)(o,an(n.argument))}else o[r(n.key)]=r(n.value);return o},{})}});var ln=p(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.default=qi;function qi(){return new Object}});var un=p(pr=>{"use strict";Object.defineProperty(pr,"__esModule",{value:!0});pr.default=Ii;function Ii(e){var r=w().default,t=e.operator,n=e.argument,o=e.prefix,i=r(n);switch(t){case"++":return o?++i:i++;case"--":return o?--i:i--;default:return}}});var pn=p(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.default=Ci;function Ci(e){var r=w().default;return e.elements.map(function(t){if(t!==null)return r(t)})}});var cn=p(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.default=Fi;function Fi(e){var r=w().default,t=r(e.callee),n=e.object===null?r(e.callee.object):r(e.object);return e.object&&e.object.property?n+"."+t+".bind("+n+")":t+".bind("+n+")"}});var dn=p(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.default=Ni;function Ni(){}});var fn=p(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.default=Mi;function Mi(e){var r=w().default;return r(e.expression)}});var mn=p(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.default=Li;function Li(e){var r=w().default;return e.expressions.map(function(t){return r(t)})}});var gn=p(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.default=T;var Ri=Ve().default;function yn(e,r,t){return t.computed?t.optional?e+"?.["+r+"]":e+"["+r+"]":t.optional?e+"?."+r:e+"."+r}function T(e){var r="The prop value with an expression type of TSNonNullExpression could not be resolved. Please file an issue ( https://github.com/jsx-eslint/jsx-ast-utils/issues/new ) to get this fixed immediately.";if(e.type==="Identifier"){var t=e.name;return t}if(e.type==="Literal")return e.value;if(e.type==="TSAsExpression")return T(e.expression);if(e.type==="ThisExpression")return Ri();if(e.type==="TSNonNullExpression"&&(!e.extra||e.extra.parenthesized===!1)){var n=e.expression;return T(n)+"!"}if(e.type==="TSNonNullExpression"&&e.extra&&e.extra.parenthesized===!0){var o=e.expression;return"("+T(o)+"!)"}if(e.type==="MemberExpression"){if(!e.extra||e.extra.parenthesized===!1)return yn(T(e.object),T(e.property),e);if(e.extra&&e.extra.parenthesized===!0){var i=yn(T(e.object),T(e.property),e);return"("+i+")"}}if(e.expression)for(var a=e.expression;a;){if(a.type==="Identifier")return console.error(r),a.name;var l=a;a=l.expression}return console.error(r),""}});var hn=p(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.default=Ui;function Ui(e){var r=w().default;return r(e.left)+" "+e.operator+" "+r(e.right)}});var w=p(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});var Ji=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e};ae.default=Va;ae.extractLiteral=Ba;var Di=Ae(),Vi=x(Di),Bi=Oe(),Xi=x(Bi),Hi=Jr(),Gi=x(Hi),Wi=_e(),Ki=x(Wi),zi=Vr(),Qi=x(zi),Yi=Br(),Zi=x(Yi),ea=qe(),ra=x(ea),ta=Xr(),vn=x(ta),na=Hr(),oa=x(na),ia=Gr(),aa=x(ia),sa=Wr(),la=x(sa),ua=Kr(),pa=x(ua),ca=zr(),da=x(ca),fa=Qr(),ma=x(fa),ya=Yr(),ga=x(ya),ha=Ve(),va=x(ha),xa=Zr(),ba=x(xa),Ea=et(),Sa=x(Ea),wa=sn(),Aa=x(wa),Pa=ln(),Oa=x(Pa),Ta=un(),_a=x(Ta),ka=pn(),$a=x(ka),ja=cn(),qa=x(ja),Ia=dn(),Ca=x(Ia),Fa=fn(),Na=x(Fa),Ma=mn(),La=x(Ma),Ra=gn(),Ua=x(Ra),Ja=hn(),Da=x(Ja);function x(e){return e&&e.__esModule?e:{default:e}}var _={Identifier:Qi.default,Literal:Vi.default,JSXElement:Xi.default,JSXFragment:Gi.default,JSXText:Ki.default,TaggedTemplateExpression:Zi.default,TemplateLiteral:ra.default,ArrowFunctionExpression:vn.default,FunctionExpression:vn.default,LogicalExpression:oa.default,MemberExpression:aa.default,ChainExpression:la.default,OptionalCallExpression:pa.default,OptionalMemberExpression:da.default,CallExpression:ma.default,UnaryExpression:ga.default,ThisExpression:va.default,ConditionalExpression:ba.default,BinaryExpression:Sa.default,ObjectExpression:Aa.default,NewExpression:Oa.default,UpdateExpression:_a.default,ArrayExpression:$a.default,BindExpression:qa.default,SpreadElement:Ca.default,TypeCastExpression:Na.default,SequenceExpression:La.default,TSNonNullExpression:Ua.default,AssignmentExpression:Da.default},S=function(){return null},bn=function(r){return"The prop value with an expression type of "+r+" could not be resolved. Please file an issue ( https://github.com/jsx-eslint/jsx-ast-utils/issues/new ) to get this fixed immediately."};function Va(e){var r=void 0;typeof e.expression!="boolean"&&e.expression?r=e.expression:r=e;var t=r,n=t.type;for(r.object&&r.object.type==="TSNonNullExpression"&&(n="TSNonNullExpression");n==="TSAsExpression";){var o=r;if(n=o.type,r.expression){var i=r;r=i.expression}}return _[n]===void 0?(console.error(bn(n)),null):_[n](r)}var xn=Ji({},_,{Literal:function(r){var t=_.Literal.call(void 0,r),n=t===null;return n?"null":t},Identifier:function(r){var t=_.Identifier.call(void 0,r)===void 0;return t?void 0:null},JSXElement:S,JSXFragment:S,JSXText:S,ArrowFunctionExpression:S,FunctionExpression:S,LogicalExpression:S,MemberExpression:S,OptionalCallExpression:S,OptionalMemberExpression:S,CallExpression:S,UnaryExpression:function(r){var t=_.UnaryExpression.call(void 0,r);return t===void 0?null:t},UpdateExpression:function(r){var t=_.UpdateExpression.call(void 0,r);return t===void 0?null:t},ThisExpression:S,ConditionalExpression:S,BinaryExpression:S,ObjectExpression:S,NewExpression:S,ArrayExpression:function(r){var t=_.ArrayExpression.call(void 0,r);return t.filter(function(n){return n!==null})},BindExpression:S,SpreadElement:S,TSNonNullExpression:S,TSAsExpression:S,TypeCastExpression:S,SequenceExpression:S,ChainExpression:S});function Ba(e){var r=e.expression||e,t=r.type;return xn[t]===void 0?(console.error(bn(t)),null):xn[t](r)}});var Y=p(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});var Xa=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e};le.default=es;le.getLiteralValue=rs;var Ha=Ae(),Ga=se(Ha),Wa=Oe(),Ka=se(Wa),za=_e(),Qa=se(za),En=w(),Ya=se(En);function se(e){return e&&e.__esModule?e:{default:e}}var Sn={Literal:Ga.default,JSXElement:Ka.default,JSXExpressionContainer:Ya.default,JSXText:Qa.default},Za=Xa({},Sn,{JSXElement:function(){return null},JSXExpressionContainer:En.extractLiteral});function es(e){return Sn[e.type](e)}function rs(e){return Za[e.type](e)}});var Pn=p(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.default=os;ue.getLiteralPropValue=is;var wn=Y(),ts=ns(wn);function ns(e){return e&&e.__esModule?e:{default:e}}var An=function(r,t){if(r&&r.type==="JSXAttribute")return r.value===null?!0:t(r.value)};function os(e){return An(e,ts.default)}function is(e){return An(e,wn.getLiteralValue)}});var pe=p((Kl,_n)=>{"use strict";var vr=Fr(),as=L(vr),ss=Mr(),ls=L(ss),On=Lr(),us=L(On),ps=Ur(),cs=L(ps),Tn=Pn(),ds=L(Tn),fs=z(),ms=L(fs);function L(e){return e&&e.__esModule?e:{default:e}}_n.exports={hasProp:as.default,hasAnyProp:vr.hasAnyProp,hasEveryProp:vr.hasEveryProp,elementType:ls.default,eventHandlers:us.default,eventHandlersByType:On.eventHandlersByType,getProp:cs.default,getPropValue:ds.default,getLiteralPropValue:Tn.getLiteralPropValue,propName:ms.default}});var As={};Vn(As,{configs:()=>ws,rules:()=>Ss});module.exports=Bn(As);var ye=require("@typescript-eslint/utils"),P=D(require("typescript"));var Tr=D(Or(),1);function de(e){let r=(0,Tr.default)(e);if(r===0)return e;let t=new RegExp(`^[ \\t]{${r}}`,"gm");return e.replace(t,"")}function fe(e,r=1,t={}){let{indent:n=" ",includeEmptyLines:o=!1}=t;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof r!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof r}\``);if(r<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${r}\``);if(typeof n!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof n}\``);if(r===0)return e;let i=o?/^/gm:/^(?!\s*$)/gm;return e.replace(i,n.repeat(r))}function me(e,r=0,t={}){return fe(de(e),r,t)}var Xn=ye.ESLintUtils.RuleCreator(()=>"https://qwik.builder.io/docs/advanced/dollar/"),_r=Xn({name:"valid-lexical-scope",defaultOptions:[{allowAny:!0}],meta:{type:"problem",docs:{description:"Used the tsc typechecker to detect the capture of unserializable data in dollar ($) scopes.",recommended:"error",url:"https://qwik.builder.io/docs/advanced/eslint/#valid-lexical-scope"},schema:[{type:"object",properties:{allowAny:{type:"boolean"}},default:{allowAny:!0}}],messages:{referencesOutside:`Seems like you are referencing "{{varName}}" inside a different scope ({{dollarName}}), when this happens, Qwik needs to serialize the value, however {{reason}}.
|
|
2
2
|
Check out https://qwik.builder.io/docs/advanced/dollar/ for more details.`,invalidJsxDollar:`Seems like you are using "{{varName}}" as an event handler, however functions are not serializable.
|
|
3
3
|
Did you mean to wrap it in \`$()\`?
|
|
4
4
|
|
|
5
5
|
{{solution}}
|
|
6
6
|
Check out https://qwik.builder.io/docs/advanced/dollar/ for more details.`,mutableIdentifier:`Seems like you are mutating the value of ("{{varName}}"), but this is not possible when captured by the ({{dollarName}}) closure, instead create an object and mutate one of its properties.
|
|
7
|
-
Check out https://qwik.builder.io/docs/advanced/dollar/ for more details.`}},create(e){var d;let t={allowAny:((d=e.options[0])==null?void 0:d.allowAny)??!0},n=e.getSourceCode().scopeManager,o=ye.ESLintUtils.getParserServices(e),
|
|
8
|
-
${
|
|
7
|
+
Check out https://qwik.builder.io/docs/advanced/dollar/ for more details.`}},create(e){var d;let t={allowAny:((d=e.options[0])==null?void 0:d.allowAny)??!0},n=e.getSourceCode().scopeManager,o=ye.ESLintUtils.getParserServices(e),i=o.esTreeNodeToTSNodeMap,a=o.program.getTypeChecker(),l=new Map,y=[];function g(f){f.references.forEach(u=>{var c,E;let v=u.resolved,s=(c=u.resolved)==null?void 0:c.scope;if(v&&s){let h=(E=v.defs.at(0))==null?void 0:E.type;if(h==="Type"||h==="ImportBinding")return;let b=u.from,O;for(;b&&(O=l.get(b),!O);)b=b.upper;if(b&&O){let R=s.type;if(R==="global"||R==="module")return;let U=u.identifier,Mn=i.get(U),J=s;for(;J&&!l.has(J);)J=J.upper;if(J!==b){U.parent&&U.parent.type==="AssignmentExpression"&&U.parent.left===U&&e.report({messageId:"mutableIdentifier",node:u.identifier,data:{varName:u.identifier.name,dollarName:O}});let wr=Hn(e,a,Mn,u.identifier,t);wr&&e.report({messageId:"referencesOutside",node:u.identifier,data:{varName:u.identifier.name,dollarName:O,reason:Gn(wr)}})}}}}),f.childScopes.forEach(g)}return{CallExpression(f){if(f.callee.type==="Identifier"&&f.callee.name.endsWith("$")){let u=f.arguments.at(0);if(u&&u.type==="ArrowFunctionExpression"){let v=n.acquire(u);v&&l.set(v,f.callee.name)}}},JSXAttribute(f){let u=f.name,v=u.type==="JSXIdentifier"?u.name:u.name.name;if(v.endsWith("$")){let s=f.value;if(s&&s.type==="JSXExpressionContainer"){let c=n.acquire(s.expression);if(c)l.set(c,v);else if(s.expression.type==="Identifier"){let E=i.get(s.expression),h=a.getTypeAtLocation(E);if(!kr(h))if(h.isUnionOrIntersection())h.types.every(b=>b.symbol?b.symbol.name==="PropFnInterface":!!(b.flags&(P.default.TypeFlags.Undefined|P.default.TypeFlags.Null)))||e.report({messageId:"invalidJsxDollar",node:s.expression,data:{varName:s.expression.name,solution:`Fix the type of ${s.expression.name} to be PropFunction`}});else{if(h.symbol.name==="PropFnInterface")return;e.report({messageId:"invalidJsxDollar",node:s.expression,data:{varName:s.expression.name,solution:`const ${s.expression.name} = $(
|
|
8
|
+
${$r(h.symbol,e.getSourceCode().text)}
|
|
9
9
|
);
|
|
10
|
-
`}})}}}}},Program(f){let u=
|
|
11
|
-
${
|
|
10
|
+
`}})}}}}},Program(f){let u=i.get(f),v=a.getSymbolAtLocation(u);v&&(y=a.getExportsOfModule(v))},"Program:exit"(){g(n.globalScope)}}}});function Hn(e,r,t,n,o){let i=r.getTypeAtLocation(t);return Wn(e,r,i,t,n,o,new Set)}function Gn(e){let r="";return e.location?r+=`"${e.location}" `:r+="it ",r+=`${e.reason}`,r}function Wn(e,r,t,n,o,i,a){let l=V(e,r,t,n,i,0,a);if(l){let y=l.location;return y&&(l.location=`${o.name}.${y}`),l}return l}function V(e,r,t,n,o,i,a){if(a.has(t)||(a.add(t),t.getProperty("__no_serialize__")))return;if(t.flags&P.default.TypeFlags.Unknown)return{type:t,typeStr:r.typeToString(t),reason:"is unknown, which could be serializable or not, please make the type for specific"};let y=t.flags&P.default.TypeFlags.Any;if(!o.allowAny&&y)return{type:t,typeStr:r.typeToString(t),reason:"is any, which is not serializable"};if(t.flags&P.default.TypeFlags.ESSymbolLike)return{type:t,typeStr:r.typeToString(t),reason:"is Symbol, which is not serializable"};if(t.flags&P.default.TypeFlags.Enum)return{type:t,typeStr:r.typeToString(t),reason:"is an enum, use an string or a number instead"};if(kr(t))return;if(t.getCallSignatures().length>0){if(t.symbol.name==="PropFnInterface")return;let s="is a function, which is not serializable";if(i===0&&P.default.isIdentifier(n)){let c=`const ${n.text} = $(
|
|
11
|
+
${$r(t.symbol,e.getSourceCode().text)}
|
|
12
12
|
);`;s+=`.
|
|
13
13
|
Did you mean to wrap it in \`$()\`?
|
|
14
14
|
|
|
15
15
|
${c}
|
|
16
|
-
`}return{type:t,typeStr:r.typeToString(t),reason:s}}if(t.isUnion()){for(let v of t.types){let s=V(e,r,v,n,o,
|
|
16
|
+
`}return{type:t,typeStr:r.typeToString(t),reason:s}}if(t.isUnion()){for(let v of t.types){let s=V(e,r,v,n,o,i+1,a);if(s)return s}return}if((t.flags&P.default.TypeFlags.Object)!==0){let v=zn(t,r);if(v)return V(e,r,v,n,o,i+1,a);let s=Qn(t,r);if(s){for(let h of s){let b=V(e,r,h,n,o,i+1,a);if(b)return b}return}let c=t.symbol.name;if(t.getProperty("nextElementSibling")||t.getProperty("activeElement")||c in Yn)return;if(t.isClass())return{type:t,typeStr:r.typeToString(t),reason:`is an instance of the "${t.symbol.name}" class, which is not serializable. Use a simple object literal instead`};let E=t.getProperty("prototype");if(E){let h=r.getTypeOfSymbolAtLocation(E,n);if(h.isClass())return{type:h,typeStr:r.typeToString(h),reason:"is a class constructor, which is not serializable"}}if(!c.startsWith("__")&&t.symbol.valueDeclaration)return{type:t,typeStr:r.typeToString(t),reason:`is an instance of the "${t.symbol.name}" class, which is not serializable`};for(let h of t.getProperties()){let b=Kn(e,r,h,n,o,i+1,a);if(b){let O=b.location;return b.location=`${h.name}${O?`.${O}`:""}`,b}}}}function Kn(e,r,t,n,o,i,a){let l=r.getTypeOfSymbolAtLocation(t,n);return V(e,r,l,n,o,i,a)}function zn(e,r){return r.getElementTypeOfArrayType(e)}function Qn(e,r){return r.isTupleType(e)?r.getTypeArguments(e):void 0}function kr(e){return!!(e.flags&P.default.TypeFlags.Any)||!!e.getProperty("__brand__QRL__")}function $r(e,r){if(e.declarations&&e.declarations.length>0){let t=e.declarations[0],n=r.slice(t.pos,t.end).replace(/^\s*$/gm,"");return me(n,2)}return""}var Yn={Promise:!0,URL:!0,RegExp:!0,Date:!0,FormData:!0,URLSearchParams:!0,Error:!0,Set:!0,Map:!0},Is=`
|
|
17
17
|
import { component$, useTask$, $ } from '@builder.io/qwik';
|
|
18
18
|
|
|
19
19
|
export const HelloWorld = component$(() => {
|
|
@@ -26,7 +26,7 @@ export const HelloWorld = component$(() => {
|
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
return <h1>Hello</h1>;
|
|
29
|
-
});`.trim(),
|
|
29
|
+
});`.trim(),Cs=`
|
|
30
30
|
import { component$, useTask$ } from '@builder.io/qwik';
|
|
31
31
|
|
|
32
32
|
export const HelloWorld = component$(() => {
|
|
@@ -39,7 +39,7 @@ export const HelloWorld = component$(() => {
|
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
return <h1>Hello</h1>;
|
|
42
|
-
});`.trim(),
|
|
42
|
+
});`.trim(),Fs=`
|
|
43
43
|
import { component$, $ } from '@builder.io/qwik';
|
|
44
44
|
|
|
45
45
|
export const HelloWorld = component$(() => {
|
|
@@ -47,7 +47,7 @@ export const HelloWorld = component$(() => {
|
|
|
47
47
|
return (
|
|
48
48
|
<button onClick$={click}>log it</button>
|
|
49
49
|
);
|
|
50
|
-
});`.trim(),
|
|
50
|
+
});`.trim(),Ns=`
|
|
51
51
|
import { component$ } from '@builder.io/qwik';
|
|
52
52
|
|
|
53
53
|
export const HelloWorld = component$(() => {
|
|
@@ -55,7 +55,7 @@ export const HelloWorld = component$(() => {
|
|
|
55
55
|
return (
|
|
56
56
|
<button onClick$={click}>log it</button>
|
|
57
57
|
);
|
|
58
|
-
});`.trim(),
|
|
58
|
+
});`.trim(),Ms=`
|
|
59
59
|
import { component$ } from '@builder.io/qwik';
|
|
60
60
|
|
|
61
61
|
export const HelloWorld = component$(() => {
|
|
@@ -68,7 +68,7 @@ export const HelloWorld = component$(() => {
|
|
|
68
68
|
{person.name}
|
|
69
69
|
</button>
|
|
70
70
|
);
|
|
71
|
-
});`.trim(),
|
|
71
|
+
});`.trim(),Ls=`
|
|
72
72
|
import { component$ } from '@builder.io/qwik';
|
|
73
73
|
|
|
74
74
|
export const HelloWorld = component$(() => {
|
|
@@ -81,40 +81,40 @@ export const HelloWorld = component$(() => {
|
|
|
81
81
|
{personName}
|
|
82
82
|
</button>
|
|
83
83
|
);
|
|
84
|
-
});`.trim();var
|
|
84
|
+
});`.trim();var jr={meta:{type:"problem",docs:{description:"Object destructuring is not recommended for component$",category:"Variables",recommended:!0,url:"https://qwik.builder.io/docs/advanced/eslint/#use-method-usage"},messages:{"use-after-await":"Calling use* methods after await is not safe.","use-wrong-function":"Calling use* methods in wrong function.","use-not-root":"Calling use* methods in non-root component."}},create(e){if(e.getSourceCode().getAllComments().some(n=>n.value.includes("@jsxImportSource")))return{};let t=[];return{ArrowFunctionExpression(){t.push({await:!1})},"ArrowFunctionExpression:exit"(n){t.pop()},AwaitExpression(){let n=t[t.length-1];n&&(n.await=!0)},"CallExpression[callee.name=/^use[A-Z]/]"(n){var a,l;let o=t[t.length-1];o&&o.await&&e.report({node:n,messageId:"use-after-await"});let i=n;for(;i=i.parent;)switch(i.type){case"VariableDeclarator":case"VariableDeclaration":case"ExpressionStatement":case"MemberExpression":case"BinaryExpression":case"UnaryExpression":case"ReturnStatement":case"BlockStatement":case"ChainExpression":case"Property":case"ObjectExpression":case"CallExpression":case"TSAsExpression":break;case"ArrowFunctionExpression":case"FunctionExpression":if(i.parent.type==="VariableDeclarator"&&((a=i.parent.id)==null?void 0:a.type)==="Identifier"&&i.parent.id.name.startsWith("use")||i.parent.type==="CallExpression"&&i.parent.callee.type==="Identifier"&&i.parent.callee.name==="component$")return;e.report({node:n,messageId:"use-wrong-function"});return;case"FunctionDeclaration":(l=i.id)!=null&&l.name.startsWith("use")||e.report({node:n,messageId:"use-wrong-function"});return;default:e.report({node:n,messageId:"use-not-root"});return}}}}},Us=`
|
|
85
85
|
export const Counter = component$(() => {
|
|
86
86
|
const count = useSignal(0);
|
|
87
87
|
});
|
|
88
|
-
`.trim(),
|
|
88
|
+
`.trim(),Js=`
|
|
89
89
|
export const Counter = (() => {
|
|
90
90
|
const count = useSignal(0);
|
|
91
91
|
});
|
|
92
|
-
`.trim(),
|
|
92
|
+
`.trim(),Ds=`
|
|
93
93
|
export const Counter = (() => {
|
|
94
94
|
const count = useSignal(0);
|
|
95
95
|
});
|
|
96
|
-
`.trim();var qr={loader$:!0,routeLoader$:!0,routeAction$:!0,routeHandler$:!0},Zn={...qr,action$:!0,globalAction$:!0},Ir={meta:{type:"problem",docs:{description:"Detect declaration location of loader$",recommended:!0,url:"https://qwik.builder.io/docs/advanced/eslint/#loader-location"},schema:[{type:"object",properties:{routesDir:{type:"string",default:"src/routes"}},additionalProperties:!1}],messages:{invalidLoaderLocation:'`{{fnName}}()` can only be declared in `layout.tsx`, `index.tsx` and `plugin.tsx` inside the {{routesDir}} directory, instead it was declared in "{{path}}".\nPlease check the docs: https://qwik.builder.io/docs/route-loader/',missingExport:"The return of `{{fnName}}()` needs to be exported in the same module, like this\n```\nexport const {{id}} = {{fnName}}(() => { ... });\n```",wrongName:"The named export of `{{fnName}}()` needs to follow the `use*` naming convention. It must start with `use`, like this:\n```\nexport const {{fixed}} = {{fnName}}(() => { ... });\n```\nInstead it was named:\n```\nexport const {{id}} = ...\n```",recommendedValue:"For `{{fnName}}()` it is recommended to inline the arrow function. Instead of:\n```\nexport const {{id}} = {{fnName}}({{arg}});\n```\nDo this:\n```\nexport const {{id}} = {{fnName}}(() => { ...logic here... });\n```\nThis will help the optimizer make sure that no server code is leaked to the client build."}},create(e){var y,
|
|
96
|
+
`.trim();var qr={loader$:!0,routeLoader$:!0,routeAction$:!0,routeHandler$:!0},Zn={...qr,action$:!0,globalAction$:!0},Ir={meta:{type:"problem",docs:{description:"Detect declaration location of loader$",recommended:!0,url:"https://qwik.builder.io/docs/advanced/eslint/#loader-location"},schema:[{type:"object",properties:{routesDir:{type:"string",default:"src/routes"}},additionalProperties:!1}],messages:{invalidLoaderLocation:'`{{fnName}}()` can only be declared in `layout.tsx`, `index.tsx` and `plugin.tsx` inside the {{routesDir}} directory, instead it was declared in "{{path}}".\nPlease check the docs: https://qwik.builder.io/docs/route-loader/',missingExport:"The return of `{{fnName}}()` needs to be exported in the same module, like this\n```\nexport const {{id}} = {{fnName}}(() => { ... });\n```",wrongName:"The named export of `{{fnName}}()` needs to follow the `use*` naming convention. It must start with `use`, like this:\n```\nexport const {{fixed}} = {{fnName}}(() => { ... });\n```\nInstead it was named:\n```\nexport const {{id}} = ...\n```",recommendedValue:"For `{{fnName}}()` it is recommended to inline the arrow function. Instead of:\n```\nexport const {{id}} = {{fnName}}({{arg}});\n```\nDo this:\n```\nexport const {{id}} = {{fnName}}(() => { ...logic here... });\n```\nThis will help the optimizer make sure that no server code is leaked to the client build."}},create(e){var y,g;let r=((g=(y=e.options)==null?void 0:y[0])==null?void 0:g.routesDir)??"src/routes",t=eo(e.getFilename()),n=/\/layout(|!|-.+)\.tsx?$/.test(t),o=/\/index(|!|@.+)\.tsx?$/.test(t),i=/\/plugin(|@.+)\.tsx?$/.test(t),l=new RegExp(`/${r}/`).test(t)&&(o||n||i);return{CallExpression(d){if(d.callee.type!=="Identifier")return;let f=d.callee.name;if(!Zn[f])return;if(!l&&qr[f]){e.report({node:d.callee,messageId:"invalidLoaderLocation",data:{routesDir:r,fnName:f,path:t}});return}let u=d.parent;if(u.type!=="VariableDeclarator"){e.report({node:d.callee,messageId:"missingExport",data:{fnName:f,id:"useStuff"}});return}if(u.id.type!=="Identifier"){e.report({node:d.callee,messageId:"missingExport",data:{fnName:f,id:"useStuff"}});return}if(!/^use/.test(u.id.name)){let v="use"+u.id.name[0].toUpperCase()+u.id.name.slice(1);e.report({node:u.id,messageId:"wrongName",data:{fnName:f,id:u.id.name,fixed:v}});return}if(u.parent.parent.type!=="ExportNamedDeclaration"){e.report({node:u.id,messageId:"missingExport",data:{fnName:f,id:u.id.name}});return}if(d.arguments.length>0&&d.arguments[0].type==="Identifier"){e.report({node:d.arguments[0],messageId:"recommendedValue",data:{fnName:f,id:u.id.name,arg:d.arguments[0].name}});return}}}}};function eo(e){let r=/^\\\\\?\\/.test(e),t=/[^\u0000-\u0080]+/.test(e);return r||t||(e=e.replace(/\\/g,"/"),e.endsWith("/")&&(e=e.slice(0,e.length-1))),e}var Bs=`
|
|
97
97
|
import { routeLoader$ } from '@builder.io/qwik-city';
|
|
98
98
|
|
|
99
99
|
export const useProductDetails = routeLoader$(async (requestEvent) => {
|
|
100
100
|
const res = await fetch(\`https://.../products/\${requestEvent.params.productId}\`);
|
|
101
101
|
const product = await res.json();
|
|
102
102
|
return product as Product;
|
|
103
|
-
});`.trim();var
|
|
103
|
+
});`.trim();var Xs=`
|
|
104
104
|
import { routeLoader$ } from '@builder.io/qwik-city';
|
|
105
105
|
|
|
106
106
|
const useProductDetails = routeLoader$(async (requestEvent) => {
|
|
107
107
|
const res = await fetch(\`https://.../products/\${requestEvent.params.productId}\`);
|
|
108
108
|
const product = await res.json();
|
|
109
109
|
return product as Product;
|
|
110
|
-
});`.trim();var
|
|
110
|
+
});`.trim();var Hs=`
|
|
111
111
|
import { routeLoader$ } from '@builder.io/qwik-city';
|
|
112
112
|
|
|
113
113
|
export const getProductDetails = routeLoader$(async (requestEvent) => {
|
|
114
114
|
const res = await fetch(\`https://.../products/\${requestEvent.params.productId}\`);
|
|
115
115
|
const product = await res.json();
|
|
116
116
|
return product as Product;
|
|
117
|
-
});`.trim();var
|
|
117
|
+
});`.trim();var Gs=`
|
|
118
118
|
import { routeLoader$ } from '@builder.io/qwik-city';
|
|
119
119
|
|
|
120
120
|
async function fetcher() {
|
|
@@ -124,9 +124,9 @@ async function fetcher() {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
export const useProductDetails = routeLoader$(fetcher);
|
|
127
|
-
`.trim();var xr=D(pe()),ys=[{from:"className",to:"class"},{from:"htmlFor",to:"for"}];var
|
|
128
|
-
<MyReactComponent class="foo" for="#password" />;`.trim(),
|
|
129
|
-
<MyReactComponent className="foo" htmlFor="#password" />;`.trim();var br=D(pe())
|
|
127
|
+
`.trim();var xr=D(pe()),ys=[{from:"className",to:"class"},{from:"htmlFor",to:"for"}];var kn={meta:{type:"problem",docs:{recommended:"warn",description:"Disallow usage of React-specific `className`/`htmlFor` props.",url:"https://qwik.builder.io/docs/advanced/eslint/#no-react-props"},fixable:"code",schema:[],messages:{prefer:"Prefer the `{{ to }}` prop over the deprecated `{{ from }}` prop."}},create(e){return e.getSourceCode().getAllComments().some(t=>t.value.includes("@jsxImportSource"))?{}:{JSXOpeningElement(t){for(let{from:n,to:o}of ys){let i=xr.default.getProp(t.attributes,n);if(i){let a=xr.default.hasProp(t.attributes,o,{ignoreCase:!1})?void 0:l=>l.replaceText(i.name,o);e.report({node:i,messageId:"prefer",data:{from:n,to:o},fix:a})}}}}}},zl=`
|
|
128
|
+
<MyReactComponent class="foo" for="#password" />;`.trim(),Ql=`
|
|
129
|
+
<MyReactComponent className="foo" htmlFor="#password" />;`.trim();var br=D(pe()),$n={meta:{type:"problem",docs:{recommended:!1,description:"Enforce using the classlist prop over importing a classnames helper. The classlist prop accepts an object `{ [class: string]: boolean }` just like classnames.",url:"https://qwik.builder.io/docs/advanced/eslint/#prefer-classlist"},fixable:"code",schema:[{type:"object",properties:{classnames:{type:"array",description:"An array of names to treat as `classnames` functions",default:["cn","clsx","classnames"],items:{type:"string",minItems:1,uniqueItems:!0}}},additionalProperties:!1}],messages:{preferClasslist:"The classlist prop should be used instead of {{ classnames }} to efficiently set classes based on an object."}},create(e){var n;if(e.getSourceCode().getAllComments().some(o=>o.value.includes("@jsxImportSource")))return{};let t=((n=e.options[0])==null?void 0:n.classnames)??["cn","clsx","classnames"];return{JSXAttribute(o){var i,a;if(!(["class","className"].indexOf(br.default.propName(o))===-1||br.default.hasProp((i=o.parent)==null?void 0:i.attributes,"classlist",{ignoreCase:!1}))&&((a=o.value)==null?void 0:a.type)==="JSXExpressionContainer"){let l=o.value.expression;l.type==="CallExpression"&&l.callee.type==="Identifier"&&t.indexOf(l.callee.name)!==-1&&l.arguments.length===1&&l.arguments[0].type==="ObjectExpression"&&e.report({node:o,messageId:"preferClasslist",data:{classnames:l.callee.name},fix:y=>{let g=o.range,d=l.arguments[0].range;return[y.replaceTextRange([g[0],d[0]],"classlist={"),y.replaceTextRange([d[1],g[1]],"}")]}})}}}}},Zl=`
|
|
130
130
|
import { component$ } from '@builder.io/qwik';
|
|
131
131
|
import styles from './MyComponent.module.css';
|
|
132
132
|
|
|
@@ -144,7 +144,7 @@ export default component$((props) => {
|
|
|
144
144
|
'text-green-500': props.isHighAttention,
|
|
145
145
|
'p-4': true
|
|
146
146
|
}}>Hello world</div>;
|
|
147
|
-
});`.trim(),
|
|
147
|
+
});`.trim(),eu=`
|
|
148
148
|
import { component$ } from '@builder.io/qwik';
|
|
149
149
|
import classnames from 'classnames';
|
|
150
150
|
import styles from './MyComponent.module.css';
|
|
@@ -159,9 +159,9 @@ export default component$((props) => {
|
|
|
159
159
|
},
|
|
160
160
|
{ active: true}
|
|
161
161
|
)}>Hello world</div>;
|
|
162
|
-
});`.trim();var
|
|
163
|
-
<button onClick$={() => alert('open the door please')>ring</button>`.trim(),
|
|
164
|
-
<button onClick$="javascript:alert('open the door please')">ring</button>`.trim();var Sr=D(pe());function Er(e){return e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"}var ce={checkFragmentShorthand:!1,checkKeyMustBeforeSpread:!1,warnOnDuplicates:!1},vs={missingIterKey:'Missing "key" prop for element in iterator',missingIterKeyUsePrag:'Missing "key" prop for element in iterator. The key prop allows for improved rendering performance. Shorthand fragment syntax does not support providing keys. Use <Fragment> instead',missingArrayKey:'Missing "key" prop for element in array. The key prop allows for improved rendering performance.',missingArrayKeyUsePrag:'Missing "key" prop for element in array. The key prop allows for improved rendering performance. Shorthand fragment syntax does not support providing keys. Use <Fragment> instead',nonUniqueKeys:"`key` prop must be unique"},In={meta:{docs:{description:"Disallow missing `key` props in iterators/collection literals",category:"Possible Errors",recommended:!0,url:"https://qwik.builder.io/docs/advanced/eslint/#jsx-key"},messages:vs,schema:[{type:"object",properties:{checkFragmentShorthand:{type:"boolean",default:ce.checkFragmentShorthand},checkKeyMustBeforeSpread:{type:"boolean",default:ce.checkKeyMustBeforeSpread},warnOnDuplicates:{type:"boolean",default:ce.warnOnDuplicates}},additionalProperties:!1}]},create(e){if(e.getSourceCode().getAllComments().some(s=>s.value.includes("@jsxImportSource")))return{};let t=Object.assign({},ce,e.options[0]),n=t.checkFragmentShorthand,o=t.checkKeyMustBeforeSpread,
|
|
162
|
+
});`.trim();var jn=require("@typescript-eslint/utils"),{getStaticValue:gs}=jn.ASTUtils,hs=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i,qn={meta:{type:"problem",docs:{recommended:"error",description:"Disallow javascript: URLs.",url:"https://qwik.builder.io/docs/advanced/eslint/#jsx-no-script-url"},schema:[],messages:{noJSURL:"For security, don't use javascript: URLs. Use event handlers instead if you can."}},create(e){return{JSXAttribute(r){if(r.name.type==="JSXIdentifier"&&r.value){let t=gs(r.value.type==="JSXExpressionContainer"?r.value.expression:r.value,e.getScope());t&&typeof t.value=="string"&&hs.test(t.value)&&e.report({node:r.value,messageId:"noJSURL"})}}}}},nu=`
|
|
163
|
+
<button onClick$={() => alert('open the door please')>ring</button>`.trim(),ou=`
|
|
164
|
+
<button onClick$="javascript:alert('open the door please')">ring</button>`.trim();var Sr=D(pe());function Er(e){return e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"}var ce={checkFragmentShorthand:!1,checkKeyMustBeforeSpread:!1,warnOnDuplicates:!1},vs={missingIterKey:'Missing "key" prop for element in iterator',missingIterKeyUsePrag:'Missing "key" prop for element in iterator. The key prop allows for improved rendering performance. Shorthand fragment syntax does not support providing keys. Use <Fragment> instead',missingArrayKey:'Missing "key" prop for element in array. The key prop allows for improved rendering performance.',missingArrayKeyUsePrag:'Missing "key" prop for element in array. The key prop allows for improved rendering performance. Shorthand fragment syntax does not support providing keys. Use <Fragment> instead',nonUniqueKeys:"`key` prop must be unique"},In={meta:{docs:{description:"Disallow missing `key` props in iterators/collection literals",category:"Possible Errors",recommended:!0,url:"https://qwik.builder.io/docs/advanced/eslint/#jsx-key"},messages:vs,schema:[{type:"object",properties:{checkFragmentShorthand:{type:"boolean",default:ce.checkFragmentShorthand},checkKeyMustBeforeSpread:{type:"boolean",default:ce.checkKeyMustBeforeSpread},warnOnDuplicates:{type:"boolean",default:ce.warnOnDuplicates}},additionalProperties:!1}]},create(e){if(e.getSourceCode().getAllComments().some(s=>s.value.includes("@jsxImportSource")))return{};let t=Object.assign({},ce,e.options[0]),n=t.checkFragmentShorthand,o=t.checkKeyMustBeforeSpread,i=t.warnOnDuplicates;function a(s){s.type==="JSXElement"&&!Sr.default.hasProp(s.openingElement.attributes,"key")?e.report({node:s,messageId:"missingIterKey"}):n&&s.type==="JSXFragment"&&e.report({node:s,messageId:"missingIterKeyUsePrag"})}function l(s,c=[]){return s.type==="IfStatement"?(s.consequent&&l(s.consequent,c),s.alternate&&l(s.alternate,c)):Array.isArray(s.body)&&s.body.forEach(E=>{E.type==="IfStatement"&&l(E,c),E.type==="ReturnStatement"&&c.push(E)}),c}function y(s){let c=!1;return s.some(E=>E.type==="JSXSpreadAttribute"?(c=!0,!1):E.type!=="JSXAttribute"?!1:c&&Sr.default.propName(E)==="key")}function g(s){Er(s)&&s.body.type==="BlockStatement"&&l(s.body).filter(c=>c&&c.argument).forEach(c=>{a(c.argument)})}function d(s){let c=s&&s.type==="ArrowFunctionExpression",E=h=>h&&(h.type==="JSXElement"||h.type==="JSXFragment");c&&E(s.body)&&a(s.body),s.body.type==="ConditionalExpression"?(E(s.body.consequent)&&a(s.body.consequent),E(s.body.alternate)&&a(s.body.alternate)):s.body.type==="LogicalExpression"&&E(s.body.right)&&a(s.body.right)}let f=`:matches(
|
|
165
165
|
CallExpression
|
|
166
166
|
[callee.object.object.name=Fragment]
|
|
167
167
|
[callee.object.property.name=Children]
|
|
@@ -169,7 +169,7 @@ export default component$((props) => {
|
|
|
169
169
|
CallExpression
|
|
170
170
|
[callee.object.name=Children]
|
|
171
171
|
[callee.property.name=toArray]
|
|
172
|
-
)`.replace(/\s/g,""),u=!1,v=new WeakSet;return{[f](){u=!0},[`${f}:exit`](){u=!1},"ArrayExpression, JSXElement > JSXElement"(s){if(u)return;let c=(s.type==="ArrayExpression"?s.elements:s.parent.children).filter(
|
|
172
|
+
)`.replace(/\s/g,""),u=!1,v=new WeakSet;return{[f](){u=!0},[`${f}:exit`](){u=!1},"ArrayExpression, JSXElement > JSXElement"(s){if(u)return;let c=(s.type==="ArrayExpression"?s.elements:s.parent.children).filter(h=>h&&h.type==="JSXElement");if(c.length===0)return;let E={};c.forEach(h=>{h.openingElement.attributes.filter(R=>R.name&&R.name.name==="key").length===0&&s.type==="ArrayExpression"&&e.report({node:h,messageId:"missingArrayKey"})}),i&&Object.values(E).filter(h=>h.length>1).forEach(h=>{h.forEach(b=>{v.has(b)||(v.add(b),e.report({node:b,messageId:"nonUniqueKeys"}))})})},JSXFragment(s){!n||u||s.parent.type==="ArrayExpression"&&e.report({node:s,messageId:"missingArrayKeyUsePrag"})},'CallExpression[callee.type="MemberExpression"][callee.property.name="map"], CallExpression[callee.type="OptionalMemberExpression"][callee.property.name="map"], OptionalCallExpression[callee.type="MemberExpression"][callee.property.name="map"], OptionalCallExpression[callee.type="OptionalMemberExpression"][callee.property.name="map"]'(s){if(u)return;let c=s.arguments.length>0&&s.arguments[0];!c||!Er(c)||(d(c),g(c))},'CallExpression[callee.type="MemberExpression"][callee.property.name="from"]'(s){if(u)return;let c=s.arguments.length>1&&s.arguments[1];Er(c)&&(d(c),g(c))}}}},au=`
|
|
173
173
|
import { component$ } from '@builder.io/qwik';
|
|
174
174
|
|
|
175
175
|
export const Person = component$(() => {
|
|
@@ -186,7 +186,7 @@ export const Person = component$(() => {
|
|
|
186
186
|
)}
|
|
187
187
|
</ul>
|
|
188
188
|
);
|
|
189
|
-
});`.trim(),
|
|
189
|
+
});`.trim(),su=`
|
|
190
190
|
import { component$ } from '@builder.io/qwik';
|
|
191
191
|
|
|
192
192
|
export const Person = component$(() => {
|
|
@@ -203,7 +203,7 @@ export const Person = component$(() => {
|
|
|
203
203
|
)}
|
|
204
204
|
</ul>
|
|
205
205
|
);
|
|
206
|
-
});`.trim(),
|
|
206
|
+
});`.trim(),lu=`
|
|
207
207
|
import { component$ } from '@builder.io/qwik';
|
|
208
208
|
import Card from './Card';
|
|
209
209
|
import Summary from './Summary';
|
|
@@ -223,7 +223,7 @@ export const Person = component$(() => {
|
|
|
223
223
|
</Fragment>
|
|
224
224
|
)}
|
|
225
225
|
);
|
|
226
|
-
});`.trim(),
|
|
226
|
+
});`.trim(),uu=`
|
|
227
227
|
import { component$ } from '@builder.io/qwik';
|
|
228
228
|
import Card from './Card';
|
|
229
229
|
import Summary from './Summary';
|
|
@@ -243,7 +243,7 @@ export const Person = component$(() => {
|
|
|
243
243
|
</>
|
|
244
244
|
)}
|
|
245
245
|
);
|
|
246
|
-
});`.trim(),
|
|
246
|
+
});`.trim(),pu=`
|
|
247
247
|
import { component$ } from '@builder.io/qwik';
|
|
248
248
|
|
|
249
249
|
export const ColorList = component$(() => {
|
|
@@ -256,7 +256,7 @@ export const ColorList = component$(() => {
|
|
|
256
256
|
)}
|
|
257
257
|
</ul>
|
|
258
258
|
);
|
|
259
|
-
});`.trim(),
|
|
259
|
+
});`.trim(),cu=`
|
|
260
260
|
import { component$ } from '@builder.io/qwik';
|
|
261
261
|
|
|
262
262
|
export const ColorList = component$(() => {
|
|
@@ -269,7 +269,7 @@ export const ColorList = component$(() => {
|
|
|
269
269
|
)}
|
|
270
270
|
</ul>
|
|
271
271
|
);
|
|
272
|
-
});`.trim(),
|
|
272
|
+
});`.trim(),du=`
|
|
273
273
|
import { component$, Fragment } from '@builder.io/qwik';
|
|
274
274
|
|
|
275
275
|
export const ColorList = component$(() => {
|
|
@@ -283,7 +283,7 @@ export const ColorList = component$(() => {
|
|
|
283
283
|
</Fragment>
|
|
284
284
|
)}
|
|
285
285
|
);
|
|
286
|
-
});`.trim(),
|
|
286
|
+
});`.trim(),fu=`
|
|
287
287
|
import { component$ } from '@builder.io/qwik';
|
|
288
288
|
|
|
289
289
|
export const ColorList = component$(() => {
|
|
@@ -297,7 +297,7 @@ export const ColorList = component$(() => {
|
|
|
297
297
|
</>
|
|
298
298
|
)}
|
|
299
299
|
);
|
|
300
|
-
});`.trim();var
|
|
300
|
+
});`.trim();var mu=`
|
|
301
301
|
import { component$ } from '@builder.io/qwik';
|
|
302
302
|
|
|
303
303
|
export const ColorList = component$(() => {
|
|
@@ -313,7 +313,7 @@ export const ColorList = component$(() => {
|
|
|
313
313
|
});`.trim();var Cn={meta:{type:"problem",docs:{description:"Detect unused server$() functions",recommended:!0,url:"https://qwik.builder.io/docs/advanced/eslint/#unused-server"},messages:{unusedServer:`Unused server$(). Seems like you are declaring a new server$ function, but you are never calling it. You might want to do:
|
|
314
314
|
|
|
315
315
|
{{ suggestion }}`}},create(e){return{CallExpression(r){if(r.callee.type!=="Identifier")return;if(r.callee.name==="server$"){let n=!1;if((r.parent.type==="ExpressionStatement"||r.parent.type==="AwaitExpression"&&r.parent.parent.type==="ExpressionStatement")&&(n=!0),n){let o=`const serverFn = server$(...);
|
|
316
|
-
await serverFn(...);`;e.report({node:r.callee,messageId:"unusedServer",data:{suggestion:o}})}}}}}},
|
|
316
|
+
await serverFn(...);`;e.report({node:r.callee,messageId:"unusedServer",data:{suggestion:o}})}}}}}},gu=`
|
|
317
317
|
import { component$ } from '@builder.io/qwik';
|
|
318
318
|
import { server$ } from '@builder.io/qwik-city';
|
|
319
319
|
|
|
@@ -332,7 +332,7 @@ export default component$(() => (
|
|
|
332
332
|
greet
|
|
333
333
|
</button>
|
|
334
334
|
);
|
|
335
|
-
);`.trim(),
|
|
335
|
+
);`.trim(),hu=`
|
|
336
336
|
import { component$ } from '@builder.io/qwik';
|
|
337
337
|
import { server$ } from '@builder.io/qwik-city';
|
|
338
338
|
|
|
@@ -351,6 +351,15 @@ export default component$(() => (
|
|
|
351
351
|
greet
|
|
352
352
|
</button>
|
|
353
353
|
);
|
|
354
|
-
);`.trim();var Fn=require("@typescript-eslint/utils"),xs=Fn.ESLintUtils.RuleCreator(()=>"https://qwik.builder.io/docs/advanced/dollar/"),Nn=xs({defaultOptions:[],name:"jsx-img",meta:{type:"problem",docs:{description:"For performance reasons, always provide width and height attributes for <img> elements, it will help to prevent layout shifts.",recommended:"warn",url:"https://qwik.builder.io/docs/advanced/eslint/#jsx-img"},fixable:"code",schema:[],messages:{
|
|
355
|
-
|
|
356
|
-
|
|
354
|
+
);`.trim();var Fn=require("@typescript-eslint/utils"),xs=Fn.ESLintUtils.RuleCreator(()=>"https://qwik.builder.io/docs/advanced/dollar/"),Nn=xs({defaultOptions:[],name:"jsx-img",meta:{type:"problem",docs:{description:"For performance reasons, always provide width and height attributes for <img> elements, it will help to prevent layout shifts.",recommended:"warn",url:"https://qwik.builder.io/docs/advanced/eslint/#jsx-img"},fixable:"code",schema:[],messages:{noLocalSrc:`Local images can be optimized by importing using ESM, like this:
|
|
355
|
+
|
|
356
|
+
import {{importName}} from '{{importSrc}}';
|
|
357
|
+
<{{importName}} />
|
|
358
|
+
|
|
359
|
+
See https://qwik.builder.io/docs/advanced/images/#importing-images`,noWidthHeight:`Missing "width" or "height" attribute.
|
|
360
|
+
For performance reasons, always provide width and height attributes for <img> elements, it will prevent layout shifts, boosting performance and UX.`}},create(e){return{JSXElement(r){if(r.openingElement.name.type==="JSXIdentifier"&&r.openingElement.name.name==="img"&&!r.openingElement.attributes.some(n=>n.type==="JSXSpreadAttribute")){let n=r.openingElement.attributes.find(a=>a.type==="JSXAttribute"&&a.name.type==="JSXIdentifier"&&a.name.name==="src");if(n&&n.value){let a=n.value.type==="Literal"?n.value:n.value.type==="JSXExpressionContainer"&&n.value.expression.type==="Literal"?n.value.expression:void 0;if(a&&typeof a.value=="string"&&a.value.startsWith("/")){let y=`~/media${a.value}?jsx`,g=bs(a.value);e.report({node:n,messageId:"noLocalSrc",data:{importSrc:y,importName:g}});return}}let o=r.openingElement.attributes.some(a=>a.type==="JSXAttribute"&&a.name.type==="JSXIdentifier"&&a.name.name==="width"),i=r.openingElement.attributes.some(a=>a.type==="JSXAttribute"&&a.name.type==="JSXIdentifier"&&a.name.name==="height");(!o||!i)&&e.report({node:r,messageId:"noWidthHeight"})}}}}}),Eu=`
|
|
361
|
+
import Image from '~/media/image.png';
|
|
362
|
+
<Image />`.trim(),Su=`
|
|
363
|
+
<img src="/image.png">`.trim(),wu=`
|
|
364
|
+
<img width="200" height="600" src="/static/images/portrait-01.webp">`.trim(),Au=`
|
|
365
|
+
<img src="/static/images/portrait-01.webp">`.trim();function bs(e){let r=e.lastIndexOf("."),t=e.lastIndexOf("/");return e=e.substring(t+1,r),`Img${Es(e)}`}function Es(e){return`${e}`.toLowerCase().replace(new RegExp(/[-_]+/,"g")," ").replace(new RegExp(/[^\w\s]/,"g"),"").replace(new RegExp(/\s+(.)(\w*)/,"g"),(r,t,n)=>`${t.toUpperCase()+n}`).replace(new RegExp(/\w/),r=>r.toUpperCase())}var Ss={"use-method-usage":jr,"valid-lexical-scope":_r,"loader-location":Ir,"no-react-props":kn,"prefer-classlist":$n,"jsx-no-script-url":qn,"jsx-key":In,"unused-server":Cn,"jsx-img":Nn},ws={recommended:{plugins:["qwik"],rules:{"qwik/use-method-usage":"error","qwik/valid-lexical-scope":"error","qwik/no-react-props":"error","qwik/prefer-classlist":"warn","qwik/jsx-no-script-url":"warn","qwik/loader-location":"warn","qwik/jsx-key":"warn","qwik/unused-server":"error","qwik/jsx-img":"warn"}},strict:{plugins:["qwik"],rules:{"qwik/valid-lexical-scope":"error","qwik/use-method-usage":"error","qwik/loader-location":"error","qwik/no-react-props":"error","qwik/prefer-classlist":"error","qwik/jsx-no-script-url":"error","qwik/jsx-key":"error","qwik/unused-server":"error","qwik/jsx-img":"error"}}};0&&(module.exports={configs,rules});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-qwik",
|
|
3
|
-
"version": "1.1.5-
|
|
3
|
+
"version": "1.1.5-dev20230616144423",
|
|
4
4
|
"description": "An Open-Source sub-framework designed with a focus on server-side-rendering, lazy-loading, and styling/animation.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Builder Team",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"node": ">=16"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@types/eslint": "8.40.
|
|
29
|
+
"@types/eslint": "8.40.2",
|
|
30
30
|
"@types/estree": "^1.0.1",
|
|
31
31
|
"redent": "^4.0.0"
|
|
32
32
|
},
|