@lokascript/semantic 2.6.0 → 2.7.0

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.
Files changed (40) hide show
  1. package/dist/browser-ar.ar.global.js +5 -5
  2. package/dist/browser-bn.bn.global.js +4 -4
  3. package/dist/browser-de.de.global.js +4 -4
  4. package/dist/browser-east-asian.east-asian.global.js +3 -3
  5. package/dist/browser-en-tr.en-tr.global.js +4 -4
  6. package/dist/browser-es.es.global.js +4 -4
  7. package/dist/browser-fr.fr.global.js +3 -3
  8. package/dist/browser-hi.hi.global.js +3 -3
  9. package/dist/browser-id.id.global.js +4 -4
  10. package/dist/browser-it.it.global.js +3 -3
  11. package/dist/browser-ja.ja.global.js +4 -4
  12. package/dist/browser-ko.ko.global.js +5 -5
  13. package/dist/browser-lazy.lazy.global.js +1 -1
  14. package/dist/browser-ms.ms.global.js +4 -4
  15. package/dist/browser-pl.pl.global.js +4 -4
  16. package/dist/browser-priority.priority.global.js +1 -1
  17. package/dist/browser-qu.qu.global.js +5 -5
  18. package/dist/browser-ru.ru.global.js +5 -5
  19. package/dist/browser-sw.sw.global.js +4 -4
  20. package/dist/browser-th.th.global.js +3 -3
  21. package/dist/browser-tl.tl.global.js +4 -4
  22. package/dist/browser-tr.tr.global.js +4 -4
  23. package/dist/browser-uk.uk.global.js +5 -5
  24. package/dist/browser-vi.vi.global.js +3 -3
  25. package/dist/browser.global.js +22 -22
  26. package/dist/browser.global.js.map +1 -1
  27. package/dist/generators/index.d.ts +1 -0
  28. package/dist/generators/index.d.ts.map +1 -1
  29. package/dist/generators/profile-queries.d.ts +32 -0
  30. package/dist/generators/profile-queries.d.ts.map +1 -0
  31. package/dist/index.cjs +19 -0
  32. package/dist/index.cjs.map +1 -1
  33. package/dist/index.d.ts +1 -1
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +17 -0
  36. package/dist/index.js.map +1 -1
  37. package/package.json +3 -3
  38. package/src/generators/index.ts +3 -0
  39. package/src/generators/profile-queries.ts +53 -0
  40. package/src/index.ts +4 -0
@@ -1,5 +1,5 @@
1
1
  "use strict";var LokaScriptSemanticPriority=(()=>{var fr=Object.defineProperty;var ta=Object.getOwnPropertyDescriptor;var ra=Object.getOwnPropertyNames;var na=Object.prototype.hasOwnProperty;var ia=(n,e)=>{for(var t in e)fr(n,t,{get:e[t],enumerable:!0})},aa=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ra(e))!na.call(n,i)&&i!==t&&fr(n,i,{get:()=>e[i],enumerable:!(r=ta(e,i))||r.enumerable});return n};var oa=n=>aa(fr({},"__esModule",{value:!0}),n);var Bd={};ia(Bd,{ASTBuilder:()=>st,DEFAULT_CONFIDENCE_THRESHOLD:()=>vn,HIGH_CONFIDENCE_THRESHOLD:()=>kn,VERSION:()=>_d,arabicProfile:()=>Ke,arabicTokenizer:()=>Qt,buildAST:()=>Sn,canParse:()=>sn,chineseProfile:()=>Xe,chineseTokenizer:()=>rr,createCommandNode:()=>ne,createEventHandler:()=>Le,createLiteral:()=>U,createPropertyPath:()=>ge,createReference:()=>oe,createSelector:()=>ue,englishProfile:()=>Ee,englishTokenizer:()=>Xt,frenchProfile:()=>De,frenchTokenizer:()=>ir,fromExplicit:()=>cn,germanProfile:()=>qe,germanTokenizer:()=>ar,getCommandMapper:()=>ot,getPatternsForLanguage:()=>Qi,getPatternsForLanguageAndCommand:()=>qd,getProfile:()=>Nt,getSupportedLanguages:()=>$d,getTokenizer:()=>Rt,indonesianProfile:()=>He,indonesianTokenizer:()=>or,isExplicitSyntax:()=>Pe,isLanguageSupported:()=>Sr,japaneseProfile:()=>Fe,japaneseTokenizer:()=>Zt,koreanProfile:()=>Ue,koreanTokenizer:()=>Jt,parse:()=>nt,parseAny:()=>pn,parseExplicit:()=>et,portugueseProfile:()=>Ge,portugueseTokenizer:()=>nr,registerCommandMapper:()=>hr,render:()=>Et,renderExplicit:()=>Pt,spanishProfile:()=>Be,spanishTokenizer:()=>er,toExplicit:()=>ln,tokenize:()=>Kd,tryGetProfile:()=>I,turkishProfile:()=>Ye,turkishTokenizer:()=>tr});var vn=.5,kn=.8;var sa=new Set(["me","my","myself","you","your","yourself","it","its","result","event","target","body","detail","window","document"]),la=new Set(["and","or","not","no"]),ca=new Set(["true","false","null","undefined"]),pa=new Set(["is","matches","match","contains","in"]),da=new Set(["next","previous","closest","first","last"]),ua=new Set(["ms","s","seconds","second","milliseconds","millisecond","minutes","minute","hours","hour"]);function xn(n){let e=[],t=0,r=1,i=1;function a(){if(e.length===0)return!0;let f=e[e.length-1];return f.type==="IDENTIFIER"&&pa.has(f.value.toLowerCase())||f.type==="IDENTIFIER"&&da.has(f.value.toLowerCase())?!0:["OPERATOR","COMPARISON","LOGICAL","LPAREN","LBRACKET","LBRACE","COMMA","COLON"].includes(f.type)}function s(f=0){return n[t+f]??""}function o(){let f=n[t];return t++,f===`
2
- `?(r++,i=1):i++,f}function l(){for(;t<n.length&&/\s/.test(n[t]);)o()}function c(f){let y="";for(;t<n.length&&f(n[t]);)y+=o();return y}function d(f){let y=f;for(o();t<n.length&&n[t]!==f;)n[t]==="\\"&&t+1<n.length&&(y+=o()),y+=o();return t<n.length&&(y+=o()),y}function p(){let f="`";for(o();t<n.length&&n[t]!=="`";)n[t]==="\\"&&t+1<n.length&&(f+=o()),f+=o();return t<n.length&&(f+=o()),f}function u(){let f="<";for(o();t<n.length&&(f+=o(),!f.endsWith("/>")););return f}function m(f,y,g){return{type:f,value:y,start:g,end:t,line:r,column:i-y.length}}for(;t<n.length&&(l(),!(t>=n.length));){let f=t,y=s();if(y==="'"&&s(1)==="s"&&!/\w/.test(s(2))){o(),o(),e.push(m("POSSESSIVE","'s",f));continue}if(y==='"'||y==="'"){let g=d(y);e.push(m("STRING",g,f));continue}if(y==="`"){let g=p();e.push(m("TEMPLATE_LITERAL",g,f));continue}if(y==="<"&&/[a-zA-Z.#\[]/.test(s(1))){let g=u();e.push(m("QUERY_SELECTOR",g,f));continue}if(y==="#"&&a()){o();let g=c(h=>/[\w-]/.test(h));e.push(m("ID_SELECTOR","#"+g,f));continue}if(y==="."&&/[a-zA-Z_-]/.test(s(1))&&a()){o();let g=c(h=>/[\w-]/.test(h));e.push(m("CLASS_SELECTOR","."+g,f));continue}if(y==="@"&&/[a-zA-Z_]/.test(s(1))){o();let g=c(h=>/[\w-]/.test(h));e.push(m("ATTRIBUTE_REF","@"+g,f));continue}if(y==="["&&a()){let g=s(1);if(g==="@"||/[a-zA-Z]/.test(g)){let h="";for(h+=o();t<n.length&&n[t]!=="]";)n[t]==='"'||n[t]==="'"?h+=d(n[t]):h+=o();t<n.length&&(h+=o()),e.push(m("ATTRIBUTE_SELECTOR",h,f));continue}}if(y==="["){o(),e.push(m("LBRACKET","[",f));continue}if(y==="]"){o(),e.push(m("RBRACKET","]",f));continue}if(/\d/.test(y)){let g=c(z=>/[\d.]/.test(z)),h=t,b=c(z=>/[a-zA-Z]/.test(z));ua.has(b)?e.push(m("TIME_EXPRESSION",g+b,f)):(t=h,e.push(m("NUMBER",g,f)));continue}if(y==="("){o(),e.push(m("LPAREN","(",f));continue}if(y===")"){o(),e.push(m("RPAREN",")",f));continue}if(y==="{"){o(),e.push(m("LBRACE","{",f));continue}if(y==="}"){o(),e.push(m("RBRACE","}",f));continue}if(y===","){o(),e.push(m("COMMA",",",f));continue}if(y===":"){o(),e.push(m("COLON",":",f));continue}if(y==="."){o(),e.push(m("DOT",".",f));continue}if(y==="+"||y==="-"||y==="*"||y==="/"||y==="%"){o(),e.push(m("OPERATOR",y,f));continue}if(y==="="||y==="!"||y==="<"||y===">"){let g=o();s()==="="&&(g+=o()),e.push(m("COMPARISON",g,f));continue}if(/[a-zA-Z_$]/.test(y)){let g=c(b=>/[\w$]/.test(b)),h=g.toLowerCase();sa.has(h)?e.push(m("CONTEXT_VAR",g,f)):la.has(h)?e.push(m("LOGICAL",g,f)):ca.has(h)?e.push(m("BOOLEAN",g,f)):e.push(m("IDENTIFIER",g,f));continue}o()}return e.push(m("EOF","",t)),e}var ma=new Set(["my","its","your"]),fa=new Set(["is","matches","match","contains","in","exists","does"]),ya=new Set(["next","previous","closest","first","last"]),Ct=class{constructor(){this.tokens=[];this.current=0}parse(e){try{return this.tokens=xn(e),this.current=0,this.isAtEnd()?{success:!1,error:"Empty expression"}:{success:!0,node:this.parseExpression(),consumed:this.current}}catch(t){return{success:!1,error:t instanceof Error?t.message:"Parse error"}}}peek(){return this.tokens[this.current]??{type:"EOF",value:"",start:0,end:0}}peekAt(e){return this.tokens[this.current+e]??{type:"EOF",value:"",start:0,end:0}}previous(){return this.tokens[this.current-1]??{type:"EOF",value:"",start:0,end:0}}isAtEnd(){return this.peek().type==="EOF"}advance(){return this.isAtEnd()||this.current++,this.previous()}check(e){return this.peek().type===e}checkValue(e){return this.peek().value.toLowerCase()===e.toLowerCase()}match(...e){for(let t of e)if(this.check(t))return this.advance(),!0;return!1}parseExpression(){return this.parseOr()}parseOr(){let e=this.parseAnd();for(;this.checkValue("or");){let t=this.advance().value,r=this.parseAnd();e=this.createBinaryExpression(t,e,r)}return e}parseAnd(){let e=this.parseEquality();for(;this.checkValue("and");){let t=this.advance().value,r=this.parseEquality();e=this.createBinaryExpression(t,e,r)}return e}parseEquality(){let e=this.parseComparison();for(;;){let t;if(this.match("COMPARISON"))t=this.previous().value;else if(this.checkValue("is")||this.checkValue("matches")||this.checkValue("match")||this.checkValue("contains")||this.checkValue("in")){let i=this.advance().value;t=i.toLowerCase()==="match"?"matches":i}else break;if(t.toLowerCase()==="is"){if(this.checkValue("empty")){this.advance(),e=this.createPostfixUnary("is empty",e);continue}if(this.checkValue("not")&&this.peekAt(1).value.toLowerCase()==="empty"){this.advance(),this.advance(),e=this.createPostfixUnary("is not empty",e);continue}}let r=this.parseComparison();e=this.createBinaryExpression(t,e,r)}return e}parseComparison(){let e=this.parseAddition();for(;this.check("COMPARISON");){let t=this.advance().value,r=this.parseAddition();e=this.createBinaryExpression(t,e,r)}return e}parseAddition(){let e=this.parseMultiplication();for(;this.peek().value==="+"||this.peek().value==="-";){let t=this.advance().value,r=this.parseMultiplication();e=this.createBinaryExpression(t,e,r)}return e}parseMultiplication(){let e=this.parseUnary();for(;this.peek().value==="*"||this.peek().value==="/"||this.peek().value==="%";){let t=this.advance().value,r=this.parseUnary();e=this.createBinaryExpression(t,e,r)}return e}parseUnary(){if(this.checkValue("not")||this.checkValue("no")||this.peek().value==="-"){let e=this.advance().value,t=this.parseUnary();return this.createUnaryExpression(e,t)}return this.parsePostfix()}parsePostfix(){let e=this.parsePrimary();for(;;)if(this.match("DOT"))if(this.check("IDENTIFIER")||this.check("CONTEXT_VAR")){let t=this.advance().value;e=this.createPropertyAccess(e,t)}else break;else if(this.match("POSSESSIVE"))if(this.check("IDENTIFIER")||this.check("CONTEXT_VAR")){let t=this.advance().value;e=this.createPossessiveExpression(e,t)}else break;else if(this.match("LPAREN")){let t=this.parseArguments();e=this.createCallExpression(e,t)}else if(this.match("LBRACKET")){let t=this.parseExpression();if(!this.match("RBRACKET"))throw new Error("Expected ] after index");e=this.createPropertyAccess(e,t)}else if(e.type==="contextReference"&&ma.has(e.contextType??"")&&this.check("IDENTIFIER")&&!fa.has(this.peek().value.toLowerCase())){let t=this.advance().value;e=this.createPropertyAccess(e,t)}else if(this.checkValue("exists")&&this.peekAt(1).type!=="LPAREN")this.advance(),e=this.createPostfixUnary("exists",e);else break;return e}parsePrimary(){let e=this.peek();if(this.match("NUMBER"))return this.createLiteral(parseFloat(e.value),"number",e);if(this.match("STRING")){let t=e.value.slice(1,-1);return this.createLiteral(t,"string",e)}if(this.match("BOOLEAN")){let t=e.value==="true"?!0:e.value==="false"?!1:e.value==="null"?null:void 0,r={true:"boolean",false:"boolean",null:"null",undefined:"undefined"};return this.createLiteral(t,r[e.value]??"string",e)}if(this.match("TEMPLATE_LITERAL"))return{type:"templateLiteral",value:e.value,start:e.start,end:e.end,line:e.line,column:e.column};if(this.match("TIME_EXPRESSION"))return this.parseTimeExpression(e);if(this.match("ID_SELECTOR"))return this.createSelector(e.value,"id",e);if(this.match("CLASS_SELECTOR"))return this.createSelector(e.value,"class",e);if(this.match("ATTRIBUTE_SELECTOR"))return this.createSelector(e.value,"attribute",e);if(this.match("ATTRIBUTE_REF"))return{type:"attributeAccess",attributeName:e.value.slice(1),start:e.start,end:e.end};if(this.match("QUERY_SELECTOR")){let t=e.value.slice(1,-2);return this.createSelector(t,"query",e)}if(this.match("CONTEXT_VAR"))return this.createContextReference(e.value,e);if(this.match("IDENTIFIER")){if(ya.has(e.value.toLowerCase())&&(this.check("CLASS_SELECTOR")||this.check("ID_SELECTOR")||this.check("QUERY_SELECTOR"))){let t=this.advance(),r=t.type==="QUERY_SELECTOR"?t.value.slice(1,-2):t.value,i=t.type==="CLASS_SELECTOR"?"class":t.type==="ID_SELECTOR"?"id":"query";return{type:"callExpression",callee:this.createIdentifier(e.value,e),arguments:[this.createSelector(r,i,t)],start:e.start,end:t.end}}return this.createIdentifier(e.value,e)}if(this.match("LPAREN")){let t=this.parseExpression();if(!this.match("RPAREN"))throw new Error("Expected ) after expression");return t}if(this.match("LBRACKET"))return this.parseArrayLiteral();if(this.match("LBRACE"))return this.parseObjectLiteral();throw new Error(`Unexpected token: ${e.value}`)}parseArguments(){let e=[];if(!this.check("RPAREN"))do e.push(this.parseExpression());while(this.match("COMMA"));if(!this.match("RPAREN"))throw new Error("Expected ) after arguments");return e}parseArrayLiteral(){let e=[],t=this.previous().start;if(!this.check("RBRACKET"))do e.push(this.parseExpression());while(this.match("COMMA"));if(!this.match("RBRACKET"))throw new Error("Expected ] after array elements");return{type:"arrayLiteral",elements:e,start:t,end:this.previous().end}}parseObjectLiteral(){let e=[],t=this.previous().start;if(!this.check("RBRACE"))do{let r;if(this.check("STRING"))r=this.advance().value.slice(1,-1);else if(this.check("IDENTIFIER"))r=this.advance().value;else throw new Error("Expected property name");if(!this.match("COLON"))throw new Error("Expected : after property name");let i=this.parseExpression();e.push({key:r,value:i})}while(this.match("COMMA"));if(!this.match("RBRACE"))throw new Error("Expected } after object properties");return{type:"objectLiteral",properties:e.map(r=>({type:"objectProperty",key:r.key,value:r.value})),start:t,end:this.previous().end}}parseTimeExpression(e){let t=e.value.match(/^(\d+(?:\.\d+)?)(ms|s|seconds?|milliseconds?|minutes?|hours?)$/i);if(!t)throw new Error(`Invalid time expression: ${e.value}`);let r=parseFloat(t[1]),i=t[2].toLowerCase();return{type:"timeExpression",value:r,unit:i,raw:e.value,start:e.start,end:e.end,line:e.line,column:e.column}}createLiteral(e,t,r){return{type:"literal",value:e,dataType:t,raw:r.value,start:r.start,end:r.end,line:r.line,column:r.column}}createSelector(e,t,r){return{type:"selector",value:e,selector:e,selectorType:t,start:r.start,end:r.end,line:r.line,column:r.column}}createContextReference(e,t){return{type:"contextReference",contextType:e,name:t.value,start:t.start,end:t.end,line:t.line,column:t.column}}createIdentifier(e,t){return{type:"identifier",name:e,start:t.start,end:t.end,line:t.line,column:t.column}}createPropertyAccess(e,t){return{type:"propertyAccess",object:e,property:typeof t=="string"?t:t.type==="identifier"?t.name:"",start:e.start,end:this.previous().end}}createPossessiveExpression(e,t){return{type:"possessiveExpression",object:e,property:t,start:e.start,end:this.previous().end}}createBinaryExpression(e,t,r){return{type:"binaryExpression",operator:e,left:t,right:r,start:t.start,end:r.end}}createUnaryExpression(e,t){return{type:"unaryExpression",operator:e,operand:t,prefix:!0,start:this.previous().start,end:t.end}}createPostfixUnary(e,t){return{type:"unaryExpression",operator:e,operand:t,prefix:!1,start:t.start,end:this.previous().end}}createCallExpression(e,t){return{type:"callExpression",callee:e,arguments:t,start:e.start,end:this.previous().end}}};function yr(n){return new Ct().parse(n)}function ae(n,e){switch(n.type){case"literal":return ga(n);case"selector":return ha(n,e);case"reference":return va(n);case"property-path":return ka(n,e);case"expression":return xa(n);case"flag":return{type:"literal",value:n.enabled};default:let t=n;throw new Error(`Unknown semantic value type: ${t.type}`)}}function ga(n){let e={type:"literal",value:n.value};return n.dataType?{...e,dataType:n.dataType}:e}function ha(n,e){return n.value.startsWith("@")&&/^[a-zA-Z_]/.test(n.value.slice(1))?{type:"attributeAccess",attributeName:n.value.slice(1)}:(e&&n.value.startsWith("*")&&/^[a-zA-Z-]/.test(n.value.slice(1))&&e.push(`Converted '${n.value}' to a CSS selector, but it looks like a CSS property name. CSS properties in commands like 'transition' should be literal strings, not selectors. Consider using expectedTypes: ['literal'] instead of ['literal', 'selector'] in the command schema.`),n.value.startsWith("<")?{type:"selector",value:n.value,selector:n.value,selectorType:n.selectorKind,raw:n.value}:{type:"selector",value:n.value,selector:n.value,selectorType:n.selectorKind})}function va(n){return{type:"contextReference",contextType:n.value,name:n.value}}function ka(n,e){return{type:"propertyAccess",object:ae(n.object,e),property:n.property}}function xa(n){let e=yr(n.raw);return!e.success||!e.node?{type:"identifier",name:n.raw}:e.node}function gr(n,e){return n.roles.get(e)}function w(n,e,t){let r=gr(n,e);return r?ae(r,t):void 0}function C(n,e=[],t,r={}){let i={type:"command",name:n,args:e};return t&&Object.keys(t).length>0&&(i.modifiers=t),r.isBlocking&&(i.isBlocking=r.isBlocking),r.implicitTarget&&(i.implicitTarget=r.implicitTarget),r.semanticRoles&&Object.keys(r.semanticRoles).length>0&&(i.semanticRoles=r.semanticRoles),i}var ba={action:"toggle",toAST(n,e){let t=w(n,"patient"),r=w(n,"destination"),i=w(n,"duration"),a=t?[t]:[],s={};return r&&(s.on=r),i&&(s.for=i),C("toggle",a,s)}},Sa={action:"add",toAST(n,e){let t=w(n,"patient"),r=w(n,"destination"),i=t?[t]:[],a={};return r&&(a.to=r),C("add",i,a)}},wa={action:"remove",toAST(n,e){let t=w(n,"patient"),r=w(n,"source"),i=t?[t]:[],a={};return r&&(a.from=r),C("remove",i,a)}},za={action:"set",toAST(n,e){let t=w(n,"destination"),r=w(n,"patient"),i=w(n,"scope"),a=[],s={};return t&&a.push(t),r&&(s.to=r),i&&(s.on=i),C("set",a,s)}},Ta={action:"show",toAST(n,e){let t=w(n,"destination"),r=w(n,"patient"),i=w(n,"duration"),a=[],s={},o=t??r;return o&&a.push(o),i&&(s.with=i),C("show",a,s)}},Ea={action:"hide",toAST(n,e){let t=w(n,"destination"),r=w(n,"patient"),i=w(n,"duration"),a=[],s={},o=t??r;return o&&a.push(o),i&&(s.with=i),C("hide",a,s)}},Pa={action:"increment",toAST(n,e){let t=w(n,"destination"),r=w(n,"patient"),i=w(n,"quantity"),a=[],s={},o=t??r;return o&&a.push(o),i&&(s.by=i),C("increment",a,s)}},La={action:"decrement",toAST(n,e){let t=w(n,"destination"),r=w(n,"patient"),i=w(n,"quantity"),a=[],s={},o=t??r;return o&&a.push(o),i&&(s.by=i),C("decrement",a,s)}},Ca={action:"wait",toAST(n,e){let t=w(n,"event");if(t){let a={for:t},s=w(n,"source");return s&&(a.from=s),C("wait",[],a,{isBlocking:!0})}let r=w(n,"duration");return C("wait",r?[r]:[],void 0,{isBlocking:!0})}},Ra={action:"log",toAST(n,e){let t=w(n,"patient"),r=[];return t&&r.push(t),C("log",r)}},Na={action:"put",toAST(n,e){let t=w(n,"patient"),r=w(n,"destination"),i=gr(n,"manner")??gr(n,"method"),a=t?[t]:[],s={};if(r){let o=i?.type==="literal"?String(i.value):"into";s[o]=r}return C("put",a,s)}},Aa={action:"fetch",toAST(n,e){let t=w(n,"source"),r=w(n,"method"),i=w(n,"responseType"),a=w(n,"patient"),s=t?[t]:[],o={};return r&&(o.with=r),i&&(o.as=i),a&&(o.body=a),C("fetch",s,o,{isBlocking:!0})}},Ma={action:"append",toAST(n,e){let t=w(n,"patient"),r=w(n,"destination"),i=t?[t]:[],a={};return r&&(a.to=r),C("append",i,a)}},Oa={action:"prepend",toAST(n,e){let t=w(n,"patient"),r=w(n,"destination"),i=t?[t]:[],a={};return r&&(a.to=r),C("prepend",i,a)}},ja={action:"trigger",toAST(n,e){let t=w(n,"event"),r=w(n,"destination"),i=t?[t]:[],a={};return r&&(a.on=r),C("trigger",i,a)}},Ia={action:"send",toAST(n,e){let t=w(n,"event"),r=w(n,"destination"),i=w(n,"patient"),a=t?[t]:[],s={};return r&&(s.to=r),i&&(s.detail=i),C("send",a,s)}},Wa={action:"go",toAST(n,e){let t=w(n,"source"),r=w(n,"destination"),i=[],a={};return t&&i.push(t),r&&(a.to=r),C("go",i,a)}},Va={action:"transition",toAST(n,e){let t=w(n,"patient"),r=w(n,"goal"),i=w(n,"duration"),a=w(n,"destination"),s=t?[t]:[],o={};return r&&(o.to=r),i&&(o.over=i),a&&(o.on=a),C("transition",s,o)}},_a={action:"focus",toAST(n,e){let t=w(n,"destination"),r=w(n,"patient"),i=[],a={},s=t??r;return s&&i.push(s),C("focus",i,a)}},$a={action:"blur",toAST(n,e){let t=w(n,"destination"),r=w(n,"patient"),i=[],a=t??r;return a&&i.push(a),C("blur",i)}},Ka={action:"get",toAST(n,e){let t=w(n,"source"),r=w(n,"patient"),i=[],a=t??r;return a&&i.push(a),C("get",i)}},qa={action:"take",toAST(n,e){let t=w(n,"patient"),r=w(n,"source"),i=t?[t]:[],a={};return r&&(a.from=r),C("take",i,a)}},Ba={action:"call",toAST(n,e){let t=w(n,"patient");return C("call",t?[t]:[])}},Da={action:"return",toAST(n,e){let t=w(n,"patient");return C("return",t?[t]:[])}},Ha={action:"halt",toAST(n,e){let t=n.roles.get("patient");return t?C("halt",[ae(t)]):C("halt",[])}},Fa={action:"throw",toAST(n,e){let t=w(n,"patient");return C("throw",t?[t]:[])}},Ua={action:"settle",toAST(n,e){let t=w(n,"destination"),r=w(n,"patient"),i=[],a=t??r;return a&&i.push(a),C("settle",i,void 0,{isBlocking:!0})}},Ga={action:"swap",toAST(n,e){let t=w(n,"patient"),r=w(n,"source"),i=w(n,"destination"),a=w(n,"style"),s=[],o={};return t&&s.push(t),r&&s.push(r),i&&(o.on=i),a&&(o.with=a),C("swap",s,o)}},Ya={action:"morph",toAST(n,e){let t=w(n,"source"),r=w(n,"destination"),i=w(n,"patient"),a=[],s={},o=t??r;return o&&a.push(o),i&&(s.on=i),C("morph",a,s)}},Xa={action:"clone",toAST(n,e){let t=w(n,"source"),r=w(n,"destination"),i=w(n,"patient"),a=[],s={},o=t??i;return o&&a.push(o),r&&(s.into=r),C("clone",a,s)}},Za={action:"make",toAST(n,e){let t=w(n,"patient");return C("make",t?[t]:[])}},Ja={action:"measure",toAST(n,e){let t=w(n,"patient"),r=w(n,"destination"),i=w(n,"source"),a=[],s={};t&&a.push(t);let o=r??i;return o&&(s.of=o),C("measure",a,s)}},Qa={action:"tell",toAST(n,e){let t=w(n,"destination"),r=w(n,"patient"),i=[],a=t??r;return a&&i.push(a),C("tell",i)}},eo={action:"js",toAST(n,e){let t=w(n,"patient");return C("js",t?[t]:[])}},to={action:"async",toAST(n,e){return C("async",[])}},ro={action:"if",toAST(n,e){let t=w(n,"condition");return C("if",t?[t]:[])}},no={action:"unless",toAST(n,e){let t=w(n,"condition");return C("unless",t?[t]:[])}},io={action:"repeat",toAST(n,e){let t=w(n,"quantity"),r=w(n,"patient"),i=[],a=t??r;return a&&i.push(a),C("repeat",i)}},ao={action:"for",toAST(n,e){let t=w(n,"patient"),r=w(n,"source"),i=t?[t]:[],a={};return r&&(a.in=r),C("for",i,a)}},oo={action:"while",toAST(n,e){let t=w(n,"condition");return C("while",t?[t]:[])}},so={action:"continue",toAST(n,e){return C("continue",[])}},lo={action:"default",toAST(n,e){let t=w(n,"patient"),r=w(n,"source"),i=t?[t]:[],a={};return r&&(a.to=r),C("default",i,a)}},co={action:"init",toAST(n,e){return C("init",[])}},po={action:"behavior",toAST(n,e){let t=w(n,"patient");return C("behavior",t?[t]:[])}},uo={action:"install",toAST(n,e){let t=w(n,"patient"),r=w(n,"destination"),i=t?[t]:[],a={};return r&&(a.on=r),C("install",i,a)}},mo={action:"on",toAST(n,e){let t=w(n,"event"),r=w(n,"source"),i=t?[t]:[],a={};return r&&(a.from=r),C("on",i,a)}},bn=new Map([["toggle",ba],["add",Sa],["remove",wa],["set",za],["show",Ta],["hide",Ea],["increment",Pa],["decrement",La],["wait",Ca],["log",Ra],["put",Na],["fetch",Aa],["append",Ma],["prepend",Oa],["get",Ka],["take",qa],["trigger",ja],["send",Ia],["on",mo],["go",Wa],["transition",Va],["focus",_a],["blur",$a],["call",Ba],["return",Da],["halt",Ha],["throw",Fa],["settle",Ua],["swap",Ga],["morph",Ya],["clone",Xa],["measure",Ja],["make",Za],["tell",Qa],["default",lo],["js",eo],["async",to],["if",ro],["unless",no],["repeat",io],["for",ao],["while",oo],["continue",so],["init",co],["behavior",po],["install",uo]]);function ot(n){return bn.get(n)}function hr(n){bn.set(n.action,n)}var st=class{constructor(e={}){this.warnings=[]}build(e){switch(e.kind){case"command":return this.buildCommand(e);case"event-handler":return this.buildEventHandler(e);case"conditional":return this.buildConditional(e);case"compound":return this.buildCompound(e);case"loop":return this.buildLoop(e);case"behavior":return this.buildBehavior(e);case"def":return this.buildDef(e);default:throw new Error(`Unknown semantic node kind: ${e.kind}`)}}buildBehavior(e){let t=e.eventHandlers.map(i=>this.buildEventHandler(i)),r={type:"behavior",name:e.name,parameters:[...e.parameters],eventHandlers:t};return e.initBlock&&e.initBlock.length>0&&(r.initBlock={type:"initBlock",commands:e.initBlock.map(i=>this.build(i))}),r}buildDef(e){return{type:"def",name:e.name,params:[...e.parameters],body:e.body.map(t=>this.build(t))}}buildCommand(e){let t=ot(e.action),r;if(t){let i=t.toAST(e,this);if("ast"in i&&"warnings"in i){let a=i;this.warnings.push(...a.warnings),r=a.ast}else r=i}else r=this.buildGenericCommand(e);if(e.roles&&e.roles.size>0){let i={};for(let[a,s]of e.roles)i[a]=ae(s);Object.keys(i).length>0&&(r.semanticRoles=i)}return r}buildGenericCommand(e){let t=[],r={},i=["patient","source","quantity"],a=["destination","duration","method","style"];for(let o of i){let l=e.roles.get(o);l&&t.push(ae(l))}for(let o of a){let l=e.roles.get(o);if(l){let c=this.roleToModifierKey(o);r[c]=ae(l)}}let s={type:"command",name:e.action,args:t};return Object.keys(r).length>0?{...s,modifiers:r}:s}roleToModifierKey(e){return{destination:"on",duration:"for",source:"from",condition:"if",method:"via",style:"with"}[e]??e}buildEventHandler(e){let t=e.roles.get("event"),r="click",i,a=t?.type==="literal"?String(t.value):t?.type==="expression"?t.raw:t?.type==="reference"?t.value:void 0;a!==void 0&&(a.includes("|")||a.includes(" or ")?(i=a.split(/\s+or\s+|\|/).map(h=>h.trim()),r=i[0]):r=a);let s=e.body.map(h=>this.build(h)),o=e.roles.get("source"),l,c;o?.type==="selector"?(l=o.value,c=o.value):o?.type==="reference"?c=o.value:o?.type==="literal"&&(c=String(o.value));let d=e.roles.get("condition"),p=d?ae(d):void 0,u=e.roles.get("destination"),m=u?ae(u):void 0,f=e.eventModifiers,y=l;if(f?.from){let h=f.from;h.type==="selector"&&!l&&(y=h.value)}let g=e.parameterNames?[...e.parameterNames]:void 0;return{type:"eventHandler",event:r,commands:s,...i&&i.length>1?{events:i}:{},...y?{selector:y}:{},...c?{target:c}:{},...p?{condition:p}:{},...m?{watchTarget:m}:{},...g&&g.length>0?{args:g,params:g}:{}}}buildConditional(e){let t=e.roles.get("condition");if(!t)throw new Error("Conditional node missing condition");let r=ae(t),i=e.thenBranch.map(o=>this.build(o)),a=e.elseBranch?.map(o=>this.build(o)),s=[r,{type:"block",commands:i}];return a&&a.length>0&&s.push({type:"block",commands:a}),{type:"command",name:"if",args:s}}buildCompound(e){let t=e.statements.map(i=>this.build(i));return t.length===1?t[0]:t.length===0?{type:"block",commands:[]}:t.every(i=>i.type==="eventHandler")?{type:"Program",statements:t}:{type:"CommandSequence",commands:t}}buildLoop(e){let t=e.body.map(i=>this.build(i)),r=[{type:"identifier",name:e.loopVariant}];switch(e.loopVariant){case"times":{let i=e.roles.get("quantity");i&&r.push(ae(i));break}case"for":{e.loopVariable&&r.push({type:"string",value:e.loopVariable});let i=e.roles.get("source");i&&r.push(ae(i));break}case"while":case"until":{let i=e.roles.get("condition");i&&r.push(ae(i));break}case"forever":break}return r.push({type:"block",commands:t}),{type:"command",name:"repeat",args:r}}buildBlock(e){return{type:"block",commands:e.map(r=>this.build(r))}}};function Sn(n){let e=new st;return{ast:e.build(n),warnings:e.warnings}}var Ae=new Map,Me=new Map,Ve=new Map;var wn=null;function zn(n,e){let t={...n};for(let r of Object.keys(e)){let i=e[r],a=n[r];i!==void 0&&(typeof i=="object"&&i!==null&&!Array.isArray(i)&&typeof a=="object"&&a!==null&&!Array.isArray(a)?t[r]=zn(a,i):t[r]=i)}return t}function Tn(n,e){return zn(n,e)}function kr(n){if(!n.extends)return n;let e=Me.get(n.extends);if(!e)return console.warn(`[Registry] Profile '${n.code}' extends '${n.extends}' but base is not registered. Make sure to import the base language before the variant.`),n;let t=kr(e);return Tn(t,n)}function D(n,e,t){Ae.set(n,e),Me.set(n,t),Ve.delete(n)}var vr=new Map;function xr(n,e){vr.set(n,e),Ve.delete(n)}function _e(n){return n.split("-")[0]}function $e(n){return n.includes("-")}function Rt(n){let e=Ae.get(n);if(!e&&$e(n)){let t=_e(n);e=Ae.get(t)}if(!e){let t=Array.from(Ae.keys()).join(", ");throw new Error(`Language '${n}' is not registered. Registered languages: ${t||"none"}. Import the language module first: import '@lokascript/semantic/languages/${n}';`)}return e}function Nt(n){let e=Me.get(n);if(!e&&$e(n)){let t=_e(n);e=Me.get(t)}if(!e){let t=Array.from(Me.keys()).join(", ");throw new Error(`Language profile '${n}' is not registered. Registered languages: ${t||"none"}. Import the language module first: import '@lokascript/semantic/languages/${n}';`)}return kr(e)}function I(n){let e=Me.get(n);return!e&&$e(n)&&(e=Me.get(_e(n))),e?kr(e):void 0}function br(){return Array.from(Ae.keys())}function Sr(n){return Ae.has(n)?!0:$e(n)?Ae.has(_e(n)):!1}function En(n,e){return Rt(e).tokenize(n)}function le(n){let e=Ve.get(n);if(!e&&$e(n)&&(e=Ve.get(_e(n))),e)return e;let t=vr.get(n);if(!t&&$e(n)&&(t=vr.get(_e(n))),t)return Ve.set(n,t),t;if(!wn)throw new Error(`No patterns registered for language '${n}'. Either import the language module or set a pattern generator.`);let r=Nt(n),i=wn(r);return Ve.set(n,i),i}function wr(n,e){return le(n).filter(t=>t.command===e).sort((t,r)=>r.priority-t.priority)}var Ke={code:"ar",name:"Arabic",nativeName:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",regions:["priority"],direction:"rtl",script:"arabic",wordOrder:"VSO",markingStrategy:"preposition",usesSpaces:!0,verb:{position:"start",subjectDrop:!0},references:{me:"\u0623\u0646\u0627",it:"\u0647\u0648",you:"\u0623\u0646\u062A",result:"\u0627\u0644\u0646\u062A\u064A\u062C\u0629",event:"\u0627\u0644\u062D\u062F\u062B",target:"\u0627\u0644\u0647\u062F\u0641",body:"\u062C\u0633\u0645"},possessive:{marker:"",markerPosition:"after-object",usePossessiveAdjectives:!0,specialForms:{me:"\u0644\u064A",it:"\u0644\u0647",you:"\u0644\u0643"},keywords:{\u0644\u064A:"me",\u0644\u0643:"you",\u0644\u0647:"it",\u0644\u0647\u0627:"it"}},roleMarkers:{destination:{primary:"\u0639\u0644\u0649",alternatives:["\u0641\u064A","\u0625\u0644\u0649","\u0628","\u0642\u0628\u0644","\u0628\u0639\u062F"],position:"before"},source:{primary:"\u0645\u0646",position:"before"},patient:{primary:"",position:"before"},style:{primary:"\u0628\u0640",alternatives:["\u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645"],position:"before"}},keywords:{toggle:{primary:"\u0628\u062F\u0651\u0644",alternatives:["\u0628\u062F\u0644","\u063A\u064A\u0651\u0631","\u063A\u064A\u0631"],normalized:"toggle"},add:{primary:"\u0623\u0636\u0641",alternatives:["\u0627\u0636\u0641"],normalized:"add"},remove:{primary:"\u0627\u062D\u0630\u0641",alternatives:["\u0623\u0632\u0644","\u0627\u0645\u0633\u062D"],normalized:"remove"},put:{primary:"\u0636\u0639",alternatives:["\u0627\u062C\u0639\u0644"],normalized:"put"},append:{primary:"\u0623\u0644\u062D\u0642",normalized:"append"},prepend:{primary:"\u0633\u0628\u0642",normalized:"prepend"},take:{primary:"\u062E\u0630",normalized:"take"},make:{primary:"\u0627\u0635\u0646\u0639",alternatives:["\u0623\u0646\u0634\u0626"],normalized:"make"},clone:{primary:"\u0627\u0633\u062A\u0646\u0633\u062E",normalized:"clone"},swap:{primary:"\u0627\u0633\u062A\u0628\u062F\u0644",alternatives:["\u062A\u0628\u0627\u062F\u0644"],normalized:"swap"},morph:{primary:"\u062D\u0648\u0651\u0644",normalized:"morph"},set:{primary:"\u0627\u0636\u0628\u0637",alternatives:["\u0639\u064A\u0651\u0646","\u062D\u062F\u062F"],normalized:"set"},get:{primary:"\u0627\u062D\u0635\u0644",normalized:"get"},increment:{primary:"\u0632\u0650\u062F",alternatives:["\u0632\u062F","\u0627\u0631\u0641\u0639"],normalized:"increment"},decrement:{primary:"\u0623\u0646\u0642\u0635",alternatives:["\u0627\u0646\u0642\u0635","\u0642\u0644\u0644"],normalized:"decrement"},log:{primary:"\u0633\u062C\u0644",normalized:"log"},show:{primary:"\u0627\u0638\u0647\u0631",alternatives:["\u0623\u0638\u0647\u0631","\u0627\u0639\u0631\u0636"],normalized:"show"},hide:{primary:"\u0627\u062E\u0641",alternatives:["\u0623\u062E\u0641\u0650","\u0627\u062E\u0641\u064A","\u0623\u062E\u0641"],normalized:"hide"},transition:{primary:"\u0627\u0646\u062A\u0642\u0627\u0644",alternatives:["\u0627\u0646\u062A\u0642\u0644"],normalized:"transition"},on:{primary:"\u0639\u0644\u0649",alternatives:["\u0639\u0646\u062F","\u0644\u062F\u0649","\u062D\u064A\u0646"],normalized:"on"},trigger:{primary:"\u062A\u0634\u063A\u064A\u0644",alternatives:["\u0623\u0637\u0644\u0642","\u0641\u0639\u0651\u0644"],normalized:"trigger"},send:{primary:"\u0623\u0631\u0633\u0644",normalized:"send"},focus:{primary:"\u062A\u0631\u0643\u064A\u0632",alternatives:["\u0631\u0643\u0632"],normalized:"focus"},blur:{primary:"\u0636\u0628\u0627\u0628\u064A\u0629",alternatives:["\u0634\u0648\u0634"],normalized:"blur"},empty:{primary:"\u0625\u0641\u0631\u0627\u063A",alternatives:["\u0641\u0627\u0631\u063A"],normalized:"empty"},open:{primary:"\u0627\u0641\u062A\u062D",normalized:"open"},close:{primary:"\u0623\u063A\u0644\u0642",normalized:"close"},select:{primary:"\u0638\u0644\u0644",normalized:"select"},clear:{primary:"\u0646\u0638\u0651\u0641",normalized:"clear"},reset:{primary:"\u0625\u0639\u0627\u062F\u0629-\u0636\u0628\u0637",alternatives:["\u0623\u0639\u062F-\u062A\u0639\u064A\u064A\u0646"],normalized:"reset"},breakpoint:{primary:"\u0646\u0642\u0637\u0629-\u062A\u0648\u0642\u0641",normalized:"breakpoint"},go:{primary:"\u0627\u0630\u0647\u0628",normalized:"go"},scroll:{primary:"\u0645\u0631\u0631",alternatives:["\u062A\u0645\u0631\u064A\u0631"],normalized:"scroll"},push:{primary:"\u0627\u062F\u0641\u0639",alternatives:["\u062F\u0641\u0639"],normalized:"push"},replace:{primary:"\u0627\u0633\u062A\u0628\u062F\u0644_\u0639\u0646\u0648\u0627\u0646",alternatives:["\u0623\u0639\u062F_\u062A\u0639\u064A\u064A\u0646_\u0639\u0646\u0648\u0627\u0646"],normalized:"replace"},process:{primary:"\u0639\u0627\u0644\u062C",alternatives:["\u0645\u0639\u0627\u0644\u062C\u0629"],normalized:"process"},wait:{primary:"\u0627\u0646\u062A\u0638\u0631",normalized:"wait"},fetch:{primary:"\u0627\u062D\u0636\u0631",alternatives:["\u062C\u0644\u0628"],normalized:"fetch"},settle:{primary:"\u0627\u0633\u062A\u0642\u0631",normalized:"settle"},if:{primary:"\u0625\u0630\u0627",normalized:"if"},unless:{primary:"\u0625\u0644\u0627",normalized:"unless"},when:{primary:"\u0639\u0646\u062F\u0645\u0627",normalized:"when"},where:{primary:"\u0623\u064A\u0646",normalized:"where"},else:{primary:"\u0648\u0625\u0644\u0627",alternatives:["\u062E\u0644\u0627\u0641 \u0630\u0644\u0643"],normalized:"else"},repeat:{primary:"\u0643\u0631\u0631",normalized:"repeat"},for:{primary:"\u0644\u0643\u0644",normalized:"for"},while:{primary:"\u0628\u064A\u0646\u0645\u0627",normalized:"while"},forever:{primary:"forever",normalized:"forever"},continue:{primary:"\u0648\u0627\u0635\u0644",normalized:"continue"},halt:{primary:"\u0623\u0648\u0642\u0641",normalized:"halt"},throw:{primary:"\u0627\u0631\u0645",alternatives:["\u0627\u0631\u0645\u0650"],normalized:"throw"},call:{primary:"\u0627\u0633\u062A\u062F\u0639",alternatives:["\u0646\u0627\u062F\u0650"],normalized:"call"},return:{primary:"\u0627\u0631\u062C\u0639",alternatives:["\u0639\u064F\u062F"],normalized:"return"},then:{primary:"\u062B\u0645",alternatives:["\u0628\u0639\u062F\u0647\u0627","\u062B\u0645\u0651"],normalized:"then"},and:{primary:"\u0648\u0623\u064A\u0636\u0627\u064B",alternatives:["\u0623\u064A\u0636\u0627\u064B"],normalized:"and"},end:{primary:"\u0646\u0647\u0627\u064A\u0629",alternatives:["\u0627\u0646\u062A\u0647\u0649","\u0627\u0644\u0646\u0647\u0627\u064A\u0629"],normalized:"end"},js:{primary:"\u062C\u0627\u0641\u0627\u0633\u0643\u0631\u0628\u062A",alternatives:["js"],normalized:"js"},async:{primary:"\u0645\u062A\u0632\u0627\u0645\u0646",normalized:"async"},tell:{primary:"\u0623\u062E\u0628\u0631",normalized:"tell"},default:{primary:"\u0627\u0641\u062A\u0631\u0627\u0636\u064A",normalized:"default"},init:{primary:"\u062A\u0647\u064A\u0626\u0629",alternatives:["\u0628\u062F\u0621"],normalized:"init"},behavior:{primary:"\u0633\u0644\u0648\u0643",normalized:"behavior"},install:{primary:"\u062A\u062B\u0628\u064A\u062A",alternatives:["\u062B\u0628\u0651\u062A"],normalized:"install"},measure:{primary:"\u0642\u064A\u0627\u0633",alternatives:["\u0642\u0650\u0633","\u0642\u0633"],normalized:"measure"},beep:{primary:"\u0635\u0641\u0651\u0631",normalized:"beep"},break:{primary:"\u062A\u0648\u0642\u0641",normalized:"break"},copy:{primary:"\u0627\u0646\u0633\u062E",normalized:"copy"},exit:{primary:"\u0627\u062E\u0631\u062C",normalized:"exit"},pick:{primary:"\u0627\u062E\u062A\u0631",normalized:"pick"},render:{primary:"\u0627\u0631\u0633\u0645",normalized:"render"},into:{primary:"\u0641\u064A",alternatives:["\u0625\u0644\u0649"],normalized:"into"},before:{primary:"\u0642\u0628\u0644",normalized:"before"},after:{primary:"\u0628\u0639\u062F",normalized:"after"},until:{primary:"\u062D\u062A\u0649",normalized:"until"},event:{primary:"\u062D\u062F\u062B",normalized:"event"},from:{primary:"\u0645\u0646",normalized:"from"},connect:{primary:"\u0627\u062A\u0635\u0644",alternatives:["\u0627\u062A\u0635\u0627\u0644"],normalized:"connect"},stream:{primary:"\u062A\u062F\u0641\u0642",alternatives:["\u0628\u062B"],normalized:"stream"},live:{primary:"\u0645\u0628\u0627\u0634\u0631",alternatives:["\u062D\u064A"],normalized:"live"},socket:{primary:"\u0645\u0642\u0628\u0633",alternatives:["websocket"],normalized:"socket"},bind:{primary:"\u0627\u0631\u0628\u0637",alternatives:["\u0631\u0628\u0637","bind"],normalized:"bind"},intercept:{primary:"\u0627\u0639\u062A\u0631\u0636",alternatives:["\u0627\u0639\u062A\u0631\u0627\u0636","intercept"],normalized:"intercept"},worker:{primary:"\u0639\u0627\u0645\u0644",alternatives:["worker"],normalized:"worker"},eventsource:{primary:"eventsource",alternatives:["\u0645\u0635\u062F\u0631-\u0627\u0644\u0623\u062D\u062F\u0627\u062B"],normalized:"eventsource"}},tokenization:{prefixes:["\u0627\u0644","\u0648","\u0641","\u0628","\u0643","\u0644"]},eventHandler:{eventMarker:{primary:"\u0639\u0646\u062F",alternatives:["\u0641\u064A","\u0644\u062F\u0649","\u0639\u0646\u062F\u0645\u0627","\u062D\u064A\u0646","\u062D\u064A\u0646\u0645\u0627","\u0644\u0645\u0651\u0627","\u0644\u0645\u0627"],position:"before"},temporalMarkers:["\u0639\u0646\u062F\u0645\u0627","\u062D\u064A\u0646","\u0644\u0645\u0651\u0627"],negationMarker:{primary:"\u0639\u062F\u0645",alternatives:["\u0639\u062F\u0645"],position:"before"}}};var qe={code:"de",name:"German",nativeName:"Deutsch",regions:["western","priority"],direction:"ltr",script:"latin",wordOrder:"SVO",markingStrategy:"preposition",usesSpaces:!0,defaultVerbForm:"infinitive",verb:{position:"start",subjectDrop:!1},references:{me:"ich",it:"es",you:"du",result:"Ergebnis",event:"Ereignis",target:"Ziel",body:"K\xF6rper"},possessive:{marker:"",markerPosition:"before-property",usePossessiveAdjectives:!0,specialForms:{me:"mein",it:"sein",you:"dein"},keywords:{mein:"me",meine:"me",meinen:"me",dein:"you",deine:"you",deinen:"you",sein:"it",seine:"it",seinen:"it"}},roleMarkers:{destination:{primary:"auf",alternatives:["zu","in"],position:"before"},source:{primary:"von",alternatives:["aus"],position:"before"},patient:{primary:"",position:"before"},style:{primary:"mit",position:"before"}},keywords:{toggle:{primary:"umschalten",alternatives:["wechseln"],normalized:"toggle"},add:{primary:"hinzuf\xFCgen",normalized:"add"},remove:{primary:"entfernen",alternatives:["l\xF6schen"],normalized:"remove"},put:{primary:"setzen",alternatives:["stellen","platzieren"],normalized:"put"},append:{primary:"anh\xE4ngen",normalized:"append"},prepend:{primary:"voranstellen",normalized:"prepend"},take:{primary:"nehmen",normalized:"take"},make:{primary:"machen",alternatives:["erstellen","erzeugen"],normalized:"make"},clone:{primary:"klonen",alternatives:["duplizieren"],normalized:"clone"},swap:{primary:"austauschen",alternatives:["tauschen","vertauschen"],normalized:"swap"},morph:{primary:"verwandeln",alternatives:["transformieren"],normalized:"morph"},set:{primary:"festlegen",alternatives:["definieren"],normalized:"set"},get:{primary:"holen",alternatives:["bekommen","erhalten"],normalized:"get"},increment:{primary:"erh\xF6hen",normalized:"increment"},decrement:{primary:"verringern",alternatives:["vermindern"],normalized:"decrement"},log:{primary:"protokollieren",alternatives:["ausgeben"],normalized:"log"},show:{primary:"zeigen",alternatives:["anzeigen"],normalized:"show"},hide:{primary:"verbergen",alternatives:["verstecken"],normalized:"hide"},transition:{primary:"\xFCbergang",alternatives:["animieren"],normalized:"transition"},on:{primary:"bei",alternatives:["auf"],normalized:"on"},trigger:{primary:"ausl\xF6sen",normalized:"trigger"},send:{primary:"senden",alternatives:["schicken"],normalized:"send"},focus:{primary:"fokussieren",normalized:"focus"},blur:{primary:"defokussieren",alternatives:["entfokussieren"],normalized:"blur"},empty:{primary:"leeren",alternatives:["leer"],normalized:"empty"},open:{primary:"\xF6ffnen",alternatives:["oeffnen"],normalized:"open"},close:{primary:"schlie\xDFen",alternatives:["schliessen"],normalized:"close"},select:{primary:"markieren",normalized:"select"},clear:{primary:"bereinigen",normalized:"clear"},reset:{primary:"zur\xFCcksetzen",alternatives:["zuruecksetzen"],normalized:"reset"},breakpoint:{primary:"haltepunkt",normalized:"breakpoint"},go:{primary:"gehen",alternatives:["navigieren"],normalized:"go"},scroll:{primary:"scrollen",normalized:"scroll"},push:{primary:"dr\xFCcken",alternatives:["push"],normalized:"push"},replace:{primary:"ersetzen",normalized:"replace"},process:{primary:"verarbeiten",normalized:"process"},wait:{primary:"warten",normalized:"wait"},fetch:{primary:"abrufen",alternatives:["laden"],normalized:"fetch"},settle:{primary:"stabilisieren",normalized:"settle"},if:{primary:"falls",alternatives:["sofern"],normalized:"if"},unless:{primary:"wennnicht",normalized:"unless"},when:{primary:"wenn",normalized:"when"},where:{primary:"wo",normalized:"where"},else:{primary:"sonst",alternatives:["ansonsten"],normalized:"else"},repeat:{primary:"wiederholen",normalized:"repeat"},for:{primary:"f\xFCr",normalized:"for"},while:{primary:"solange",alternatives:["w\xE4hrend"],normalized:"while"},forever:{primary:"forever",normalized:"forever"},continue:{primary:"fortfahren",alternatives:["weiter"],normalized:"continue"},halt:{primary:"anhalten",alternatives:["stoppen"],normalized:"halt"},throw:{primary:"werfen",normalized:"throw"},call:{primary:"aufrufen",normalized:"call"},return:{primary:"zur\xFCckgeben",normalized:"return"},then:{primary:"dann",alternatives:["danach","anschlie\xDFend"],normalized:"then"},and:{primary:"und",alternatives:["sowie","auch"],normalized:"and"},is:{primary:"ist",normalized:"is"},end:{primary:"ende",alternatives:["fertig"],normalized:"end"},js:{primary:"js",alternatives:["javascript"],normalized:"js"},async:{primary:"asynchron",normalized:"async"},tell:{primary:"sagen",normalized:"tell"},default:{primary:"standard",normalized:"default"},init:{primary:"initialisieren",normalized:"init"},behavior:{primary:"verhalten",normalized:"behavior"},install:{primary:"installieren",normalized:"install"},measure:{primary:"messen",normalized:"measure"},beep:{primary:"piepton",normalized:"beep"},break:{primary:"unterbrechen",normalized:"break"},copy:{primary:"kopieren",normalized:"copy"},exit:{primary:"beenden",normalized:"exit"},pick:{primary:"ausw\xE4hlen",normalized:"pick"},render:{primary:"rendern",normalized:"render"},into:{primary:"hinein",normalized:"into"},before:{primary:"vor",normalized:"before"},after:{primary:"nach",normalized:"after"},click:{primary:"Klick",alternatives:["Klicken"],normalized:"click"},hover:{primary:"Hover",alternatives:["Schweben"],normalized:"hover"},submit:{primary:"Absenden",alternatives:["Senden"],normalized:"submit"},input:{primary:"Eingabe",normalized:"input"},change:{primary:"\xC4nderung",alternatives:["\xC4ndern"],normalized:"change"},resize:{primary:"gr\xF6\xDFe\xE4ndern",normalized:"resize"},until:{primary:"bis",normalized:"until"},event:{primary:"Ereignis",alternatives:["Event"],normalized:"event"},from:{primary:"von",alternatives:["aus"],normalized:"from"},connect:{primary:"verbinden",alternatives:["Verbindung"],normalized:"connect"},stream:{primary:"stream",alternatives:["Strom"],normalized:"stream"},live:{primary:"direkt",alternatives:["live","echtzeit"],normalized:"live"},socket:{primary:"socket",alternatives:["websocket"],normalized:"socket"},bind:{primary:"binden",alternatives:["verknuepfen","bind"],normalized:"bind"},intercept:{primary:"abfangen",alternatives:["intercept"],normalized:"intercept"},worker:{primary:"arbeiter",alternatives:["worker"],normalized:"worker"},eventsource:{primary:"eventsource",alternatives:["ereignisquelle"],normalized:"eventsource"}},eventHandler:{keyword:{primary:"bei",alternatives:["auf"],normalized:"on"},sourceMarker:{primary:"von",alternatives:["aus"],position:"before"},conditionalKeyword:{primary:"wenn",alternatives:["falls"]},eventMarker:{primary:"bei",alternatives:["beim"],position:"before"},temporalMarkers:["wenn","bei"]}};var Ee={code:"en",name:"English",nativeName:"English",regions:["western","priority"],direction:"ltr",script:"latin",wordOrder:"SVO",markingStrategy:"preposition",usesSpaces:!0,defaultVerbForm:"base",verb:{position:"start",subjectDrop:!1},references:{me:"me",it:"it",you:"you",result:"result",event:"event",target:"target",body:"body"},possessive:{marker:"'s",markerPosition:"after-object",specialForms:{me:"my",it:"its",you:"your"},keywords:{my:"me",your:"you",its:"it"}},roleMarkers:{destination:{primary:"on",alternatives:["to","from"],position:"before"},source:{primary:"from",position:"before"},patient:{primary:"",position:"before"},style:{primary:"with",alternatives:["by","using"],position:"before"},responseType:{primary:"as",position:"before"},method:{primary:"via",alternatives:["using"],position:"before"}},keywords:{toggle:{primary:"toggle"},add:{primary:"add"},remove:{primary:"remove"},put:{primary:"put"},append:{primary:"append"},prepend:{primary:"prepend"},take:{primary:"take"},make:{primary:"make"},clone:{primary:"clone"},swap:{primary:"swap"},morph:{primary:"morph"},set:{primary:"set"},get:{primary:"get"},increment:{primary:"increment"},decrement:{primary:"decrement"},log:{primary:"log"},show:{primary:"show"},hide:{primary:"hide"},transition:{primary:"transition"},on:{primary:"on"},trigger:{primary:"trigger"},send:{primary:"send"},focus:{primary:"focus"},blur:{primary:"blur"},empty:{primary:"empty",normalized:"empty"},open:{primary:"open",normalized:"open"},close:{primary:"close",normalized:"close"},select:{primary:"select",normalized:"select"},clear:{primary:"clear",normalized:"clear"},reset:{primary:"reset",normalized:"reset"},breakpoint:{primary:"breakpoint",normalized:"breakpoint"},go:{primary:"go"},scroll:{primary:"scroll",normalized:"scroll"},push:{primary:"push",normalized:"push"},replace:{primary:"replace",normalized:"replace"},process:{primary:"process",normalized:"process"},wait:{primary:"wait"},fetch:{primary:"fetch"},settle:{primary:"settle"},if:{primary:"if"},when:{primary:"when",normalized:"when"},where:{primary:"where",normalized:"where"},else:{primary:"else"},repeat:{primary:"repeat"},for:{primary:"for"},while:{primary:"while"},continue:{primary:"continue"},halt:{primary:"halt"},throw:{primary:"throw"},call:{primary:"call"},return:{primary:"return"},then:{primary:"then"},and:{primary:"and"},end:{primary:"end"},js:{primary:"js"},async:{primary:"async"},tell:{primary:"tell"},default:{primary:"default"},init:{primary:"init"},behavior:{primary:"behavior"},install:{primary:"install"},measure:{primary:"measure"},beep:{primary:"beep"},break:{primary:"break"},copy:{primary:"copy"},exit:{primary:"exit"},pick:{primary:"pick"},render:{primary:"render"},into:{primary:"into"},before:{primary:"before"},after:{primary:"after"},until:{primary:"until"},event:{primary:"event"},from:{primary:"from"},connect:{primary:"connect",normalized:"connect"},stream:{primary:"stream",normalized:"stream"},live:{primary:"live",normalized:"live"},socket:{primary:"socket",alternatives:["websocket"],normalized:"socket"},bind:{primary:"bind",normalized:"bind"},eventsource:{primary:"eventsource",normalized:"eventsource"},worker:{primary:"worker",normalized:"worker"},intercept:{primary:"intercept",normalized:"intercept"}}};var Be={code:"es",name:"Spanish",nativeName:"Espa\xF1ol",regions:["western","priority"],direction:"ltr",script:"latin",wordOrder:"SVO",markingStrategy:"preposition",usesSpaces:!0,defaultVerbForm:"infinitive",verb:{position:"start",subjectDrop:!0},references:{me:"yo",it:"ello",you:"t\xFA",result:"resultado",event:"evento",target:"objetivo",body:"cuerpo"},possessive:{marker:"de",markerPosition:"before-property",usePossessiveAdjectives:!0,specialForms:{me:"mi",it:"su",you:"tu"},keywords:{mi:"me",tu:"you",su:"it"}},roleMarkers:{destination:{primary:"en",alternatives:["sobre","a"],position:"before"},source:{primary:"de",alternatives:["desde"],position:"before"},patient:{primary:"",position:"before"},style:{primary:"con",position:"before"}},keywords:{toggle:{primary:"alternar",alternatives:["conmutar","toggle"],normalized:"toggle"},add:{primary:"agregar",alternatives:["a\xF1adir"],normalized:"add"},remove:{primary:"quitar",alternatives:["eliminar","remover","sacar","borrar"],normalized:"remove"},put:{primary:"poner",alternatives:["colocar","pon"],normalized:"put"},append:{primary:"anexar",normalized:"append"},prepend:{primary:"anteponer",normalized:"prepend"},take:{primary:"tomar",normalized:"take"},make:{primary:"hacer",alternatives:["crear"],normalized:"make"},clone:{primary:"clonar",alternatives:["duplicar"],normalized:"clone"},swap:{primary:"intercambiar",alternatives:["permutar"],normalized:"swap"},morph:{primary:"transformar",alternatives:["convertir"],normalized:"morph"},set:{primary:"establecer",alternatives:["fijar","definir"],normalized:"set"},get:{primary:"obtener",alternatives:["conseguir"],normalized:"get"},increment:{primary:"incrementar",alternatives:["aumentar"],normalized:"increment"},decrement:{primary:"decrementar",alternatives:["disminuir"],normalized:"decrement"},log:{primary:"registrar",alternatives:["imprimir"],normalized:"log"},show:{primary:"mostrar",alternatives:["ense\xF1ar"],normalized:"show"},hide:{primary:"ocultar",alternatives:["esconder"],normalized:"hide"},transition:{primary:"transici\xF3n",alternatives:["animar"],normalized:"transition"},on:{primary:"en",alternatives:["al"],normalized:"on"},trigger:{primary:"disparar",alternatives:["activar"],normalized:"trigger"},send:{primary:"enviar",normalized:"send"},focus:{primary:"enfocar",alternatives:["enfoque"],normalized:"focus"},blur:{primary:"desenfocar",alternatives:["desenfoque"],normalized:"blur"},open:{primary:"abrir",normalized:"open"},close:{primary:"cerrar",normalized:"close"},select:{primary:"seleccionar",normalized:"select"},clear:{primary:"limpiar",normalized:"clear"},reset:{primary:"reiniciar",alternatives:["restablecer"],normalized:"reset"},breakpoint:{primary:"punto-interrupci\xF3n",alternatives:["punto-interrupcion"],normalized:"breakpoint"},click:{primary:"clic",alternatives:["hacer clic","click"],normalized:"click"},resize:{primary:"redimensionar",normalized:"resize"},hover:{primary:"sobrevolar",alternatives:["pasar por encima"],normalized:"hover"},submit:{primary:"env\xEDo",alternatives:["envio","someter"],normalized:"submit"},input:{primary:"entrada",alternatives:["introducir"],normalized:"input"},change:{primary:"cambio",alternatives:["cambiar"],normalized:"change"},load:{primary:"carga",alternatives:["cargar"],normalized:"load"},scroll:{primary:"desplazar",alternatives:["desplazamiento"],normalized:"scroll"},keydown:{primary:"tecla abajo",normalized:"keydown"},keyup:{primary:"tecla arriba",normalized:"keyup"},mouseover:{primary:"rat\xF3n encima",alternatives:["raton encima"],normalized:"mouseover"},mouseout:{primary:"rat\xF3n fuera",alternatives:["raton fuera"],normalized:"mouseout"},mousedown:{primary:"rat\xF3nabajo",normalized:"mousedown"},mouseup:{primary:"rat\xF3narriba",normalized:"mouseup"},go:{primary:"ir",alternatives:["navegar"],normalized:"go"},push:{primary:"empujar",alternatives:["push"],normalized:"push"},replace:{primary:"reemplazar",alternatives:["sustituir"],normalized:"replace"},process:{primary:"procesar",normalized:"process"},wait:{primary:"esperar",normalized:"wait"},fetch:{primary:"buscar",alternatives:["recuperar"],normalized:"fetch"},settle:{primary:"estabilizar",normalized:"settle"},if:{primary:"si",normalized:"if"},unless:{primary:"menos",alternatives:["a menos que","salvo"],normalized:"unless"},when:{primary:"cuando",normalized:"when"},where:{primary:"donde",normalized:"where"},else:{primary:"sino",alternatives:["de lo contrario"],normalized:"else"},repeat:{primary:"repetir",normalized:"repeat"},for:{primary:"para",normalized:"for"},while:{primary:"mientras",normalized:"while"},forever:{primary:"forever",normalized:"forever"},continue:{primary:"continuar",normalized:"continue"},halt:{primary:"detener",alternatives:["parar"],normalized:"halt"},throw:{primary:"lanzar",alternatives:["arrojar"],normalized:"throw"},call:{primary:"llamar",normalized:"call"},return:{primary:"retornar",alternatives:["devolver"],normalized:"return"},then:{primary:"entonces",alternatives:["luego"],normalized:"then"},and:{primary:"y",alternatives:["adem\xE1s","tambi\xE9n"],normalized:"and"},or:{primary:"o",normalized:"or"},not:{primary:"no",normalized:"not"},is:{primary:"es",normalized:"is"},exists:{primary:"existe",normalized:"exists"},empty:{primary:"vac\xEDo",alternatives:["vacio"],normalized:"empty"},end:{primary:"fin",alternatives:["final","terminar"],normalized:"end"},js:{primary:"js",normalized:"js"},async:{primary:"as\xEDncrono",alternatives:["asincrono"],normalized:"async"},tell:{primary:"decir",normalized:"tell"},default:{primary:"predeterminar",alternatives:["por defecto"],normalized:"default"},init:{primary:"iniciar",alternatives:["inicializar"],normalized:"init"},behavior:{primary:"comportamiento",normalized:"behavior"},install:{primary:"instalar",normalized:"install"},measure:{primary:"medir",normalized:"measure"},beep:{primary:"pitido",normalized:"beep"},break:{primary:"romper",normalized:"break"},copy:{primary:"copiar",normalized:"copy"},exit:{primary:"salir",normalized:"exit"},pick:{primary:"escoger",normalized:"pick"},render:{primary:"renderizar",normalized:"render"},first:{primary:"primero",alternatives:["primera"],normalized:"first"},last:{primary:"\xFAltimo",alternatives:["ultima"],normalized:"last"},next:{primary:"siguiente",normalized:"next"},previous:{primary:"anterior",normalized:"previous"},closest:{primary:"cercano",normalized:"closest"},parent:{primary:"padre",normalized:"parent"},into:{primary:"dentro",alternatives:["adentro","dentro de"],normalized:"into"},before:{primary:"antes",alternatives:["antes de"],normalized:"before"},after:{primary:"despu\xE9s",alternatives:["despues","despu\xE9s de","despues de"],normalized:"after"},out:{primary:"fuera",alternatives:["fuera de"],normalized:"out"},until:{primary:"hasta",alternatives:["hasta que"],normalized:"until"},event:{primary:"evento",normalized:"event"},from:{primary:"de",alternatives:["desde"],normalized:"from"},connect:{primary:"conectar",alternatives:["conectarse"],normalized:"connect"},stream:{primary:"transmitir",alternatives:["flujo"],normalized:"stream"},live:{primary:"en-vivo",alternatives:["vivo","directo"],normalized:"live"},socket:{primary:"socket",alternatives:["websocket"],normalized:"socket"},bind:{primary:"vincular",alternatives:["enlazar","bind"],normalized:"bind"},intercept:{primary:"interceptar",alternatives:["intercept"],normalized:"intercept"},worker:{primary:"trabajador",alternatives:["worker"],normalized:"worker"},eventsource:{primary:"eventsource",alternatives:["fuente-de-eventos"],normalized:"eventsource"}},eventHandler:{keyword:{primary:"al",alternatives:["cuando","en"],normalized:"on"},sourceMarker:{primary:"de",alternatives:["desde"],position:"before"},eventMarker:{primary:"al",alternatives:["cuando","en"],position:"before"},temporalMarkers:["cuando","al"]}};var De={code:"fr",name:"French",nativeName:"Fran\xE7ais",regions:["western","priority"],direction:"ltr",script:"latin",wordOrder:"SVO",markingStrategy:"preposition",usesSpaces:!0,defaultVerbForm:"infinitive",verb:{position:"start",subjectDrop:!1},references:{me:"moi",it:"il",you:"toi",result:"r\xE9sultat",event:"\xE9v\xE9nement",target:"cible",body:"corps"},possessive:{marker:"de",markerPosition:"before-property",usePossessiveAdjectives:!0,specialForms:{me:"ma",it:"sa",you:"ta"},keywords:{mon:"me",ma:"me",mes:"me",ton:"you",ta:"you",tes:"you",son:"it",sa:"it",ses:"it"}},roleMarkers:{destination:{primary:"sur",alternatives:["\xE0","dans"],position:"before"},source:{primary:"de",alternatives:["depuis"],position:"before"},patient:{primary:"",position:"before"},style:{primary:"avec",position:"before"}},keywords:{toggle:{primary:"basculer",alternatives:["alterner"],normalized:"toggle"},add:{primary:"ajouter",normalized:"add"},remove:{primary:"supprimer",alternatives:["enlever","retirer"],normalized:"remove"},put:{primary:"mettre",alternatives:["placer"],normalized:"put"},append:{primary:"annexer",normalized:"append"},prepend:{primary:"pr\xE9fixer",normalized:"prepend"},take:{primary:"prendre",normalized:"take"},make:{primary:"faire",alternatives:["cr\xE9er"],normalized:"make"},clone:{primary:"cloner",alternatives:["dupliquer"],normalized:"clone"},swap:{primary:"\xE9changer",alternatives:["permuter"],normalized:"swap"},morph:{primary:"transformer",alternatives:["m\xE9tamorphoser"],normalized:"morph"},set:{primary:"d\xE9finir",alternatives:["\xE9tablir"],normalized:"set"},get:{primary:"obtenir",normalized:"get"},increment:{primary:"incr\xE9menter",alternatives:["augmenter"],normalized:"increment"},decrement:{primary:"d\xE9cr\xE9menter",alternatives:["diminuer"],normalized:"decrement"},log:{primary:"enregistrer",alternatives:["journaliser"],normalized:"log"},show:{primary:"montrer",alternatives:["afficher"],normalized:"show"},hide:{primary:"cacher",alternatives:["masquer"],normalized:"hide"},transition:{primary:"transition",alternatives:["animer"],normalized:"transition"},on:{primary:"sur",alternatives:["lors"],normalized:"on"},trigger:{primary:"d\xE9clencher",normalized:"trigger"},send:{primary:"envoyer",normalized:"send"},focus:{primary:"focaliser",alternatives:["concentrer"],normalized:"focus"},blur:{primary:"d\xE9focaliser",normalized:"blur"},empty:{primary:"vider",alternatives:["vide"],normalized:"empty"},open:{primary:"ouvrir",normalized:"open"},close:{primary:"fermer",normalized:"close"},select:{primary:"s\xE9lectionner",alternatives:["selectionner"],normalized:"select"},clear:{primary:"effacer",normalized:"clear"},reset:{primary:"r\xE9initialiser",alternatives:["reinitialiser"],normalized:"reset"},breakpoint:{primary:"point-arr\xEAt",alternatives:["point-arret"],normalized:"breakpoint"},go:{primary:"aller",alternatives:["naviguer"],normalized:"go"},scroll:{primary:"d\xE9filer",alternatives:["faire-d\xE9filer"],normalized:"scroll"},push:{primary:"pousser",normalized:"push"},replace:{primary:"remplacer",normalized:"replace"},process:{primary:"traiter",normalized:"process"},wait:{primary:"attendre",normalized:"wait"},fetch:{primary:"chercher",alternatives:["r\xE9cup\xE9rer"],normalized:"fetch"},settle:{primary:"stabiliser",normalized:"settle"},if:{primary:"si",normalized:"if"},unless:{primary:"saufsi",normalized:"unless"},when:{primary:"quand",normalized:"when"},where:{primary:"o\xF9",normalized:"where"},else:{primary:"sinon",normalized:"else"},repeat:{primary:"r\xE9p\xE9ter",normalized:"repeat"},for:{primary:"pour",normalized:"for"},while:{primary:"pendant",normalized:"while"},forever:{primary:"forever",normalized:"forever"},continue:{primary:"continuer",normalized:"continue"},halt:{primary:"arr\xEAter",alternatives:["stopper"],normalized:"halt"},throw:{primary:"lancer",normalized:"throw"},call:{primary:"appeler",normalized:"call"},return:{primary:"retourner",alternatives:["renvoyer"],normalized:"return"},then:{primary:"puis",alternatives:["ensuite","alors"],normalized:"then"},and:{primary:"et",alternatives:["aussi","\xE9galement"],normalized:"and"},end:{primary:"fin",alternatives:["terminer","finir"],normalized:"end"},js:{primary:"js",normalized:"js"},async:{primary:"asynchrone",normalized:"async"},tell:{primary:"dire",normalized:"tell"},default:{primary:"d\xE9faut",normalized:"default"},init:{primary:"initialiser",normalized:"init"},behavior:{primary:"comportement",normalized:"behavior"},install:{primary:"installer",normalized:"install"},measure:{primary:"mesurer",normalized:"measure"},beep:{primary:"bip",normalized:"beep"},break:{primary:"interrompre",normalized:"break"},copy:{primary:"copier",normalized:"copy"},exit:{primary:"sortir",normalized:"exit"},pick:{primary:"choisir",normalized:"pick"},render:{primary:"rendu",normalized:"render"},into:{primary:"dans",normalized:"into"},before:{primary:"avant",normalized:"before"},after:{primary:"apr\xE8s",normalized:"after"},click:{primary:"clic",alternatives:["clique"],normalized:"click"},resize:{primary:"redimensionner",normalized:"resize"},hover:{primary:"survol",alternatives:["survoler"],normalized:"hover"},submit:{primary:"soumission",alternatives:["soumettre"],normalized:"submit"},input:{primary:"saisie",alternatives:["entr\xE9e"],normalized:"input"},change:{primary:"changement",alternatives:["modifier","changer"],normalized:"change"},load:{primary:"charger",alternatives:["chargement"],normalized:"load"},until:{primary:"jusqu'\xE0",alternatives:["jusque"],normalized:"until"},event:{primary:"\xE9v\xE9nement",normalized:"event"},from:{primary:"de",alternatives:["depuis"],normalized:"from"},connect:{primary:"connecter",alternatives:["connexion"],normalized:"connect"},stream:{primary:"flux",alternatives:["streaming"],normalized:"stream"},live:{primary:"en-direct",alternatives:["direct","vif"],normalized:"live"},socket:{primary:"socket",alternatives:["websocket"],normalized:"socket"},bind:{primary:"lier",alternatives:["relier","bind"],normalized:"bind"},intercept:{primary:"intercepter",alternatives:["intercept"],normalized:"intercept"},worker:{primary:"travailleur",alternatives:["worker"],normalized:"worker"},eventsource:{primary:"eventsource",alternatives:["source-d-evenements"],normalized:"eventsource"}},eventHandler:{keyword:{primary:"sur",alternatives:["lors"],normalized:"on"},sourceMarker:{primary:"de",alternatives:["depuis"],position:"before"},conditionalKeyword:{primary:"quand",alternatives:["lorsque"]},eventMarker:{primary:"au",alternatives:["lors du","lors de","sur"],position:"before"},temporalMarkers:["quand","lorsque"]}};var He={code:"id",name:"Indonesian",nativeName:"Bahasa Indonesia",regions:["priority"],direction:"ltr",script:"latin",wordOrder:"SVO",markingStrategy:"preposition",usesSpaces:!0,verb:{position:"start",subjectDrop:!0},references:{me:"saya",it:"itu",you:"anda",result:"hasil",event:"peristiwa",target:"target",body:"badan"},possessive:{marker:"",markerPosition:"after-object",usePossessiveAdjectives:!0,specialForms:{me:"saya",it:"nya",you:"anda"},keywords:{saya:"me",aku:"me",ku:"me",my:"me",anda:"you",kamu:"you",mu:"you",nya:"it",dia:"it",miliknya:"it"},connectors:["punya"]},roleMarkers:{destination:{primary:"pada",alternatives:["ke","di"],position:"before"},source:{primary:"dari",position:"before"},patient:{primary:"",position:"before"},style:{primary:"dengan",position:"before"}},keywords:{toggle:{primary:"alihkan",normalized:"toggle"},add:{primary:"tambah",alternatives:["tambahkan"],normalized:"add"},remove:{primary:"hapus",alternatives:["buang","hilangkan"],normalized:"remove"},put:{primary:"taruh",alternatives:["letakkan","masukkan"],normalized:"put"},append:{primary:"sisipkan",normalized:"append"},prepend:{primary:"awali",normalized:"prepend"},take:{primary:"ambil",normalized:"take"},make:{primary:"buat",alternatives:["bikin","ciptakan"],normalized:"make"},clone:{primary:"klon",alternatives:["tiru"],normalized:"clone"},swap:{primary:"tukar",alternatives:["ganti"],normalized:"swap"},morph:{primary:"ubah",alternatives:["transformasi"],normalized:"morph"},set:{primary:"atur",alternatives:["tetapkan"],normalized:"set"},get:{primary:"dapatkan",alternatives:["peroleh"],normalized:"get"},increment:{primary:"tingkatkan",alternatives:["naikkan"],normalized:"increment"},decrement:{primary:"turunkan",alternatives:["kurangi"],normalized:"decrement"},log:{primary:"catat",alternatives:["rekam","cetak"],normalized:"log"},show:{primary:"tampilkan",alternatives:["perlihatkan"],normalized:"show"},hide:{primary:"sembunyikan",alternatives:["tutup"],normalized:"hide"},transition:{primary:"transisi",alternatives:["animasikan"],normalized:"transition"},on:{primary:"pada",alternatives:["saat"],normalized:"on"},trigger:{primary:"picu",alternatives:["jalankan"],normalized:"trigger"},send:{primary:"kirim",alternatives:["kirimkan"],normalized:"send"},focus:{primary:"fokus",alternatives:["fokuskan"],normalized:"focus"},blur:{primary:"blur",normalized:"blur"},empty:{primary:"kosongkan",alternatives:["kosong"],normalized:"empty"},open:{primary:"buka",normalized:"open"},close:{primary:"tutupkan",normalized:"close"},select:{primary:"tandai",normalized:"select"},clear:{primary:"bersihkan",normalized:"clear"},reset:{primary:"setel-ulang",alternatives:["reset"],normalized:"reset"},breakpoint:{primary:"titik-henti",normalized:"breakpoint"},go:{primary:"pergi",alternatives:["pindah","navigasi"],normalized:"go"},scroll:{primary:"gulir",alternatives:["gulung"],normalized:"scroll"},push:{primary:"dorong",alternatives:["push"],normalized:"push"},replace:{primary:"ganti_url",alternatives:["gantikan_url"],normalized:"replace"},process:{primary:"proses",normalized:"process"},wait:{primary:"tunggu",normalized:"wait"},fetch:{primary:"muat",normalized:"fetch"},settle:{primary:"stabilkan",normalized:"settle"},if:{primary:"jika",alternatives:["kalau","bila"],normalized:"if"},unless:{primary:"kecuali",normalized:"unless"},when:{primary:"ketika",normalized:"when"},where:{primary:"di_mana",normalized:"where"},else:{primary:"selainnya",alternatives:["lainnya"],normalized:"else"},repeat:{primary:"ulangi",normalized:"repeat"},for:{primary:"untuk",normalized:"for"},while:{primary:"selama",normalized:"while"},forever:{primary:"forever",normalized:"forever"},continue:{primary:"lanjutkan",alternatives:["terus"],normalized:"continue"},halt:{primary:"hentikan",alternatives:["berhenti"],normalized:"halt"},throw:{primary:"lempar",normalized:"throw"},call:{primary:"panggil",normalized:"call"},return:{primary:"kembalikan",alternatives:["kembali"],normalized:"return"},then:{primary:"lalu",alternatives:["kemudian","setelah itu"],normalized:"then"},and:{primary:"dan",alternatives:["juga","serta"],normalized:"and"},end:{primary:"selesai",alternatives:["akhir","tamat"],normalized:"end"},js:{primary:"js",alternatives:["javascript"],normalized:"js"},async:{primary:"asinkron",normalized:"async"},tell:{primary:"katakan",alternatives:["beritahu"],normalized:"tell"},default:{primary:"bawaan",normalized:"default"},init:{primary:"inisialisasi",alternatives:["mulai"],normalized:"init"},behavior:{primary:"perilaku",normalized:"behavior"},install:{primary:"pasang",alternatives:["instal"],normalized:"install"},measure:{primary:"ukur",normalized:"measure"},beep:{primary:"bunyi",normalized:"beep"},break:{primary:"putuskan",normalized:"break"},copy:{primary:"salin",normalized:"copy"},exit:{primary:"keluar",normalized:"exit"},pick:{primary:"pilih",normalized:"pick"},render:{primary:"olah",normalized:"render"},into:{primary:"ke dalam",normalized:"into"},before:{primary:"sebelum",normalized:"before"},after:{primary:"sesudah",alternatives:["setelah"],normalized:"after"},click:{primary:"klik",alternatives:["tekan"],normalized:"click"},hover:{primary:"hover",alternatives:["arahkan"],normalized:"hover"},submit:{primary:"ajukan",normalized:"submit"},input:{primary:"masuk",alternatives:["input","masukan"],normalized:"input"},change:{primary:"berubah",normalized:"change"},until:{primary:"sampai",normalized:"until"},event:{primary:"peristiwa",alternatives:["event"],normalized:"event"},from:{primary:"dari",normalized:"from"},connect:{primary:"sambungkan",alternatives:["hubungkan","koneksi"],normalized:"connect"},stream:{primary:"alirkan",alternatives:["streaming"],normalized:"stream"},live:{primary:"langsung",alternatives:["live"],normalized:"live"},socket:{primary:"soket",alternatives:["socket","websocket"],normalized:"socket"},bind:{primary:"ikat",alternatives:["kaitkan","bind"],normalized:"bind"},intercept:{primary:"cegat",alternatives:["tangkap","intercept"],normalized:"intercept"},worker:{primary:"pekerja",alternatives:["worker"],normalized:"worker"},eventsource:{primary:"eventsource",alternatives:["sumber peristiwa"],normalized:"eventsource"}},eventHandler:{keyword:{primary:"pada",alternatives:["ketika","saat"],normalized:"on"},sourceMarker:{primary:"dari",position:"before"},conditionalKeyword:{primary:"ketika",alternatives:["saat","waktu"]},eventMarker:{primary:"saat",alternatives:["ketika","pada"],position:"before"},temporalMarkers:["ketika","saat"]}};var Fe={code:"ja",name:"Japanese",nativeName:"\u65E5\u672C\u8A9E",regions:["east-asian","priority"],direction:"ltr",script:"cjk",wordOrder:"SOV",markingStrategy:"particle",usesSpaces:!1,defaultVerbForm:"base",verb:{position:"end",suffixes:["\u308B","\u3066","\u305F","\u307E\u3059","\u306A\u3044"],subjectDrop:!0},references:{me:"\u81EA\u5206",it:"\u305D\u308C",you:"\u3042\u306A\u305F",result:"\u7D50\u679C",event:"\u30A4\u30D9\u30F3\u30C8",target:"\u30BF\u30FC\u30B2\u30C3\u30C8",body:"\u30DC\u30C7\u30A3"},possessive:{marker:"\u306E",markerPosition:"between",keywords:{\u79C1\u306E:"me",\u3042\u306A\u305F\u306E:"you",\u305D\u306E:"it"}},roleMarkers:{patient:{primary:"\u3092",position:"after"},destination:{primary:"\u306B",alternatives:["\u3078","\u3067","\u306E"],position:"after"},source:{primary:"\u304B\u3089",position:"after"},style:{primary:"\u3067",position:"after"},event:{primary:"\u3092",position:"after"}},keywords:{toggle:{primary:"\u5207\u308A\u66FF\u3048",alternatives:["\u5207\u308A\u66FF\u3048\u308B","\u30C8\u30B0\u30EB","\u30C8\u30B0\u30EB\u3059\u308B"],normalized:"toggle"},add:{primary:"\u8FFD\u52A0",alternatives:["\u8FFD\u52A0\u3059\u308B","\u52A0\u3048\u308B"],normalized:"add"},remove:{primary:"\u524A\u9664",alternatives:["\u524A\u9664\u3059\u308B","\u53D6\u308A\u9664\u304F"],normalized:"remove"},put:{primary:"\u7F6E\u304F",alternatives:["\u5165\u308C\u308B"],normalized:"put"},append:{primary:"\u672B\u5C3E\u8FFD\u52A0",alternatives:["\u672B\u5C3E\u306B\u8FFD\u52A0","\u30A2\u30DA\u30F3\u30C9"],normalized:"append"},prepend:{primary:"\u5148\u982D\u8FFD\u52A0",alternatives:["\u5148\u982D\u306B\u8FFD\u52A0","\u30D7\u30EA\u30DA\u30F3\u30C9"],normalized:"prepend"},take:{primary:"\u53D6\u308B",normalized:"take"},make:{primary:"\u4F5C\u308B",alternatives:["\u4F5C\u6210"],normalized:"make"},clone:{primary:"\u8907\u88FD",alternatives:["\u30AF\u30ED\u30FC\u30F3"],normalized:"clone"},swap:{primary:"\u4EA4\u63DB",alternatives:["\u30B9\u30EF\u30C3\u30D7","\u5165\u308C\u66FF\u3048"],normalized:"swap"},morph:{primary:"\u5909\u5F62",alternatives:["\u30E2\u30FC\u30D5","\u5909\u63DB"],normalized:"morph"},set:{primary:"\u8A2D\u5B9A",alternatives:["\u8A2D\u5B9A\u3059\u308B"],normalized:"set"},get:{primary:"\u53D6\u5F97",alternatives:["\u53D6\u5F97\u3059\u308B","\u30B2\u30C3\u30C8"],normalized:"get"},increment:{primary:"\u5897\u52A0",alternatives:["\u5897\u3084\u3059","\u30A4\u30F3\u30AF\u30EA\u30E1\u30F3\u30C8"],normalized:"increment"},decrement:{primary:"\u6E1B\u5C11",alternatives:["\u6E1B\u3089\u3059","\u30C7\u30AF\u30EA\u30E1\u30F3\u30C8"],normalized:"decrement"},log:{primary:"\u8A18\u9332",alternatives:["\u30ED\u30B0","\u51FA\u529B"],normalized:"log"},show:{primary:"\u8868\u793A",alternatives:["\u8868\u793A\u3059\u308B","\u898B\u305B\u308B"],normalized:"show"},hide:{primary:"\u96A0\u3059",alternatives:["\u975E\u8868\u793A","\u975E\u8868\u793A\u306B\u3059\u308B"],normalized:"hide"},transition:{primary:"\u9077\u79FB",alternatives:["\u30C8\u30E9\u30F3\u30B8\u30B7\u30E7\u30F3","\u30A2\u30CB\u30E1\u30FC\u30B7\u30E7\u30F3"],normalized:"transition"},on:{primary:"\u3067",alternatives:["\u6642"],normalized:"on"},trigger:{primary:"\u5F15\u304D\u91D1",alternatives:["\u767A\u706B","\u30C8\u30EA\u30AC\u30FC"],normalized:"trigger"},send:{primary:"\u9001\u308B",alternatives:["\u9001\u4FE1"],normalized:"send"},focus:{primary:"\u30D5\u30A9\u30FC\u30AB\u30B9",alternatives:["\u96C6\u4E2D"],normalized:"focus"},blur:{primary:"\u307C\u304B\u3057",alternatives:["\u30D5\u30A9\u30FC\u30AB\u30B9\u89E3\u9664","\u30D6\u30E9\u30FC"],normalized:"blur"},empty:{primary:"\u7A7A\u306B",alternatives:["\u7A7A\u306B\u3059\u308B"],normalized:"empty"},open:{primary:"\u958B\u304F",alternatives:["\u30AA\u30FC\u30D7\u30F3"],normalized:"open"},close:{primary:"\u9589\u3058\u308B",alternatives:["\u30AF\u30ED\u30FC\u30BA"],normalized:"close"},select:{primary:"\u9078\u3076",alternatives:["\u30BB\u30EC\u30AF\u30C8"],normalized:"select"},clear:{primary:"\u30AF\u30EA\u30A2",alternatives:["\u6D88\u53BB"],normalized:"clear"},reset:{primary:"\u30EA\u30BB\u30C3\u30C8",alternatives:["\u518D\u8A2D\u5B9A"],normalized:"reset"},breakpoint:{primary:"\u30D6\u30EC\u30FC\u30AF\u30DD\u30A4\u30F3\u30C8",normalized:"breakpoint"},go:{primary:"\u79FB\u52D5",alternatives:["\u884C\u304F","\u30CA\u30D3\u30B2\u30FC\u30C8"],normalized:"go"},scroll:{primary:"\u30B9\u30AF\u30ED\u30FC\u30EB",normalized:"scroll"},push:{primary:"\u30D7\u30C3\u30B7\u30E5",normalized:"push"},replace:{primary:"\u7F6E\u63DB",alternatives:["\u7F6E\u304D\u63DB\u3048"],normalized:"replace"},process:{primary:"\u51E6\u7406",normalized:"process"},wait:{primary:"\u5F85\u3064",alternatives:["\u5F85\u6A5F"],normalized:"wait"},fetch:{primary:"\u30D5\u30A7\u30C3\u30C1",normalized:"fetch"},settle:{primary:"\u5B89\u5B9A",alternatives:["\u843D\u3061\u7740\u304F"],normalized:"settle"},if:{primary:"\u3082\u3057",normalized:"if"},when:{primary:"\u3068\u304D",alternatives:["\u3068\u304D\u306B"],normalized:"when"},where:{primary:"\u3069\u3053",normalized:"where"},else:{primary:"\u305D\u3046\u3067\u306A\u3051\u308C\u3070",alternatives:["\u305D\u308C\u4EE5\u5916"],normalized:"else"},unless:{primary:"\u306A\u3044\u9650\u308A",normalized:"unless"},repeat:{primary:"\u7E70\u308A\u8FD4\u3057",alternatives:["\u7E70\u308A\u8FD4\u3059","\u30EA\u30D4\u30FC\u30C8"],normalized:"repeat"},for:{primary:"\u305F\u3081\u306B",alternatives:["\u5404"],normalized:"for"},while:{primary:"\u306E\u9593",alternatives:["\u9593"],normalized:"while"},forever:{primary:"forever",normalized:"forever"},continue:{primary:"\u7D9A\u3051\u308B",alternatives:["\u7D99\u7D9A"],normalized:"continue"},halt:{primary:"\u505C\u6B62",alternatives:["\u6B62\u3081\u308B","\u30CF\u30EB\u30C8"],normalized:"halt"},throw:{primary:"\u6295\u3052\u308B",alternatives:["\u30B9\u30ED\u30FC"],normalized:"throw"},call:{primary:"\u547C\u3073\u51FA\u3057",alternatives:["\u30B3\u30FC\u30EB","\u547C\u3076"],normalized:"call"},return:{primary:"\u623B\u308B",alternatives:["\u8FD4\u3059","\u30EA\u30BF\u30FC\u30F3"],normalized:"return"},then:{primary:"\u305D\u308C\u304B\u3089",alternatives:["\u6B21\u306B","\u306A\u3089\u3070","\u306A\u3089"],normalized:"then"},and:{primary:"\u307E\u305F",alternatives:["\u3068","\u305D\u3057\u3066"],normalized:"and"},end:{primary:"\u7D42\u308F\u308A",alternatives:["\u304A\u308F\u308A"],normalized:"end"},js:{primary:"JS\u5B9F\u884C",alternatives:["js"],normalized:"js"},async:{primary:"\u975E\u540C\u671F",alternatives:["\u30A2\u30B7\u30F3\u30AF"],normalized:"async"},tell:{primary:"\u4F1D\u3048\u308B",alternatives:["\u30C6\u30EB"],normalized:"tell"},default:{primary:"\u65E2\u5B9A",alternatives:["\u30C7\u30D5\u30A9\u30EB\u30C8"],normalized:"default"},init:{primary:"\u521D\u671F\u5316",alternatives:["\u30A4\u30CB\u30C3\u30C8"],normalized:"init"},behavior:{primary:"\u632F\u308B\u821E\u3044",alternatives:["\u30D3\u30D8\u30A4\u30D3\u30A2"],normalized:"behavior"},install:{primary:"\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB",alternatives:["\u5C0E\u5165"],normalized:"install"},measure:{primary:"\u6E2C\u5B9A",alternatives:["\u8A08\u6E2C","\u30E1\u30B8\u30E3\u30FC"],normalized:"measure"},beep:{primary:"\u30D3\u30FC\u30D7",normalized:"beep"},break:{primary:"\u4E2D\u65AD",normalized:"break"},copy:{primary:"\u30B3\u30D4\u30FC",normalized:"copy"},exit:{primary:"\u9000\u51FA",normalized:"exit"},pick:{primary:"\u9078\u629E",normalized:"pick"},render:{primary:"\u63CF\u753B",normalized:"render"},into:{primary:"\u3078",alternatives:["\u306B"],normalized:"into"},before:{primary:"\u524D\u306B",alternatives:["\u524D"],normalized:"before"},after:{primary:"\u5F8C\u306B",alternatives:["\u5F8C"],normalized:"after"},until:{primary:"\u307E\u3067",alternatives:["\u8FC4"],normalized:"until"},event:{primary:"\u30A4\u30D9\u30F3\u30C8",alternatives:["\u4E8B\u8C61"],normalized:"event"},from:{primary:"\u304B\u3089",normalized:"from"},connect:{primary:"\u63A5\u7D9A",alternatives:["\u63A5\u7D9A\u3059\u308B"],normalized:"connect"},stream:{primary:"\u30B9\u30C8\u30EA\u30FC\u30E0",alternatives:["\u914D\u4FE1"],normalized:"stream"},live:{primary:"\u30E9\u30A4\u30D6",alternatives:["\u5B9F\u6642\u9593"],normalized:"live"},socket:{primary:"\u30BD\u30B1\u30C3\u30C8",alternatives:["websocket"],normalized:"socket"},bind:{primary:"\u30D0\u30A4\u30F3\u30C9",alternatives:["\u7D50\u3073\u3064\u3051\u308B","bind"],normalized:"bind"},intercept:{primary:"\u30A4\u30F3\u30BF\u30FC\u30BB\u30D7\u30C8",alternatives:["\u508D\u53D7","intercept"],normalized:"intercept"},worker:{primary:"\u30EF\u30FC\u30AB\u30FC",alternatives:["worker"],normalized:"worker"},eventsource:{primary:"eventsource",alternatives:["\u30A4\u30D9\u30F3\u30C8\u30BD\u30FC\u30B9"],normalized:"eventsource"}},tokenization:{particles:["\u3092","\u306B","\u3067","\u304B\u3089","\u306E","\u304C","\u306F","\u3082","\u3078","\u3068"],boundaryStrategy:"particle"},eventHandler:{eventMarker:{primary:"\u3067",position:"after"},temporalMarkers:["\u6642","\u3068\u304D"]}};var Ue={code:"ko",name:"Korean",nativeName:"\uD55C\uAD6D\uC5B4",regions:["east-asian","priority"],direction:"ltr",script:"hangul",wordOrder:"SOV",markingStrategy:"particle",usesSpaces:!0,verb:{position:"end",suffixes:["\uB2E4","\uC694","\uB2C8\uB2E4","\uC138\uC694"],subjectDrop:!0},references:{me:"\uB098",it:"\uADF8\uAC83",you:"\uB108",result:"\uACB0\uACFC",event:"\uC774\uBCA4\uD2B8",target:"\uB300\uC0C1",body:"\uBC14\uB514"},possessive:{marker:"\uC758",markerPosition:"between",specialForms:{me:"\uB0B4",it:"\uADF8\uAC83\uC758",you:"\uB124"},keywords:{\uB0B4:"me",\uB124:"you",\uADF8\uC758:"it"}},roleMarkers:{patient:{primary:"\uC744",alternatives:["\uB97C"],position:"after"},destination:{primary:"\uC5D0",alternatives:["\uC73C\uB85C","\uB85C","\uC758"],position:"after"},source:{primary:"\uC5D0\uC11C",alternatives:["\uBD80\uD130"],position:"after"},style:{primary:"\uB85C",alternatives:["\uC73C\uB85C"],position:"after"},event:{primary:"\uC744",alternatives:["\uB97C"],position:"after"}},keywords:{toggle:{primary:"\uD1A0\uAE00",normalized:"toggle"},add:{primary:"\uCD94\uAC00",normalized:"add"},remove:{primary:"\uC81C\uAC70",alternatives:["\uC0AD\uC81C"],normalized:"remove"},put:{primary:"\uB123\uB2E4",alternatives:["\uB123\uAE30","\uB193\uAE30"],normalized:"put"},append:{primary:"\uB367\uBD99\uC774\uB2E4",alternatives:["\uB05D\uC5D0\uCD94\uAC00"],normalized:"append"},prepend:{primary:"\uC55E\uC5D0\uCD94\uAC00",alternatives:["\uC120\uB450\uCD94\uAC00"],normalized:"prepend"},take:{primary:"\uAC00\uC838\uC624\uB2E4",normalized:"take"},make:{primary:"\uB9CC\uB4E4\uB2E4",normalized:"make"},clone:{primary:"\uBCF5\uC81C",normalized:"clone"},swap:{primary:"\uAD50\uD658",alternatives:["\uBC14\uAFB8\uB2E4"],normalized:"swap"},morph:{primary:"\uBCC0\uD615",alternatives:["\uBCC0\uD658"],normalized:"morph"},set:{primary:"\uC124\uC815",normalized:"set"},get:{primary:"\uC5BB\uB2E4",normalized:"get"},increment:{primary:"\uC99D\uAC00",normalized:"increment"},decrement:{primary:"\uAC10\uC18C",normalized:"decrement"},log:{primary:"\uB85C\uADF8",normalized:"log"},show:{primary:"\uBCF4\uC774\uB2E4",alternatives:["\uD45C\uC2DC","\uBCF4\uC774\uAE30"],normalized:"show"},hide:{primary:"\uC228\uAE30\uB2E4",alternatives:["\uC228\uAE30\uAE30"],normalized:"hide"},transition:{primary:"\uD2B8\uB79C\uC9C0\uC158",alternatives:["\uC804\uD658"],normalized:"transition"},on:{primary:"\uC5D0",alternatives:["\uC2DC","\uD560 \uB54C"],normalized:"on"},trigger:{primary:"\uD2B8\uB9AC\uAC70",normalized:"trigger"},send:{primary:"\uBCF4\uB0B4\uB2E4",normalized:"send"},focus:{primary:"\uD3EC\uCEE4\uC2A4",normalized:"focus"},blur:{primary:"\uBE14\uB7EC",normalized:"blur"},empty:{primary:"\uBE44\uC6B0\uAE30",normalized:"empty"},open:{primary:"\uC5F4\uAE30",normalized:"open"},close:{primary:"\uB2EB\uAE30",normalized:"close"},select:{primary:"\uACE0\uB974\uAE30",normalized:"select"},clear:{primary:"\uC9C0\uC6B0\uAE30",normalized:"clear"},reset:{primary:"\uC7AC\uC124\uC815",normalized:"reset"},breakpoint:{primary:"\uC911\uB2E8\uC810",normalized:"breakpoint"},click:{primary:"\uD074\uB9AD",normalized:"click"},hover:{primary:"\uD638\uBC84",normalized:"hover"},submit:{primary:"\uC81C\uCD9C",normalized:"submit"},input:{primary:"\uC785\uB825",normalized:"input"},change:{primary:"\uBCC0\uACBD",normalized:"change"},go:{primary:"\uC774\uB3D9",normalized:"go"},scroll:{primary:"\uC2A4\uD06C\uB864",normalized:"scroll"},push:{primary:"\uD478\uC2DC",normalized:"push"},replace:{primary:"\uAD50\uCCB4",alternatives:["\uBC14\uAFB8\uAE30"],normalized:"replace"},process:{primary:"\uCC98\uB9AC",normalized:"process"},wait:{primary:"\uB300\uAE30",normalized:"wait"},fetch:{primary:"\uD328\uCE58",alternatives:["\uAC00\uC838\uC624\uAE30"],normalized:"fetch"},settle:{primary:"\uC548\uC815",normalized:"settle"},if:{primary:"\uB9CC\uC57D",normalized:"if"},when:{primary:"\uB54C",normalized:"when"},where:{primary:"\uC5B4\uB514",normalized:"where"},else:{primary:"\uC544\uB2C8\uBA74",normalized:"else"},unless:{primary:"\uC544\uB2C8\uB77C\uBA74",normalized:"unless"},repeat:{primary:"\uBC18\uBCF5",normalized:"repeat"},for:{primary:"\uAC01\uAC01",normalized:"for"},while:{primary:"\uB3D9\uC548",normalized:"while"},forever:{primary:"forever",normalized:"forever"},continue:{primary:"\uACC4\uC18D",normalized:"continue"},halt:{primary:"\uC815\uC9C0",normalized:"halt"},throw:{primary:"\uB358\uC9C0\uB2E4",normalized:"throw"},call:{primary:"\uD638\uCD9C",normalized:"call"},return:{primary:"\uBC18\uD658",normalized:"return"},then:{primary:"\uADF8\uB2E4\uC74C",alternatives:["\uADF8\uB7F0\uD6C4"],normalized:"then"},and:{primary:"\uADF8\uB9AC\uACE0",alternatives:["\uB610\uD55C","\uBC0F"],normalized:"and"},matches:{primary:"\uC77C\uCE58",normalized:"matches"},end:{primary:"\uB05D",alternatives:["\uB9C8\uCE68"],normalized:"end"},js:{primary:"JS\uC2E4\uD589",alternatives:["js"],normalized:"js"},async:{primary:"\uBE44\uB3D9\uAE30",normalized:"async"},tell:{primary:"\uB9D0\uD558\uB2E4",normalized:"tell"},default:{primary:"\uAE30\uBCF8\uAC12",normalized:"default"},init:{primary:"\uCD08\uAE30\uD654",normalized:"init"},behavior:{primary:"\uB3D9\uC791",normalized:"behavior"},install:{primary:"\uC124\uCE58",normalized:"install"},measure:{primary:"\uCE21\uC815",normalized:"measure"},beep:{primary:"\uBE44\uD504",normalized:"beep"},break:{primary:"\uC911\uB2E8",normalized:"break"},copy:{primary:"\uBCF5\uC0AC",normalized:"copy"},exit:{primary:"\uB098\uAC00\uAE30",normalized:"exit"},pick:{primary:"\uC120\uD0DD",normalized:"pick"},render:{primary:"\uB80C\uB354\uB9C1",normalized:"render"},into:{primary:"\uC73C\uB85C",normalized:"into"},before:{primary:"\uC804\uC5D0",normalized:"before"},after:{primary:"\uD6C4\uC5D0",normalized:"after"},until:{primary:"\uAE4C\uC9C0",normalized:"until"},event:{primary:"\uC774\uBCA4\uD2B8",normalized:"event"},from:{primary:"\uC5D0\uC11C",normalized:"from"},connect:{primary:"\uC5F0\uACB0",alternatives:["\uC811\uC18D"],normalized:"connect"},stream:{primary:"\uC2A4\uD2B8\uB9BC",alternatives:["\uC2A4\uD2B8\uB9AC\uBC0D"],normalized:"stream"},live:{primary:"\uC2E4\uC2DC\uAC04",alternatives:["\uB77C\uC774\uBE0C"],normalized:"live"},socket:{primary:"\uC18C\uCF13",alternatives:["websocket"],normalized:"socket"},bind:{primary:"\uBC14\uC778\uB4DC",alternatives:["bind"],normalized:"bind"},intercept:{primary:"\uAC00\uB85C\uCC44\uAE30",alternatives:["\uC778\uD130\uC149\uD2B8","intercept"],normalized:"intercept"},worker:{primary:"\uC6CC\uCEE4",alternatives:["worker"],normalized:"worker"},eventsource:{primary:"eventsource",alternatives:["\uC774\uBCA4\uD2B8\uC18C\uC2A4"],normalized:"eventsource"}},tokenization:{particles:["\uC744","\uB97C","\uC774","\uAC00","\uC740","\uB294","\uC5D0","\uC5D0\uC11C","\uC73C\uB85C","\uB85C","\uC640","\uACFC","\uB3C4"],boundaryStrategy:"space"},eventHandler:{eventMarker:{primary:"\uD560 \uB54C",alternatives:["\uD560\uB54C","\uB54C","\uC5D0"],position:"after"},temporalMarkers:["\uD560 \uB54C","\uD560\uB54C","\uB54C"]}};var Ge={code:"pt",name:"Portuguese",nativeName:"Portugu\xEAs",regions:["western","priority"],direction:"ltr",script:"latin",wordOrder:"SVO",markingStrategy:"preposition",usesSpaces:!0,verb:{position:"start",subjectDrop:!0},references:{me:"eu",it:"ele",you:"voc\xEA",result:"resultado",event:"evento",target:"alvo",body:"corpo"},possessive:{marker:"de",markerPosition:"before-property",usePossessiveAdjectives:!0,specialForms:{me:"meu",it:"seu",you:"teu"},keywords:{meu:"me",minha:"me",teu:"you",tua:"you",seu:"it",sua:"it"}},roleMarkers:{destination:{primary:"em",alternatives:["para","a"],position:"before"},source:{primary:"de",alternatives:["desde"],position:"before"},patient:{primary:"",position:"before"},style:{primary:"com",position:"before"}},keywords:{toggle:{primary:"alternar",alternatives:[],normalized:"toggle"},add:{primary:"adicionar",alternatives:["acrescentar"],normalized:"add"},remove:{primary:"remover",alternatives:["eliminar","apagar"],normalized:"remove"},put:{primary:"colocar",alternatives:["p\xF4r","por"],normalized:"put"},append:{primary:"anexar",normalized:"append"},prepend:{primary:"preceder",normalized:"prepend"},take:{primary:"pegar",normalized:"take"},make:{primary:"fazer",alternatives:["criar"],normalized:"make"},clone:{primary:"clonar",alternatives:[],normalized:"clone"},swap:{primary:"trocar",alternatives:["substituir"],normalized:"swap"},morph:{primary:"transformar",alternatives:["converter"],normalized:"morph"},set:{primary:"definir",alternatives:["configurar"],normalized:"set"},get:{primary:"obter",normalized:"get"},increment:{primary:"incrementar",alternatives:["aumentar"],normalized:"increment"},decrement:{primary:"decrementar",alternatives:["diminuir"],normalized:"decrement"},log:{primary:"registrar",alternatives:["imprimir"],normalized:"log"},show:{primary:"mostrar",alternatives:["exibir"],normalized:"show"},hide:{primary:"ocultar",alternatives:["esconder"],normalized:"hide"},transition:{primary:"transi\xE7\xE3o",alternatives:["animar"],normalized:"transition"},on:{primary:"em",alternatives:["ao"],normalized:"on"},trigger:{primary:"disparar",alternatives:["ativar"],normalized:"trigger"},send:{primary:"enviar",normalized:"send"},focus:{primary:"focar",normalized:"focus"},blur:{primary:"desfocar",normalized:"blur"},empty:{primary:"esvaziar",alternatives:["vazio"],normalized:"empty"},open:{primary:"abrir",normalized:"open"},close:{primary:"fechar",normalized:"close"},select:{primary:"selecionar",normalized:"select"},clear:{primary:"limpar",normalized:"clear"},reset:{primary:"redefinir",alternatives:["resetar"],normalized:"reset"},breakpoint:{primary:"ponto-interrup\xE7\xE3o",alternatives:["ponto-interrupcao"],normalized:"breakpoint"},go:{primary:"ir",alternatives:["navegar"],normalized:"go"},scroll:{primary:"rolar",alternatives:["scroll"],normalized:"scroll"},push:{primary:"empurrar",alternatives:["push"],normalized:"push"},replace:{primary:"repor",alternatives:["recolocar"],normalized:"replace"},process:{primary:"processar",normalized:"process"},wait:{primary:"esperar",alternatives:["aguardar"],normalized:"wait"},fetch:{primary:"buscar",normalized:"fetch"},settle:{primary:"estabilizar",normalized:"settle"},if:{primary:"se",normalized:"if"},unless:{primary:"salvo",alternatives:["a_menos"],normalized:"unless"},when:{primary:"quando",normalized:"when"},where:{primary:"onde",normalized:"where"},else:{primary:"sen\xE3o",normalized:"else"},repeat:{primary:"repetir",normalized:"repeat"},for:{primary:"para",normalized:"for"},while:{primary:"enquanto",normalized:"while"},forever:{primary:"forever",normalized:"forever"},continue:{primary:"continuar",normalized:"continue"},halt:{primary:"parar",normalized:"halt"},throw:{primary:"lan\xE7ar",normalized:"throw"},call:{primary:"chamar",normalized:"call"},return:{primary:"retornar",alternatives:["devolver"],normalized:"return"},then:{primary:"ent\xE3o",alternatives:["logo"],normalized:"then"},and:{primary:"e",alternatives:["tamb\xE9m","al\xE9m disso"],normalized:"and"},end:{primary:"fim",alternatives:["final","t\xE9rmino"],normalized:"end"},js:{primary:"js",normalized:"js"},async:{primary:"ass\xEDncrono",normalized:"async"},tell:{primary:"dizer",normalized:"tell"},default:{primary:"padr\xE3o",normalized:"default"},init:{primary:"iniciar",alternatives:["inicializar"],normalized:"init"},behavior:{primary:"comportamento",normalized:"behavior"},install:{primary:"instalar",normalized:"install"},measure:{primary:"medir",normalized:"measure"},beep:{primary:"apitar",normalized:"beep"},break:{primary:"interromper",normalized:"break"},copy:{primary:"copiar",normalized:"copy"},exit:{primary:"sair",normalized:"exit"},pick:{primary:"escolher",normalized:"pick"},render:{primary:"renderizar",normalized:"render"},into:{primary:"dentro",alternatives:["dentro de"],normalized:"into"},before:{primary:"antes",normalized:"before"},after:{primary:"depois",normalized:"after"},click:{primary:"clique",alternatives:["clicar"],normalized:"click"},resize:{primary:"redimensionar",normalized:"resize"},hover:{primary:"sobrevoar",alternatives:["passar"],normalized:"hover"},submit:{primary:"envio",alternatives:["submeter"],normalized:"submit"},input:{primary:"entrada",alternatives:["inser\xE7\xE3o"],normalized:"input"},change:{primary:"altera\xE7\xE3o",alternatives:["mudan\xE7a"],normalized:"change"},mousedown:{primary:"mouseBaixo",normalized:"mousedown"},mouseup:{primary:"mouseCima",normalized:"mouseup"},until:{primary:"at\xE9",normalized:"until"},event:{primary:"evento",normalized:"event"},from:{primary:"de",alternatives:["desde"],normalized:"from"},connect:{primary:"conectar",alternatives:["conex\xE3o"],normalized:"connect"},stream:{primary:"transmitir",alternatives:["fluxo"],normalized:"stream"},live:{primary:"ao-vivo",alternatives:["vivo","direto"],normalized:"live"},socket:{primary:"soquete",alternatives:["websocket"],normalized:"socket"},bind:{primary:"vincular",alternatives:["ligar","bind"],normalized:"bind"},intercept:{primary:"interceptar",alternatives:["intercept"],normalized:"intercept"},worker:{primary:"trabalhador",alternatives:["worker"],normalized:"worker"},eventsource:{primary:"eventsource",alternatives:["fonte-de-eventos"],normalized:"eventsource"}},eventHandler:{keyword:{primary:"em",alternatives:["ao"],normalized:"on"},sourceMarker:{primary:"de",alternatives:["desde"],position:"before"},conditionalKeyword:{primary:"quando",alternatives:["se"]},eventMarker:{primary:"ao",alternatives:["no","em"],position:"before"},temporalMarkers:["quando","ao"]}};var Ye={code:"tr",name:"Turkish",nativeName:"T\xFCrk\xE7e",regions:["priority"],direction:"ltr",script:"latin",wordOrder:"SOV",markingStrategy:"case-suffix",usesSpaces:!0,markersOptional:!0,verb:{position:"end",suffixes:["mek","mak","yor","di","mi\u015F"],subjectDrop:!0},references:{me:"ben",it:"o",you:"sen",result:"sonu\xE7",event:"olay",target:"hedef",body:"g\xF6vde"},possessive:{marker:"\u0131n",markerPosition:"after-object",usePossessiveAdjectives:!0,specialForms:{me:"benim",it:"onun",you:"senin"},keywords:{benim:"me",senin:"you",onun:"it"}},roleMarkers:{patient:{primary:"i",alternatives:["\u0131","u","\xFC","yi","y\u0131","yu","y\xFC","ni","n\u0131","nu","n\xFC"],position:"after"},destination:{primary:"e",alternatives:["a","ye","ya","ne","na","de","da","te","ta","\u0131n","in","un","\xFCn","n\u0131n","nin","nun","n\xFCn"],position:"after"},source:{primary:"den",alternatives:["dan","ten","tan"],position:"after"},style:{primary:"le",alternatives:["la","yle","yla"],position:"after"},event:{primary:"i",alternatives:["\u0131","u","\xFC"],position:"after"}},keywords:{toggle:{primary:"de\u011Fi\u015Ftir",alternatives:["a\xE7/kapat"],normalized:"toggle"},add:{primary:"ekle",normalized:"add"},remove:{primary:"kald\u0131r",alternatives:["sil"],normalized:"remove"},put:{primary:"koy",normalized:"put"},append:{primary:"ili\u015Ftir",normalized:"append"},prepend:{primary:"ba\u015F\u0131naekle",normalized:"prepend"},take:{primary:"tut",normalized:"take"},make:{primary:"yap",normalized:"make"},clone:{primary:"klonla",normalized:"clone"},swap:{primary:"takas",normalized:"swap"},morph:{primary:"d\xF6n\xFC\u015Ft\xFCr",alternatives:["\u015Fekil de\u011Fi\u015Ftir"],normalized:"morph"},set:{primary:"ayarla",alternatives:["belirle"],normalized:"set"},get:{primary:"al",normalized:"get"},increment:{primary:"art\u0131r",normalized:"increment"},decrement:{primary:"azalt",normalized:"decrement"},log:{primary:"kaydet",normalized:"log"},show:{primary:"g\xF6ster",normalized:"show"},hide:{primary:"gizle",normalized:"hide"},transition:{primary:"ge\xE7i\u015F",normalized:"transition"},on:{primary:"\xFCzerinde",alternatives:["zaman"],normalized:"on"},trigger:{primary:"tetikle",normalized:"trigger"},send:{primary:"g\xF6nder",normalized:"send"},focus:{primary:"odak",alternatives:["odaklanma"],normalized:"focus"},blur:{primary:"bulan\u0131k",alternatives:["bulan\u0131kl\u0131k","bulanik"],normalized:"blur"},empty:{primary:"bo\u015Falt",alternatives:["bosalt","bo\u015F"],normalized:"empty"},open:{primary:"a\xE7",alternatives:["ac"],normalized:"open"},close:{primary:"kapat",normalized:"close"},select:{primary:"vurgula",normalized:"select"},clear:{primary:"temizle",normalized:"clear"},reset:{primary:"s\u0131f\u0131rla",alternatives:["sifirla"],normalized:"reset"},breakpoint:{primary:"kesme-noktas\u0131",alternatives:["kesme-noktasi"],normalized:"breakpoint"},click:{primary:"t\u0131klama",alternatives:["t\u0131kla","tiklama","t\u0131k","tik"],normalized:"click"},hover:{primary:"\xFCzerine gelme",alternatives:["\xFCzerinde gezinme"],normalized:"hover"},submit:{primary:"g\xF6nderme",normalized:"submit"},input:{primary:"giri\u015F",alternatives:["girdi","giris"],normalized:"input"},change:{primary:"de\u011Fi\u015Fiklik",alternatives:["de\u011Fi\u015Fim","degisim"],normalized:"change"},load:{primary:"y\xFCkle",normalized:"load"},go:{primary:"git",normalized:"go"},scroll:{primary:"kayd\u0131r",alternatives:["kaydir"],normalized:"scroll"},push:{primary:"itele",alternatives:["push"],normalized:"push"},replace:{primary:"de\u011Fi\u015Ftir_url",alternatives:["degistir_url"],normalized:"replace"},process:{primary:"i\u015Fle",alternatives:["isle"],normalized:"process"},wait:{primary:"bekle",normalized:"wait"},fetch:{primary:"getir",normalized:"fetch"},settle:{primary:"sabitlen",normalized:"settle"},if:{primary:"e\u011Fer",normalized:"if"},unless:{primary:"de\u011Filse",normalized:"unless"},when:{primary:"iken",alternatives:["durumunda","oldu\u011Funda"],normalized:"when"},where:{primary:"nerede",normalized:"where"},else:{primary:"yoksa",normalized:"else"},repeat:{primary:"tekrarla",normalized:"repeat"},for:{primary:"i\xE7in",normalized:"for"},while:{primary:"s\xFCresince",normalized:"while"},forever:{primary:"forever",normalized:"forever"},continue:{primary:"devam",normalized:"continue"},halt:{primary:"durdur",normalized:"halt"},throw:{primary:"f\u0131rlat",normalized:"throw"},call:{primary:"\xE7a\u011F\u0131r",normalized:"call"},return:{primary:"d\xF6n",normalized:"return"},then:{primary:"ard\u0131ndan",alternatives:["daha sonra","ardindan"],normalized:"then"},and:{primary:"ve",alternatives:["ayr\u0131ca","hem de"],normalized:"and"},or:{primary:"veya",normalized:"or"},not:{primary:"de\u011Fil",alternatives:["degil"],normalized:"not"},end:{primary:"son",alternatives:["biti\u015F","bitti"],normalized:"end"},js:{primary:"js",normalized:"js"},async:{primary:"asenkron",normalized:"async"},tell:{primary:"s\xF6yle",normalized:"tell"},default:{primary:"varsay\u0131lan",normalized:"default"},init:{primary:"ba\u015Flat",normalized:"init"},behavior:{primary:"davran\u0131\u015F",normalized:"behavior"},install:{primary:"kur",alternatives:["y\xFCklemek"],normalized:"install"},measure:{primary:"\xF6l\xE7",normalized:"measure"},beep:{primary:"bip",normalized:"beep"},break:{primary:"dur",normalized:"break"},copy:{primary:"kopyala",normalized:"copy"},exit:{primary:"\xE7\u0131k",normalized:"exit"},pick:{primary:"se\xE7",normalized:"pick"},render:{primary:"render",normalized:"render"},into:{primary:"i\xE7ine",normalized:"into"},before:{primary:"\xF6nce",normalized:"before"},after:{primary:"sonra",normalized:"after"},until:{primary:"kadar",normalized:"until"},event:{primary:"olay",normalized:"event"},from:{primary:"den",alternatives:["dan"],normalized:"from"},connect:{primary:"ba\u011Flan",alternatives:["ba\u011Fla","ba\u011Flant\u0131"],normalized:"connect"},stream:{primary:"yay\u0131nla",alternatives:["ak\u0131t","ak\u0131\u015F"],normalized:"stream"},live:{primary:"canl\u0131",alternatives:["ger\xE7ek-zamanl\u0131"],normalized:"live"},socket:{primary:"soket",alternatives:["websocket"],normalized:"socket"},bind:{primary:"bind",normalized:"bind"},intercept:{primary:"yakala",alternatives:["araya-gir","intercept"],normalized:"intercept"},worker:{primary:"i\u015F\xE7i",alternatives:["worker"],normalized:"worker"},eventsource:{primary:"eventsource",alternatives:["olay-kayna\u011F\u0131"],normalized:"eventsource"}},eventHandler:{eventMarker:{primary:"da",alternatives:["de","ta","te"],position:"after"},temporalMarkers:["d\u0131\u011F\u0131nda","di\u011Finde"]}};var Xe={code:"zh",name:"Chinese",nativeName:"\u4E2D\u6587",regions:["east-asian","priority"],direction:"ltr",script:"cjk",wordOrder:"SVO",markingStrategy:"preposition",usesSpaces:!1,verb:{position:"second",subjectDrop:!0},references:{me:"\u6211",it:"\u5B83",you:"\u4F60",result:"\u7ED3\u679C",event:"\u4E8B\u4EF6",target:"\u76EE\u6807",body:"\u4E3B\u4F53"},possessive:{marker:"\u7684",markerPosition:"between",keywords:{\u6211\u7684:"me",\u4F60\u7684:"you",\u5B83\u7684:"it",\u4ED6\u7684:"it",\u5979\u7684:"it"}},roleMarkers:{destination:{primary:"\u5728",alternatives:["\u5230","\u4E8E"],position:"before"},source:{primary:"\u4ECE",alternatives:["\u7531"],position:"before"},patient:{primary:"\u628A",position:"before"},style:{primary:"\u7528",alternatives:["\u4EE5"],position:"before"}},keywords:{toggle:{primary:"\u5207\u6362",normalized:"toggle"},add:{primary:"\u6DFB\u52A0",alternatives:["\u52A0"],normalized:"add"},remove:{primary:"\u79FB\u9664",alternatives:["\u5220\u9664","\u53BB\u6389"],normalized:"remove"},put:{primary:"\u653E\u7F6E",alternatives:["\u653E","\u653E\u5165"],normalized:"put"},append:{primary:"\u8FFD\u52A0",alternatives:["\u9644\u52A0"],normalized:"append"},prepend:{primary:"\u524D\u7F6E",alternatives:["\u9884\u7F6E"],normalized:"prepend"},take:{primary:"\u62FF\u53D6",normalized:"take"},make:{primary:"\u5236\u4F5C",normalized:"make"},clone:{primary:"\u514B\u9686",normalized:"clone"},swap:{primary:"\u4EA4\u6362",normalized:"swap"},morph:{primary:"\u53D8\u5F62",alternatives:["\u8F6C\u6362"],normalized:"morph"},set:{primary:"\u8BBE\u7F6E",alternatives:["\u8BBE\u5B9A"],normalized:"set"},get:{primary:"\u83B7\u53D6",alternatives:["\u83B7\u5F97","\u53D6\u5F97"],normalized:"get"},increment:{primary:"\u589E\u52A0",normalized:"increment"},decrement:{primary:"\u51CF\u5C11",normalized:"decrement"},log:{primary:"\u65E5\u5FD7",normalized:"log"},show:{primary:"\u663E\u793A",alternatives:["\u5C55\u793A"],normalized:"show"},hide:{primary:"\u9690\u85CF",normalized:"hide"},transition:{primary:"\u8FC7\u6E21",normalized:"transition"},on:{primary:"\u5F53",alternatives:["\u5728...\u65F6"],normalized:"on"},trigger:{primary:"\u89E6\u53D1",normalized:"trigger"},send:{primary:"\u53D1\u9001",normalized:"send"},focus:{primary:"\u805A\u7126",normalized:"focus"},blur:{primary:"\u5931\u7126",normalized:"blur"},empty:{primary:"\u6E05\u7A7A",alternatives:["\u7A7A\u7684"],normalized:"empty"},open:{primary:"\u6253\u5F00",normalized:"open"},close:{primary:"\u5173\u95ED",normalized:"close"},select:{primary:"\u9009\u62E9",normalized:"select"},clear:{primary:"\u6E05\u9664",normalized:"clear"},reset:{primary:"\u91CD\u7F6E",normalized:"reset"},breakpoint:{primary:"\u65AD\u70B9",normalized:"breakpoint"},click:{primary:"\u70B9\u51FB",normalized:"click"},hover:{primary:"\u60AC\u505C",alternatives:["\u60AC\u6D6E"],normalized:"hover"},submit:{primary:"\u63D0\u4EA4",normalized:"submit"},input:{primary:"\u8F93\u5165",normalized:"input"},change:{primary:"\u6539\u53D8",alternatives:["\u53D8\u5316"],normalized:"change"},go:{primary:"\u524D\u5F80",normalized:"go"},scroll:{primary:"\u6EDA\u52A8",normalized:"scroll"},push:{primary:"\u63A8\u9001",normalized:"push"},replace:{primary:"\u66FF\u6362",normalized:"replace"},process:{primary:"\u5904\u7406",normalized:"process"},wait:{primary:"\u7B49\u5F85",normalized:"wait"},fetch:{primary:"\u6293\u53D6",normalized:"fetch"},settle:{primary:"\u7A33\u5B9A",normalized:"settle"},if:{primary:"\u5982\u679C",normalized:"if"},unless:{primary:"\u9664\u975E",normalized:"unless"},when:{primary:"\u4F55\u65F6",normalized:"when"},where:{primary:"\u54EA\u91CC",normalized:"where"},else:{primary:"\u5426\u5219",normalized:"else"},matches:{primary:"\u5339\u914D",normalized:"matches"},repeat:{primary:"\u91CD\u590D",normalized:"repeat"},for:{primary:"\u4E3A",normalized:"for"},while:{primary:"\u6301\u7EED",normalized:"while"},continue:{primary:"\u7EE7\u7EED",normalized:"continue"},halt:{primary:"\u505C\u6B62",normalized:"halt"},throw:{primary:"\u629B\u51FA",normalized:"throw"},call:{primary:"\u8C03\u7528",normalized:"call"},return:{primary:"\u8FD4\u56DE",normalized:"return"},then:{primary:"\u7136\u540E",alternatives:["\u63A5\u7740","\u90A3\u4E48"],normalized:"then"},and:{primary:"\u5E76\u4E14",alternatives:["\u548C","\u800C\u4E14"],normalized:"and"},end:{primary:"\u7ED3\u675F",alternatives:["\u7EC8\u6B62","\u5B8C"],normalized:"end"},js:{primary:"JS\u6267\u884C",alternatives:["js"],normalized:"js"},async:{primary:"\u5F02\u6B65",normalized:"async"},tell:{primary:"\u544A\u8BC9",normalized:"tell"},default:{primary:"\u9ED8\u8BA4",normalized:"default"},init:{primary:"\u521D\u59CB\u5316",normalized:"init"},behavior:{primary:"\u884C\u4E3A",normalized:"behavior"},install:{primary:"\u5B89\u88C5",normalized:"install"},measure:{primary:"\u6D4B\u91CF",normalized:"measure"},beep:{primary:"\u8702\u9E23",normalized:"beep"},break:{primary:"\u4E2D\u65AD",normalized:"break"},copy:{primary:"\u590D\u5236",normalized:"copy"},exit:{primary:"\u9000\u51FA",normalized:"exit"},pick:{primary:"\u9009\u53D6",normalized:"pick"},render:{primary:"\u6E32\u67D3",normalized:"render"},into:{primary:"\u8FDB\u5165",normalized:"into"},before:{primary:"\u4E4B\u524D",normalized:"before"},after:{primary:"\u4E4B\u540E",normalized:"after"},until:{primary:"\u76F4\u5230",normalized:"until"},event:{primary:"\u4E8B\u4EF6",normalized:"event"},from:{primary:"\u4ECE",normalized:"from"},connect:{primary:"\u8FDE\u63A5",alternatives:["\u8FDE\u63A5\u5668"],normalized:"connect"},stream:{primary:"\u6D41",alternatives:["\u6D41\u5F0F\u4F20\u8F93"],normalized:"stream"},live:{primary:"\u5B9E\u65F6",alternatives:["\u76F4\u64AD"],normalized:"live"},socket:{primary:"\u5957\u63A5\u5B57",alternatives:["websocket","socket"],normalized:"socket"},bind:{primary:"\u7ED1\u5B9A",alternatives:["bind"],normalized:"bind"},intercept:{primary:"\u62E6\u622A",alternatives:["intercept"],normalized:"intercept"},worker:{primary:"\u5DE5\u4F5C\u7EBF\u7A0B",alternatives:["\u5DE5\u4F5C\u8005","worker"],normalized:"worker"},eventsource:{primary:"eventsource",alternatives:["\u4E8B\u4EF6\u6E90"],normalized:"eventsource"}},tokenization:{boundaryStrategy:"character"},eventHandler:{keyword:{primary:"\u5F53",alternatives:["\u5728...\u65F6"],normalized:"on"},sourceMarker:{primary:"\u4ECE",position:"before"},eventMarker:{primary:"\u5F53",alternatives:["\u5728"],position:"before"},temporalMarkers:["\u5F53","\u5728...\u65F6"]}};function ee(n,e){return e?{type:"literal",value:n,dataType:e}:{type:"literal",value:n}}function lt(n,e){return e?{type:"selector",value:n,selectorKind:e}:{type:"selector",value:n}}function Ze(n){return{type:"reference",value:n}}function Mt(n,e){return{type:"property-path",object:n,property:e}}function zr(n,e=!0){return{type:"flag",name:n,enabled:e}}function Ln(n,e,t){let r=e instanceof Map?e:new Map(Object.entries(e)),i={kind:"command",action:n,roles:r};return t?{...i,metadata:t}:i}function Tr(n,e,t,r,i){let a=e instanceof Map?e:new Map(Object.entries(e));return{kind:"event-handler",action:n,roles:a,body:t,...i&&{eventModifiers:i},...r&&{metadata:r}}}function Cn(n,e,t,r,i){let a=e instanceof Map?e:new Map(Object.entries(e));return{kind:"conditional",action:n,roles:a,thenBranch:t,...r&&{elseBranch:r},...i&&{metadata:i}}}function Rn(n,e,t,r,i,a,s){let o=e instanceof Map?e:new Map(Object.entries(e));return{kind:"loop",action:n,roles:o,loopVariant:t,body:r,...i&&{loopVariable:i},...a&&{indexVariable:a},...s&&{metadata:s}}}var Er=new Set(["me","you","it","result","event","target","body"]);function Ot(n,e=Er){return e.has(n)}var Pn=new Set(["body","then","else","condition","loop-body","variable","catch","finally"]);function fo(n){let e=n.slice(1,-1),t=0;for(let r of e)if(r==="[")t++;else if(r==="]")t--;else if(t===0&&(r===" "||r===":"))return!0;return!1}function jt(n,e={}){let t=n.trim(),r=e.collectDiagnostics===!0,i=[];if(!t.startsWith("[")||!t.endsWith("]"))throw new Error("Explicit syntax must be wrapped in brackets: [command role:value ...]");let a=t.slice(1,-1).trim();if(!a)throw new Error("Empty explicit statement");let s=go(a);if(s.length===0)throw new Error("No command specified in explicit statement");let o=s[0].toLowerCase(),l=new Map,c=e.referenceSet??Er,d=e.schemaLookup?.getSchema(o),p=d?new Set(d.roles.map(m=>m.role)):null;for(let m=1;m<s.length;m++){let f=s[m];if(f.startsWith("+")||f.startsWith("~")){let E=f.startsWith("+"),x=f.slice(1);if(!x){if(r){i.push({severity:"error",code:"EMPTY_FLAG",message:`Empty flag name: "${f}"`,source:"schema"});continue}throw new Error(`Empty flag name: "${f}"`)}if(p&&!p.has(x)){if(r){i.push({severity:"error",code:"UNKNOWN_FLAG",message:`Unknown flag "${x}" for command "${o}"`,source:"schema",suggestions:[...p].map(k=>`+${k}`)}),l.set(x,zr(x,E));continue}throw new Error(`Unknown flag "${x}" for command "${o}". Valid roles: ${[...p].join(", ")}`)}l.set(x,zr(x,E));continue}let y=f.indexOf(":");if(y===-1){if(r){i.push({severity:"error",code:"INVALID_ROLE_FORMAT",message:`Invalid role format: "${f}". Expected role:value or +flag`,source:"schema"});continue}throw new Error(`Invalid role format: "${f}". Expected role:value or +flag`)}let g=f.slice(0,y);if(p&&!Pn.has(g)&&!p.has(g))if(r)i.push({severity:"error",code:"UNKNOWN_ROLE",message:`Unknown role "${g}" for command "${o}"`,source:"schema",suggestions:[...p]});else throw new Error(`Unknown role "${g}" for command "${o}". Valid roles: ${[...p].join(", ")}`);let h=g,b=f.slice(y+1);if(Pn.has(g)&&b.startsWith("[")&&fo(b)){let E=vo(f,y+1),x=f.slice(y+1,E+1);l.set(h,{type:"expression",raw:x});continue}let z=ho(b,c);l.set(h,z)}if(d&&o!=="on"){for(let m of d.roles)if(m.required&&!l.has(m.role)&&!m.default)if(r)i.push({severity:"error",code:"MISSING_REQUIRED_ROLE",message:`Missing required role "${m.role}" for command "${o}": ${m.description}`,source:"schema"});else throw new Error(`Missing required role "${m.role}" for command "${o}": ${m.description}`)}let u=m=>i.length===0?m:{...m,diagnostics:i};switch(o){case"on":{if(!l.get("event")){if(r)return i.push({severity:"error",code:"MISSING_EVENT_ROLE",message:"Event handler requires event role: [on event:click ...]",source:"schema"}),u(Tr("on",l,[],{sourceLanguage:"explicit"}));throw new Error("Event handler requires event role: [on event:click ...]")}let f=At(l,"body",e);return l.delete("body"),u(Tr("on",l,f,{sourceLanguage:"explicit"}))}case"if":{let m=At(l,"then",e),f=At(l,"else",e);return l.delete("then"),l.delete("else"),u(Cn(o,l,m,f.length>0?f:void 0,{sourceLanguage:"explicit"}))}case"repeat":{let m=At(l,"loop-body",e),f=l.get("loop-variant"),y=l.get("variable"),g=l.get("index-variable");l.delete("loop-body"),l.delete("loop-variant"),l.delete("variable"),l.delete("index-variable");let h;f&&f.type==="literal"&&typeof f.value=="string"?h=f.value:l.has("quantity")?h="times":l.has("source")?h="for":l.has("condition")?h="while":h="forever";let b=y?.type==="literal"&&typeof y.value=="string"?y.value:y?.type==="expression"?y.raw:void 0,z=g?.type==="literal"&&typeof g.value=="string"?g.value:void 0;return u(Rn(o,l,h,m,b,z,{sourceLanguage:"explicit"}))}default:return u(Ln(o,l,{sourceLanguage:"explicit"}))}}function Pe(n){let e=n.trim();return e.startsWith("[")&&e.endsWith("]")}function At(n,e,t){let r=n.get(e);return r?r.type==="expression"?[jt(r.raw,t)]:[]:[]}function yo(n){if(n){if(n.startsWith("#"))return"id";if(n.startsWith("."))return"class";if(n.startsWith("["))return"attribute";if(n.startsWith("<")||n.startsWith("*"))return"element";if(/[>+~ ]/.test(n)&&n.length>1)return"complex"}}function go(n){let e=[],t="",r=!1,i="",a=0;for(let s=0;s<n.length;s++){let o=n[s];if(r){t+=o,o===i&&n[s-1]!=="\\"&&(r=!1);continue}if(o==='"'||o==="'"){r=!0,i=o,t+=o;continue}if(o==="["){a++,t+=o;continue}if(o==="]"){a--,t+=o;continue}if(o===" "&&a===0){t&&(e.push(t),t="");continue}t+=o}return t&&e.push(t),e}function ho(n,e){if(n.startsWith("#")||n.startsWith(".")||n.startsWith("[")||n.startsWith("@")||n.startsWith("*"))return lt(n,yo(n));if(n.startsWith('"')||n.startsWith("'"))return ee(n.slice(1,-1),"string");if(n==="true")return ee(!0,"boolean");if(n==="false")return ee(!1,"boolean");let t=n.toLowerCase();if(Ot(t,e))return Ze(t);let r=n.match(/^(-?\d+(?:\.\d+)?)(ms|s|m|h)?$/);if(r){let i=parseFloat(r[1]);return r[2]?ee(n,"duration"):ee(i,"number")}return ee(n)}function vo(n,e){let t=0;for(let r=e;r<n.length;r++)if(n[r]==="[")t++;else if(n[r]==="]"&&(t--,t===0))return r;return n.length-1}function ce(n){let e;if(n.kind==="compound"){let t=n;e=t.statements.map(r=>ce(r)).join(` ${t.chainType} `)}else e=ko(n);return n.annotations&&n.annotations.length>0?n.annotations.map(r=>r.value!==void 0?`@${r.name}(${r.value})`:`@${r.name}`).join(" ")+" "+e:e}function ko(n){let e=[n.action];for(let[t,r]of n.roles)r.type==="flag"?e.push(r.enabled?`+${r.name}`:`~${r.name}`):e.push(`${t}:${Nn(r)}`);if(n.kind==="event-handler"){let t=n;t.body&&t.body.length>0&&e.push(`body:${t.body.map(r=>ce(r)).join(" ")}`)}if(n.kind==="conditional"){let t=n;t.thenBranch&&t.thenBranch.length>0&&e.push(`then:${t.thenBranch.map(r=>ce(r)).join(" ")}`),t.elseBranch&&t.elseBranch.length>0&&e.push(`else:${t.elseBranch.map(r=>ce(r)).join(" ")}`)}if(n.kind==="loop"){let t=n;t.loopVariant&&e.push(`loop-variant:${t.loopVariant}`),t.loopVariable&&e.push(`variable:${t.loopVariable}`),t.indexVariable&&e.push(`index-variable:${t.indexVariable}`),t.body&&t.body.length>0&&e.push(`loop-body:${t.body.map(r=>ce(r)).join(" ")}`)}if(n.kind==="command"){let t=n;t.body&&t.body.length>0&&e.push(`body:${t.body.map(r=>ce(r)).join(" ")}`),t.catchBranch&&t.catchBranch.length>0&&e.push(`catch:${t.catchBranch.map(r=>ce(r)).join(" ")}`),t.finallyBranch&&t.finallyBranch.length>0&&e.push(`finally:${t.finallyBranch.map(r=>ce(r)).join(" ")}`),t.asyncVariant&&e.push(`async-variant:${t.asyncVariant}`),t.asyncBody&&t.asyncBody.length>0&&e.push(`async-body:${t.asyncBody.map(r=>ce(r)).join(" ")}`)}return`[${e.join(" ")}]`}function Nn(n){switch(n.type){case"literal":return typeof n.value=="string"?n.dataType==="string"||/\s/.test(n.value)?`"${n.value}"`:n.value:String(n.value);case"selector":return n.value;case"reference":return n.value;case"property-path":return`${Nn(n.object)}'s ${n.property}`;case"expression":return n.raw;case"flag":return n.name}}var xo=class{constructor(n){this.namespace=n,this.enabled=this.checkEnabled()}checkEnabled(){if(typeof process<"u"&&process.env){let n=process.env.DEBUG||"";return n==="*"||n.includes("framework:*")||n.includes(`framework:${this.namespace}`)}return!1}log(n,e,...t){if(!this.enabled)return;let r=`[framework:${this.namespace}]`,i=new Date().toISOString();switch(n){case"debug":console.debug(`${i} ${r} DEBUG:`,e,...t);break;case"info":console.info(`${i} ${r} INFO:`,e,...t);break;case"warn":console.warn(`${i} ${r} WARN:`,e,...t);break;case"error":console.error(`${i} ${r} ERROR:`,e,...t);break}}debug(n,...e){this.log("debug",n,...e)}info(n,...e){this.log("info",n,...e)}warn(n,...e){this.log("warn",n,...e)}error(n,...e){this.log("error",n,...e)}isEnabled(){return this.enabled}enable(){this.enabled=!0}disable(){this.enabled=!1}};function bo(n){return new xo(n)}function Je(n,e){return!e||e.length===0||e.includes(n)||e.includes("expression")?!0:n==="property-path"?e.some(t=>["selector","reference","expression"].includes(t)):!1}function So(n,e){return n?.possessive?.keywords?.[e]}function An(n){return!1}var ct=class Qe{constructor(){this.logger=bo("pattern-matcher"),this.stemMatchCount=0,this.totalKeywordMatches=0}safeToLowerCase(e){return typeof e=="string"?e.toLowerCase():e==null?"":String(e).toLowerCase()}matchPattern(e,t,r){let i=e.mark(),a=new Map;if(this.logger.debug("========================================"),this.logger.debug("matchPattern ENTRY"),this.logger.debug("Pattern ID:",t.id),this.logger.debug("Pattern command:",t.command),this.logger.debug("Pattern language:",t.language),this.logger.debug("Pattern template:",JSON.stringify(t.template,null,2)),this.logger.isEnabled()){let l=[];for(let c=0;c<10;c++){let d=e.peek(c);if(d)l.push({type:d.type,value:d.value,kind:d.kind});else break}this.logger.debug("Input tokens (first 10):",l),this.logger.debug("Profile code:",r?.code)}this.currentProfile=r,this.stemMatchCount=0,this.totalKeywordMatches=0,this.logger.debug("--- Calling matchTokenSequence ---"),this.logger.debug("Pattern tokens to match:",JSON.stringify(t.template.tokens,null,2));let s=this.matchTokenSequence(e,t.template.tokens,a);if(this.logger.debug("matchTokenSequence returned:",s),this.logger.debug("Captured roles:",Array.from(a.entries()).map(([l,c])=>[l,JSON.stringify(c)])),!s)return this.logger.debug(">>> MATCH FAILED - resetting token position"),e.reset(i),null;let o=this.calculateConfidence(t,a);return this.applyExtractionRules(t,a),{pattern:t,captured:a,consumedTokens:e.position()-i.position,confidence:o}}matchBest(e,t,r){let i=[];for(let s of t){let o=e.mark(),l=this.matchPattern(e,s,r);l&&i.push(l),e.reset(o)}if(i.length===0)return null;i.sort((s,o)=>{let l=o.pattern.priority-s.pattern.priority;if(l!==0)return l;let c=o.confidence-s.confidence;return Math.abs(c)>.001?c:o.consumedTokens-s.consumedTokens});let a=i[0];return this.matchPattern(e,a.pattern),a}matchTokenSequence(e,t,r,i){let a=t[0],s=a?.type==="literal"&&(a.value==="and"||a.value==="then"||a.alternatives?.includes("and")||a.alternatives?.includes("then"));if(this.currentProfile?.code==="ar"&&!s)for(;e.peek()?.kind==="conjunction";)e.advance();let o=null,l=null;for(let c=0;c<t.length;c++){let d=t[c];this.logger.debug(" >> Matching pattern token:",JSON.stringify(d,null,2));let p=e.peek();if(this.logger.debug(" >> Current input token:",p?JSON.stringify({type:p.type,value:p.value,kind:p.kind}):"EOF"),d.type==="role"&&d.greedy){let g=this.collectStopMarkers(t,c+1);if(i)for(let b of i)g.add(b);let h=[];for(;!e.isAtEnd();){let b=e.peek();if(!b||this.isStopMarker(b,g))break;h.push(b.value),e.advance()}if(h.length>0){r.set(d.role,{type:"expression",raw:h.join(" ")}),o=null,l=null;continue}else{if(d.optional)continue;return!1}}if(d.type==="group"){let g=this.collectStopMarkers(t,c+1);if(i)for(let b of i)g.add(b);if(this.matchGroupToken(e,d,r,g)){o=null,l=null;continue}if(this.isOptional(d))continue;return!1}let u=d.type==="role"&&d.optional===!0,m=u?e.mark():null;if(d.type==="role"&&!u){let g=c+1<t.length?t[c+1]:null;if(g?.type==="literal"){let h=e.peek();if(h&&this.getMatchType(h,g.value)!=="none"){if(this.logger.debug(" >> MARKER-STEAL GUARD: current token matches next literal, skipping role"),this.logger.debug(" >> Token match FAILED"),this.isOptional(d))continue;if(o&&l){this.logger.debug(" >> BACKTRACKING: undoing optional role",l),e.reset(o),r.delete(l),o=null,l=null;let b=this.matchPatternToken(e,d,r);if(this.logger.debug(" >> Backtrack retry result:",b),b)continue}return!1}}}let y=this.matchPatternToken(e,d,r);if(this.logger.debug(" >> Match result:",y),y){u?(o=m,l=d.role):(o=null,l=null);continue}if(this.logger.debug(" >> Token match FAILED"),!this.isOptional(d)){if(o&&l){this.logger.debug(" >> BACKTRACKING: undoing optional role",l),e.reset(o),r.delete(l),o=null,l=null;let g=this.matchPatternToken(e,d,r);if(this.logger.debug(" >> Backtrack retry result:",g),g)continue}return!1}}return!0}matchPatternToken(e,t,r){switch(t.type){case"literal":return this.matchLiteralToken(e,t);case"role":return this.matchRoleToken(e,t,r);case"group":return this.matchGroupToken(e,t,r);default:return!1}}matchLiteralToken(e,t){let r=e.peek();if(this.logger.debug(" >>> matchLiteralToken: expecting",t.value),this.logger.debug(" >>> matchLiteralToken: got token",r?JSON.stringify({type:r.type,value:r.value,kind:r.kind}):"null"),!r)return this.logger.debug(" >>> matchLiteralToken: FAIL - no token"),!1;let i=this.getMatchType(r,t.value);if(this.logger.debug(" >>> matchType for",r.value,"vs",t.value,":",i),i!=="none")return this.totalKeywordMatches++,i==="stem"&&this.stemMatchCount++,e.advance(),!0;if(t.alternatives)for(let a of t.alternatives){let s=this.getMatchType(r,a);if(s!=="none")return this.totalKeywordMatches++,s==="stem"&&this.stemMatchCount++,e.advance(),!0}return!1}matchRoleToken(e,t,r){this.logger.debug(" >>> matchRoleToken ENTRY: capturing role",t.role),this.logger.debug(" >>> matchRoleToken: expected types",t.expectedTypes),this.logger.debug(" >>> matchRoleToken: optional?",t.optional),this.skipNoiseWords(e);let i=e.peek();if(this.logger.debug(" >>> After skipNoiseWords, current token:",i?JSON.stringify({value:i.value,kind:i.kind}):"null"),!i)return t.optional||!1;let a=this.tryMatchPossessiveExpression(e);if(a)return t.expectedTypes&&t.expectedTypes.length>0&&!Je(a.type,t.expectedTypes)?t.optional||!1:(r.set(t.role,a),!0);let s=this.tryMatchMethodCallExpression(e);if(s)return t.expectedTypes&&t.expectedTypes.length>0&&!Je(s.type,t.expectedTypes)?t.optional||!1:(r.set(t.role,s),!0);let o=this.tryMatchPossessiveSelectorExpression(e);if(o)return t.expectedTypes&&t.expectedTypes.length>0&&!Je(o.type,t.expectedTypes)?t.optional||!1:(r.set(t.role,o),!0);let l=this.tryMatchPropertyAccessExpression(e);if(l)return t.expectedTypes&&t.expectedTypes.length>0&&!Je(l.type,t.expectedTypes)?t.optional||!1:(r.set(t.role,l),!0);let c=this.tryMatchSelectorPropertyExpression(e);if(c)return t.expectedTypes&&t.expectedTypes.length>0&&!Je(c.type,t.expectedTypes)?t.optional||!1:(r.set(t.role,c),!0);this.logger.debug(" >>> Trying tokenToSemanticValue for token:",i?JSON.stringify({value:i.value,kind:i.kind}):"null");let d=this.tokenToSemanticValue(i);return this.logger.debug(" >>> tokenToSemanticValue returned:",d?JSON.stringify(d):"null"),d?(this.logger.debug(" >>> Validating type:",d.type,"against expected:",t.expectedTypes),t.expectedTypes&&t.expectedTypes.length>0&&!Je(d.type,t.expectedTypes)?(this.logger.debug(" >>> TYPE MISMATCH - returning",t.optional||!1),t.optional||!1):(this.logger.debug(" >>> Type validation PASSED"),r.set(t.role,d),e.advance(),!0)):t.optional||!1}tryMatchPossessiveExpression(e){let t=e.peek();if(!t||!this.currentProfile)return null;let r=t.normalized||t.value,i=this.safeToLowerCase(r),a=So(this.currentProfile,i);if(!a)return null;let s=e.mark();e.advance();let o=e.peek();if(!o)return e.reset(s),null;if(o.kind==="identifier"||o.kind==="keyword"&&!this.isStructuralKeyword(o.value)||o.kind==="selector"&&o.value.startsWith("*")||o.kind==="selector"&&o.value.startsWith("@")||o.kind==="selector"&&o.value.startsWith(".")&&/^\.[a-zA-Z_]\w*/.test(o.value)){e.advance();let l=o.value;o.kind==="selector"&&l.startsWith(".")&&/^\.[a-zA-Z_]\w*/.test(l)&&(l=l.substring(1));let c=l;for(;e.peek()?.kind==="selector"&&e.peek().value.startsWith(".")&&/^\.[a-zA-Z_]\w*/.test(e.peek().value);)c+=e.peek().value,e.advance();let d=e.peek();return d?.kind==="literal"&&d.value.startsWith("(")&&(c+=d.value,e.advance()),Mt(Ze(a),c)}return e.reset(s),null}isStructuralKeyword(e){return new Set(["into","in","to","from","at","by","with","without","before","after","of","as","on","then","end","else","if","repeat","while","for","toggle","add","remove","put","set","show","hide","increment","decrement","send","trigger","call"]).has(e.toLowerCase())}tryMatchMethodCallExpression(e){let t=e.peek();if(!t||t.kind!=="selector")return null;let r=e.mark();e.advance();let i=e.peek();if(!i||i.kind!=="operator"||i.value!==".")return e.reset(r),null;e.advance();let a=e.peek();if(!a||a.kind!=="identifier")return e.reset(r),null;e.advance();let s=e.peek();if(!s||s.kind!=="punctuation"||s.value!=="(")return e.reset(r),null;e.advance();let o=[];for(;!e.isAtEnd()&&o.length<Qe.MAX_METHOD_ARGS;){let c=e.peek();if(!c)break;if(c.kind==="punctuation"&&c.value===")"){e.advance();break}if(c.kind==="punctuation"&&c.value===","){e.advance();continue}o.push(c.value),e.advance()}return{type:"expression",raw:`${t.value}.${a.value}(${o.join(", ")})`}}tryMatchPropertyAccessExpression(e){let t=e.peek();if(!t||t.kind!=="identifier"&&t.kind!=="keyword")return null;let r=e.mark();e.advance();let i=e.peek();if(!i||i.kind!=="operator"||i.value!==".")return e.reset(r),null;e.advance();let a=e.peek();if(!a||a.kind!=="identifier")return e.reset(r),null;e.advance();let s=`${t.value}.${a.value}`,o=1;for(;!e.isAtEnd()&&o<Qe.MAX_PROPERTY_DEPTH;){let c=e.peek();if(!c||c.kind!=="operator"||c.value!==".")break;e.advance();let d=e.peek();if(!d||d.kind!=="identifier")break;e.advance(),s+=`.${d.value}`,o++}let l=e.peek();if(l&&l.kind==="punctuation"&&l.value==="("){e.advance();let c=[],d=0;for(;!e.isAtEnd()&&c.length<Qe.MAX_METHOD_ARGS;){let u=e.peek();if(!u)break;if(u.kind==="punctuation"&&u.value===")"){if(d===0){e.advance();break}d--}if(u.kind==="punctuation"&&u.value==="("&&d++,u.kind==="punctuation"&&u.value===","){e.advance();continue}c.push(u.value),e.advance()}return{type:"expression",raw:`${s}(${c.join(", ")})`}}return{type:"expression",raw:s}}tryMatchPossessiveSelectorExpression(e){let t=e.peek();if(!t||t.kind!=="selector")return null;let r=e.mark();e.advance();let i=e.peek();if(!i||i.kind!=="punctuation"||i.value!=="'s")return e.reset(r),null;e.advance();let a=e.peek();return!a||a.kind!=="selector"&&a.kind!=="identifier"?(e.reset(r),null):(e.advance(),Mt(lt(t.value),a.value))}tryMatchSelectorPropertyExpression(e){let t=e.peek();if(!t||t.kind!=="selector"||typeof t.value!="string"||!t.value.startsWith("#"))return null;let r=e.mark();e.advance();let i=e.peek();if(!i||i.kind!=="selector"||!i.value.startsWith("."))return e.reset(r),null;let a=e.peek(1);a&&a.kind,e.advance();let s=i.value.slice(1);return Mt(lt(t.value),s)}matchGroupToken(e,t,r,i){let a=e.mark(),s=new Set(r.keys());if(this.matchTokenSequence(e,t.tokens,r,i))return!0;e.reset(a);for(let c of r.keys())s.has(c)||r.delete(c);if(!t.optional)return!1;let l=this.getGroupLeadingMarker(t);if(l)for(let c=1;c<=Qe.MAX_MARKER_SCAN;c++){let d=e.peek(c);if(!d)break;if((d.normalized||d.value).toLowerCase()===l){this.logger.debug(" >> MARKER SCAN: found",l,"at offset",c,"- skipping intervening tokens");for(let m=0;m<c;m++)e.advance();if(this.matchTokenSequence(e,t.tokens,r,i))return!0;e.reset(a);for(let m of r.keys())s.has(m)||r.delete(m);break}}return!0}getGroupLeadingMarker(e){let t=e.tokens[0];return t?.type==="literal"?t.value.toLowerCase():null}getMatchType(e,t){return e.value===t?"exact":e.normalized===t?"normalized":e.stem===t&&e.stemConfidence!==void 0&&e.stemConfidence>=.7?"stem":e.kind==="keyword"&&this.safeToLowerCase(e.value)===t.toLowerCase()?"case-insensitive":"none"}collectStopMarkers(e,t){let r=new Set;for(let i=t;i<e.length;i++){let a=e[i];if(a.type==="literal"){if(r.add(a.value.toLowerCase()),a.alternatives)for(let s of a.alternatives)r.add(s.toLowerCase());break}if(a.type==="group"){for(let s of a.tokens)if(s.type==="literal"){if(r.add(s.value.toLowerCase()),s.alternatives)for(let o of s.alternatives)r.add(o.toLowerCase());break}if(!a.optional)break}}return r}isStopMarker(e,t){return t.size===0?!1:!!(t.has(e.value.toLowerCase())||e.normalized&&t.has(e.normalized.toLowerCase()))}tokenToSemanticValue(e){switch(e.kind){case"selector":return lt(e.value);case"literal":return this.parseLiteralValue(e.value);case"keyword":let t=e.normalized||e.value,r=this.safeToLowerCase(t);return An(r)?Ze(r):ee(e.normalized||e.value);case"identifier":if(typeof e.value=="string"&&e.value.startsWith(":"))return Ze(e.value);let i=this.safeToLowerCase(e.value);return An(i)?Ze(i):{type:"expression",raw:e.value};case"url":return ee(e.value,"string");default:return null}}parseLiteralValue(e){if(e.startsWith('"')||e.startsWith("'")||e.startsWith("`")||e.startsWith("\u300C")){let i=e.slice(1,-1);return ee(i,"string")}if(e==="true")return ee(!0,"boolean");if(e==="false")return ee(!1,"boolean");let t=e.match(/^(\d+(?:\.\d+)?)(ms|s|m|h)?$/);if(t){let i=parseFloat(t[1]);return t[2]?ee(e,"duration"):ee(i,"number")}let r=parseFloat(e);return isNaN(r)?ee(e,"string"):ee(r,"number")}applyExtractionRules(e,t){for(let[r,i]of Object.entries(e.extraction))t.has(r)||(i.value!==void 0?t.set(r,{type:"literal",value:i.value}):i.default&&t.set(r,i.default))}isOptional(e){return e.type!=="literal"&&e.optional===!0}calculateConfidence(e,t){let r=0,i=0,a=c=>e.extraction?.[c]?.default!==void 0;for(let c of e.template.tokens)if(c.type==="role")i+=1,t.has(c.role)&&(r+=1);else if(c.type==="group"){for(let d of c.tokens)if(d.type==="role"){let p=a(d.role),u=.8;i+=u,t.has(d.role)?r+=u:p&&(r+=u*.6)}}let s=i>0?r/i:1;if(this.stemMatchCount>0&&this.totalKeywordMatches>0){let c=this.stemMatchCount/this.totalKeywordMatches*.15;s=Math.max(.5,s-c)}let o=this.calculateVSOConfidenceBoost(e);s=Math.min(1,s+o);let l=this.arabicPrepositionDisambiguation(e,t);return s=Math.max(0,Math.min(1,s+l)),s}calculateVSOConfidenceBoost(e){if(e.language!=="ar")return 0;let t=e.template.tokens[0];if(!t||t.type!=="literal")return 0;let r=new Set(["\u0628\u062F\u0644","\u063A\u064A\u0631","\u0623\u0636\u0641","\u0623\u0632\u0644","\u0636\u0639","\u0627\u062C\u0639\u0644","\u0639\u064A\u0646","\u0632\u062F","\u0627\u0646\u0642\u0635","\u0633\u062C\u0644","\u0623\u0638\u0647\u0631","\u0623\u062E\u0641","\u0634\u063A\u0644","\u0623\u0631\u0633\u0644","\u0631\u0643\u0632","\u0634\u0648\u0634","\u062A\u0648\u0642\u0641","\u0627\u0646\u0633\u062E","\u0627\u062D\u0630\u0641","\u0627\u0635\u0646\u0639","\u0627\u0646\u062A\u0638\u0631","\u0627\u0646\u062A\u0642\u0627\u0644","\u0623\u0648"]);if(r.has(t.value))return .15;if(t.alternatives){for(let i of t.alternatives)if(r.has(i))return .15}return 0}arabicPrepositionDisambiguation(e,t){if(e.language!=="ar")return 0;let r=0,i={patient:["\u0639\u0644\u0649"],destination:["\u0625\u0644\u0649","\u0627\u0644\u0649"],source:["\u0645\u0646"],agent:["\u0645\u0646"],manner:["\u0628"],style:["\u0628"],goal:["\u0625\u0644\u0649","\u0627\u0644\u0649"],method:["\u0628"]};for(let[a,s]of t.entries()){let o=i[a];if(!o||o.length===0)continue;let l="metadata"in s?s.metadata:void 0;if(l&&typeof l.prepositionValue=="string"){let c=l.prepositionValue;o.includes(c)?r+=.1:r-=.1}}return Math.max(-.1,Math.min(.1,r))}skipNoiseWords(e){let t=e.peek();if(!t)return;let r=this.safeToLowerCase(t.value);if(Qe.ENGLISH_NOISE_WORDS.has(r)){let i=e.mark();e.advance();let a=e.peek();if(a&&a.kind==="selector")return;e.reset(i)}r==="class"&&e.advance()}extractEventModifiers(e){let t={},r=!1;for(;!e.isAtEnd();){let i=e.peek();if(!i||i.kind!=="event-modifier")break;let a=i.metadata;if(!a)break;switch(r=!0,a.modifierName){case"once":t.once=!0;break;case"debounce":typeof a.value=="number"&&(t.debounce=a.value);break;case"throttle":typeof a.value=="number"&&(t.throttle=a.value);break;case"queue":(a.value==="first"||a.value==="last"||a.value==="all"||a.value==="none")&&(t.queue=a.value);break}e.advance()}return r?t:void 0}};ct.MAX_MARKER_SCAN=3;ct.MAX_PROPERTY_DEPTH=10;ct.MAX_METHOD_ARGS=20;ct.ENGLISH_NOISE_WORDS=new Set(["the","a","an"]);var wo=ct,ju=new wo;var H=class{constructor(){this.name="string-literal"}canExtract(n,e){let t=n[e];return t==='"'||t==="'"||t==="`"||t==="\u201C"||t==="\u2018"}extract(n,e){let t=n[e];if(t==="\u201C"){let a=1;for(;e+a<n.length;){if(n[e+a]==="\u201D")return a++,{value:n.substring(e,e+a),length:a};a++}return null}if(t==="\u2018"){let a=1;for(;e+a<n.length;){if(n[e+a]==="\u2019")return a++,{value:n.substring(e,e+a),length:a};a++}return null}let r=1,i=!1;for(;e+r<n.length;){let a=n[e+r];if(i){i=!1,r++;continue}if(a==="\\"){i=!0,r++;continue}if(a===t)return r++,{value:n.substring(e,e+r),length:r};r++}return null}},F=class{constructor(){this.name="number"}canExtract(n,e){return/\d/.test(n[e])}extract(n,e){let t=0,r=!1;for(;e+t<n.length;){let s=n[e+t];if(/\d/.test(s))t++;else if(s==="."&&!r)r=!0,t++;else break}if(t===0)return null;let i=n.substring(e,e+t),a=e+t;if(a<n.length){let s=n.slice(a),o=[{pattern:"\u6BEB\u79D2",suffix:"ms"},{pattern:"\u5206\u949F",suffix:"m"},{pattern:"\u5C0F\u65F6",suffix:"h"},{pattern:"\u30DF\u30EA\u79D2",suffix:"ms"},{pattern:"\u6642\u9593",suffix:"h"}];for(let c of o)if(s.startsWith(c.pattern))return{value:i+c.suffix,length:t+c.pattern.length,metadata:{hasTimeUnit:!0}};if(s.startsWith("ms"))return{value:i+"ms",length:t+2,metadata:{hasTimeUnit:!0}};let l=[{pattern:"\u79D2",suffix:"s"},{pattern:"\u5206",suffix:"m"}];for(let c of l)if(s.startsWith(c.pattern))return{value:i+c.suffix,length:t+1,metadata:{hasTimeUnit:!0}};if(/^[smh](?![a-zA-Z])/.test(s))return{value:i+s[0],length:t+1,metadata:{hasTimeUnit:!0}}}return{value:i,length:t}}};function zo(n){return"setContext"in n&&typeof n.setContext=="function"}function To(n){let e={language:n.language,direction:n.direction,lookupKeyword:n.lookupKeyword.bind(n),isKeyword:n.isKeyword.bind(n),isKeywordStart:n.isKeywordStart.bind(n),...n.isKeywordStartAtBoundary?{isKeywordStartAtBoundary:n.isKeywordStartAtBoundary.bind(n)}:{}};return n.normalizer?{...e,normalizer:n.normalizer}:e}var re=class{constructor(n,e){this.pos=0,this.tokens=n,this.language=e}peek(n=0){let e=this.pos+n;return e<0||e>=this.tokens.length?null:this.tokens[e]}advance(){if(this.isAtEnd())throw new Error("Unexpected end of token stream");return this.tokens[this.pos++]}isAtEnd(){return this.pos>=this.tokens.length}mark(){return{position:this.pos}}reset(n){this.pos=n.position}position(){return this.pos}remaining(){return this.tokens.slice(this.pos)}takeWhile(n){let e=[];for(;!this.isAtEnd()&&n(this.peek());)e.push(this.advance());return e}skipWhile(n){for(;!this.isAtEnd()&&n(this.peek());)this.advance()}};function _(n,e){return{start:n,end:e}}function $(n,e,t,r){if(typeof n=="object"){let{value:a,kind:s,position:o,normalized:l,stem:c,stemConfidence:d,metadata:p}=n;return{value:a,kind:s,position:o,...l!==void 0&&{normalized:l},...c!==void 0&&{stem:c},...d!==void 0&&{stemConfidence:d},...p!==void 0&&{metadata:p}}}let i=n;if(!e||!t)throw new Error("createToken requires kind and position parameters");if(typeof r=="string")return{value:i,kind:e,position:t,normalized:r};if(r){let{normalized:a,stem:s,stemConfidence:o,metadata:l}=r;return{value:i,kind:e,position:t,...a!==void 0&&{normalized:a},...s!==void 0&&{stem:s},...o!==void 0&&{stemConfidence:o},...l!==void 0&&{metadata:l}}}return{value:i,kind:e,position:t}}function pe(n){return/\s/.test(n)}function It(n){return n==="#"||n==="."||n==="["||n==="@"||n==="*"||n==="<"}function Wt(n){return n==='"'||n==="'"||n==="`"||n==="\u300C"||n==="\u300D"}function ye(n){return/\d/.test(n)}function Vt(n){return/[a-zA-Z]/.test(n)}function J(n){return/[a-zA-Z0-9_-]/.test(n)}function Mn(n,e){if(e>=n.length)return null;let t=n[e];if(!It(t))return null;let r=e,i="";if(t==="#"||t==="."){for(i+=n[r++];r<n.length&&J(n[r]);)i+=n[r++];if(i.length<=1)return null;if(r<n.length&&n[r]==="."&&t==="#"){let s=r+1;for(;s<n.length&&J(n[s]);)s++;if(s<n.length&&n[s]==="(")return i}}else if(t==="["){let a=1,s=!1,o=null,l=!1;for(i+=n[r++];r<n.length&&a>0;){let c=n[r];i+=c,l?l=!1:c==="\\"?l=!0:s?c===o&&(s=!1,o=null):c==='"'||c==="'"||c==="`"?(s=!0,o=c):c==="["?a++:c==="]"&&a--,r++}if(a!==0)return null}else if(t==="@"){for(i+=n[r++];r<n.length&&J(n[r]);)i+=n[r++];if(i.length<=1)return null}else if(t==="*"){for(i+=n[r++];r<n.length&&J(n[r]);)i+=n[r++];if(i.length<=1)return null}else if(t==="<"){if(i+=n[r++],r>=n.length||!Vt(n[r]))return null;for(;r<n.length&&J(n[r]);)i+=n[r++];for(;r<n.length;){let a=n[r];if(a==="."){if(i+=n[r++],r>=n.length||!J(n[r]))return null;for(;r<n.length&&J(n[r]);)i+=n[r++]}else if(a==="#"){if(i+=n[r++],r>=n.length||!J(n[r]))return null;for(;r<n.length&&J(n[r]);)i+=n[r++]}else if(a==="["){let s=1,o=!1,l=null,c=!1;for(i+=n[r++];r<n.length&&s>0;){let d=n[r];i+=d,c?c=!1:d==="\\"?c=!0:o?d===l&&(o=!1,l=null):d==='"'||d==="'"||d==="`"?(o=!0,l=d):d==="["?s++:d==="]"&&s--,r++}if(s!==0)return null}else break}for(;r<n.length&&pe(n[r]);)i+=n[r++];if(r<n.length&&n[r]==="/")for(i+=n[r++];r<n.length&&pe(n[r]);)i+=n[r++];if(r>=n.length||n[r]!==">")return null;i+=n[r++]}return i||null}function Eo(n,e){if(e>=n.length||n[e]!=="'"||e+1>=n.length||n[e+1].toLowerCase()!=="s")return!1;if(e+2>=n.length)return!0;let r=n[e+2];return pe(r)||r==="*"||!J(r)}function On(n,e){if(e>=n.length)return null;let t=n[e];if(!Wt(t)||t==="'"&&Eo(n,e))return null;let i={'"':'"',"'":"'","`":"`","\u300C":"\u300D"}[t];if(!i)return null;let a=e+1,s=t,o=!1;for(;a<n.length;){let l=n[a];if(s+=l,o)o=!1;else if(l==="\\")o=!0;else if(l===i)return s;a++}return s}function jn(n,e){if(e>=n.length)return!1;let t=n[e],r=n[e+1]||"",i=n[e+2]||"";if(t==="/"&&r!=="/"&&/[a-zA-Z0-9._-]/.test(r)||t==="/"&&r==="/"&&/[a-zA-Z]/.test(i)||t==="."&&(r==="/"||r==="."&&i==="/"))return!0;let a=n.slice(e,e+8).toLowerCase();return!!(a.startsWith("http://")||a.startsWith("https://"))}function In(n,e){if(!jn(n,e))return null;let t=e,r="",i=/[a-zA-Z0-9/:._\-?&=%@+~!$'()*,;[\]]/;for(;t<n.length;){let a=n[t];if(a==="#"){if(r.length>0&&/[a-zA-Z0-9/.]$/.test(r))for(r+=a,t++;t<n.length&&/[a-zA-Z0-9_-]/.test(n[t]);)r+=n[t++];break}if(i.test(a))r+=a,t++;else break}return r.length<2?null:r}function Wn(n,e){if(e>=n.length)return null;let t=n[e];if(!ye(t)&&t!=="-"&&t!=="+")return null;let r=e,i="";if((n[r]==="-"||n[r]==="+")&&(i+=n[r++]),r>=n.length||!ye(n[r]))return null;for(;r<n.length&&ye(n[r]);)i+=n[r++];if(r<n.length&&n[r]===".")for(i+=n[r++];r<n.length&&ye(n[r]);)i+=n[r++];return r<n.length&&(n.slice(r,r+2)==="ms"?i+="ms":(n[r]==="s"||n[r]==="m"||n[r]==="h")&&(i+=n[r])),i}var Po=["===","!==","->","==","!=","<=",">=","&&","||","**","+=","-=","*=","/=","+","-","*","/","=",">","<","!","&","|","%","^","~"];function xe(n){return e=>{let t=e.charCodeAt(0);return n.some(([r,i])=>t>=r&&t<=i)}}var $u=new Set(Po),Lo=new Set(["patient","destination","source","style","event","eventMarker","agent","goal","manner","into","from","to","with","at","of","as","by","in","on","over","under","between","through","without"]),Co=["click","dblclick","input","change","submit","keydown","keyup","keypress","mousedown","mouseup","mouseover","mouseout","mouseenter","mouseleave","mousemove","pointerdown","pointerup","pointermove","focus","blur","load","resize","scroll"],Vn=class _n{constructor(){this.profileKeywords=[],this.multiWordKeywords=[],this.profileKeywordMap=new Map,this.rawExtraEntries=[],this.extractors=[]}getExtraKeywordEntries(){return this.rawExtraEntries}tokenize(e){if(this.isUsingExtractors())return this.tokenizeWithExtractors(e);throw new Error(`${this.constructor.name}: tokenize() not implemented and no extractors registered. Either register extractors or override tokenize() method.`)}registerExtractor(e){zo(e)&&e.setContext(To(this)),this.extractors.push(e)}registerExtractors(e){for(let t of e)this.registerExtractor(t)}clearExtractors(){this.extractors=[]}isUsingExtractors(){return this.extractors.length>0}tokenizeWithExtractors(e){let t=[],r=0;for(;r<e.length;){for(;r<e.length&&pe(e[r]);)r++;if(r>=e.length)break;let i=this.tryMultiWordKeyword(e,r);if(i){t.push(i),r=i.position.end;continue}let a=!1;for(let s of this.extractors)if(s.canExtract(e,r)){let o=s.extract(e,r);if(o){let l=o.metadata?.normalized,c=o.metadata?.stem,d=o.metadata?.stemConfidence,p={};if(o.metadata)for(let[m,f]of Object.entries(o.metadata))m!=="normalized"&&m!=="stem"&&m!=="stemConfidence"&&(p[m]=f);let u={};l&&(u.normalized=l),c&&(u.stem=c),d!==void 0&&(u.stemConfidence=d),Object.keys(p).length>0&&(u.metadata=p),t.push($(o.value,this.classifyToken(o.value),_(r,r+o.length),Object.keys(u).length>0?u:void 0)),r+=o.length,a=!0;break}}if(!a){let s=e[r],o=this.classifyUnknownChar(s);t.push($(s,o,_(r,r+1))),r++}}return new re(t,this.language)}classifyUnknownChar(e){return"()[]{},:;".includes(e)?"punctuation":"+-*/<>=!&|".includes(e)?"operator":"identifier"}tryPropertyAccess(e,t,r){if(e[t]!==".")return!1;let i=r[r.length-1],a=i&&i.position.end<t;if(i&&!a&&(i.kind==="identifier"||i.kind==="keyword"||i.kind==="selector"))return r.push($(".","operator",_(t,t+1))),!0;let l=t+1;for(;l<e.length&&J(e[l]);)l++;return l<e.length&&e[l]==="("?(r.push($(".","operator",_(t,t+1))),!0):!1}initializeKeywordsFromProfile(e,t=[]){let r=new Map;if(this.rawExtraEntries=t,e.keywords){for(let[i,a]of Object.entries(e.keywords))if(r.set(a.primary,{native:a.primary,normalized:a.normalized||i}),a.alternatives)for(let s of a.alternatives)r.set(s,{native:s,normalized:a.normalized||i})}if(e.references){for(let[i,a]of Object.entries(e.references))r.set(a,{native:a,normalized:i});for(let i of Object.keys(e.references))r.has(i)||r.set(i,{native:i,normalized:i})}if(e.roleMarkers){for(let[i,a]of Object.entries(e.roleMarkers))if(a.primary&&r.set(a.primary,{native:a.primary,normalized:i}),a.alternatives)for(let s of a.alternatives)r.set(s,{native:s,normalized:i})}if(e.possessive?.keywords)for(let[i,a]of Object.entries(e.possessive.keywords))r.set(i,{native:i,normalized:a});for(let i of Co)r.has(i)||r.set(i,{native:i,normalized:i});for(let i of t)r.set(i.native,i);this.profileKeywords=Array.from(r.values()).sort((i,a)=>a.native.length-i.native.length),this.multiWordKeywords=this.profileKeywords.filter(i=>i.native.includes(" ")&&!Lo.has(i.normalized)),this.profileKeywordMap=new Map;for(let i of this.profileKeywords){this.profileKeywordMap.set(i.native.toLowerCase(),i);let a=this.removeDiacritics(i.native);a!==i.native&&!this.profileKeywordMap.has(a.toLowerCase())&&this.profileKeywordMap.set(a.toLowerCase(),i)}}removeDiacritics(e){return e.replace(/[\u064B-\u0652\u0670]/g,"")}tryProfileKeyword(e,t){for(let r of this.profileKeywords)if(e.slice(t).startsWith(r.native))return $(r.native,"keyword",_(t,t+r.native.length),r.normalized);return null}tryMultiWordKeyword(e,t,r=i=>/[\p{L}\p{N}_]/u.test(i)){if(this.multiWordKeywords.length===0)return null;let i=e.slice(t);for(let a of this.multiWordKeywords){if(!i.startsWith(a.native))continue;let s=e[t+a.native.length];if(!(s!==void 0&&r(s)))return $(a.native,"keyword",_(t,t+a.native.length),a.normalized)}return null}isKeywordStart(e,t){let r=e.slice(t);return this.profileKeywords.some(i=>r.startsWith(i.native))}isKeywordStartAtBoundary(e,t,r=i=>/[\p{L}\p{N}_]/u.test(i)){let i=e.slice(t);return this.profileKeywords.some(a=>{if(!i.startsWith(a.native))return!1;let s=e[t+a.native.length];return s===void 0||!r(s)})}lookupKeyword(e){return this.profileKeywordMap.get(e.toLowerCase())}isKeyword(e){return this.profileKeywordMap.has(e.toLowerCase())}setNormalizer(e){this.normalizer=e}tryNormalize(e){if(!this.normalizer)return null;let t=this.normalizer.normalize(e);return t.stem!==e&&t.confidence>=.7?t:null}tryMorphKeywordMatch(e,t,r){let i=this.tryNormalize(e);if(!i)return null;let a=this.lookupKeyword(i.stem);if(!a)return null;let s={normalized:a.normalized,stem:i.stem,stemConfidence:i.confidence};return $(e,"keyword",_(t,r),s)}trySelector(e,t){let r=Mn(e,t);return r?$(r,"selector",_(t,t+r.length)):null}tryEventModifier(e,t){if(e[t]!==".")return null;let r=e.slice(t).match(/^\.(?:once|debounce|throttle|queue)(?:\(([^)]+)\))?(?:\s|$|\.)/);if(!r)return null;let i=r[0].replace(/(\s|\.)$/,""),a=i.slice(1).split("(")[0],s=r[1];return{...$(i,"event-modifier",_(t,t+i.length)),metadata:{modifierName:a,value:s?a==="queue"?s:parseInt(s,10):void 0}}}tryString(e,t){let r=On(e,t);return r?$(r,"literal",_(t,t+r.length)):null}tryNumber(e,t){let r=Wn(e,t);return r?$(r,"literal",_(t,t+r.length)):null}tryMatchTimeUnit(e,t,r,i=!1){let a=t;if(i)for(;a<e.length&&pe(e[a]);)a++;let s=e.slice(a);for(let o of r){let l=s.slice(0,o.length);if(o.caseInsensitive?l.toLowerCase()===o.pattern.toLowerCase():l===o.pattern){if(o.notFollowedBy&&(s[o.length]||"")===o.notFollowedBy)continue;if(o.checkBoundary){let d=s[o.length]||"";if(J(d))continue}return{suffix:o.suffix,endPos:a+o.length}}}return null}parseBaseNumber(e,t,r=!0){let i=t,a="";if(r&&(e[i]==="-"||e[i]==="+")&&(a+=e[i++]),i>=e.length||!ye(e[i]))return null;for(;i<e.length&&ye(e[i]);)a+=e[i++];if(i<e.length&&e[i]===".")for(a+=e[i++];i<e.length&&ye(e[i]);)a+=e[i++];return!a||a==="-"||a==="+"?null:{number:a,endPos:i}}tryNumberWithTimeUnits(e,t,r,i={}){let{allowSign:a=!0,skipWhitespace:s=!1}=i,o=this.parseBaseNumber(e,t,a);if(!o)return null;let{number:l,endPos:c}=o,d=[...r,..._n.STANDARD_TIME_UNITS],p=this.tryMatchTimeUnit(e,c,d,s);return p&&(l+=p.suffix,c=p.endPos),$(l,"literal",_(t,c))}tryUrl(e,t){let r=In(e,t);return r?$(r,"url",_(t,t+r.length)):null}tryVariableRef(e,t){if(e[t]!==":"||t+1>=e.length||!J(e[t+1]))return null;let r=t+1;for(;r<e.length&&J(e[r]);)r++;let i=e.slice(t,r);return $(i,"identifier",_(t,r))}tryOperator(e,t){let r=e.slice(t,t+2);if(["==","!=","<=",">=","&&","||","->"].includes(r))return $(r,"operator",_(t,t+2));let i=e[t];return["<",">","!","+","-","*","/","="].includes(i)?$(i,"operator",_(t,t+1)):["(",")","{","}",",",";",":"].includes(i)?$(i,"punctuation",_(t,t+1)):null}tryMultiCharParticle(e,t,r){for(let i of r)if(e.slice(t,t+i.length)===i)return $(i,"particle",_(t,t+i.length));return null}};Vn.STANDARD_TIME_UNITS=[{pattern:"ms",suffix:"ms",length:2},{pattern:"s",suffix:"s",length:1,checkBoundary:!0},{pattern:"m",suffix:"m",length:1,checkBoundary:!0,notFollowedBy:"s"},{pattern:"h",suffix:"h",length:1,checkBoundary:!0}];var V=Vn;function Y(n){return{stem:n,confidence:1}}function O(n,e,t){return t?{stem:n,confidence:e,metadata:t}:{stem:n,confidence:e}}var Pr=class{constructor(n){this.language=n.language,this.config={minWordLength:3,minStemLength:2,...n}}normalize(n){let e=n.toLowerCase();if(this.isAlreadyNormalized(e))return Y(n);if(this.config.reflexiveSuffixes){let t=this.tryReflexiveNormalization(e);if(t)return t}if(this.config.endings){let t=this.tryConjugationEndings(e);if(t)return t}if(this.config.suffixRules){let t=this.trySuffixRules(e);if(t)return t}if(this.config.prefixRules){let t=this.tryPrefixRules(e);if(t)return t}return Y(n)}isAlreadyNormalized(n){return this.config.infinitiveEndings?this.config.infinitiveEndings.some(e=>n.endsWith(e)):!1}tryReflexiveNormalization(n){let e=this.config.reflexiveSuffixes;if(!e)return null;for(let t of e){if(!n.endsWith(t))continue;let r=n.slice(0,-t.length);if(this.isAlreadyNormalized(r))return O(r,.88,{removedSuffixes:[t],conjugationType:"reflexive"});let i=this.tryConjugationEndings(r)||this.trySuffixRules(r);if(i&&i.stem!==r)return O(i.stem,i.confidence*.95,{removedSuffixes:[t,...i.metadata?.removedSuffixes||[]],conjugationType:"reflexive"})}return null}tryConjugationEndings(n){let e=this.config.endings;if(!e)return null;let t=this.config.minStemLength??2;for(let r of e){if(!n.endsWith(r.ending))continue;let i=n.slice(0,-r.ending.length);if(i.length<t)continue;let a=i+r.stem;return O(a,r.confidence,{removedSuffixes:[r.ending],conjugationType:r.type})}return null}trySuffixRules(n){let e=this.config.suffixRules;if(!e)return null;let t=this.config.minStemLength??2;for(let r of e){if(!n.endsWith(r.pattern))continue;let i=n.slice(0,-r.pattern.length),a=r.minStemLength??t;if(i.length<a)continue;let s=i+(r.replacement||"");return O(s,r.confidence,{removedSuffixes:[r.pattern],...r.conjugationType&&{conjugationType:r.conjugationType}})}return null}tryPrefixRules(n){let e=this.config.prefixRules;if(!e)return null;for(let t of e){if(!n.startsWith(t.pattern))continue;let r=n.slice(t.pattern.length),i=t.minRemaining??this.config.minStemLength??2;if(!(r.length<i))return O(r,1-t.confidencePenalty,{removedPrefixes:[t.pattern]})}return null}};function ue(n){let e="complex";return n.startsWith("#")&&!n.includes(" ")?e="id":n.startsWith(".")&&!n.includes(" ")?e="class":n.startsWith("[")&&n.endsWith("]")?e="attribute":/^[a-z][a-z0-9]*$/i.test(n)&&(e="element"),{type:"selector",value:n,selectorKind:e}}function U(n,e){let t={type:"literal",value:n};return e!==void 0?{type:"literal",value:n,dataType:e}:t}function Oe(n){return Ot(n)}function oe(n){return{type:"reference",value:n}}function ge(n,e){return{type:"property-path",object:n,property:e}}function ne(n,e,t){let r={kind:"command",action:n,roles:new Map(Object.entries(e))};return t!==void 0?{...r,metadata:t}:r}function Le(n,e,t,r,i,a){let s=new Map;s.set("event",n);let o={kind:"event-handler",action:"on",roles:s,body:e};return t!==void 0&&(o.eventModifiers=t),r!==void 0&&(o.metadata=r),i!==void 0&&i.length>0&&(o.parameterNames=i),a!==void 0&&a.length>0&&(o.additionalEvents=a),o}function $n(n,e,t,r,i){let a={kind:"behavior",action:"behavior",roles:new Map,name:n,parameters:e,eventHandlers:t};return r!==void 0&&r.length>0&&(a.initBlock=r),i!==void 0&&(a.metadata=i),a}function Kn(n,e,t,r){let i={kind:"def",action:"def",roles:new Map,name:n,parameters:e,body:t};return r!==void 0&&(i.metadata=r),i}function pt(n,e="then",t){let r={kind:"compound",action:"compound",roles:new Map,statements:n,chainType:e};return t!==void 0&&(r.metadata=t),r}function qn(n,e,t,r){let i=new Map;i.set("condition",n);let a={kind:"conditional",action:"if",roles:i,thenBranch:e};return t!==void 0&&(a.elseBranch=t),r!==void 0&&(a.metadata=r),a}function dt(n,e){return!e||e.length===0||e.includes(n)||e.includes("expression")?!0:n==="property-path"?e.some(t=>["selector","reference","expression"].includes(t)):n==="expression"?e.some(t=>["selector","reference","expression"].includes(t)):!1}function be(n){let e=n.roles.find(t=>t.role==="destination");return e?{destination:e.default?{fromRole:"destination",default:e.default}:{fromRole:"destination"}}:{}}function Se(n){let e=n.roles.find(t=>t.role==="source");return e?{source:e.default?{fromRole:"source",default:e.default}:{fromRole:"source"}}:{}}function we(n,e){return Bn(n,e,"source")}function _t(n,e){return Bn(n,e,"destination")}function Bn(n,e,t){if(!e||!n.roles.some(a=>a.role===t))return[];let r=e.alternatives?{type:"literal",value:e.primary,alternatives:[...e.alternatives]}:{type:"literal",value:e.primary},i={type:"role",role:t,optional:!0};return[{type:"group",optional:!0,tokens:e.position==="after"?[i,r]:[r,i]}]}var Ro={action:"toggle",description:"Toggle a class or attribute on/off",category:"dom-class",primaryRole:"patient",roles:[{role:"patient",description:"The class or attribute to toggle",required:!0,expectedTypes:["selector"],selectorKinds:["class","attribute"],svoPosition:1,sovPosition:2},{role:"destination",description:"The target element (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:2,sovPosition:1,markerVariants:{ko:["\uC5D0\uC11C"]}}],errorCodes:["MISSING_ARGUMENT","NO_VALID_CLASS_NAMES","INVALID_CSS_PROPERTY"],preconditions:[{condition:"Command has at least one argument",errorCode:"MISSING_ARGUMENT",message:"toggle command requires an argument"},{condition:"Class names are valid CSS identifiers",errorCode:"NO_VALID_CLASS_NAMES",message:"toggle command: no valid class names found"}],recoveryHints:{MISSING_ARGUMENT:"Add a class selector (.classname) or attribute to toggle",NO_VALID_CLASS_NAMES:"Ensure class names start with a dot (.) and are valid CSS identifiers",INVALID_CSS_PROPERTY:"Check CSS property name syntax (use kebab-case)"}},No={action:"add",description:"Add a class or attribute to an element",category:"dom-class",primaryRole:"patient",roles:[{role:"patient",description:"The class or attribute to add",required:!0,expectedTypes:["selector","literal"],svoPosition:1,sovPosition:2},{role:"destination",description:"The target element (defaults to me)",required:!1,expectedTypes:["selector","reference","expression"],default:{type:"reference",value:"me"},svoPosition:2,sovPosition:1,markerOverride:{en:"to"}}],errorCodes:["MISSING_ARGUMENT","NO_VALID_CLASS_NAMES","PROPERTY_REQUIRES_VALUE"],preconditions:[{condition:"Command has at least one argument",errorCode:"MISSING_ARGUMENT",message:"add command requires an argument"}],recoveryHints:{MISSING_ARGUMENT:"Add a class selector (.classname) or attribute to add",NO_VALID_CLASS_NAMES:"Ensure class names start with a dot (.) and are valid CSS identifiers",PROPERTY_REQUIRES_VALUE:"When adding a property (*prop), provide a value argument"}},Ao={action:"remove",description:"Remove a class or attribute from an element",category:"dom-class",primaryRole:"patient",targetRole:"source",roles:[{role:"patient",description:"The class/attribute to remove, or the element to remove",required:!0,expectedTypes:["selector","reference"],svoPosition:1,sovPosition:2},{role:"source",description:"The element to remove from (defaults to me)",required:!1,expectedTypes:["selector","reference","expression"],default:{type:"reference",value:"me"},svoPosition:2,sovPosition:1}],errorCodes:["MISSING_ARGUMENT","NO_VALID_CLASS_NAMES"],preconditions:[{condition:"Command has at least one argument",errorCode:"MISSING_ARGUMENT",message:"remove command requires an argument"}],recoveryHints:{MISSING_ARGUMENT:"Add a class selector (.classname) or attribute to remove",NO_VALID_CLASS_NAMES:"Ensure class names start with a dot (.) and are valid CSS identifiers"}},Mo={action:"put",description:"Put content into a target element or variable",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The content to put",required:!0,expectedTypes:["literal","selector","reference","expression"],svoPosition:1,sovPosition:1},{role:"destination",description:"Where to put the content",required:!0,expectedTypes:["selector","reference"],svoPosition:2,sovPosition:2,markerOverride:{en:"into"},markerVariants:{en:["before","after"]},methodCarrier:"method"}],errorCodes:["MISSING_ARGUMENTS","MISSING_CONTENT","MISSING_POSITION","INVALID_POSITION","NO_TARGET","NO_ELEMENTS"],preconditions:[{condition:"Command has content and position arguments",errorCode:"MISSING_ARGUMENTS",message:"put requires arguments"},{condition:"Content to put is specified",errorCode:"MISSING_CONTENT",message:"put requires content"},{condition:"Position keyword is specified (into, before, after, etc.)",errorCode:"MISSING_POSITION",message:"put requires position keyword"}],recoveryHints:{MISSING_ARGUMENTS:"Use syntax: put <content> into/before/after <target>",MISSING_CONTENT:"Add content to put (string, element, or expression)",MISSING_POSITION:"Add position keyword: into, before, after, at start of, at end of",INVALID_POSITION:"Valid positions: into, before, after, at start of, at end of",NO_TARGET:'Ensure target element exists or use "me" reference',NO_ELEMENTS:"Check that the selector matches existing elements"}},Oo={action:"set",description:"Set a property or variable to a value",category:"variable",primaryRole:"destination",roles:[{role:"destination",description:"The property or variable to set",required:!0,expectedTypes:["selector","reference","expression","property-path"],svoPosition:1,sovPosition:1,markerOverride:{en:"",ja:"\u3092",ko:"\uB97C",tr:"i",ar:"",sw:"",tl:"",bn:"\u0995\u09C7",qu:"ta",hi:"\u0915\u094B"}},{role:"patient",description:"The value to set",required:!0,expectedTypes:["literal","expression","reference"],svoPosition:2,sovPosition:2,markerOverride:{en:"to",es:"a",pt:"para",fr:"\xE0",de:"auf",id:"ke",ja:"\u306B",ko:"\uC5D0",tr:"e",ar:"\u0625\u0644\u0649",sw:"kwenye",tl:"sa",bn:"\u09A4\u09C7",qu:"man",hi:"\u092E\u0947\u0902"},markerVariants:{tr:["e","a","ye","ya"]}},{role:"scope",description:"The element(s) the attribute/property is set on (defaults to me)",required:!1,expectedTypes:["selector","reference"],svoPosition:3,sovPosition:3,markerOverride:{en:"on",es:"on",pt:"on",fr:"on",de:"on",it:"on",id:"on",ms:"on",sw:"on",tl:"on",zh:"on",vi:"on",ru:"on",uk:"on",pl:"on",th:"on",he:"on",ar:"on",ja:"on",ko:"on",tr:"on",hi:"on",bn:"on",qu:"on"}}],errorCodes:["MISSING_TARGET","INVALID_TARGET","MISSING_VALUE","INVALID_SYNTAX"],preconditions:[{condition:"Command has a target variable or property",errorCode:"MISSING_TARGET",message:"set command requires a target"},{condition:"Target is a valid variable or property reference",errorCode:"INVALID_TARGET",message:"set command target must be a string or object literal"},{condition:'Value is specified with "to" keyword',errorCode:"MISSING_VALUE",message:'set command requires a value (use "to" keyword)'}],recoveryHints:{MISSING_TARGET:"Add a target: set :variable to value OR set element.property to value",INVALID_TARGET:'Use local variable (:name), element property (el.prop), or "the X of Y" syntax',MISSING_VALUE:'Add "to <value>" to specify what to set',INVALID_SYNTAX:"Use syntax: set <target> to <value>"}},jo={action:"bind",description:"Reactively bind a variable to an element or property value",category:"variable",primaryRole:"destination",roles:[{role:"destination",description:"The variable to bind",required:!0,expectedTypes:["reference","expression"],svoPosition:1,sovPosition:1,markerOverride:{en:"",es:"",pt:"",fr:"",de:"",it:"",id:"",ms:"",vi:"",ru:"",uk:"",pl:"",th:"",zh:"",he:"",ar:"",sw:"",tl:"",ja:"\u3092",ko:"\uB97C",tr:"i",bn:"\u0995\u09C7",qu:"ta",hi:"\u0915\u094B"}},{role:"source",description:"The element or property to bind to",required:!0,expectedTypes:["selector","reference","expression"],svoPosition:2,sovPosition:2,markerOverride:{en:"to",es:"a",pt:"para",fr:"\xE0",de:"zu",it:"in",id:"ke",ms:"ke",vi:"v\xE0o",ru:"\u0432",uk:"\u0432",pl:"do",ja:"\u306B",ko:"\uC5D0",tr:"e",ar:"\u0625\u0644\u0649",zh:"\u5230",he:"\u05DC",sw:"kwa",th:"\u0E43\u0E19",tl:"sa",bn:"\u09A4\u09C7",qu:"man",hi:"\u092E\u0947\u0902"}}],errorCodes:["MISSING_TARGET","MISSING_VALUE","INVALID_SYNTAX"],recoveryHints:{MISSING_TARGET:"Add a variable to bind: bind $name to #input",MISSING_VALUE:'Add "to <element>" to specify the binding source',INVALID_SYNTAX:"Use syntax: bind <variable> to <element>"}},Io={action:"live",description:"Reactive block: re-run the body when its dependencies change",category:"control-flow",primaryRole:"patient",hasBody:!0,bareKeyword:!0,roles:[]},Wo={action:"eventsource",description:"Open a Server-Sent Events stream and handle its events",category:"async",primaryRole:"patient",hasBody:!0,bareKeyword:!0,roles:[]},Vo={action:"socket",description:"Open a WebSocket and handle its messages",category:"async",primaryRole:"patient",hasBody:!0,bareKeyword:!0,roles:[]},_o={action:"worker",description:"Define a Web Worker with inline methods",category:"async",primaryRole:"patient",hasBody:!0,bareKeyword:!0,roles:[]},$o={action:"intercept",description:"Service-worker fetch interception / caching strategies",category:"async",primaryRole:"patient",hasBody:!0,bareKeyword:!0,roles:[]},Ko={action:"show",description:"Make an element visible",category:"dom-visibility",primaryRole:"patient",roles:[{role:"patient",description:"The element to show",required:!0,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:1,sovPosition:1},{role:"style",description:"Animation style (fade, slide, etc.)",required:!1,expectedTypes:["literal"],svoPosition:2,sovPosition:2}]},qo={action:"hide",description:"Make an element invisible",category:"dom-visibility",primaryRole:"patient",roles:[{role:"patient",description:"The element to hide",required:!0,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:1,sovPosition:1},{role:"style",description:"Animation style (fade, slide, etc.)",required:!1,expectedTypes:["literal"],svoPosition:2,sovPosition:2}]},Bo={action:"on",description:"Handle an event",category:"event",primaryRole:"event",hasBody:!0,roles:[{role:"event",description:"The event to handle",required:!0,expectedTypes:["literal"],svoPosition:1,sovPosition:2},{role:"source",description:"The element to listen on (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:2,sovPosition:1}]},Do={action:"trigger",description:"Trigger/dispatch an event",category:"event",primaryRole:"event",roles:[{role:"event",description:"The event to trigger (supports namespaced events like draggable:start)",required:!0,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:2},{role:"destination",description:"The target element (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:2,sovPosition:1}]},Ho={action:"wait",description:"Wait for a duration or event",category:"async",primaryRole:"duration",roles:[{role:"duration",description:"Duration or event to wait for",required:!0,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:1}]},Fo={action:"fetch",description:"Fetch data from a URL",category:"async",primaryRole:"source",roles:[{role:"source",description:"The URL to fetch from",required:!0,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:1,renderOverride:{en:""}},{role:"responseType",description:"Response format (json, text, html, blob, etc.)",required:!1,expectedTypes:["literal","expression"],svoPosition:2,sovPosition:2,markerOverride:{en:"as"}},{role:"method",description:"HTTP method (GET, POST, etc.)",required:!1,expectedTypes:["literal"],svoPosition:3,sovPosition:3},{role:"destination",description:"Where to store the result",required:!1,expectedTypes:["selector","reference"],svoPosition:4,sovPosition:4}]},Uo={action:"increment",description:"Increment a numeric value",category:"variable",primaryRole:"patient",roles:[{role:"patient",description:"The value to increment",required:!0,expectedTypes:["selector","reference","expression"],svoPosition:1,sovPosition:1},{role:"quantity",description:"Amount to increment by (defaults to 1)",required:!1,expectedTypes:["literal"],default:{type:"literal",value:1,dataType:"number"},svoPosition:2,sovPosition:2,markerOverride:{en:"by",es:"por",pt:"por",fr:"par",de:"um"}}]},Go={action:"decrement",description:"Decrement a numeric value",category:"variable",primaryRole:"patient",roles:[{role:"patient",description:"The value to decrement",required:!0,expectedTypes:["selector","reference","expression"],svoPosition:1,sovPosition:1},{role:"quantity",description:"Amount to decrement by (defaults to 1)",required:!1,expectedTypes:["literal"],default:{type:"literal",value:1,dataType:"number"},svoPosition:2,sovPosition:2,markerOverride:{en:"by",es:"por",pt:"por",fr:"par",de:"um"}}]},Yo={action:"append",description:"Append content to an element",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The content to append",required:!0,expectedTypes:["literal","selector","expression"],svoPosition:1,sovPosition:2},{role:"destination",description:"The element to append to",required:!0,expectedTypes:["selector","reference"],svoPosition:2,sovPosition:1,markerOverride:{en:"to"}}]},Xo={action:"prepend",description:"Prepend content to an element",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The content to prepend",required:!0,expectedTypes:["literal","selector","expression"],svoPosition:1,sovPosition:2},{role:"destination",description:"The element to prepend to",required:!0,expectedTypes:["selector","reference"],svoPosition:2,sovPosition:1,markerOverride:{en:"to"}}]},Zo={action:"log",description:"Log a value to the console",category:"variable",primaryRole:"patient",roles:[{role:"patient",description:"The value to log",required:!0,expectedTypes:["literal","selector","reference","expression"],svoPosition:1,sovPosition:1}]},Jo={action:"get",description:"Get a value from a source",category:"variable",primaryRole:"source",roles:[{role:"source",description:"The source to get from",required:!0,expectedTypes:["selector","reference","expression"],svoPosition:1,sovPosition:2,markerOverride:{en:"",es:"",pt:"",fr:"",de:"",ja:"\u3092",zh:"",ko:"\uB97C",ar:"\u0639\u0644\u0649",tr:"i",id:"",he:"\u05D0\u05EA",sw:"",tl:"",bn:"\u0995\u09C7",qu:"ta"}},{role:"destination",description:"Where to store the result (optional)",required:!1,expectedTypes:["reference"],svoPosition:2,sovPosition:1}]},Qo={action:"take",description:"Take content from a source element",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The class or element to take",required:!0,expectedTypes:["selector"],svoPosition:1,sovPosition:2},{role:"source",description:"The element to take from (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:2,sovPosition:1}]},es={action:"make",description:"Create a new element",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The element type or selector to create",required:!0,expectedTypes:["literal","selector"],svoPosition:1,sovPosition:1}]},ts={action:"halt",description:"Halt/stop execution or event propagation",category:"control-flow",primaryRole:"patient",roles:[{role:"patient",description:"What to halt (event, default, bubbling, etc.)",required:!1,expectedTypes:["literal","reference","expression"],svoPosition:1,sovPosition:1}]},rs={action:"settle",description:"Wait for animations/transitions to settle",category:"async",primaryRole:"patient",roles:[{role:"patient",description:"The element to settle (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:1,sovPosition:1}]},ns={action:"throw",description:"Throw an error",category:"control-flow",primaryRole:"patient",roles:[{role:"patient",description:"The error message or object to throw",required:!0,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:1}]},is={action:"send",description:"Send an event to an element",category:"event",primaryRole:"event",roles:[{role:"event",description:"The event to send",required:!0,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:2},{role:"destination",description:"The target element (defaults to me)",required:!1,expectedTypes:["selector","reference","expression"],default:{type:"reference",value:"me"},svoPosition:2,sovPosition:1,markerOverride:{en:"to",ja:"\u306B",ar:"\u0625\u0644\u0649",es:"a",ko:"\uC5D0\uAC8C",zh:"\u5230",tr:"-e",pt:"para",fr:"\xE0",de:"an",id:"ke",qu:"-man",sw:"kwa"}}]},as={action:"if",description:"Conditional execution",category:"control-flow",primaryRole:"condition",hasBody:!0,roles:[{role:"condition",description:"The condition to evaluate",required:!0,expectedTypes:["expression","reference","selector"],svoPosition:1,sovPosition:1}]},os={action:"unless",description:"Negated conditional execution (executes when condition is false)",category:"control-flow",primaryRole:"condition",hasBody:!0,roles:[{role:"condition",description:"The condition to evaluate (body executes when false)",required:!0,expectedTypes:["expression","reference","selector"],svoPosition:1,sovPosition:1}]},ss={action:"else",description:"Else branch of conditional",category:"control-flow",primaryRole:"patient",hasBody:!0,roles:[]},ls={action:"repeat",description:"Repeat a block of commands",category:"control-flow",primaryRole:"loopType",hasBody:!0,roles:[{role:"loopType",description:"Loop variant: forever, times, for, while, until, until-event",required:!0,expectedTypes:["literal"],svoPosition:0,sovPosition:0},{role:"quantity",description:"Number of times to repeat",required:!1,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:1},{role:"event",description:"Event to wait for (terminates loop)",required:!1,expectedTypes:["literal","expression"],svoPosition:2,sovPosition:2},{role:"source",description:"Element to listen for event on",required:!1,expectedTypes:["selector","reference"],svoPosition:3,sovPosition:3}],notes:'Can also use "repeat forever", "repeat until condition", or "repeat until event X from Y"'},cs={action:"for",description:"Iterate over a collection",category:"control-flow",primaryRole:"patient",hasBody:!0,roles:[{role:"patient",description:"The iteration variable",required:!0,expectedTypes:["reference","expression"],svoPosition:1,sovPosition:2},{role:"source",description:"The collection to iterate over",required:!0,expectedTypes:["selector","reference","expression"],svoPosition:2,sovPosition:1,markerOverride:{en:"in",es:"en",fr:"en",de:"in",it:"in",pt:"dentro",id:"dalam",ms:"dalam",pl:"w",ru:"\u0432",uk:"\u0443",sw:"ndani",th:"\u0E43\u0E19",vi:"trong",ar:"\u0641\u064A",tl:"sa_loob",he:"in",zh:"\u5728"}}]},ps={action:"while",description:"Loop while condition is true",category:"control-flow",primaryRole:"condition",hasBody:!0,roles:[{role:"condition",description:"The condition to check",required:!0,expectedTypes:["expression"],svoPosition:1,sovPosition:1}]},ds={action:"continue",description:"Continue to next loop iteration",category:"control-flow",primaryRole:"patient",roles:[]},us={action:"go",description:"Navigate to a URL",category:"navigation",primaryRole:"destination",roles:[{role:"destination",description:"The URL to navigate to",required:!0,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:1,markerOverride:{en:"to"},renderOverride:{en:""},markerOptional:{en:!0},markerVariants:{he:["\u05D0\u05EA"],zh:["\u628A"]}}]},ms={action:"transition",description:"Transition an element with animation",category:"dom-visibility",primaryRole:"patient",omitRoleVariants:["goal"],roles:[{role:"patient",description:"The property to transition (opacity, *background-color, etc.)",required:!0,expectedTypes:["literal","expression","selector"],svoPosition:1,sovPosition:2,markerOverride:{en:"",ar:"",tl:"",sw:""}},{role:"goal",description:"The target value to transition to",required:!0,expectedTypes:["literal","expression"],svoPosition:2,sovPosition:3,markerOverride:{en:"to",ar:"\u0625\u0644\u0649",tl:"sa",sw:"kwa",bn:"\u09A4\u09C7",qu:"man",es:"a",pt:"para",fr:"\xE0",de:"zu",he:"\u05E2\u05DC",it:"in",ja:"\u306B",ko:"\uC5D0",ms:"ke",pl:"do",ru:"\u0432",th:"\u0E43\u0E19",tr:"e",uk:"\u0432",vi:"v\xE0o",zh:"\u5230",id:"ke"}},{role:"destination",description:"The target element (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:3,sovPosition:1},{role:"duration",description:"Transition duration (over 500ms, for 2 seconds)",required:!1,expectedTypes:["literal"],svoPosition:4,sovPosition:4,markerOverride:{en:"over"}},{role:"style",description:"Easing function (ease-in, linear, etc.)",required:!1,expectedTypes:["literal"],svoPosition:5,sovPosition:5}]},fs={action:"clone",description:"Clone an element",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The element to clone",required:!0,expectedTypes:["selector","reference"],svoPosition:1,sovPosition:2},{role:"destination",description:"Where to put the clone",required:!1,expectedTypes:["selector","reference"],svoPosition:2,sovPosition:1,markerOverride:{en:"into"}}]},ys={action:"focus",description:"Focus an element",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The element to focus (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:1,sovPosition:1}]},gs={action:"blur",description:"Remove focus from an element",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The element to blur (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:1,sovPosition:1}]},hs={action:"empty",description:"Remove all children from an element (sets innerHTML to empty)",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The element to empty (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:1,sovPosition:1}]},vs={action:"open",description:"Open a dialog, details element, or popover",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The element to open (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:2,sovPosition:2},{role:"style",description:"Open-mode variant (modal / non-modal) for <dialog>",required:!1,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:1,markerOverride:{en:"as"}}]},ks={action:"close",description:"Close a dialog, details element, or popover",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The element to close (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:1,sovPosition:1}]},xs={action:"select",description:"Select the contents of a text field or DOM element",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The element whose contents to select (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:1,sovPosition:1}]},bs={action:"clear",description:"Clear a variable, local, or input element",category:"variable",primaryRole:"patient",roles:[{role:"patient",description:"The variable or element to clear (defaults to me)",required:!1,expectedTypes:["selector","reference","expression"],default:{type:"reference",value:"me"},svoPosition:1,sovPosition:1}]},Ss={action:"reset",description:"Reset a <form> element to its default values",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The form element to reset (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:1,sovPosition:1}]},ws={action:"breakpoint",description:"Drop into the debugger",category:"control-flow",primaryRole:"patient",roles:[],bareKeyword:!0},zs={action:"call",description:"Call a function",category:"control-flow",primaryRole:"patient",roles:[{role:"patient",description:"The function to call",required:!0,expectedTypes:["expression","reference"],markerOptional:{he:!0,zh:!0},svoPosition:1,sovPosition:1}]},Ts={action:"return",description:"Return a value from a function",category:"control-flow",primaryRole:"patient",roles:[{role:"patient",description:"The value to return",required:!1,expectedTypes:["literal","expression","reference"],svoPosition:1,sovPosition:1}]},Es={action:"js",description:"Execute raw JavaScript code",category:"control-flow",primaryRole:"patient",hasBody:!0,roles:[{role:"patient",description:"The JavaScript code to execute",required:!1,expectedTypes:["expression"],svoPosition:1,sovPosition:1}]},Ps={action:"async",description:"Execute commands asynchronously",category:"async",primaryRole:"patient",hasBody:!0,roles:[]},Ls={action:"tell",description:"Execute commands in context of another element",category:"control-flow",primaryRole:"destination",hasBody:!0,roles:[{role:"destination",description:"The element to tell",required:!0,expectedTypes:["selector","reference"],svoPosition:1,sovPosition:1,markerOverride:{en:"",he:"\u05D0\u05EA",zh:"\u628A"}}]},Cs={action:"default",description:"Set a default value for a variable",category:"variable",primaryRole:"destination",roles:[{role:"destination",description:"The variable to set default for",required:!0,expectedTypes:["selector","reference","expression","property-path"],svoPosition:1,sovPosition:1,markerOverride:{en:"",ar:"",tl:"",sw:"",bn:"\u0995\u09C7",qu:"ta",ja:"\u3092",ko:"\uB97C",tr:"i",hi:"\u0915\u094B",de:"",es:"",fr:"",it:"",pt:"",pl:"",ru:"",uk:"",vi:"",id:"",ms:"",th:"",zh:"\u628A",he:"\u05D0\u05EA"}},{role:"patient",description:"The default value",required:!0,expectedTypes:["literal","expression"],svoPosition:2,sovPosition:2,markerOverride:{en:"to",ar:"\u0625\u0644\u0649",tl:"sa",sw:"kwa",bn:"\u09A4\u09C7",qu:"man",ja:"\u306B",ko:"\uC5D0",tr:"e",hi:"\u092E\u0947\u0902",de:"zu",es:"a",fr:"\xE0",it:"in",pt:"para",pl:"do",ru:"\u0432",uk:"\u0432",vi:"v\xE0o",id:"ke",ms:"ke",th:"\u0E43\u0E19",zh:"\u5230",he:"\u05E2\u05DC"}}]},Rs={action:"init",description:"Initialization block that runs once",category:"control-flow",primaryRole:"patient",hasBody:!0,roles:[]},Ns={action:"behavior",description:"Define a reusable behavior",category:"control-flow",primaryRole:"patient",hasBody:!0,roles:[{role:"patient",description:"The behavior name (PascalCase identifier)",required:!0,expectedTypes:["literal","reference","expression"],svoPosition:1,sovPosition:1}]},As={action:"install",description:"Install a behavior on an element",category:"control-flow",primaryRole:"patient",roles:[{role:"patient",description:"The behavior name to install",required:!0,expectedTypes:["literal","reference","expression"],svoPosition:1,sovPosition:2},{role:"destination",description:"Element to install on (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:2,sovPosition:1}]},Ms={action:"measure",description:"Measure element dimensions (x, y, width, height, etc.)",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"Property to measure (x, y, width, height, top, left, etc.)",required:!1,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:1},{role:"source",description:"Element to measure (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:2,sovPosition:2,markerOverride:{en:"of"}}]},Os={action:"swap",description:"Swap DOM content using various strategies (innerHTML, outerHTML, delete, etc.)",category:"dom-content",primaryRole:"destination",roles:[{role:"method",description:"The swap strategy (innerHTML, outerHTML, beforebegin, afterend, delete)",required:!1,expectedTypes:["literal"],svoPosition:1,sovPosition:3,markerOverride:{en:""}},{role:"destination",description:"The element to swap content in/for",required:!0,expectedTypes:["selector","reference"],svoPosition:2,sovPosition:1,markerOverride:{en:"of",es:"",fr:"",pt:"",it:"",de:"",pl:"",ru:"",uk:"",id:"",ms:"",sw:"",th:"",vi:"",he:"\u05D0\u05EA",zh:"\u628A"}},{role:"patient",description:"The content to swap in (optional for delete)",required:!1,expectedTypes:["literal","expression","selector"],svoPosition:3,sovPosition:2,markerOverride:{en:"with",es:"con",fr:"avec",pt:"com",it:"con",de:"mit",pl:"z",ru:"\u0441",uk:"\u0437",id:"dengan",ms:"dengan",sw:"na",th:"\u0E14\u0E49\u0E27\u0E22",vi:"v\u1EDBi",he:"\u05E2\u05DD",zh:"\u7528"}}]},js={action:"morph",description:"Morph an element into another using DOM diffing",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The element to morph",required:!0,expectedTypes:["selector","reference"],svoPosition:1,sovPosition:1,markerOverride:{en:""}},{role:"destination",description:"The target content/element to morph into",required:!0,expectedTypes:["literal","expression","selector","reference"],svoPosition:2,sovPosition:2,markerOverride:{en:"to"}}]},Is={action:"beep",description:"Debug output for expressions with type information",category:"variable",primaryRole:"patient",roles:[{role:"patient",description:"The expression(s) to debug",required:!1,expectedTypes:["literal","selector","reference","expression"],svoPosition:1,sovPosition:1}]},Ws={action:"break",description:"Exit from the current loop",category:"control-flow",primaryRole:"patient",roles:[]},Vs={action:"copy",description:"Copy text or element content to the clipboard",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The text or element to copy",required:!0,expectedTypes:["literal","selector","reference","expression"],svoPosition:1,sovPosition:1}]},_s={action:"exit",description:"Exit from the current event handler",category:"control-flow",primaryRole:"patient",roles:[],bareKeyword:!0},$s={action:"pick",description:"Select a random element from a collection",category:"variable",primaryRole:"patient",roles:[{role:"patient",description:"The items to pick from",required:!0,expectedTypes:["literal","expression","reference"],svoPosition:1,sovPosition:1},{role:"source",description:'The array to pick from (with "from" keyword)',required:!1,expectedTypes:["reference","expression"],svoPosition:2,sovPosition:2}]},Ks={action:"scroll",description:"Scroll the viewport to a target element",category:"navigation",primaryRole:"destination",argSkipTokens:["of","the","top","bottom","middle","center","nearest","left","right","smoothly","instantly"],roles:[{role:"destination",description:"The element to scroll to",required:!0,expectedTypes:["selector","reference","expression"],svoPosition:1,sovPosition:1,markerOverride:{en:"to"}}]},Dn={en:"url",es:"url",pt:"url",fr:"url",de:"url",it:"url",ja:"url",ko:"url",zh:"url",ar:"url",he:"url",hi:"url",bn:"url",tr:"url",ru:"url",uk:"url",pl:"url",id:"url",vi:"url",th:"url",ms:"url",tl:"url",sw:"url",qu:"url"},qs={en:"partials in",es:"partials in",pt:"partials in",fr:"partials in",de:"partials in",it:"partials in",ja:"partials in",ko:"partials in",zh:"partials in",ar:"partials in",he:"partials in",hi:"partials in",bn:"partials in",tr:"partials in",ru:"partials in",uk:"partials in",pl:"partials in",id:"partials in",vi:"partials in",th:"partials in",ms:"partials in",tl:"partials in",sw:"partials in",qu:"partials in"},Bs={action:"push",description:"Push a URL onto the browser history",category:"navigation",primaryRole:"patient",roles:[{role:"patient",description:"The URL to push (after the `url` keyword)",required:!0,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:1,markerOverride:Dn}]},Ds={action:"replace",description:"Replace the current browser history entry with a URL",category:"navigation",primaryRole:"patient",roles:[{role:"patient",description:"The URL to replace with (after the `url` keyword)",required:!0,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:1,markerOverride:Dn}]},Hs={action:"process",description:"Process hx-partial markup in HTML content",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The HTML content (string, element, or response) to process",required:!0,expectedTypes:["literal","reference","expression"],svoPosition:1,sovPosition:1,markerOverride:qs}]},Fs={action:"render",description:"Render a template with optional variables",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The template to render",required:!0,expectedTypes:["selector","reference","expression"],svoPosition:1,sovPosition:2},{role:"style",description:"Variables to pass to the template (with keyword)",required:!1,expectedTypes:["expression","reference"],svoPosition:2,sovPosition:1}]},je={toggle:Ro,add:No,remove:Ao,put:Mo,set:Oo,show:Ko,hide:qo,on:Bo,trigger:Do,wait:Ho,fetch:Fo,increment:Uo,decrement:Go,append:Yo,prepend:Xo,log:Zo,get:Jo,take:Qo,make:es,halt:ts,settle:rs,throw:ns,send:is,if:as,unless:os,else:ss,repeat:ls,for:cs,while:ps,continue:ds,go:us,scroll:Ks,push:Bs,replace:Ds,process:Hs,transition:ms,clone:fs,focus:ys,blur:gs,empty:hs,open:vs,close:ks,select:xs,clear:bs,reset:Ss,breakpoint:ws,call:zs,return:Ts,js:Es,async:Ps,tell:Ls,default:Cs,init:Rs,behavior:Ns,install:As,measure:Ms,swap:Os,morph:js,beep:Is,break:Ws,copy:Vs,exit:_s,pick:$s,render:Fs,bind:jo,live:Io,eventsource:Wo,socket:Vo,worker:_o,intercept:$o,compound:{action:"compound",description:"A compound node representing chained statements",primaryRole:"patient",category:"control-flow",hasBody:!0,roles:[]}};function me(n){return je[n]}function Hn(){return Object.values(je).filter(n=>n.roles.length>0||n.bareKeyword===!0)}function ze(n,e){let t=n.possessive?.keywords?.[e];if(t)return t;let r=n.possessive?.specialForms;if(r){for(let[i,a]of Object.entries(r))if(a===e)return i}}function Us(){return[{id:"put-bn-before",language:"bn",command:"put",priority:105,template:{format:"{patient} before {destination} \u0995\u09C7 \u09B0\u09BE\u0996\u09C1\u09A8",tokens:[{type:"role",role:"patient"},{type:"literal",value:"before"},{type:"role",role:"destination"},{type:"literal",value:"\u0995\u09C7"},{type:"literal",value:"\u09B0\u09BE\u0996\u09C1\u09A8",alternatives:["\u09B0\u09BE\u0996"]}]},extraction:{patient:{position:0},destination:{marker:"before"},manner:{default:{type:"literal",value:"before"}}}},{id:"put-bn-after",language:"bn",command:"put",priority:105,template:{format:"{patient} after {destination} \u0995\u09C7 \u09B0\u09BE\u0996\u09C1\u09A8",tokens:[{type:"role",role:"patient"},{type:"literal",value:"after"},{type:"role",role:"destination"},{type:"literal",value:"\u0995\u09C7"},{type:"literal",value:"\u09B0\u09BE\u0996\u09C1\u09A8",alternatives:["\u09B0\u09BE\u0996"]}]},extraction:{patient:{position:0},destination:{marker:"after"},manner:{default:{type:"literal",value:"after"}}}},{id:"put-bn-full",language:"bn",command:"put",priority:100,template:{format:"{patient} \u0995\u09C7 {destination} \u098F \u09B0\u09BE\u0996\u09C1\u09A8",tokens:[{type:"role",role:"patient"},{type:"literal",value:"\u0995\u09C7"},{type:"role",role:"destination"},{type:"literal",value:"\u098F",alternatives:["\u09A4\u09C7"]},{type:"literal",value:"\u09B0\u09BE\u0996\u09C1\u09A8",alternatives:["\u09B0\u09BE\u0996"]}]},extraction:{patient:{position:0},destination:{marker:"\u098F",position:2}}},{id:"put-bn-simple",language:"bn",command:"put",priority:90,template:{format:"\u09B0\u09BE\u0996\u09C1\u09A8 {patient} {destination} \u098F",tokens:[{type:"literal",value:"\u09B0\u09BE\u0996\u09C1\u09A8",alternatives:["\u09B0\u09BE\u0996"]},{type:"role",role:"patient"},{type:"role",role:"destination"},{type:"literal",value:"\u098F",alternatives:["\u09A4\u09C7"]}]},extraction:{patient:{position:1},destination:{position:2}}}]}function Gs(){return[{id:"put-en-into",language:"en",command:"put",priority:100,template:{format:"put {patient} into {destination}",tokens:[{type:"literal",value:"put"},{type:"role",role:"patient"},{type:"literal",value:"into",alternatives:["in","to"]},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"into",markerAlternatives:["in","to"]}}},{id:"put-en-before",language:"en",command:"put",priority:95,template:{format:"put {patient} before {destination}",tokens:[{type:"literal",value:"put"},{type:"role",role:"patient"},{type:"literal",value:"before"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"before"},manner:{default:{type:"literal",value:"before"}}}},{id:"put-en-after",language:"en",command:"put",priority:95,template:{format:"put {patient} after {destination}",tokens:[{type:"literal",value:"put"},{type:"role",role:"patient"},{type:"literal",value:"after"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"after"},manner:{default:{type:"literal",value:"after"}}}},{id:"put-en-at-end",language:"en",command:"put",priority:96,template:{format:"put {patient} at end of {destination}",tokens:[{type:"literal",value:"put"},{type:"role",role:"patient"},{type:"literal",value:"at"},{type:"literal",value:"end"},{type:"literal",value:"of"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{position:5},manner:{default:{type:"literal",value:"at end of"}}}},{id:"put-en-at-start",language:"en",command:"put",priority:96,template:{format:"put {patient} at start of {destination}",tokens:[{type:"literal",value:"put"},{type:"role",role:"patient"},{type:"literal",value:"at"},{type:"literal",value:"start"},{type:"literal",value:"of"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{position:5},manner:{default:{type:"literal",value:"at start of"}}}}]}function Ys(){return[{id:"put-es-full",language:"es",command:"put",priority:100,template:{format:"poner {patient} en {destination}",tokens:[{type:"literal",value:"poner",alternatives:["pon","colocar","put"]},{type:"role",role:"patient"},{type:"literal",value:"en",alternatives:["dentro de","a"]},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"en",markerAlternatives:["dentro de","a"]}}},{id:"put-es-before",language:"es",command:"put",priority:95,template:{format:"poner {patient} antes de {destination}",tokens:[{type:"literal",value:"poner",alternatives:["pon","colocar"]},{type:"role",role:"patient"},{type:"literal",value:"antes de",alternatives:["antes"]},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"antes de",markerAlternatives:["antes"]},manner:{default:{type:"literal",value:"before"}}}},{id:"put-es-after",language:"es",command:"put",priority:95,template:{format:"poner {patient} despu\xE9s de {destination}",tokens:[{type:"literal",value:"poner",alternatives:["pon","colocar"]},{type:"role",role:"patient"},{type:"literal",value:"despu\xE9s de",alternatives:["despues de","despu\xE9s"]},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"despu\xE9s de",markerAlternatives:["despues de","despu\xE9s"]},manner:{default:{type:"literal",value:"after"}}}}]}function Xs(){return[{id:"put-hi-before",language:"hi",command:"put",priority:106,template:{format:"{patient} before {destination} \u0915\u094B \u0930\u0916\u0947\u0902",tokens:[{type:"role",role:"patient"},{type:"literal",value:"before"},{type:"role",role:"destination"},{type:"literal",value:"\u0915\u094B"},{type:"literal",value:"\u0930\u0916\u0947\u0902",alternatives:["\u0930\u0916","\u0921\u093E\u0932\u0947\u0902","\u0921\u093E\u0932"]}]},extraction:{patient:{position:0},destination:{marker:"before"},manner:{default:{type:"literal",value:"before"}}}},{id:"put-hi-after",language:"hi",command:"put",priority:106,template:{format:"{patient} after {destination} \u0915\u094B \u0930\u0916\u0947\u0902",tokens:[{type:"role",role:"patient"},{type:"literal",value:"after"},{type:"role",role:"destination"},{type:"literal",value:"\u0915\u094B"},{type:"literal",value:"\u0930\u0916\u0947\u0902",alternatives:["\u0930\u0916","\u0921\u093E\u0932\u0947\u0902","\u0921\u093E\u0932"]}]},extraction:{patient:{position:0},destination:{marker:"after"},manner:{default:{type:"literal",value:"after"}}}},{id:"put-hi-verb-medial",language:"hi",command:"put",priority:105,template:{format:"{patient} \u0915\u094B \u0930\u0916\u0947\u0902 {destination} \u092E\u0947\u0902",tokens:[{type:"role",role:"patient"},{type:"literal",value:"\u0915\u094B"},{type:"literal",value:"\u0930\u0916\u0947\u0902",alternatives:["\u0930\u0916","\u0921\u093E\u0932\u0947\u0902","\u0921\u093E\u0932"]},{type:"role",role:"destination"},{type:"literal",value:"\u092E\u0947\u0902"}]},extraction:{patient:{position:0},destination:{marker:"\u092E\u0947\u0902",position:3}}},{id:"put-hi-full",language:"hi",command:"put",priority:100,template:{format:"{patient} \u0915\u094B {destination} \u092E\u0947\u0902 \u0930\u0916\u0947\u0902",tokens:[{type:"role",role:"patient"},{type:"literal",value:"\u0915\u094B"},{type:"role",role:"destination"},{type:"literal",value:"\u092E\u0947\u0902"},{type:"literal",value:"\u0930\u0916\u0947\u0902",alternatives:["\u0930\u0916","\u0921\u093E\u0932\u0947\u0902","\u0921\u093E\u0932"]}]},extraction:{patient:{position:0},destination:{marker:"\u092E\u0947\u0902",position:3}}},{id:"put-hi-simple",language:"hi",command:"put",priority:90,template:{format:"{patient} \u0930\u0916\u0947\u0902",tokens:[{type:"role",role:"patient"},{type:"literal",value:"\u0930\u0916\u0947\u0902",alternatives:["\u0930\u0916","\u0921\u093E\u0932\u0947\u0902","\u0921\u093E\u0932"]}]},extraction:{patient:{position:0},destination:{default:{type:"reference",value:"me"}}}},{id:"put-hi-bare",language:"hi",command:"put",priority:80,template:{format:"\u0930\u0916\u0947\u0902 {patient}",tokens:[{type:"literal",value:"\u0930\u0916\u0947\u0902",alternatives:["\u0930\u0916","\u0921\u093E\u0932\u0947\u0902","\u0921\u093E\u0932"]},{type:"role",role:"patient"}]},extraction:{patient:{position:1},destination:{default:{type:"reference",value:"me"}}}}]}function Zs(){return[{id:"put-id-full",language:"id",command:"put",priority:100,template:{format:"taruh {patient} ke dalam {destination}",tokens:[{type:"literal",value:"taruh",alternatives:["letakkan","masukkan","tempatkan","put"]},{type:"role",role:"patient",expectedTypes:["literal","selector","reference","expression"]},{type:"literal",value:"ke"},{type:"literal",value:"dalam",alternatives:["di"]},{type:"role",role:"destination",expectedTypes:["selector","reference"]}]},extraction:{patient:{position:1},destination:{position:4}}},{id:"put-id-simple-ke",language:"id",command:"put",priority:95,template:{format:"taruh {patient} ke {destination}",tokens:[{type:"literal",value:"taruh",alternatives:["letakkan","masukkan","tempatkan"]},{type:"role",role:"patient",expectedTypes:["literal","selector","reference","expression"]},{type:"literal",value:"ke",alternatives:["di","pada"]},{type:"role",role:"destination",expectedTypes:["selector","reference"]}]},extraction:{patient:{position:1},destination:{position:3}}},{id:"put-id-di",language:"id",command:"put",priority:90,template:{format:"taruh {patient} di {destination}",tokens:[{type:"literal",value:"taruh",alternatives:["letakkan","masukkan"]},{type:"role",role:"patient",expectedTypes:["literal","selector","reference","expression"]},{type:"literal",value:"di"},{type:"role",role:"destination",expectedTypes:["selector","reference"]}]},extraction:{patient:{position:1},destination:{position:3}}}]}function Js(){return[{id:"put-it-full",language:"it",command:"put",priority:100,template:{format:"mettere {patient} in {target}",tokens:[{type:"literal",value:"mettere",alternatives:["metti","inserire","put"]},{type:"role",role:"patient"},{type:"group",optional:!0,tokens:[{type:"literal",value:"in",alternatives:["dentro","nel"]},{type:"role",role:"destination"}]}]},extraction:{patient:{position:1},destination:{marker:"in",markerAlternatives:["dentro","nel"]}}},{id:"put-it-before",language:"it",command:"put",priority:105,template:{format:"mettere {patient} prima {target}",tokens:[{type:"literal",value:"mettere",alternatives:["metti","inserire","put"]},{type:"role",role:"patient"},{type:"literal",value:"prima"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"prima"},manner:{default:{type:"literal",value:"before"}}}},{id:"put-it-after",language:"it",command:"put",priority:105,template:{format:"mettere {patient} dopo {target}",tokens:[{type:"literal",value:"mettere",alternatives:["metti","inserire","put"]},{type:"role",role:"patient"},{type:"literal",value:"dopo"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"dopo"},manner:{default:{type:"literal",value:"after"}}}},{id:"put-it-simple",language:"it",command:"put",priority:90,template:{format:"mettere {patient}",tokens:[{type:"literal",value:"mettere",alternatives:["metti","inserire","put"]},{type:"role",role:"patient"}]},extraction:{patient:{position:1}}}]}function Qs(){return[{id:"put-pl-full",language:"pl",command:"put",priority:100,template:{format:"umie\u015B\u0107 {patient} w {destination}",tokens:[{type:"literal",value:"umie\u015B\u0107",alternatives:["umiesc","wstaw","w\u0142\xF3\u017C","wloz"]},{type:"role",role:"patient"},{type:"group",optional:!0,tokens:[{type:"literal",value:"w",alternatives:["do","na"]},{type:"role",role:"destination"}]}]},extraction:{patient:{position:1},destination:{marker:"w",markerAlternatives:["do","na"]}}},{id:"put-pl-before",language:"pl",command:"put",priority:105,template:{format:"umie\u015B\u0107 {patient} przed {destination}",tokens:[{type:"literal",value:"umie\u015B\u0107",alternatives:["umiesc","wstaw"]},{type:"role",role:"patient"},{type:"literal",value:"przed"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"przed"},manner:{default:{type:"literal",value:"before"}}}},{id:"put-pl-after",language:"pl",command:"put",priority:105,template:{format:"umie\u015B\u0107 {patient} po {destination}",tokens:[{type:"literal",value:"umie\u015B\u0107",alternatives:["umiesc","wstaw"]},{type:"role",role:"patient"},{type:"literal",value:"po"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"po"},manner:{default:{type:"literal",value:"after"}}}}]}function el(){return[{id:"put-ru-full",language:"ru",command:"put",priority:100,template:{format:"\u043F\u043E\u043B\u043E\u0436\u0438\u0442\u044C {patient} \u0432 {destination}",tokens:[{type:"literal",value:"\u043F\u043E\u043B\u043E\u0436\u0438\u0442\u044C",alternatives:["\u043F\u043E\u043B\u043E\u0436\u0438","\u043F\u043E\u043C\u0435\u0441\u0442\u0438\u0442\u044C","\u043F\u043E\u043C\u0435\u0441\u0442\u0438","\u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044C","\u0432\u0441\u0442\u0430\u0432\u044C"]},{type:"role",role:"patient"},{type:"group",optional:!0,tokens:[{type:"literal",value:"\u0432",alternatives:["\u0432\u043E","\u043D\u0430"]},{type:"role",role:"destination"}]}]},extraction:{patient:{position:1},destination:{marker:"\u0432",markerAlternatives:["\u0432\u043E","\u043D\u0430"]}}},{id:"put-ru-before",language:"ru",command:"put",priority:105,template:{format:"\u043F\u043E\u043B\u043E\u0436\u0438\u0442\u044C {patient} \u043F\u0435\u0440\u0435\u0434 {destination}",tokens:[{type:"literal",value:"\u043F\u043E\u043B\u043E\u0436\u0438\u0442\u044C",alternatives:["\u043F\u043E\u043B\u043E\u0436\u0438","\u043F\u043E\u043C\u0435\u0441\u0442\u0438\u0442\u044C","\u043F\u043E\u043C\u0435\u0441\u0442\u0438"]},{type:"role",role:"patient"},{type:"literal",value:"\u043F\u0435\u0440\u0435\u0434",alternatives:["\u0434\u043E"]},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"\u043F\u0435\u0440\u0435\u0434",markerAlternatives:["\u0434\u043E"]},manner:{default:{type:"literal",value:"before"}}}},{id:"put-ru-after",language:"ru",command:"put",priority:105,template:{format:"\u043F\u043E\u043B\u043E\u0436\u0438\u0442\u044C {patient} \u043F\u043E\u0441\u043B\u0435 {destination}",tokens:[{type:"literal",value:"\u043F\u043E\u043B\u043E\u0436\u0438\u0442\u044C",alternatives:["\u043F\u043E\u043B\u043E\u0436\u0438","\u043F\u043E\u043C\u0435\u0441\u0442\u0438\u0442\u044C","\u043F\u043E\u043C\u0435\u0441\u0442\u0438"]},{type:"role",role:"patient"},{type:"literal",value:"\u043F\u043E\u0441\u043B\u0435"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"\u043F\u043E\u0441\u043B\u0435"},manner:{default:{type:"literal",value:"after"}}}}]}function tl(){return[{id:"put-th-full",language:"th",command:"put",priority:100,template:{format:"\u0E43\u0E2A\u0E48 {patient} \u0E43\u0E19 {destination}",tokens:[{type:"literal",value:"\u0E43\u0E2A\u0E48",alternatives:["\u0E27\u0E32\u0E07"]},{type:"role",role:"patient"},{type:"literal",value:"\u0E43\u0E19"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"\u0E43\u0E19",position:3}}},{id:"put-th-before",language:"th",command:"put",priority:105,template:{format:"\u0E43\u0E2A\u0E48 {patient} \u0E01\u0E48\u0E2D\u0E19 {destination}",tokens:[{type:"literal",value:"\u0E43\u0E2A\u0E48",alternatives:["\u0E27\u0E32\u0E07"]},{type:"role",role:"patient"},{type:"literal",value:"\u0E01\u0E48\u0E2D\u0E19"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"\u0E01\u0E48\u0E2D\u0E19"},manner:{default:{type:"literal",value:"before"}}}},{id:"put-th-after",language:"th",command:"put",priority:105,template:{format:"\u0E43\u0E2A\u0E48 {patient} \u0E2B\u0E25\u0E31\u0E07 {destination}",tokens:[{type:"literal",value:"\u0E43\u0E2A\u0E48",alternatives:["\u0E27\u0E32\u0E07"]},{type:"role",role:"patient"},{type:"literal",value:"\u0E2B\u0E25\u0E31\u0E07"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"\u0E2B\u0E25\u0E31\u0E07"},manner:{default:{type:"literal",value:"after"}}}}]}function rl(){return[{id:"put-uk-full",language:"uk",command:"put",priority:100,template:{format:"\u043F\u043E\u043A\u043B\u0430\u0441\u0442\u0438 {patient} \u0432 {destination}",tokens:[{type:"literal",value:"\u043F\u043E\u043A\u043B\u0430\u0441\u0442\u0438",alternatives:["\u043F\u043E\u043A\u043B\u0430\u0434\u0438","\u043F\u043E\u043C\u0456\u0441\u0442\u0438\u0442\u0438","\u043F\u043E\u043C\u0456\u0441\u0442\u0438","\u0432\u0441\u0442\u0430\u0432\u0438\u0442\u0438","\u0432\u0441\u0442\u0430\u0432"]},{type:"role",role:"patient"},{type:"group",optional:!0,tokens:[{type:"literal",value:"\u0432",alternatives:["\u0443","\u043D\u0430"]},{type:"role",role:"destination"}]}]},extraction:{patient:{position:1},destination:{marker:"\u0432",markerAlternatives:["\u0443","\u043D\u0430"]}}},{id:"put-uk-before",language:"uk",command:"put",priority:95,template:{format:"\u043F\u043E\u043A\u043B\u0430\u0441\u0442\u0438 {patient} \u043F\u0435\u0440\u0435\u0434 {destination}",tokens:[{type:"literal",value:"\u043F\u043E\u043A\u043B\u0430\u0441\u0442\u0438",alternatives:["\u043F\u043E\u043A\u043B\u0430\u0434\u0438","\u043F\u043E\u043C\u0456\u0441\u0442\u0438\u0442\u0438","\u043F\u043E\u043C\u0456\u0441\u0442\u0438"]},{type:"role",role:"patient"},{type:"literal",value:"\u043F\u0435\u0440\u0435\u0434",alternatives:["\u0434\u043E"]},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"\u043F\u0435\u0440\u0435\u0434",markerAlternatives:["\u0434\u043E"]},manner:{default:{type:"literal",value:"before"}}}},{id:"put-uk-after",language:"uk",command:"put",priority:95,template:{format:"\u043F\u043E\u043A\u043B\u0430\u0441\u0442\u0438 {patient} \u043F\u0456\u0441\u043B\u044F {destination}",tokens:[{type:"literal",value:"\u043F\u043E\u043A\u043B\u0430\u0441\u0442\u0438",alternatives:["\u043F\u043E\u043A\u043B\u0430\u0434\u0438","\u043F\u043E\u043C\u0456\u0441\u0442\u0438\u0442\u0438","\u043F\u043E\u043C\u0456\u0441\u0442\u0438"]},{type:"role",role:"patient"},{type:"literal",value:"\u043F\u0456\u0441\u043B\u044F"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"\u043F\u0456\u0441\u043B\u044F"},manner:{default:{type:"literal",value:"after"}}}}]}function nl(){return[{id:"put-vi-into",language:"vi",command:"put",priority:100,template:{format:"\u0111\u1EB7t {patient} v\xE0o {target}",tokens:[{type:"literal",value:"\u0111\u1EB7t",alternatives:["\u0111\u1EC3","\u0111\u01B0a"]},{type:"role",role:"patient"},{type:"literal",value:"v\xE0o",alternatives:["v\xE0o trong"]},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"v\xE0o",markerAlternatives:["v\xE0o trong"]}}},{id:"put-vi-before",language:"vi",command:"put",priority:105,template:{format:"\u0111\u1EB7t {patient} tr\u01B0\u1EDBc {target}",tokens:[{type:"literal",value:"\u0111\u1EB7t",alternatives:["\u0111\u1EC3","\u0111\u01B0a"]},{type:"role",role:"patient"},{type:"literal",value:"tr\u01B0\u1EDBc",alternatives:["tr\u01B0\u1EDBc khi"]},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"tr\u01B0\u1EDBc",markerAlternatives:["tr\u01B0\u1EDBc khi"]},manner:{default:{type:"literal",value:"before"}}}},{id:"put-vi-after",language:"vi",command:"put",priority:105,template:{format:"\u0111\u1EB7t {patient} sau {target}",tokens:[{type:"literal",value:"\u0111\u1EB7t",alternatives:["\u0111\u1EC3","\u0111\u01B0a"]},{type:"role",role:"patient"},{type:"literal",value:"sau",alternatives:["sau khi"]},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"sau",markerAlternatives:["sau khi"]},manner:{default:{type:"literal",value:"after"}}}}]}function il(){return[...["before","after"].map(n=>{let e=n==="before"?"\xF1awpaqpi":"qhepapi";return{id:`put-qu-${n}`,language:"qu",command:"put",priority:105,template:{format:`{patient} ${e} {destination} ta churay`,tokens:[{type:"role",role:"patient"},{type:"literal",value:e,alternatives:[n]},{type:"role",role:"destination"},{type:"group",optional:!0,tokens:[{type:"literal",value:"ta"}]},{type:"literal",value:"churay",alternatives:["tiyachiy"]}]},extraction:{patient:{position:0},destination:{position:2},manner:{default:{type:"literal",value:n}}}}}),{id:"put-qu-patient-first",language:"qu",command:"put",priority:96,template:{format:"{patient} ta {destination} man churay",tokens:[{type:"role",role:"patient"},{type:"literal",value:"ta"},{type:"role",role:"destination"},{type:"literal",value:"man"},{type:"literal",value:"churay",alternatives:["tiyachiy"]}]},extraction:{patient:{position:0},destination:{position:2}}}]}function al(){return[{id:"put-zh-full",language:"zh",command:"put",priority:100,template:{format:"\u653E\u7F6E {patient} \u5230 {destination}",tokens:[{type:"literal",value:"\u653E\u7F6E",alternatives:["\u653E","\u653E\u5165","\u7F6E\u5165","put"]},{type:"role",role:"patient",expectedTypes:["literal","selector","reference","expression"]},{type:"literal",value:"\u5230",alternatives:["\u5728","\u4E8E","\u5165"]},{type:"role",role:"destination",expectedTypes:["selector","reference"]}]},extraction:{patient:{position:1},destination:{position:3}}},{id:"put-zh-ba",language:"zh",command:"put",priority:95,template:{format:"\u628A {patient} \u653E\u7F6E \u5230 {destination}",tokens:[{type:"literal",value:"\u628A"},{type:"role",role:"patient",expectedTypes:["literal","selector","reference","expression"]},{type:"literal",value:"\u653E\u7F6E",alternatives:["\u653E\u5230","\u653E\u5728","\u653E\u5165","\u653E","\u7F6E\u5165"]},{type:"group",optional:!0,tokens:[{type:"literal",value:"\u5230",alternatives:["\u5728","\u4E8E","\u5165"]}]},{type:"role",role:"destination",expectedTypes:["selector","reference"]}]},extraction:{patient:{position:1},destination:{marker:"\u5230",markerAlternatives:["\u5728","\u4E8E","\u5165"]}}}]}var ol=[{lang:"de",verb:"setzen",before:"vor",after:"nach"},{lang:"fr",verb:"mettre",before:"avant",after:"apr\xE8s"},{lang:"he",verb:"\u05E9\u05D9\u05DD",patientPrefix:"\u05D0\u05EA",before:"\u05DC\u05E4\u05E0\u05D9",after:"\u05D0\u05D7\u05E8\u05D9"},{lang:"id",verb:"taruh",verbAlts:["letakkan","masukkan","tempatkan"],before:"sebelum",after:"setelah"},{lang:"ms",verb:"letak",before:"sebelum",after:"selepas"},{lang:"pt",verb:"colocar",before:"antes",after:"depois"},{lang:"sw",verb:"weka",before:"kabla",after:"baada"},{lang:"zh",verb:"\u653E\u7F6E",verbAlts:["\u653E","\u653E\u5165"],patientPrefix:"\u628A",patientPrefixOptional:!0,before:"\u4E4B\u524D",after:"\u4E4B\u540E"}],Lr=[{lang:"es",verb:"poner",verbAlts:["pon","colocar","put"],at:"en",end:"fin",of:"de"},{lang:"fr",verb:"mettre",at:"\xE0",end:"fin",of:"de"},{lang:"pt",verb:"colocar",at:"em",end:"fim",of:"de"},{lang:"it",verb:"mettere",at:"a",end:"fine",of:"di"},{lang:"de",verb:"setzen",at:"bei",end:"ende",of:"von"},{lang:"sw",verb:"weka",at:"katika",end:"mwisho",of:"ya"},{lang:"id",verb:"taruh",verbAlts:["letakkan","masukkan","tempatkan"],at:"di",end:"akhir",of:"dari"},{lang:"ms",verb:"letak",at:"di",end:"tamat",of:"daripada"},{lang:"vi",verb:"\u0111\u1EB7t",at:"t\u1EA1i",end:"k\u1EBFt th\xFAc",of:"c\u1EE7a"},{lang:"pl",verb:"umie\u015B\u0107",at:"przy",end:"koniec",of:"z"},{lang:"ru",verb:"\u043F\u043E\u043B\u043E\u0436\u0438\u0442\u044C",at:"\u0443",end:"\u043A\u043E\u043D\u0435\u0446",of:"\u0438\u0437"},{lang:"uk",verb:"\u043F\u043E\u043A\u043B\u0430\u0441\u0442\u0438",at:"\u0432",end:"\u043A\u0456\u043D\u0435\u0446\u044C",of:"\u0437"},{lang:"th",verb:"\u0E43\u0E2A\u0E48",at:"\u0E17\u0E35\u0E48",end:"\u0E08\u0E1A",of:"\u0E02\u0E2D\u0E07"},{lang:"tl",verb:"ilagay",at:"sa",end:"wakas",of:"ng"},{lang:"ar",verb:"\u0636\u0639",at:"\u0639\u0646\u062F",end:"\u0627\u0644\u0646\u0647\u0627\u064A\u0629",of:"\u0645\u0646"},{lang:"zh",verb:"\u653E\u7F6E",verbAlts:["\u653E","\u653E\u5165"],patientPrefix:"\u628A",at:"\u5728",end:"\u7ED3\u675F",of:"\u7684"},{lang:"he",verb:"\u05E9\u05D9\u05DD",patientPrefix:"\u05D0\u05EA",at:"at",end:"\u05E1\u05D5\u05E3",of:"of"},{lang:"tr",verb:"koy",sov:!0,objMarker:"i",at:"de",end:"son",of:"nin"},{lang:"ja",verb:"\u7F6E\u304F",sov:!0,objMarker:"\u3092",at:"\u3067",end:"\u7D42\u308F\u308A",of:"\u306E"},{lang:"ko",verb:"\uB123\uB2E4",sov:!0,objMarker:"\uB97C",at:"\uC5D0",end:"\uB05D",of:"\uC758"},{lang:"hi",verb:"\u0930\u0916\u0947\u0902",verbAlts:["\u0930\u0916","\u0921\u093E\u0932\u0947\u0902","\u0921\u093E\u0932"],sov:!0,objMarker:"\u0915\u094B",at:"\u092A\u0930",end:"\u0938\u092E\u093E\u092A\u094D\u0924",of:"\u0915\u093E"},{lang:"bn",verb:"\u09B0\u09BE\u0996\u09C1\u09A8",verbAlts:["\u09B0\u09BE\u0996"],sov:!0,objMarker:"\u0995\u09C7",at:"\u098F",end:"\u09B6\u09C7\u09B7",of:"\u09B0"},{lang:"qu",verb:"churay",sov:!0,objMarker:"ta",at:"pi",end:"tukuy",of:"pa"}];function Cr(n,e,t,r){let i=Lr.find(s=>s.lang===n);if(!i)return!1;let a=(s,o)=>(s??"").toLowerCase()===o.toLowerCase();return a(e,i.end)&&a(t,i.at)&&a(r,i.of)}function Fn(n,e){let t=Lr.find(i=>i.lang===n);if(!t)return!1;let r=e.toLowerCase();return r===t.at.toLowerCase()||r===t.of.toLowerCase()||r===t.end.toLowerCase()}function sl(n){let e=Lr.find(a=>a.lang===n);if(!e)return[];let t=[],r=e.verbAlts?{type:"literal",value:e.verb,alternatives:e.verbAlts}:{type:"literal",value:e.verb},i=a=>{t.push({type:"literal",value:a})};return e.sov?(t.push({type:"role",role:"patient"}),i(e.at),i(e.end),i(e.of),t.push({type:"role",role:"destination"}),e.objMarker&&t.push({type:"literal",value:e.objMarker}),t.push(r)):(t.push(r),e.patientPrefix&&t.push({type:"literal",value:e.patientPrefix}),t.push({type:"role",role:"patient"}),i(e.at),i(e.end),i(e.of),t.push({type:"role",role:"destination"})),[{id:`put-${e.lang}-at-end`,language:e.lang,command:"put",priority:110,template:{format:`put {patient} ${e.at} ${e.end} ${e.of} {destination}`,tokens:t},extraction:{manner:{default:{type:"literal",value:"at end of"}}}}]}function ll(){return["before","after"].map(n=>{let e=n==="before"?"\u524D\u306B":"\u5F8C\u306B",t=n==="before"?"\u524D":"\u5F8C";return{id:`put-ja-${n}`,language:"ja",command:"put",priority:105,template:{format:`{patient} ${e} {destination} \u3092 \u7F6E\u304F`,tokens:[{type:"role",role:"patient"},{type:"literal",value:e,alternatives:[t]},{type:"role",role:"destination"},{type:"literal",value:"\u3092"},{type:"literal",value:"\u7F6E\u304F",alternatives:["\u5165\u308C\u308B"]}]},extraction:{patient:{position:0},destination:{position:2},manner:{default:{type:"literal",value:n}}}}})}function cl(){return["before","after"].map(n=>{let e=n==="before"?"\uC804\uC5D0":"\uD6C4\uC5D0";return{id:`put-ko-${n}`,language:"ko",command:"put",priority:105,template:{format:`{patient} ${e} {destination} \uB97C \uB123\uB2E4`,tokens:[{type:"role",role:"patient"},{type:"literal",value:e},{type:"role",role:"destination"},{type:"literal",value:"\uB97C",alternatives:["\uC744"]},{type:"literal",value:"\uB123\uB2E4",alternatives:["\uB123\uAE30","\uB193\uAE30"]}]},extraction:{patient:{position:0},destination:{position:2},manner:{default:{type:"literal",value:n}}}}})}function pl(){let n=(e,t)=>({id:`put-tr-${e}`,language:"tr",command:"put",priority:105,template:{format:`{patient} ${t} {destination} i koy`,tokens:[{type:"role",role:"patient"},{type:"literal",value:t},{type:"role",role:"destination"},{type:"group",optional:!0,tokens:[{type:"literal",value:"i",alternatives:["\u0131","u","\xFC","yi","y\u0131","yu","y\xFC"]}]},{type:"literal",value:"koy",alternatives:["koymak"]}]},extraction:{patient:{position:0},destination:{position:2},manner:{default:{type:"literal",value:e}}}});return[n("before","\xF6nce"),n("after","sonra")]}function dl(n){let e=ol.find(t=>t.lang===n);return e?["before","after"].map(t=>{let r=e[t],i=[e.verbAlts?{type:"literal",value:e.verb,alternatives:e.verbAlts}:{type:"literal",value:e.verb}];return e.patientPrefix&&i.push(e.patientPrefixOptional?{type:"group",optional:!0,tokens:[{type:"literal",value:e.patientPrefix}]}:{type:"literal",value:e.patientPrefix}),i.push({type:"role",role:"patient"},{type:"literal",value:r},{type:"role",role:"destination"}),{id:`put-${e.lang}-${t}`,language:e.lang,command:"put",priority:95,template:{format:`${e.verb} {patient} ${r} {destination}`,tokens:i},extraction:{patient:{position:e.patientPrefix&&!e.patientPrefixOptional?2:1},destination:{marker:r},manner:{default:{type:"literal",value:t}}}}}):[]}function Un(n){let e=dl(n),t=sl(n);switch(n){case"bn":return[...Us(),...t];case"en":return Gs();case"es":return[...Ys(),...t];case"hi":return[...Xs(),...t];case"id":return[...Zs(),...e,...t];case"it":return[...Js(),...t];case"ja":return[...ll(),...t];case"ko":return[...cl(),...t];case"tr":return[...pl(),...t];case"pl":return[...Qs(),...t];case"ru":return[...el(),...t];case"qu":return[...il(),...t];case"th":return[...tl(),...t];case"uk":return[...rl(),...t];case"vi":return[...nl(),...t];case"zh":return[...al(),...e,...t];default:return[...e,...t]}}var Gn=new Set(["\u0628\u062F\u0644","\u063A\u064A\u0631","\u0623\u0636\u0641","\u0623\u0632\u0644","\u0636\u0639","\u0627\u062C\u0639\u0644","\u0639\u064A\u0646","\u0632\u062F","\u0627\u0646\u0642\u0635","\u0633\u062C\u0644","\u0623\u0638\u0647\u0631","\u0623\u062E\u0641","\u0634\u063A\u0644","\u0623\u0631\u0633\u0644","\u0631\u0643\u0632","\u0634\u0648\u0634","\u062A\u0648\u0642\u0641","\u0627\u0646\u0633\u062E","\u0627\u062D\u0630\u0641","\u0627\u0635\u0646\u0639","\u0627\u0646\u062A\u0638\u0631","\u0627\u0646\u062A\u0642\u0627\u0644","\u0623\u0648"]),ul={patient:["\u0639\u0644\u0649"],destination:["\u0625\u0644\u0649","\u0627\u0644\u0649"],source:["\u0645\u0646"],agent:["\u0645\u0646"],manner:["\u0628"],style:["\u0628"],goal:["\u0625\u0644\u0649","\u0627\u0644\u0649"],method:["\u0628"]},Rr=class{calculate(e){return this.calculateWithBreakdown(e).final}calculateWithBreakdown(e){let t=this.scoreRoleCoverage(e),r=this.scoreStemPenalty(e),i=this.scoreLanguageBoost(e),a=this.scoreLanguageAdjustment(e),s=t;return s=Math.max(.5,s+r),s=Math.min(1,s+i),s=Math.max(0,Math.min(1,s+a)),{roleCoverage:t,stemPenalty:r,languageBoost:i,languageAdjustment:a,final:s}}scoreRoleCoverage(e){let{pattern:t,captured:r}=e,i=0,a=0,s=o=>t.extraction?.[o]?.default!==void 0;for(let o of t.template.tokens)if(o.type==="role")a+=1,r.has(o.role)&&(i+=1);else if(o.type==="group")for(let l of o.tokens)l.type==="role"&&(a+=.8,r.has(l.role)?i+=.8:s(l.role)&&(i+=.8*.6));return a>0?i/a:1}scoreStemPenalty(e){let{stemMatchCount:t,totalKeywordMatches:r}=e;return t<=0||r<=0?0:-(t/r)*.15}scoreLanguageBoost(e){let{pattern:t}=e;if(t.language!=="ar")return 0;let r=t.template.tokens[0];return!r||r.type!=="literal"?0:Gn.has(r.value)||r.alternatives?.some(i=>Gn.has(i))?.15:0}scoreLanguageAdjustment(e){let{pattern:t,captured:r}=e;if(t.language!=="ar")return 0;let i=0;for(let[a,s]of r.entries()){let o=ul[a];if(!o||o.length===0)continue;let l="metadata"in s?s.metadata:void 0;l&&typeof l.prepositionValue=="string"&&(o.includes(l.prepositionValue)?i+=.1:i-=.1)}return Math.max(-.1,Math.min(.1,i))}},Yn=new Rr;var ml=new Set(Object.values(je).filter(n=>n.bareKeyword===!0).map(n=>n.action)),N=class N{constructor(e){this.matchCache=new Map;this.stemMatchCount=0;this.totalKeywordMatches=0;this.confidenceModel=e??Yn}matchPattern(e,t){let r=e.mark(),i=new Map;if(this.currentProfile=I(t.language),this.currentPatternCommand=t.command,this.stemMatchCount=0,this.totalKeywordMatches=0,!this.matchTokenSequence(e,t.template.tokens,i))return e.reset(r),null;let s=this.confidenceModel.calculate({pattern:t,captured:i,stemMatchCount:this.stemMatchCount,totalKeywordMatches:this.totalKeywordMatches});return this.applyExtractionRules(t,i),{pattern:t,captured:i,consumedTokens:e.position()-r.position,confidence:s}}matchBest(e,t){this.matchCache.clear();let r=[],i=e.position();for(let s of t){let o=e.mark(),l=`${i}:${s.id}`,c;this.matchCache.has(l)?c=this.matchCache.get(l):(c=this.matchPattern(e,s),this.matchCache.set(l,c)),c&&r.push(c),e.reset(o)}if(r.length===0)return null;r.sort((s,o)=>{let l=o.pattern.priority-s.pattern.priority;return l!==0?l:o.confidence-s.confidence});let a=r[0];return this.matchPattern(e,a.pattern),a}matchTokenSequence(e,t,r,i){let a=t[0],s=a?.type==="literal"&&(a.value==="and"||a.value==="then"||a.alternatives?.includes("and")||a.alternatives?.includes("then"));if(this.currentProfile?.code==="ar"&&!s)for(;e.peek()?.kind==="conjunction";)e.advance();let o=0;for(let l=0;l<t.length;l++){let c=t[l];o>0&&c.type==="literal"&&this.tryConsumeEventSourceClause(e,r,c);let d=this.matchPatternToken(e,c,r,t[l+1]??i);if(o=c.type==="role"&&c.role==="event"?2:Math.max(0,o-1),!d){if(this.isOptional(c))continue;return!1}}return!0}tryConsumeEventSourceClause(e,t,r){if(t.has("source"))return;let i=e.peek(),a=e.peek(1);if(!i||!a||this.patternTokenWouldMatch(r,i))return;let s=this.currentProfile?.roleMarkers?.source,o=c=>{if(c.kind!=="particle"&&c.kind!=="keyword")return!1;if((c.normalized??"").toLowerCase()==="source")return!0;if(!s)return!1;let d=c.value.toLowerCase();return s.primary?.toLowerCase()===d?!0:!!s.alternatives?.some(p=>p.toLowerCase()===d)},l=s?.position;if(l!=="after"&&o(i)&&a.kind==="selector"){e.advance();let c=this.tokenToSemanticValue(e.advance());c&&t.set("source",c);return}if(l==="after"&&i.kind==="selector"&&o(a)){let c=this.tokenToSemanticValue(i);e.advance(),e.advance(),c&&t.set("source",c)}}matchPatternToken(e,t,r,i){switch(t.type){case"literal":return this.matchLiteralToken(e,t);case"role":return this.matchRoleToken(e,t,r,i);case"group":return this.matchGroupToken(e,t,r,i);default:return!1}}matchLiteralToken(e,t){let r=e.peek();if(!r)return!1;let i=this.getMatchType(r,t.value);if(i!=="none")return this.totalKeywordMatches++,i==="stem"&&this.stemMatchCount++,e.advance(),!0;if(t.alternatives)for(let a of t.alternatives){let s=this.getMatchType(r,a);if(s!=="none")return this.totalKeywordMatches++,s==="stem"&&this.stemMatchCount++,e.advance(),!0}for(let a of[t.value,...t.alternatives??[]])for(let s of["-","_"])if(a.includes(s)&&this.tryMatchShatteredCompound(e,a,s))return this.totalKeywordMatches++,!0;return!1}tryFoldHyphenActionKeyword(e){let t=this.currentProfile;if(!t)return null;let r=e.mark(),i=[];for(;;){let s=e.peek();if(!s||s.kind!=="identifier"&&s.kind!=="keyword")break;i.push(s.value),e.advance();let o=e.peek();if(!o||o.value!=="-")break;e.advance(),i.push("-")}if(i.length<3||i[i.length-1]==="-")return e.reset(r),null;let a=i.join("").toLowerCase();for(let[s,o]of Object.entries(t.keywords))if(o.primary.toLowerCase()===a||o.alternatives?.some(l=>l.toLowerCase()===a))return U(s);return e.reset(r),null}tryMatchShatteredCompound(e,t,r){let i=t.split(r);if(i.length<2||i.some(s=>s.length===0))return!1;let a=e.mark();for(let s=0;s<i.length;s++){if(s>0){let l=e.peek();if(!l||l.value!==r)return e.reset(a),!1;e.advance()}let o=e.peek();if(!o||o.kind!=="identifier"&&o.kind!=="keyword"&&o.kind!=="particle"||o.value.toLowerCase()!==i[s].toLowerCase())return e.reset(a),!1;e.advance()}return!0}matchRoleToken(e,t,r,i){this.skipNoiseWords(e);let a=e.peek();if(!a)return t.optional||!1;if(t.role==="action"&&this.currentProfile&&e.peek(1)?.value==="-"){let h=this.tryFoldHyphenActionKeyword(e);if(h)return r.set(t.role,h),!0}if(t.role==="event"&&this.currentPatternCommand==="on"){if(!N.tokenLooksLikeEvent(a))return t.optional||!1;let h=(a.normalized??a.value).toLowerCase();if(N.POSITIONAL_OR_SCOPE_KEYWORDS.has(h)||this.currentProfile&&(ze(this.currentProfile,a.value)??ze(this.currentProfile,h))!==void 0||a.value.includes("?."))return t.optional||!1}if(t.role==="event"){let h=(a.normalized??a.value).toLowerCase();if(N.STRUCTURAL_NEVER_EVENT.has(h))return t.optional||!1}if(t.role==="duration"){let h=(a.normalized??a.value).toLowerCase();if(N.POSITIONAL_OR_SCOPE_KEYWORDS.has(h))return t.optional||!1}if(t.optional&&i===void 0&&t.role!=="event"&&t.role!=="action"&&a.kind==="keyword"&&(a.normalized??a.value).toLowerCase()in je)return!0;let s=this.tryMatchPositionalExpression(e);if(s)return t.expectedTypes&&t.expectedTypes.length>0&&!dt(s.type,t.expectedTypes)?t.optional||!1:(r.set(t.role,s),!0);let o=this.tryMatchCaretScopeExpression(e);if(o)return t.expectedTypes&&t.expectedTypes.length>0&&!dt(o.type,t.expectedTypes)?t.optional||!1:(r.set(t.role,o),!0);if(t.role!=="event"&&(!t.expectedTypes||t.expectedTypes.includes("expression"))){let h=this.tryMatchOperatorRunExpression(e);if(h)return r.set(t.role,h),!0}if(t.expectedTypes?.includes("property-path")){let h=this.tryMatchOfPossessiveExpression(e);if(h)return r.set(t.role,h),!0;let b=this.tryMatchPostNominalPossessiveExpression(e);if(b)return r.set(t.role,b),!0}let l=this.tryMatchPossessiveExpression(e);if(l)return t.expectedTypes&&t.expectedTypes.length>0&&!t.expectedTypes.includes(l.type)&&!t.expectedTypes.includes("expression")?t.optional||!1:(r.set(t.role,l),!0);let c=this.tryMatchMethodCallExpression(e);if(c)return t.expectedTypes&&t.expectedTypes.length>0&&!t.expectedTypes.includes(c.type)&&!t.expectedTypes.includes("expression")?t.optional||!1:(r.set(t.role,c),!0);let p=t.role==="event"&&this.currentPatternCommand==="on"||N.DECLARATION_COMMANDS.has(this.currentPatternCommand??"")?null:this.tryMatchBareCallExpression(e);if(p)return t.expectedTypes&&t.expectedTypes.length>0&&!t.expectedTypes.includes(p.type)&&!t.expectedTypes.includes("expression")?t.optional||!1:(r.set(t.role,p),!0);let u=this.tryMatchPossessiveSelectorExpression(e);if(u)return t.expectedTypes&&t.expectedTypes.length>0&&!dt(u.type,t.expectedTypes)?t.optional||!1:(r.set(t.role,u),!0);let m=t.role!=="condition",f=this.tryMatchPropertyAccessExpression(e,m);if(f)return t.expectedTypes&&t.expectedTypes.length>0&&!t.expectedTypes.includes(f.type)&&!t.expectedTypes.includes("expression")?t.optional||!1:(r.set(t.role,f),!0);let y=this.tryMatchSelectorPropertyExpression(e);if(y)return t.expectedTypes&&t.expectedTypes.length>0&&!dt(y.type,t.expectedTypes)?t.optional||!1:(r.set(t.role,y),!0);if(a.kind==="identifier"&&a.value==="{"&&(!t.expectedTypes?.length||t.expectedTypes.includes("literal"))){let h=this.tryMatchBraceRunLiteral(e);if(h)return r.set(t.role,h),!0}let g=this.tokenToSemanticValue(a);if(!g)return t.optional||!1;if(t.expectedTypes&&t.expectedTypes.length>0&&!t.expectedTypes.includes(g.type)){let h=g.type==="selector"&&String(g.value).startsWith("@"),b=t.expectedTypes.some(z=>z==="expression"||z==="reference");if(!(h&&b))return t.optional||!1}if(r.set(t.role,g),e.advance(),t.role==="event"){let h=e.peek();h&&h.kind==="selector"&&h.value.startsWith("[")&&"value"in g&&(r.set(t.role,U(`${String(g.value)}${h.value}`)),e.advance());let b=e.peek();if(b&&(b.kind==="particle"||b.kind==="keyword")&&(b.normalized??"").toLowerCase()==="source"&&!this.patternTokenWouldMatch(i,b)){let z=e.peek(1);if(z&&(z.kind==="selector"||z.kind==="identifier")){e.advance();let E=this.tokenToSemanticValue(e.advance());E&&!r.has("source")&&r.set("source",E)}}}return!0}patternTokenWouldMatch(e,t){return e?e.type==="literal"?this.getMatchType(t,e.value)!=="none"?!0:!!e.alternatives?.some(r=>this.getMatchType(t,r)!=="none"):e.type==="group"?this.patternTokenWouldMatch(e.tokens?.[0],t):!1:!1}tryMatchPositionalExpression(e){let t=e.peek();if(!t)return null;let r=(t.normalized??t.value).toLowerCase();if(!N.POSITIONAL_KEYWORDS.has(r)&&!N.POSITIONAL_KEYWORDS.has(t.value.toLowerCase()))return null;let i=e.mark(),a=[t.normalized??t.value];e.advance();let s=e.peek();if(!s||s.kind!=="selector")return e.reset(i),null;a.push(s.value),e.advance();let o=0;for(;o++<8;){let d=e.peek();if(d&&d.kind==="selector"&&d.value.startsWith("."))a.push(d.value),e.advance();else break}let l=e.peek(),c=e.peek(1);return l&&c&&c.kind==="selector"&&(l.kind==="keyword"||l.kind==="particle"||l.kind==="identifier")&&!N.POSITIONAL_KEYWORDS.has((l.normalized??l.value).toLowerCase())&&!N.COMMAND_ACTION_KEYWORDS.has((l.normalized??l.value).toLowerCase())&&(a.push(l.normalized??l.value,c.value),e.advance(),e.advance()),{type:"expression",raw:a.join(" ")}}tryMatchCaretScopeExpression(e){let t=e.peek();if(!t||t.kind!=="identifier"||!t.value.startsWith("^"))return null;let r=e.peek(1),i=e.peek(2),a=(r?.normalized??"").toLowerCase(),s=!!r&&(r.value.toLowerCase()==="on"||a==="destination"||a==="on");return!r||!i||i.kind!=="selector"||!s?null:(e.advance(),e.advance(),e.advance(),{type:"expression",raw:`${t.value} on ${i.value}`})}isOfPossessiveMarker(e){let t=e.value.toLowerCase(),r=(e.normalized??"").toLowerCase();if(t==="of"||t==="ng"||r==="of"||r==="source")return!0;let i=this.currentProfile?.code?N.OF_POSSESSIVE_MARKERS[this.currentProfile.code]:void 0;return!!i&&i.has(t)}tryMatchOperatorRunExpression(e){let t=e.mark(),r=e.position();if(!this.tryConsumeRunOperand(e))return e.reset(t),null;let i=1;for(;;){let s=e.peek();if(!s||!N.RUN_OPERATORS.has(s.value))break;let o=e.mark();if(e.advance(),!this.tryConsumeRunOperand(e)){e.reset(o);break}i++}if(i<2)return e.reset(t),null;let a=e.tokens.slice(r,e.position()).map(s=>s.value).join(" ");return{type:"expression",raw:a,value:a}}tryConsumeRunOperand(e){let t=e.peek();if(!t)return!1;if(t.value==="("){let r=e.mark(),i=0;for(;!e.isAtEnd();){let a=e.advance();if(a.value==="(")i++;else if(a.value===")"&&(i--,i===0))return!0}return e.reset(r),!1}return this.tryMatchPossessiveExpression(e)?!0:(t.kind==="literal"||t.kind==="identifier"||t.kind==="selector"||t.kind==="keyword")&&!N.RUN_OPERATORS.has(t.value)&&t.value!==")"?(e.advance(),!0):!1}tryMatchOfPossessiveExpression(e){let t=e.peek();if(!t||t.kind!=="selector")return null;let r=e.mark();e.advance();let i=e.peek();if(!i||!this.isOfPossessiveMarker(i))return e.reset(r),null;e.advance();let a=e.peek();return!a||a.kind!=="selector"?(e.reset(r),null):(e.advance(),ge(ue(a.value),t.value))}tryMatchPossessiveExpression(e){let t=e.peek();if(!t||!this.currentProfile)return null;let r=[t.value,t.normalized].filter(Boolean),i;for(let l of r)if(i=ze(this.currentProfile,l)??ze(this.currentProfile,l.toLowerCase()),i)break;if(!i)return null;let a=e.mark();e.advance();let s=this.currentProfile.possessive?.connectors;if(s&&s.length>0){let l=e.peek();if(l){let c=l.value.toLowerCase(),d=(l.normalized??"").toLowerCase();s.some(p=>p.toLowerCase()===c||p.toLowerCase()===d)&&e.advance()}}let o=e.peek();if(!o||Fn(this.currentProfile.code,o.value))return e.reset(a),null;if(o.kind==="identifier"||o.kind==="keyword"&&!this.isStructuralKeyword(o.value)&&!(o.normalized&&this.isStructuralKeyword(o.normalized))&&!(o.normalized&&this.isRoleMarkerConcept(o.normalized))||o.kind==="selector"&&o.value.startsWith("*")||o.kind==="selector"&&o.value.startsWith("@")||o.kind==="selector"&&o.value.startsWith(".")&&/^\.[a-zA-Z_]\w*/.test(o.value)){e.advance();let l=o.value;o.kind==="selector"&&l.startsWith(".")&&/^\.[a-zA-Z_]\w*/.test(l)&&(l=l.substring(1));let c=l;for(;e.peek()?.kind==="selector"&&e.peek().value.startsWith(".")&&/^\.[a-zA-Z_]\w*/.test(e.peek().value);)c+=e.peek().value,e.advance();let d=e.peek();if(d&&d.value.startsWith("(")){let p="",u=0,m=0;for(;!e.isAtEnd()&&m++<N.MAX_METHOD_ARGS+2;){let f=e.peek();if(!f)break;p+=f.value,e.advance();for(let y of f.value)y==="("?u++:y===")"&&u--;if(u<=0)break}c+=p}return ge(oe(i),c)}return e.reset(a),null}tryMatchPostNominalPossessiveExpression(e){if(!this.currentProfile||this.currentProfile.possessive?.markerPosition!=="after-object")return null;let t=p=>{for(let u of[p.value,p.normalized].filter(Boolean))if(ze(this.currentProfile,u)??ze(this.currentProfile,u.toLowerCase()))return!0;return!1},r=e.peek();if(!r)return null;let i=r.kind==="selector"&&r.value.startsWith(".")&&/^\.[a-zA-Z_]\w*/.test(r.value);if(!(r.kind==="identifier"&&!this.isStructuralKeyword(r.value)&&!(r.normalized&&this.isStructuralKeyword(r.normalized))&&!(r.normalized&&this.isRoleMarkerConcept(r.normalized))||r.kind==="selector"&&(r.value.startsWith("*")||r.value.startsWith("@"))||i)||t(r))return null;let s=e.mark(),o=r.value;i&&(o=o.substring(1)),e.advance();let l=o;for(;e.peek()?.kind==="selector"&&e.peek().value.startsWith(".")&&/^\.[a-zA-Z_]\w*/.test(e.peek().value);)l+=e.peek().value,e.advance();let c=e.peek();if(!c)return e.reset(s),null;let d;for(let p of[c.value,c.normalized].filter(Boolean))if(d=ze(this.currentProfile,p)??ze(this.currentProfile,p.toLowerCase()),d)break;return d?(e.advance(),ge(oe(d),l)):(e.reset(s),null)}isStructuralKeyword(e){return new Set(["into","in","to","from","at","by","with","without","before","after","of","as","on","then","end","else","if","repeat","while","for","toggle","add","remove","put","set","show","hide","increment","decrement","send","trigger","call"]).has(e.toLowerCase())}isRoleMarkerConcept(e){return new Set(["destination","source","patient","object","event","eventmarker","manner","instrument"]).has(e.toLowerCase())}static tokenLooksLikeEvent(e){if(e.kind==="selector"||e.kind==="url"||e.kind==="literal")return!1;let t=e.value;if(/[/#@*]/.test(t)||t.startsWith('"')||t.startsWith("'")||t.startsWith("`"))return!1;let r=e.normalized?.toLowerCase();return!(r&&ml.has(r))}tryMatchBraceRunLiteral(e){let t=e.peek();if(!t||t.kind!=="identifier"||t.value!=="{")return null;let r=e.mark();e.advance();let i=["{"],a=1,s=0;for(;!e.isAtEnd()&&s++<N.MAX_BRACE_RUN_TOKENS;){let o=e.advance();if(!o)break;if(o.value==="{")a++;else if(o.value==="}"&&(a--,a===0))return i.push("}"),U(i.join(" "));i.push(o.value)}return e.reset(r),null}tryMatchBareCallExpression(e){let t=e.peek();if(!t||t.kind!=="identifier"||!/^[A-Za-z_][\w$]*$/.test(t.value))return null;let r=e.peek(1);if(!r||r.value!=="(")return null;let i=e.mark();e.advance(),e.advance();let a=[],s=!1,o=0;for(;!e.isAtEnd()&&o++<N.MAX_METHOD_ARGS+2;){let l=e.peek();if(!l)break;if(l.value===")"){e.advance(),s=!0;break}if(l.value===","){e.advance();continue}a.push(l.value),e.advance()}return s?{type:"expression",raw:`${t.value}(${a.join(", ")})`}:(e.reset(i),null)}tryMatchMethodCallExpression(e){let t=e.peek();if(!t||t.kind!=="selector")return null;let r=e.mark();e.advance();let i=e.peek();if(!i||i.kind!=="operator"||i.value!==".")return e.reset(r),null;e.advance();let a=e.peek();if(!a||a.kind!=="identifier")return e.reset(r),null;e.advance();let s=e.peek();if(!s||s.kind!=="punctuation"||s.value!=="(")return e.reset(r),null;e.advance();let o=[];for(;!e.isAtEnd()&&o.length<N.MAX_METHOD_ARGS;){let c=e.peek();if(!c)break;if(c.kind==="punctuation"&&c.value===")"){e.advance();break}if(c.kind==="punctuation"&&c.value===","){e.advance();continue}o.push(c.value),e.advance()}return{type:"expression",raw:`${t.value}.${a.value}(${o.join(", ")})`}}tryMatchPropertyAccessExpression(e,t=!0){let r=e.peek();if(!r||r.kind!=="identifier"&&r.kind!=="keyword")return null;let i=e.mark();e.advance();let a=r.value.toLowerCase(),s=e.peek();if((r.kind==="identifier"||N.PROPERTY_ACCESS_BASES.has(a))&&s&&s.kind==="selector"&&/^\.[a-zA-Z_]/.test(s.value)){let m=r.value,f=[],y=0;for(;y<N.MAX_PROPERTY_DEPTH;){let b=e.peek();if(b&&b.kind==="selector"&&/^\.[a-zA-Z_]/.test(b.value))m+=`.${b.value.slice(1)}`,f.push(b.value.slice(1)),e.advance(),y++;else break}let g=e.peek(),h=!!g&&g.value.startsWith("(");if(t&&!h&&f.length>0&&Oe(a))return ge(oe(a),f.join("."));if(h){let b=e.mark(),z=[],E=0,x=!1;for(;!e.isAtEnd();){let k=e.peek();if(!k)break;if(k.value==="(")E++;else if(k.value===")"){if(z.push(k.value),e.advance(),E--,E===0&&(x=!0),x)break;continue}z.push(k.value),e.advance()}x?m+=z.join(""):e.reset(b)}return{type:"expression",raw:m}}let o=e.peek();if(!o||o.kind!=="operator"||o.value!==".")return e.reset(i),null;e.advance();let l=e.peek();if(!l||l.kind!=="identifier")return e.reset(i),null;e.advance();let c=`${r.value}.${l.value}`,d=1;for(;!e.isAtEnd()&&d<N.MAX_PROPERTY_DEPTH;){let m=e.peek();if(!m||m.kind!=="operator"||m.value!==".")break;e.advance();let f=e.peek();if(!f||f.kind!=="identifier")break;e.advance(),c+=`.${f.value}`,d++}let p=e.peek();if(p&&p.kind==="punctuation"&&p.value==="("){e.advance();let m=[],f=0;for(;!e.isAtEnd()&&m.length<N.MAX_METHOD_ARGS;){let g=e.peek();if(!g)break;if(g.kind==="punctuation"&&g.value===")"){if(f===0){e.advance();break}f--}if(g.kind==="punctuation"&&g.value==="("&&f++,g.kind==="punctuation"&&g.value===","){e.advance();continue}m.push(g.value),e.advance()}return{type:"expression",raw:`${c}(${m.join(", ")})`}}let u=r.value.toLowerCase();if(t&&Oe(u)){let m=c.split(".").slice(1).join(".");return ge(oe(u),m)}return{type:"expression",raw:c}}tryMatchPossessiveSelectorExpression(e){let t=e.peek();if(!t||t.kind!=="selector")return null;let r=e.mark();e.advance();let i=e.peek(),a=this.currentProfile?.possessive?.marker?.replace(/^-/,""),s=!!i&&i.kind==="punctuation"&&i.value==="'s",o=!!i&&i.value==="'"&&(e.peek(1)?.value??"").toLowerCase()==="s",l=(()=>{if(!this.currentPatternCommand||(i?.normalized??"").toLowerCase()!=="source")return!1;let u=je[this.currentPatternCommand];return!!u&&u.roles.some(m=>m.role==="source")})(),c=!!i&&!!a&&a!=="'s"&&i.value===a&&(i.kind==="particle"||i.kind==="punctuation")&&!l;if(!s&&!c&&!o)return e.reset(r),null;e.advance(),o&&e.advance();let d=e.peek();return!d||!(d.kind==="identifier"||(s||o)&&(d.kind==="selector"||d.kind==="keyword"))?(e.reset(r),null):(e.advance(),ge(ue(t.value),d.value))}tryMatchSelectorPropertyExpression(e){let t=e.peek();if(!t||t.kind!=="selector"||!t.value.startsWith("#"))return null;let r=e.mark();e.advance();let i=e.peek();if(!i||i.kind!=="selector"||!i.value.startsWith("."))return e.reset(r),null;let a=e.peek(1);a&&a.kind,e.advance();let s=i.value.slice(1);return ge(ue(t.value),s)}matchGroupToken(e,t,r,i){let a=e.mark(),s=new Set(r.keys());if(!this.matchTokenSequence(e,t.tokens,r,i)){e.reset(a);for(let l of r.keys())s.has(l)||r.delete(l);return t.optional||!1}return!0}getMatchType(e,t){return e.value===t?"exact":e.normalized===t?"normalized":e.stem===t&&e.stemConfidence!==void 0&&e.stemConfidence>=.7?"stem":e.kind==="keyword"&&e.value.toLowerCase()===t.toLowerCase()?"case-insensitive":"none"}tokenToSemanticValue(e){switch(e.kind){case"selector":return ue(e.value);case"literal":return this.parseLiteralValue(e.value);case"keyword":let t=(e.normalized||e.value).toLowerCase();return Oe(t)?oe(t):U(e.normalized||e.value);case"identifier":if(e.value.startsWith("@"))return ue(e.value);if(e.value.startsWith(":")||e.value.startsWith("$"))return oe(e.value);let r=e.value.toLowerCase();return Oe(r)?oe(r):{type:"expression",raw:e.value};case"url":return U(e.value,"string");default:return null}}parseLiteralValue(e){if(e.startsWith('"')||e.startsWith("'")||e.startsWith("`")||e.startsWith("\u300C")){let i=e.slice(1,-1);return U(i,"string")}if(e==="true")return U(!0,"boolean");if(e==="false")return U(!1,"boolean");let t=e.match(/^(\d+(?:\.\d+)?)(ms|s|m|h)?$/);if(t){let i=parseFloat(t[1]);return t[2]?U(e,"duration"):U(i,"number")}let r=parseFloat(e);return isNaN(r)?U(e,"string"):U(r,"number")}applyExtractionRules(e,t){for(let[r,i]of Object.entries(e.extraction))t.has(r)||(i.value!==void 0?t.set(r,{type:"literal",value:i.value}):i.default&&t.set(r,i.default))}isOptional(e){return e.type!=="literal"&&e.optional===!0}skipNoiseWords(e){let t=e.peek();if(!t)return;let r=t.value.toLowerCase();if(N.ENGLISH_NOISE_WORDS.has(r)){let i=e.mark();e.advance();let a=e.peek();if(a&&(a.kind==="selector"||a.kind==="identifier"))return;let s=e.peek(1);if(a&&a.kind==="keyword"&&s&&s.kind==="selector"&&/^\.[a-zA-Z_]/.test(s.value))return;let o=a?(a.normalized??a.value).toLowerCase():"";if(a&&N.POSITIONAL_OR_SCOPE_KEYWORDS.has(o))return;let l=e.peek(1),c=l?(l.normalized??l.value).toLowerCase():"",d=this.currentProfile?.wordOrder!=="SOV"&&N.COMMAND_ACTION_KEYWORDS.has(c),p=!l||l.kind==="particle"||N.CLAUSE_BOUNDARY_KEYWORDS.has(c)||d;if(a&&a.kind==="keyword"&&this.currentProfile?.code!=="en"&&Oe(o)&&p||a&&a.kind==="keyword"&&this.currentProfile?.code==="en"&&Oe(o))return;e.reset(i)}r==="class"&&e.advance()}extractEventModifiers(e){let t={},r=!1;for(;!e.isAtEnd();){let i=e.peek();if(!i||i.kind!=="event-modifier")break;let a=i.metadata;if(!a)break;switch(r=!0,a.modifierName){case"once":t.once=!0;break;case"debounce":typeof a.value=="number"&&(t.debounce=a.value);break;case"throttle":typeof a.value=="number"&&(t.throttle=a.value);break;case"queue":(a.value==="first"||a.value==="last"||a.value==="all"||a.value==="none")&&(t.queue=a.value);break}e.advance()}return r?t:void 0}};N.POSITIONAL_KEYWORDS=new Set(["first","last","next","previous","random","closest"]),N.POSITIONAL_OR_SCOPE_KEYWORDS=new Set(["first","last","next","previous","random","closest","parent"]),N.STRUCTURAL_NEVER_EVENT=new Set(["if","unless","else","end","then"]),N.PROPERTY_ACCESS_BASES=new Set(["it","me","you","my","its","your","event","result","target","detail","body","window","document","self","this"]),N.COMMAND_ACTION_KEYWORDS=new Set(Object.keys(je).map(e=>e.toLowerCase())),N.CLAUSE_BOUNDARY_KEYWORDS=new Set(["then","and","or","end","else"]),N.OF_POSSESSIVE_MARKERS={ms:new Set(["daripada"]),sw:new Set(["ya"]),vi:new Set(["c\u1EE7a"]),zh:new Set(["\u7684"]),it:new Set(["di"]),pl:new Set(["z"]),uk:new Set(["\u0437"]),th:new Set(["\u0E02\u0E2D\u0E07"]),ja:new Set(["\u306E"]),ko:new Set(["\uC758"]),bn:new Set(["\u09B0"]),hi:new Set(["\u0915\u093E"]),qu:new Set(["pa"]),tr:new Set(["nin"])},N.RUN_OPERATORS=new Set(["+","-","*","/"]),N.MAX_BRACE_RUN_TOKENS=64,N.MAX_PROPERTY_DEPTH=10,N.MAX_METHOD_ARGS=20,N.DECLARATION_COMMANDS=new Set(["behavior","def","install"]),N.ENGLISH_NOISE_WORDS=new Set(["the","a","an"]);var Nr=N,he=new Nr;var fl=["===","!==","->","==","!=","<=",">=","&&","||","**","+=","-=","*=","/=","+","-","*","/","=",">","<","!","&","|","%","^","~"],K=class{constructor(e=fl){this.name="operator";this.operators=[...e].sort((t,r)=>r.length-t.length)}canExtract(e,t){return this.operators.some(r=>e.startsWith(r,t))}extract(e,t){for(let r of this.operators)if(e.startsWith(r,t))return{value:r,length:r.length};return null}},yl="()[]{},:;",q=class{constructor(e=yl){this.punctuation=e;this.name="punctuation"}canExtract(e,t){return this.punctuation.includes(e[t])}extract(e,t){let r=e[t];return this.punctuation.includes(r)?{value:r,length:1}:null}};function Ar(n,e){let t=n[e];if(t==="#"){let r=n.slice(e).match(/^#[a-zA-Z_][\w-]*/);return r?r[0]:null}if(t==="."){let r=n.slice(e).match(/^\.\{[a-zA-Z_$][\w$]*\}/);if(r)return r[0];let i=n.slice(e).match(/^\.[a-zA-Z_][\w-]*/);return i?i[0]:null}if(t==="@"){let r=n.slice(e).match(/^@[a-zA-Z_][\w-]*/);return r?r[0]:null}if(t==="*"){let r=n.slice(e).match(/^\*(?:--)?[a-zA-Z_][\w-]*/);return r?r[0]:null}if(t==="["){let r=0,i=e;for(;i<n.length;){if(n[i]==="["&&r++,n[i]==="]"&&(r--,r===0))return n.slice(e,i+1);i++}return null}if(t==="<"){let r=n.slice(e).match(/^<(?=[\w.#[])[\w-]*(?:[#.][\w-]+|\[[^\]]+\])*\s*\/>/);return r?r[0]:null}return null}var ut=class{constructor(){this.name="css-selector"}canExtract(e,t){let r=e[t];return r==="#"||r==="."||r==="["||r==="<"?!0:r==="@"||r==="*"?Ar(e,t)!==null:!1}extract(e,t){let r=Ar(e,t);return r?{value:r,length:r.length,metadata:{type:"css-selector"}}:null}};var mt=class{constructor(){this.name="event-modifier"}canExtract(e,t){if(e[t]!==".")return!1;let r=e.slice(t);return/^\.(once|prevent|stop|debounce|throttle|queue)/.test(r)}extract(e,t){let r=e.slice(t).match(/^\.(?:once|prevent|stop|debounce|throttle|queue)(?:\(([^)]+)\))?/);if(!r)return null;let i=r[0],a=i.slice(1).split("(")[0],s=r[1];return{value:i,length:i.length,metadata:{modifierName:a,value:s?a==="queue"?s:parseInt(s,10):void 0}}}};function Jn(n,e){let t=n.slice(e);if(t.startsWith("http://")||t.startsWith("https://")){let r=t.match(/^https?:\/\/[^\s]*/);return r?r[0]:null}if(t.startsWith("//")){let r=t.match(/^\/\/[^\s]*/);return r?r[0]:null}if(t.startsWith("./")||t.startsWith("../")){let r=t.match(/^\.\.?\/[^\s]*/);return r?r[0]:null}if(t.startsWith("/")){let r=t.match(/^\/[^\s]*/);return r?r[0]:null}return null}var ft=class{constructor(){this.name="url"}canExtract(e,t){let r=e.slice(t);return r.startsWith("http://")||r.startsWith("https://")||r.startsWith("//")||r.startsWith("./")||r.startsWith("../")||r.startsWith("/")}extract(e,t){let r=Jn(e,t);return r?{value:r,length:r.length,metadata:{type:"url"}}:null}};var yt=class{constructor(){this.name="variable-ref"}canExtract(e,t){let r=e[t];return(r===":"||r==="$"||r==="^")&&t+1<e.length&&/[a-zA-Z_]/.test(e[t+1])}extract(e,t){if(!this.canExtract(e,t))return null;let r=1;for(;t+r<e.length&&/[a-zA-Z0-9_]/.test(e[t+r]);)r++;return{value:e.substring(t,t+r),length:r,metadata:{type:"variable-reference"}}}};function gl(n){let e=n.charCodeAt(0);return e>=12352&&e<=12447}function hl(n){let e=n.charCodeAt(0);return e>=12448&&e<=12543}function vl(n){let e=n.charCodeAt(0);return e>=19968&&e<=40879||e>=13312&&e<=19903}function Qn(n){return gl(n)||hl(n)||vl(n)}var $t=class{constructor(){this.name="japanese-keyword"}setContext(e){this.context=e}canExtract(e,t){return Qn(e[t])}extract(e,t){if(!this.context)throw new Error("JapaneseKeywordExtractor: context not set");let r=t;this.context.isKeywordStart(e,t);let i="",a=t;for(;a<e.length&&Qn(e[a]);)i+=e[a],a++;let s=i,o=i.length;for(let p=i.length;p>0;p--){let u=i.substring(0,p);if(this.context.lookupKeyword(u)){s=u,o=p;break}}if(i=s,a=t+o,!i)return null;let l=this.context.lookupKeyword(i),c=l&&l.normalized!==l.native?l.normalized:void 0,d;if(!l&&this.context.normalizer){let p=this.context.normalizer.normalize(i);if(p.stem!==i&&p.confidence>=.7){let u=this.context.lookupKeyword(p.stem);u&&(d=u.normalized)}}return{value:i,length:a-r,metadata:{normalized:c||d}}}};var ei=new Map([["\u3092",{role:"patient",confidence:.95}],["\u306B",{role:"destination",confidence:.85}],["\u304C",{role:"subject",confidence:.9}],["\u306E",{role:"possessive",confidence:.9}],["\u3068",{role:"conjunction",confidence:.8}],["\u3067",{role:"instrument",confidence:.85}],["\u3078",{role:"direction",confidence:.85}],["\u3084",{role:"listing",confidence:.8}],["\u304B",{role:"question",confidence:.85}],["\u3082",{role:"also",confidence:.85}],["\u306F",{role:"topic",confidence:.9}]]),ti=new Map([["\u304B\u3089",{role:"source",confidence:.95}],["\u307E\u3067",{role:"until",confidence:.95}],["\u3088\u308A",{role:"comparison",confidence:.9}],["\u3068\u3057\u3066",{role:"as",confidence:.9}],["\u306B\u3064\u3044\u3066",{role:"about",confidence:.9}],["\u306B\u3088\u3063\u3066",{role:"by-means",confidence:.9}],["\u306B\u3066",{role:"at-location",confidence:.85}]]),Kt=class{constructor(){this.name="japanese-particle"}setContext(e){this._context=e}longerKeywordStartsHere(e,t){if(!this._context)return!1;for(let r=4;r>=2;r--){let i=e.slice(t,t+r);if(i.length===r&&this._context.isKeyword(i))return!0}return!1}canExtract(e,t){let r=e[t];if(ei.has(r)&&!this.longerKeywordStartsHere(e,t))return!0;for(let[i]of ti)if(e.startsWith(i,t))return!0;return!1}extract(e,t){for(let[a,s]of ti)if(e.startsWith(a,t))return{value:a,length:a.length,metadata:{role:s.role,confidence:s.confidence,variant:a}};let r=e[t];if(this.longerKeywordStartsHere(e,t))return null;let i=ei.get(r);return i?{value:r,length:1,metadata:{role:i.role,confidence:i.confidence,variant:r}}:null}};function kl(n){let e=n.charCodeAt(0);return e>=44032&&e<=55203}function xl(n){let e=n.charCodeAt(0);return e>=4352&&e<=4607||e>=12592&&e<=12687}function Mr(n){return kl(n)||xl(n)}var bl=["\uD560\uB54C","\uD558\uBA74","\uD558\uB2C8\uAE4C","\uD560 \uB54C"],qt=class{constructor(){this.name="korean-keyword"}setContext(e){this.context=e}canExtract(e,t){return Mr(e[t])}extract(e,t){if(!this.context)throw new Error("KoreanKeywordExtractor: context not set");let r=t,i=6;for(let u=Math.min(i,e.length-r);u>=2;u--){let m=e.slice(r,r+u),f=!0;for(let g=0;g<m.length;g++)if(!Mr(m[g])){f=!1;break}if(!f)continue;let y=this.context.lookupKeyword(m);if(y)return{value:m,length:u,metadata:{normalized:y.normalized!==y.native?y.normalized:void 0}};if(this.context.normalizer){let g=this.context.normalizer.normalize(m);if(g.stem!==m&&g.confidence>=.7){let h=this.context.lookupKeyword(g.stem);if(h)return{value:m,length:u,metadata:{normalized:h.normalized,stem:g.stem,stemConfidence:g.confidence}}}}}let a="",s=t;for(;s<e.length&&Mr(e[s])&&!(a.length>0&&this.context.isKeywordStart(e,s));)a+=e[s],s++;if(!a)return null;for(let u of bl)if(a.endsWith(u)&&a.length>u.length){let m=a.slice(0,-u.length),f=this.context.lookupKeyword(m);if(f)return{value:m,length:m.length,metadata:{normalized:f.normalized,hasSuffix:!0,suffix:u,stem:m}}}let o=this.context.lookupKeyword(a),l=o&&o.normalized!==o.native?o.normalized:void 0;a.includes("\uD1A0\uAE00")&&(console.log(`[KO DEBUG] word="${a}"`),console.log(`[KO DEBUG] keywordEntry=${o?"FOUND":"NOT FOUND"}`),console.log(`[KO DEBUG] normalizer=${this.context.normalizer?"EXISTS":"MISSING"}`));let c,d,p;if(!o&&this.context.normalizer){let u=this.context.normalizer.normalize(a);if(u.stem!==a&&u.confidence>=.7){let m=this.context.lookupKeyword(u.stem);m&&(c=m.normalized,d=u.stem,p=u.confidence,a.includes("\uD1A0\uAE00")&&console.log(`[KO DEBUG] word="${a}", stem="${u.stem}", normalized="${c}"`))}}return{value:a,length:s-r,metadata:{normalized:l||c,stem:d,stemConfidence:p}}}};var ri=new Map([["\uC774",{role:"agent",confidence:.85,variant:"consonant",description:"subject marker (after consonant)"}],["\uAC00",{role:"agent",confidence:.85,variant:"vowel",description:"subject marker (after vowel)"}],["\uC744",{role:"patient",confidence:.95,variant:"consonant",description:"object marker (after consonant)"}],["\uB97C",{role:"patient",confidence:.95,variant:"vowel",description:"object marker (after vowel)"}],["\uC740",{role:"agent",confidence:.75,variant:"consonant",description:"topic marker (after consonant)"}],["\uB294",{role:"agent",confidence:.75,variant:"vowel",description:"topic marker (after vowel)"}],["\uC5D0",{role:"destination",confidence:.85,description:"at/to marker"}],["\uB85C",{role:"destination",confidence:.85,variant:"vowel",description:"to/by means (after vowel or \u3139)"}],["\uC640",{role:"style",confidence:.7,variant:"vowel",description:"and/with (after vowel)"}],["\uACFC",{role:"style",confidence:.7,variant:"consonant",description:"and/with (after consonant)"}],["\uC758",{role:"patient",confidence:.6,description:"possessive marker"}],["\uB3C4",{role:"patient",confidence:.65,description:"also/too marker"}],["\uB9CC",{role:"patient",confidence:.65,description:"only marker"}]]),ni=new Map([["\uC5D0\uC11C",{role:"source",confidence:.8,description:"at/from marker (action location)"}],["\uC73C\uB85C",{role:"destination",confidence:.85,variant:"consonant",description:"to/by means (after consonant)"}],["\uBD80\uD130",{role:"source",confidence:.9,description:"from/since marker"}],["\uAE4C\uC9C0",{role:"destination",confidence:.75,description:"until/to marker"}],["\uCC98\uB7FC",{role:"manner",confidence:.8,description:"like/as marker"}],["\uBCF4\uB2E4",{role:"source",confidence:.75,description:"than marker"}]]);function ii(n){if(!n)return!1;let e=n.codePointAt(0);return e>=44032&&e<=55203}var Bt=class{constructor(){this.name="korean-particle"}setContext(e){this._context=e,this._context}canExtract(e,t){let r=e[t];if(ri.has(r)&&!ii(e[t+1]))return!0;for(let[i]of ni)if(e.startsWith(i,t))return!0;return!1}extract(e,t){for(let[a,s]of ni)if(e.startsWith(a,t))return{value:a,length:a.length,metadata:{particleRole:s.role,particleConfidence:s.confidence,particleVariant:s.variant}};let r=e[t],i=ri.get(r);return i&&!ii(e[t+1])?{value:r,length:1,metadata:{particleRole:i.role,particleConfidence:i.confidence,particleVariant:i.variant}}:null}};function Or(n){let e=n.charCodeAt(0);return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=63744&&e<=64255||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=194560&&e<=195103}var Dt=class{constructor(){this.name="chinese-keyword"}setContext(e){this.context=e}canExtract(e,t){return Or(e[t])}extract(e,t){if(!this.context)throw new Error("ChineseKeywordExtractor: context not set");let r=t,i=null;if(this.context.isKeywordStart(e,t))for(let o=10;o>=1;o--){let l=e.slice(t,t+o);if([...l].every(c=>Or(c))){let c=this.context.lookupKeyword(l);if(c){i={word:l,entry:c};break}}}if(i)return{value:i.word,length:i.word.length,metadata:{normalized:i.entry.normalized}};let a="",s=t;for(;s<e.length&&Or(e[s])&&(a+=e[s],s++,!(s<e.length&&this.context.isKeywordStart(e,s))););return a?{value:a,length:s-r,metadata:{}}:null}};var ai=new Map([["\u628A",{role:"patient",confidence:.95,description:"ba-construction object marker"}],["\u5728",{role:"location",confidence:.85,description:"at/in/on location marker"}],["\u4ECE",{role:"source",confidence:.9,description:"from marker"}],["\u5230",{role:"destination",confidence:.9,description:"to/until marker"}],["\u5411",{role:"destination",confidence:.85,description:"towards marker"}],["\u7ED9",{role:"destination",confidence:.85,description:"to/for recipient marker"}],["\u5BF9",{role:"destination",confidence:.8,description:"to/towards marker"}],["\u7528",{role:"instrument",confidence:.85,description:"with/using marker"}],["\u88AB",{role:"agent",confidence:.8,description:"by (passive) marker"}],["\u8BA9",{role:"agent",confidence:.75,description:"let/make causative marker"}],["\u7684",{role:"possessive",confidence:.9,description:"possessive/attributive marker"}],["\u5730",{role:"manner",confidence:.85,description:"adverbial marker"}],["\u5F97",{role:"manner",confidence:.8,description:"complement marker"}],["\u4E86",{role:"aspect",confidence:.7,description:"completion aspect marker"}],["\u7740",{role:"aspect",confidence:.7,description:"progressive aspect marker"}],["\u8FC7",{role:"aspect",confidence:.7,description:"experiential aspect marker"}],["\u5417",{role:"mood",confidence:.75,description:"question particle"}],["\u5462",{role:"mood",confidence:.7,description:"question/emphasis particle"}],["\u5427",{role:"mood",confidence:.7,description:"suggestion particle"}]]),oi=new Map([["\u7136\u540E",{role:"sequence",confidence:.9,description:"then/afterwards"}],["\u63A5\u7740",{role:"sequence",confidence:.85,description:"next/following"}],["\u5E76\u4E14",{role:"conjunction",confidence:.85,description:"and/moreover"}],["\u6216\u8005",{role:"conjunction",confidence:.85,description:"or"}],["\u5982\u679C",{role:"condition",confidence:.9,description:"if"}],["\u90A3\u4E48",{role:"consequence",confidence:.85,description:"then"}],["\u5426\u5219",{role:"alternative",confidence:.85,description:"otherwise"}]]),Ht=class{constructor(){this.name="chinese-particle"}setContext(e){this._context=e}longerKeywordAt(e,t,r){let i=this._context;if(!i)return!1;let a=Math.min(10,e.length-t);for(let s=a;s>r;s--)if(i.lookupKeyword(e.slice(t,t+s)))return!0;return!1}canExtract(e,t){let r=e[t];if(ai.has(r)&&!this.longerKeywordAt(e,t,1))return!0;for(let[i]of oi)if(e.startsWith(i,t)&&!this.longerKeywordAt(e,t,i.length))return!0;return!1}extract(e,t){for(let[a,s]of oi)if(e.startsWith(a,t)&&!this.longerKeywordAt(e,t,a.length))return{value:a,length:a.length,metadata:{particleRole:s.role,particleConfidence:s.confidence,particleDescription:s.description}};let r=e[t],i=ai.get(r);return i&&!this.longerKeywordAt(e,t,1)?{value:r,length:1,metadata:{particleRole:i.role,particleConfidence:i.confidence,particleDescription:i.description}}:null}};var si=xe([[1536,1791],[1872,1919],[2208,2303],[64336,65023],[65136,65279]]),Sl=new Set(["\u0641\u064A","\u0639\u0644\u0649","\u0645\u0646","\u0625\u0644\u0649","\u0627\u0644\u0649","\u0645\u0639","\u0639\u0646","\u0642\u0628\u0644","\u0628\u0639\u062F","\u0628\u064A\u0646"]),Ft=class{constructor(){this.name="arabic-keyword"}setContext(e){this.context=e}canExtract(e,t){return si(e[t])}extract(e,t){if(!this.context)throw new Error("ArabicKeywordExtractor: context not set");let r=t;this.context.isKeywordStart(e,t);let i="",a=t;for(;a<e.length&&(si(e[a])||e[a]==="\u0640");)i+=e[a],a++;if(!i)return null;let s=this.context.lookupKeyword(i),o=s&&s.normalized!==s.native?s.normalized:void 0;if(Sl.has(i))return{value:i,length:a-r,metadata:{prepositionValue:i,normalized:o}};let l,c,d;if(!s&&this.context.normalizer){let p=this.context.normalizer.normalize(i);if(p.stem!==i&&p.confidence>=.7){let u=this.context.lookupKeyword(p.stem);u&&(l=u.normalized,c=p.stem,d=p.confidence)}}return{value:i,length:a-r,metadata:{normalized:o||l,stem:c,stemConfidence:d}}}};var gt=xe([[1536,1791],[1872,1919],[2208,2303],[64336,65023],[65136,65279]]),ht=new Map([["\u0648",{normalized:"and",type:"conjunction"}],["\u0641",{normalized:"then",type:"conjunction"}],["\u0628",{normalized:"with",type:"preposition"}],["\u0644",{normalized:"to",type:"preposition"}],["\u0643",{normalized:"like",type:"preposition"}],["\u0648\u0644",{normalized:"and-to",type:"conjunction"}],["\u0648\u0628",{normalized:"and-with",type:"conjunction"}],["\u0648\u0643",{normalized:"and-like",type:"conjunction"}],["\u0641\u0644",{normalized:"then-to",type:"conjunction"}],["\u0641\u0628",{normalized:"then-with",type:"conjunction"}],["\u0641\u0643",{normalized:"then-like",type:"conjunction"}]]),wl=new Set(["\u0648\u062B\u064A\u0642\u0629"]),Ut=class{constructor(){this.name="arabic-proclitic"}setContext(e){this.context=e}canExtract(e,t){let r=e[t];return ht.has(r)||t+1<e.length&&ht.has(e.slice(t,t+2))}extract(e,t){if(!this.context)throw new Error("ArabicProcliticExtractor: context not set");let r=t;for(;r<e.length&&(gt(e[r])||e[r]==="\u0640");)r++;let i=e.slice(t,r);if(this.context.isKeyword(i)||wl.has(i))return null;if(t+2<=e.length){let d=e.slice(t,t+2),p=ht.get(d);if(p){let u=t+2;if(u<e.length&&gt(e[u])){let m=0,f=u;for(;f<e.length&&gt(e[f]);)m++,f++;if(m>=2)if(ht.get(e[t])){let g=e.slice(t+1,r);if(!this.context.isKeyword(g))return{value:d,length:2,metadata:{procliticType:p.type,normalized:p.normalized}}}else return{value:d,length:2,metadata:{procliticType:p.type,normalized:p.normalized}}}}}let a=e[t],s=ht.get(a);if(!s)return null;let o=t+1;if(o>=e.length||!gt(e[o]))return null;let l=0,c=o;for(;c<e.length&&gt(e[c]);)l++,c++;return l<2?null:{value:a,length:1,metadata:{procliticType:s.type,normalized:s.normalized}}}};var zl=xe([[1536,1791],[1872,1919],[2208,2303],[64336,65023],[65136,65279]]),li=new Map([["\u0639\u0646\u062F\u0645\u0627",{normalized:"on",formality:"formal",confidence:.95,description:"when (formal MSA)"}],["\u062D\u064A\u0646\u0645\u0627",{normalized:"on",formality:"formal",confidence:.93,description:"when/whenever (formal)"}],["\u0639\u0646\u062F",{normalized:"on",formality:"neutral",confidence:.88,description:"at/when (neutral)"}],["\u062D\u064A\u0646",{normalized:"on",formality:"neutral",confidence:.85,description:"when/time (neutral)"}],["\u0644\u0645\u0651\u0627",{normalized:"on",formality:"dialectal",confidence:.7,description:"when (dialectal, with shadda)"}],["\u0644\u0645\u0627",{normalized:"on",formality:"dialectal",confidence:.68,description:"when (dialectal, no diacritic)"}],["\u0644\u062F\u0649",{normalized:"on",formality:"neutral",confidence:.82,description:"at/with (temporal)"}]]),Gt=class{constructor(){this.name="arabic-temporal"}setContext(e){this._context=e,this._context}canExtract(e,t){for(let[r]of li)if(e.startsWith(r,t))return!0;return!1}extract(e,t){let r=Array.from(li.entries()).sort(([i],[a])=>a.length-i.length);for(let[i,a]of r)if(e.startsWith(i,t)){let s=t+i.length;if(s>=e.length||/\s/.test(e[s])||!zl(e[s]))return{value:i,length:i.length,metadata:{temporalFormality:a.formality,temporalConfidence:a.confidence,normalized:a.normalized,description:a.description}}}return null}};var Tl=new Set(["di","ke","dari","pada","dengan","tanpa","untuk","oleh","antara","sebelum","sesudah","setelah","selama","sampai","hingga","sejak","menuju","tentang","terhadap","melalui","dalam","luar"]);function El(){let n=/[a-zA-Z]/;return{isLetter:r=>n.test(r),isIdentifierChar:r=>/[0-9]/.test(r)||n.test(r)}}var{isLetter:Pl,isIdentifierChar:Ll}=El(),jr=class{constructor(){this.name="indonesian-keyword"}setContext(e){this.context=e}canExtract(e,t){return Pl(e[t])}extract(e,t){if(!this.context)throw new Error("IndonesianKeywordExtractor: context not set");let r=t,i="";for(;r<e.length&&Ll(e[r]);)i+=e[r++];if(!i)return null;let a=i.toLowerCase(),s=Tl.has(a),o=this.context.lookupKeyword(a),l=o&&o.normalized!==o.native?o.normalized:void 0,c;if(!o&&this.context.normalizer){let d=this.context.normalizer.normalize(i);if(d.stem!==i&&d.confidence>=.7){let p=this.context.lookupKeyword(d.stem);p&&(c=p.normalized)}}return{value:i,length:r-t,metadata:{normalized:l||c,isPreposition:s}}}};function ci(){return[new jr]}function Yt(n){let e=n.charCodeAt(0);return e>=65&&e<=90||e>=97&&e<=122?!0:"\xE7\xC7\u011F\u011E\u0131\u0130\xF6\xD6\u015F\u015E\xFC\xDC".includes(n)}var Cl=new Set(["ile","i\xE7in","kadar","gibi","\xF6nce","\xFCzerinde","alt\u0131nda","i\xE7inde","d\u0131\u015F\u0131nda","aras\u0131nda","kar\u015F\u0131","g\xF6re","ra\u011Fmen","do\u011Fru","boyunca"]),Rl=new Set(["de","da","te","ta","den","dan","ten","tan","e","a","ye","ya","i","\u0131","u","\xFC","in","\u0131n","un","\xFCn","le","la","yle","yla"]),Ir=class{constructor(){this.name="turkish-keyword"}setContext(e){this.context=e}canExtract(e,t){return Yt(e[t])}extract(e,t){if(!this.context)throw new Error("TurkishKeywordExtractor: context not set");let r=t,i=12;for(let u=Math.min(i,e.length-r);u>=2;u--){let m=e.slice(r,r+u);if(r+u<e.length&&Yt(e[r+u]))continue;let f=!0;for(let g=0;g<m.length;g++)if(!Yt(m[g])){f=!1;break}if(!f)continue;let y=this.context.lookupKeyword(m);if(y)return{value:m,length:u,metadata:{normalized:y.normalized!==y.native?y.normalized:void 0}};if(this.context.normalizer){let g=this.context.normalizer.normalize(m);if(g.stem!==m&&g.confidence>=.7){let h=this.context.lookupKeyword(g.stem);if(h)return{value:m,length:u,metadata:{normalized:h.normalized,stem:g.stem,stemConfidence:g.confidence}}}}}let a="",s=t;for(;s<e.length&&Yt(e[s]);)a+=e[s],s++;for(let u=a.length;u>=2&&!(u<a.length);u--){let m=a.substring(0,u),f=this.context.lookupKeyword(m);if(f)return{value:m,length:u,metadata:{normalized:f.normalized!==f.native?f.normalized:void 0}}}if(!a||!a)return null;if(Cl.has(a.toLowerCase()))return{value:a,length:s-r,metadata:{postpositionValue:a.toLowerCase()}};if(Rl.has(a.toLowerCase()))return{value:a,length:s-r,metadata:{caseSuffixValue:a.toLowerCase()}};let o=this.context.lookupKeyword(a),l=o&&o.normalized!==o.native?o.normalized:void 0,c,d,p;if(!o&&this.context.normalizer){let u=this.context.normalizer.normalize(a);if(u.stem!==a&&u.confidence>=.7){let m=this.context.lookupKeyword(u.stem);m&&(c=m.normalized,d=u.stem,p=u.confidence)}}return{value:a,length:s-r,metadata:{normalized:l||c,stem:d,stemConfidence:p}}}};function pi(){return new Ir}function Nl(n){let e=n.charCodeAt(0);return e>=65&&e<=90||e>=97&&e<=122||e===95||e===36}function Al(n){let e=n.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95||e===36}var ve=class{constructor(){this.name="ascii-identifier"}setContext(e){this.context=e}canExtract(e,t){return Nl(e[t])}extract(e,t){if(!this.context)throw new Error("AsciiIdentifierExtractor: context not set");let r=t,i="",a=t;for(;a<e.length&&Al(e[a]);)i+=e[a],a++;if(!i)return null;let s=this.context.lookupKeyword(i),o=s&&s.normalized!==s.native?s.normalized:void 0;return{value:i,length:a-r,metadata:{normalized:o}}}};function G(){return[new ft,new mt,new yt,new ut]}function Wr(n){return/[a-zA-Z0-9_]/.test(n)}var Vr=class{constructor(){this.name="english-keyword"}setContext(e){this.context=e}canExtract(e,t){return/[a-zA-Z_]/.test(e[t])}extract(e,t){if(!this.context)throw new Error("EnglishKeywordExtractor: context not set");let r=t,i="";for(;r<e.length&&Wr(e[r]);)i+=e[r++];if(!i)return null;if(r<e.length&&e[r]===":"){let l=r;r++;let c="";for(;r<e.length&&Wr(e[r]);)c+=e[r++];c?i=i+":"+c:r=l}let a=this.context.lookupKeyword(i),s=a&&a.normalized!==a.native?a.normalized:void 0,o=null;return this.context.isKeyword(i)||(o=this.tryClassSyntaxConversion(e,r,i)),{value:o||i,length:r-t,metadata:{normalized:s,classConversion:o?!0:void 0}}}tryClassSyntaxConversion(e,t,r){let i=t;for(;i<e.length&&/\s/.test(e[i]);)i++;if(e.slice(i,i+5).toLowerCase()==="class"){let a=i+5;if(a>=e.length||!Wr(e[a]))return"."+r}return null}};function di(){return[new Vr]}var Ml=[{native:"true",normalized:"true"},{native:"false",normalized:"false"},{native:"null",normalized:"null"},{native:"undefined",normalized:"undefined"},{native:"first",normalized:"first"},{native:"last",normalized:"last"},{native:"next",normalized:"next"},{native:"previous",normalized:"previous"},{native:"closest",normalized:"closest"},{native:"click",normalized:"click"},{native:"dblclick",normalized:"dblclick"},{native:"mousedown",normalized:"mousedown"},{native:"mouseup",normalized:"mouseup"},{native:"mouseover",normalized:"mouseover"},{native:"mouseout",normalized:"mouseout"},{native:"mouseenter",normalized:"mouseenter"},{native:"mouseleave",normalized:"mouseleave"},{native:"mousemove",normalized:"mousemove"},{native:"keydown",normalized:"keydown"},{native:"keyup",normalized:"keyup"},{native:"keypress",normalized:"keypress"},{native:"input",normalized:"input"},{native:"change",normalized:"change"},{native:"submit",normalized:"submit"},{native:"reset",normalized:"reset"},{native:"load",normalized:"load"},{native:"unload",normalized:"unload"},{native:"scroll",normalized:"scroll"},{native:"resize",normalized:"resize"},{native:"dragstart",normalized:"dragstart"},{native:"drag",normalized:"drag"},{native:"dragend",normalized:"dragend"},{native:"dragenter",normalized:"dragenter"},{native:"dragleave",normalized:"dragleave"},{native:"dragover",normalized:"dragover"},{native:"drop",normalized:"drop"},{native:"touchstart",normalized:"touchstart"},{native:"touchmove",normalized:"touchmove"},{native:"touchend",normalized:"touchend"},{native:"touchcancel",normalized:"touchcancel"},{native:"in",normalized:"in"},{native:"to",normalized:"to"},{native:"at",normalized:"at"},{native:"by",normalized:"by"},{native:"with",normalized:"with"},{native:"without",normalized:"without"},{native:"of",normalized:"of"},{native:"as",normalized:"as"},{native:"every",normalized:"every"},{native:"upon",normalized:"upon"},{native:"unless",normalized:"unless"},{native:"forever",normalized:"forever"},{native:"times",normalized:"times"},{native:"and",normalized:"and"},{native:"or",normalized:"or"},{native:"not",normalized:"not"},{native:"is",normalized:"is"},{native:"exists",normalized:"exists"},{native:"empty",normalized:"empty"},{native:"my",normalized:"my"},{native:"your",normalized:"your"},{native:"its",normalized:"its"},{native:"the",normalized:"the"},{native:"a",normalized:"a"},{native:"an",normalized:"an"},{native:"delete",normalized:"delete"},{native:"innerHTML",normalized:"innerHTML"},{native:"outerHTML",normalized:"outerHTML"},{native:"beforebegin",normalized:"beforebegin"},{native:"afterend",normalized:"afterend"},{native:"beforeend",normalized:"beforeend"},{native:"afterbegin",normalized:"afterbegin"},{native:"flip",normalized:"toggle"},{native:"switch",normalized:"toggle"},{native:"increase",normalized:"increment"},{native:"decrease",normalized:"decrement"},{native:"display",normalized:"show"},{native:"reveal",normalized:"show"},{native:"conceal",normalized:"hide"},{native:"colour",normalized:"color"},{native:"grey",normalized:"gray"},{native:"centre",normalized:"center"},{native:"behaviour",normalized:"behavior"},{native:"initialise",normalized:"initialize"},{native:"favourite",normalized:"favorite"}],_r=class extends V{constructor(){super();this.language="en";this.direction="ltr";this.initializeKeywordsFromProfile(Ee,Ml),this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractors(di()),this.registerExtractor(new K),this.registerExtractor(new q)}classifyToken(t){return this.isKeyword(t)?"keyword":t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("http")?"url":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||/^\d/.test(t)?"literal":["==","!=","<=",">=","<",">","&&","||","!"].includes(t)?"operator":"identifier"}},Xt=new _r;var Ol=[{pattern:"\u3057\u305F\u3089",confidence:.88,conjugationType:"conditional-tara",minStemLength:2},{pattern:"\u3059\u308B\u3068",confidence:.88,conjugationType:"conditional-to",minStemLength:2},{pattern:"\u3059\u308C\u3070",confidence:.85,conjugationType:"conditional-ba",minStemLength:2},{pattern:"\u305F\u3089",confidence:.85,conjugationType:"conditional-tara",minStemLength:2},{pattern:"\u308C\u3070",confidence:.82,conjugationType:"conditional-ba",minStemLength:2},{pattern:"\u3066\u3044\u307E\u3057\u305F",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"\u3066\u3044\u307E\u3059",confidence:.85,conjugationType:"progressive",minStemLength:2},{pattern:"\u3066\u304F\u3060\u3055\u3044",confidence:.85,conjugationType:"request",minStemLength:2},{pattern:"\u3067\u304F\u3060\u3055\u3044",confidence:.85,conjugationType:"request",minStemLength:2},{pattern:"\u3066\u3044\u308B",confidence:.85,conjugationType:"progressive",minStemLength:2},{pattern:"\u3066\u304A\u304F",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\u3066\u307F\u308B",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\u3066\u3042\u308B",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\u3066\u304F\u308C",confidence:.8,conjugationType:"casual-request",minStemLength:2},{pattern:"\u3067\u304F\u308C",confidence:.8,conjugationType:"casual-request",minStemLength:2},{pattern:"\u3061\u3083\u3063\u305F",confidence:.82,conjugationType:"contracted-past",minStemLength:2},{pattern:"\u3058\u3083\u3063\u305F",confidence:.82,conjugationType:"contracted-past",minStemLength:2},{pattern:"\u3061\u3083\u3046",confidence:.82,conjugationType:"contracted",minStemLength:2},{pattern:"\u3058\u3083\u3046",confidence:.82,conjugationType:"contracted",minStemLength:2},{pattern:"\u307E\u3057\u305F",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"\u307E\u305B\u3093",confidence:.85,conjugationType:"negative",minStemLength:2},{pattern:"\u307E\u3059",confidence:.85,conjugationType:"polite",minStemLength:2},{pattern:"\u3066",confidence:.85,conjugationType:"te-form",minStemLength:2},{pattern:"\u305F",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"\u306A\u3044",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"\u306A\u304B\u3063\u305F",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"\u3089\u308C\u308B",confidence:.8,conjugationType:"potential",minStemLength:2},{pattern:"\u308C\u308B",confidence:.78,conjugationType:"potential",minStemLength:2},{pattern:"\u3089\u308C\u305F",confidence:.8,conjugationType:"passive",minStemLength:2},{pattern:"\u3055\u305B\u308B",confidence:.8,conjugationType:"causative",minStemLength:2},{pattern:"\u305B\u308B",confidence:.78,conjugationType:"causative",minStemLength:2},{pattern:"\u3088\u3046",confidence:.8,conjugationType:"volitional",minStemLength:2},{pattern:"\u308B",confidence:.75,conjugationType:"dictionary",minStemLength:3}],jl=[{pattern:"\u3057\u305F\u3089",confidence:.88,conjugationType:"conditional-tara"},{pattern:"\u3059\u308B\u3068",confidence:.88,conjugationType:"conditional-to"},{pattern:"\u3059\u308C\u3070",confidence:.85,conjugationType:"conditional-ba"},{pattern:"\u3057\u3066\u3044\u307E\u3059",confidence:.85,conjugationType:"progressive"},{pattern:"\u3057\u3066\u3044\u308B",confidence:.85,conjugationType:"progressive"},{pattern:"\u3057\u307E\u3057\u305F",confidence:.85,conjugationType:"past"},{pattern:"\u3057\u307E\u3059",confidence:.85,conjugationType:"polite"},{pattern:"\u3057\u306A\u3044",confidence:.82,conjugationType:"negative"},{pattern:"\u3057\u3066",confidence:.85,conjugationType:"te-form"},{pattern:"\u3057\u305F",confidence:.85,conjugationType:"past"},{pattern:"\u3059\u308B",confidence:.88,conjugationType:"dictionary"}];function ui(n){let e=n.charCodeAt(0);return e>=12352&&e<=12447}function Il(n){let e=n.charCodeAt(0);return e>=12448&&e<=12543}function Wl(n){let e=n.charCodeAt(0);return e>=19968&&e<=40959||e>=13312&&e<=19903}function Vl(n){for(let e of n)if(ui(e)||Il(e)||Wl(e))return!0;return!1}var vt=class{constructor(){this.language="ja"}isNormalizable(e){if(!Vl(e)||e.length<2)return!1;let t=e[e.length-1];return ui(t)}normalize(e){let t=this.normalizeCompound(e);if(t)return t;let r=this.trySuruNormalization(e);if(r)return r;for(let i of Ol)if(e.endsWith(i.pattern)){let a=e.slice(0,-i.pattern.length),s=i.minStemLength??2;if(a.length<s)continue;let o={removedSuffixes:[i.pattern]};return i.conjugationType&&(o.conjugationType=i.conjugationType),O(a,i.confidence,o)}return Y(e)}trySuruNormalization(e){for(let t of jl)if(e.endsWith(t.pattern)){let r=e.slice(0,-t.pattern.length);if(r.length<1)continue;return O(r,t.confidence,{removedSuffixes:[t.pattern],conjugationType:t.conjugationType,originalForm:"suru-verb"})}return null}normalizeCompound(e){let t=[{pattern:"\u3066\u3044\u306A\u304B\u3063\u305F",suffixes:["\u3066","\u3044","\u306A\u304B\u3063\u305F"],confidence:.8,minStemLength:2},{pattern:"\u3067\u3044\u306A\u304B\u3063\u305F",suffixes:["\u3067","\u3044","\u306A\u304B\u3063\u305F"],confidence:.8,minStemLength:2},{pattern:"\u3066\u3044\u306A\u3044",suffixes:["\u3066","\u3044","\u306A\u3044"],confidence:.82,minStemLength:2},{pattern:"\u3067\u3044\u306A\u3044",suffixes:["\u3067","\u3044","\u306A\u3044"],confidence:.82,minStemLength:2},{pattern:"\u3066\u3044\u305F",suffixes:["\u3066","\u3044","\u305F"],confidence:.85,minStemLength:2},{pattern:"\u3067\u3044\u305F",suffixes:["\u3067","\u3044","\u305F"],confidence:.85,minStemLength:2}];for(let{pattern:r,suffixes:i,confidence:a,minStemLength:s}of t)if(e.endsWith(r)){let o=e.slice(0,-r.length);if(o.length<s)continue;return O(o,a,{removedSuffixes:i,conjugationType:"compound"})}return null}},nf=new vt;var _l=new Set(["\u3092","\u306B","\u3067","\u304B\u3089","\u307E\u3067","\u3078","\u3068","\u306E","\u304C","\u306F","\u3082","\u3088\u308A"]),$l=[{native:"\u771F",normalized:"true"},{native:"\u507D",normalized:"false"},{native:"\u30CC\u30EB",normalized:"null"},{native:"\u672A\u5B9A\u7FA9",normalized:"undefined"},{native:"\u6700\u521D",normalized:"first"},{native:"\u6700\u5F8C",normalized:"last"},{native:"\u6B21",normalized:"next"},{native:"\u524D",normalized:"previous"},{native:"\u6700\u3082\u8FD1\u3044",normalized:"closest"},{native:"\u89AA",normalized:"parent"},{native:"\u30AF\u30EA\u30C3\u30AF",normalized:"click"},{native:"\u5909\u66F4",normalized:"change"},{native:"\u9001\u4FE1",normalized:"submit"},{native:"\u5165\u529B",normalized:"input"},{native:"\u30ED\u30FC\u30C9",normalized:"load"},{native:"\u8AAD\u307F\u8FBC\u307F",normalized:"load"},{native:"\u30B9\u30AF\u30ED\u30FC\u30EB",normalized:"scroll"},{native:"\u30AD\u30FC\u30C0\u30A6\u30F3",normalized:"keydown"},{native:"\u30AD\u30FC\u30A2\u30C3\u30D7",normalized:"keyup"},{native:"\u30DE\u30A6\u30B9\u30AA\u30FC\u30D0\u30FC",normalized:"mouseover"},{native:"\u30DE\u30A6\u30B9\u30A2\u30A6\u30C8",normalized:"mouseout"},{native:"\u30DE\u30A6\u30B9\u62BC\u4E0B",normalized:"mousedown"},{native:"\u30DE\u30A6\u30B9\u89E3\u653E",normalized:"mouseup"},{native:"\u307E\u305F\u306F",normalized:"or"},{native:"\u79C1",normalized:"me"},{native:"\u3057\u305F\u3089",normalized:"on"},{native:"\u3059\u308B\u3068",normalized:"on"},{native:"\u6642\u306B",normalized:"on"},{native:"\u79D2",normalized:"s"},{native:"\u30DF\u30EA\u79D2",normalized:"ms"},{native:"\u5206",normalized:"m"},{native:"\u6642\u9593",normalized:"h"}],$r=class extends V{constructor(){super();this.language="ja";this.direction="ltr";this.initializeKeywordsFromProfile(Fe,$l),this.normalizer=new vt,this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractor(new ve),this.registerExtractor(new Kt),this.registerExtractor(new $t),this.registerExtractor(new K),this.registerExtractor(new q)}classifyToken(t){return _l.has(t)?"particle":this.isKeyword(t)?"keyword":t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("http")?"url":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||t.startsWith("\u300C")||/^\d/.test(t)?"literal":"identifier"}},Zt=new $r;function Kl(n){let e=n.charCodeAt(0);return e>=44032&&e<=55203}function ql(n){for(let e of n)if(Kl(e))return!0;return!1}var Bl=[{pattern:"\uD558\uC2DC\uB2C8\uAE4C",confidence:.85,conjugationType:"honorific-causal",minStemLength:1},{pattern:"\uD558\uC2E4\uB54C",confidence:.88,conjugationType:"honorific-temporal",minStemLength:1},{pattern:"\uD558\uC2E4 \uB54C",confidence:.88,conjugationType:"honorific-temporal",minStemLength:1},{pattern:"\uD558\uC2DC\uBA74",confidence:.88,conjugationType:"honorific-conditional",minStemLength:1},{pattern:"\uC73C\uC2DC\uBA74",confidence:.85,conjugationType:"honorific-conditional",minStemLength:2},{pattern:"\uC2DC\uBA74",confidence:.82,conjugationType:"honorific-conditional",minStemLength:2},{pattern:"\uD558\uACE0\uB098\uC11C",confidence:.85,conjugationType:"sequential-after",minStemLength:1},{pattern:"\uD558\uACE0 \uB098\uC11C",confidence:.85,conjugationType:"sequential-after",minStemLength:1},{pattern:"\uD558\uACE0\uC11C",confidence:.85,conjugationType:"sequential-after",minStemLength:1},{pattern:"\uACE0\uB098\uC11C",confidence:.82,conjugationType:"sequential-after",minStemLength:2},{pattern:"\uACE0 \uB098\uC11C",confidence:.82,conjugationType:"sequential-after",minStemLength:2},{pattern:"\uACE0\uC11C",confidence:.82,conjugationType:"sequential-after",minStemLength:2},{pattern:"\uD558\uAE30\uC804\uC5D0",confidence:.85,conjugationType:"sequential-before",minStemLength:1},{pattern:"\uD558\uAE30 \uC804\uC5D0",confidence:.85,conjugationType:"sequential-before",minStemLength:1},{pattern:"\uAE30\uC804\uC5D0",confidence:.82,conjugationType:"sequential-before",minStemLength:2},{pattern:"\uAE30 \uC804\uC5D0",confidence:.82,conjugationType:"sequential-before",minStemLength:2},{pattern:"\uD558\uC790\uB9C8\uC790",confidence:.88,conjugationType:"immediate",minStemLength:1},{pattern:"\uC790\uB9C8\uC790",confidence:.85,conjugationType:"immediate",minStemLength:2},{pattern:"\uD574\uC57C\uD574\uC694",confidence:.85,conjugationType:"obligation",minStemLength:1},{pattern:"\uD574\uC57C\uD574",confidence:.85,conjugationType:"obligation",minStemLength:1},{pattern:"\uD574\uC57C\uD558\uB2E4",confidence:.85,conjugationType:"obligation",minStemLength:1},{pattern:"\uC5B4\uC57C\uD574\uC694",confidence:.82,conjugationType:"obligation",minStemLength:2},{pattern:"\uC5B4\uC57C\uD574",confidence:.82,conjugationType:"obligation",minStemLength:2},{pattern:"\uC544\uC57C\uD574\uC694",confidence:.82,conjugationType:"obligation",minStemLength:2},{pattern:"\uC544\uC57C\uD574",confidence:.82,conjugationType:"obligation",minStemLength:2},{pattern:"\uD558\uB2C8\uAE4C",confidence:.85,conjugationType:"causal-nikka",minStemLength:1},{pattern:"\uD560\uB54C",confidence:.88,conjugationType:"temporal-ttae",minStemLength:1},{pattern:"\uD560 \uB54C",confidence:.88,conjugationType:"temporal-ttae",minStemLength:1},{pattern:"\uC744\uB54C",confidence:.85,conjugationType:"temporal-ttae",minStemLength:2},{pattern:"\uC744 \uB54C",confidence:.85,conjugationType:"temporal-ttae",minStemLength:2},{pattern:"\uD558\uBA74",confidence:.88,conjugationType:"conditional-myeon",minStemLength:1},{pattern:"\uC73C\uBA74",confidence:.85,conjugationType:"conditional-myeon",minStemLength:2},{pattern:"\uB2C8\uAE4C",confidence:.82,conjugationType:"causal-nikka",minStemLength:2},{pattern:"\uBA74",confidence:.8,conjugationType:"conditional-myeon",minStemLength:2},{pattern:"\uD558\uC600\uC2B5\uB2C8\uB2E4",confidence:.85,conjugationType:"past",minStemLength:1},{pattern:"\uD588\uC2B5\uB2C8\uB2E4",confidence:.85,conjugationType:"past",minStemLength:1},{pattern:"\uD569\uB2C8\uB2E4",confidence:.85,conjugationType:"polite",minStemLength:1},{pattern:"\uC2B5\uB2C8\uB2E4",confidence:.82,conjugationType:"polite",minStemLength:2},{pattern:"\uB429\uB2C8\uB2E4",confidence:.82,conjugationType:"polite",minStemLength:1},{pattern:"\u3142\uB2C8\uB2E4",confidence:.82,conjugationType:"polite",minStemLength:2},{pattern:"\uD558\uC138\uC694",confidence:.85,conjugationType:"honorific",minStemLength:1},{pattern:"\uD558\uC2ED\uC2DC\uC624",confidence:.85,conjugationType:"honorific",minStemLength:1},{pattern:"\uC138\uC694",confidence:.82,conjugationType:"honorific",minStemLength:2},{pattern:"\uC2ED\uC2DC\uC624",confidence:.82,conjugationType:"honorific",minStemLength:2},{pattern:"\uD558\uACE0\uC788\uC5B4\uC694",confidence:.82,conjugationType:"progressive",minStemLength:1},{pattern:"\uD558\uACE0\uC788\uC5B4",confidence:.82,conjugationType:"progressive",minStemLength:1},{pattern:"\uD588\uC5B4\uC694",confidence:.85,conjugationType:"past",minStemLength:1},{pattern:"\uD574\uC694",confidence:.85,conjugationType:"polite",minStemLength:1},{pattern:"\uC5B4\uC694",confidence:.82,conjugationType:"polite",minStemLength:2},{pattern:"\uC544\uC694",confidence:.82,conjugationType:"polite",minStemLength:2},{pattern:"\uD588\uC5B4",confidence:.85,conjugationType:"past",minStemLength:1},{pattern:"\uD574",confidence:.8,conjugationType:"present",minStemLength:1},{pattern:"\uC5C8\uC5B4",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"\uC558\uC5B4",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"\uD558\uACE0\uC788\uB2E4",confidence:.82,conjugationType:"progressive",minStemLength:1},{pattern:"\uACE0\uC788\uB2E4",confidence:.8,conjugationType:"progressive",minStemLength:2},{pattern:"\uACE0\uC788\uC5B4",confidence:.8,conjugationType:"progressive",minStemLength:2},{pattern:"\uD558\uB2E4",confidence:.88,conjugationType:"dictionary",minStemLength:1},{pattern:"\uD558\uC9C0\uC54A\uB2E4",confidence:.82,conjugationType:"negative",minStemLength:1},{pattern:"\uC548\uD558\uB2E4",confidence:.82,conjugationType:"negative",minStemLength:1},{pattern:"\uC9C0\uC54A\uB2E4",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"\uD574\uB77C",confidence:.82,conjugationType:"imperative",minStemLength:1},{pattern:"\uD558\uB77C",confidence:.82,conjugationType:"imperative",minStemLength:1},{pattern:"\uB2E4",confidence:.75,conjugationType:"dictionary",minStemLength:2}],Dl=[{pattern:"\uD558\uC2DC\uB2C8\uAE4C",confidence:.88,conjugationType:"honorific-causal"},{pattern:"\uD558\uC2E4\uB54C",confidence:.88,conjugationType:"honorific-temporal"},{pattern:"\uD558\uC2E4 \uB54C",confidence:.88,conjugationType:"honorific-temporal"},{pattern:"\uD558\uC2DC\uBA74",confidence:.88,conjugationType:"honorific-conditional"},{pattern:"\uD558\uC168\uC5B4\uC694",confidence:.85,conjugationType:"honorific-past"},{pattern:"\uD558\uC168\uC5B4",confidence:.85,conjugationType:"honorific-past"},{pattern:"\uD558\uC2ED\uB2C8\uB2E4",confidence:.85,conjugationType:"honorific-polite"},{pattern:"\uD558\uACE0\uB098\uC11C",confidence:.88,conjugationType:"sequential-after"},{pattern:"\uD558\uACE0 \uB098\uC11C",confidence:.88,conjugationType:"sequential-after"},{pattern:"\uD558\uACE0\uC11C",confidence:.88,conjugationType:"sequential-after"},{pattern:"\uD558\uAE30\uC804\uC5D0",confidence:.88,conjugationType:"sequential-before"},{pattern:"\uD558\uAE30 \uC804\uC5D0",confidence:.88,conjugationType:"sequential-before"},{pattern:"\uD558\uC790\uB9C8\uC790",confidence:.88,conjugationType:"immediate"},{pattern:"\uD574\uC57C\uD574\uC694",confidence:.88,conjugationType:"obligation"},{pattern:"\uD574\uC57C\uD574",confidence:.88,conjugationType:"obligation"},{pattern:"\uD574\uC57C\uD558\uB2E4",confidence:.88,conjugationType:"obligation"},{pattern:"\uD558\uB2C8\uAE4C",confidence:.88,conjugationType:"causal-nikka"},{pattern:"\uD560\uB54C",confidence:.88,conjugationType:"temporal-ttae"},{pattern:"\uD560 \uB54C",confidence:.88,conjugationType:"temporal-ttae"},{pattern:"\uD558\uBA74",confidence:.88,conjugationType:"conditional-myeon"},{pattern:"\uD558\uC600\uC2B5\uB2C8\uB2E4",confidence:.85,conjugationType:"past"},{pattern:"\uD588\uC2B5\uB2C8\uB2E4",confidence:.85,conjugationType:"past"},{pattern:"\uD569\uB2C8\uB2E4",confidence:.85,conjugationType:"polite"},{pattern:"\uD558\uC2ED\uC2DC\uC624",confidence:.85,conjugationType:"honorific"},{pattern:"\uD558\uC138\uC694",confidence:.85,conjugationType:"honorific"},{pattern:"\uD588\uC5B4\uC694",confidence:.85,conjugationType:"past"},{pattern:"\uD574\uC694",confidence:.85,conjugationType:"polite"},{pattern:"\uD588\uC5B4",confidence:.85,conjugationType:"past"},{pattern:"\uD574",confidence:.8,conjugationType:"present"},{pattern:"\uD558\uACE0\uC788\uC5B4\uC694",confidence:.82,conjugationType:"progressive"},{pattern:"\uD558\uACE0\uC788\uC5B4",confidence:.82,conjugationType:"progressive"},{pattern:"\uD558\uACE0\uC788\uB2E4",confidence:.82,conjugationType:"progressive"},{pattern:"\uD574\uC11C",confidence:.82,conjugationType:"connective"},{pattern:"\uD558\uACE0",confidence:.8,conjugationType:"connective"},{pattern:"\uD558\uC9C0\uC54A\uC544\uC694",confidence:.82,conjugationType:"negative"},{pattern:"\uD558\uC9C0\uC54A\uB2E4",confidence:.82,conjugationType:"negative"},{pattern:"\uC548\uD574\uC694",confidence:.82,conjugationType:"negative"},{pattern:"\uC548\uD574",confidence:.82,conjugationType:"negative"},{pattern:"\uD574\uB77C",confidence:.82,conjugationType:"imperative"},{pattern:"\uD558\uB77C",confidence:.82,conjugationType:"imperative"},{pattern:"\uD558\uB2E4",confidence:.88,conjugationType:"dictionary"}],kt=class{constructor(){this.language="ko"}isNormalizable(e){return!(!ql(e)||e.length<2)}normalize(e){let t=this.normalizeCompound(e);if(t)return t;let r=this.tryHadaNormalization(e);if(r)return r;for(let i of Bl)if(e.endsWith(i.pattern)){let a=e.slice(0,-i.pattern.length),s=i.minStemLength??2;if(a.length<s)continue;let o={removedSuffixes:[i.pattern]};return i.conjugationType&&(o.conjugationType=i.conjugationType),O(a,i.confidence,o)}return Y(e)}tryHadaNormalization(e){for(let t of Dl)if(e.endsWith(t.pattern)){let r=e.slice(0,-t.pattern.length);if(r.length<1)continue;return O(r,t.confidence,{removedSuffixes:[t.pattern],conjugationType:t.conjugationType,originalForm:"hada-verb"})}return null}normalizeCompound(e){let t=[{pattern:"\uD558\uACE0\uB098\uC11C\uC600\uC5B4",suffixes:["\uD558\uACE0\uB098\uC11C","\uC600\uC5B4"],confidence:.78,conjugationType:"sequential-after",minStemLength:2},{pattern:"\uD558\uACE0\uB098\uC11C\uC600\uB2E4",suffixes:["\uD558\uACE0\uB098\uC11C","\uC600\uB2E4"],confidence:.78,conjugationType:"sequential-after",minStemLength:2},{pattern:"\uD558\uACE0\uB098\uC11C",suffixes:["\uD558\uACE0","\uB098\uC11C"],confidence:.85,conjugationType:"sequential-after",minStemLength:2},{pattern:"\uD574\uC57C\uD588\uC5B4",suffixes:["\uD574\uC57C","\uD588\uC5B4"],confidence:.8,conjugationType:"obligation",minStemLength:2},{pattern:"\uD574\uC57C\uD588\uB2E4",suffixes:["\uD574\uC57C","\uD588\uB2E4"],confidence:.8,conjugationType:"obligation",minStemLength:2},{pattern:"\uD574\uC57C\uD588\uC2B5\uB2C8\uB2E4",suffixes:["\uD574\uC57C","\uD588\uC2B5\uB2C8\uB2E4"],confidence:.8,conjugationType:"obligation",minStemLength:2},{pattern:"\uD558\uC2DC\uBA74\uC11C",suffixes:["\uD558\uC2DC","\uBA74\uC11C"],confidence:.82,conjugationType:"connective",minStemLength:2},{pattern:"\uD558\uC2DC\uBA70",suffixes:["\uD558\uC2DC","\uBA70"],confidence:.82,conjugationType:"connective",minStemLength:2},{pattern:"\uD558\uACE0\uC788\uC5C8\uC5B4",suffixes:["\uD558\uACE0","\uC788\uC5C8\uC5B4"],confidence:.8,conjugationType:"progressive",minStemLength:2},{pattern:"\uD558\uACE0\uC788\uC5C8\uB2E4",suffixes:["\uD558\uACE0","\uC788\uC5C8\uB2E4"],confidence:.8,conjugationType:"progressive",minStemLength:2}];for(let{pattern:r,suffixes:i,confidence:a,conjugationType:s,minStemLength:o}of t)if(e.endsWith(r)){let l=e.slice(0,-r.length);if(l.length<o)continue;return O(l,a,{removedSuffixes:i,conjugationType:s})}return null}},gf=new kt;var Hl=new Set(["\uC774","\uAC00","\uC744","\uB97C","\uC740","\uB294","\uC5D0","\uC5D0\uC11C","\uB85C","\uC73C\uB85C","\uC640","\uACFC","\uC758","\uB3C4","\uB9CC","\uBD80\uD130","\uAE4C\uC9C0","\uCC98\uB7FC","\uBCF4\uB2E4"]),Fl=[{native:"\uCC38",normalized:"true"},{native:"\uAC70\uC9D3",normalized:"false"},{native:"\uB110",normalized:"null"},{native:"\uBBF8\uC815\uC758",normalized:"undefined"},{native:"\uCCAB\uBC88\uC9F8",normalized:"first"},{native:"\uB9C8\uC9C0\uB9C9",normalized:"last"},{native:"\uB2E4\uC74C",normalized:"next"},{native:"\uC774\uC804",normalized:"previous"},{native:"\uAC00\uC7A5\uAC00\uAE4C\uC6B4",normalized:"closest"},{native:"\uBD80\uBAA8",normalized:"parent"},{native:"\uD074\uB9AD",normalized:"click"},{native:"\uB354\uBE14\uD074\uB9AD",normalized:"dblclick"},{native:"\uBCC0\uACBD",normalized:"change"},{native:"\uC81C\uCD9C",normalized:"submit"},{native:"\uC785\uB825",normalized:"input"},{native:"\uB85C\uB4DC",normalized:"load"},{native:"\uC2A4\uD06C\uB864",normalized:"scroll"},{native:"\uD0A4\uB2E4\uC6B4",normalized:"keydown"},{native:"\uD0A4\uC5C5",normalized:"keyup"},{native:"\uB9C8\uC6B0\uC2A4\uC624\uBC84",normalized:"mouseover"},{native:"\uB9C8\uC6B0\uC2A4\uC544\uC6C3",normalized:"mouseout"},{native:"\uB9C8\uC6B0\uC2A4\uB2E4\uC6B4",normalized:"mousedown"},{native:"\uB9C8\uC6B0\uC2A4\uC5C5",normalized:"mouseup"},{native:"\uB0B4",normalized:"my"},{native:"\uADF8\uAC83\uC758",normalized:"its"},{native:"\uADF8\uB2E4\uC74C",normalized:"then"},{native:"\uADF8\uB7F0\uD6C4",normalized:"then"},{native:"\uADF8\uB7EC\uBA74",normalized:"then"},{native:"\uADF8\uB9AC\uACE0",normalized:"and"},{native:"\uB610\uB294",normalized:"or"},{native:"\uC544\uB2C8",normalized:"not"},{native:"\uC774\uB2E4",normalized:"is"},{native:"\uCD08",normalized:"s"},{native:"\uBC00\uB9AC\uCD08",normalized:"ms"},{native:"\uBD84",normalized:"m"},{native:"\uC2DC\uAC04",normalized:"h"}],Kr=class extends V{constructor(){super();this.language="ko";this.direction="ltr";this.initializeKeywordsFromProfile(Ue,Fl),this.normalizer=new kt,this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractor(new ve),this.registerExtractor(new Bt),this.registerExtractor(new qt),this.registerExtractor(new K),this.registerExtractor(new q)}classifyToken(t){return Hl.has(t)?"particle":this.isKeyword(t)?"keyword":t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("http")?"url":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||/^\d/.test(t)?"literal":"identifier"}},Jt=new Kr;function Ul(n){let e=n.charCodeAt(0);return e>=1536&&e<=1791||e>=1872&&e<=1919||e>=2208&&e<=2303||e>=64336&&e<=65023||e>=65136&&e<=65279}function Gl(n){for(let e of n)if(Ul(e))return!0;return!1}function Yl(n){return n.replace(/[\u064B-\u0652\u0670]/g,"")}var Xl=[{pattern:"\u0648\u0627\u0644",confidencePenalty:.15,prefixType:"conjunction"},{pattern:"\u0641\u0627\u0644",confidencePenalty:.15,prefixType:"conjunction"},{pattern:"\u0628\u0627\u0644",confidencePenalty:.15,prefixType:"preposition"},{pattern:"\u0643\u0627\u0644",confidencePenalty:.15,prefixType:"preposition"},{pattern:"\u0644\u0644",confidencePenalty:.12,prefixType:"preposition"}],Zl=[{pattern:"\u0627\u0644",confidencePenalty:.08,prefixType:"article",minRemaining:2},{pattern:"\u0648",confidencePenalty:.08,prefixType:"conjunction",minRemaining:3},{pattern:"\u0641",confidencePenalty:.08,prefixType:"conjunction",minRemaining:3},{pattern:"\u0628",confidencePenalty:.1,prefixType:"preposition",minRemaining:3},{pattern:"\u0644",confidencePenalty:.1,prefixType:"preposition",minRemaining:3},{pattern:"\u0643",confidencePenalty:.1,prefixType:"preposition",minRemaining:3}],Jl=[{pattern:"\u064A",confidencePenalty:.12,prefixType:"verb-marker",minRemaining:3},{pattern:"\u062A",confidencePenalty:.12,prefixType:"verb-marker",minRemaining:3},{pattern:"\u0646",confidencePenalty:.12,prefixType:"verb-marker",minRemaining:3},{pattern:"\u0623",confidencePenalty:.12,prefixType:"verb-marker",minRemaining:3},{pattern:"\u0627",confidencePenalty:.12,prefixType:"verb-marker",minRemaining:3}],Ql=[{pattern:"\u0648\u0646",confidencePenalty:.1,type:"masculine-plural"},{pattern:"\u064A\u0646",confidencePenalty:.1,type:"masculine-plural-accusative"},{pattern:"\u0627\u062A",confidencePenalty:.1,type:"feminine-plural"},{pattern:"\u0627\u0646",confidencePenalty:.1,type:"dual-nominative"},{pattern:"\u064A\u0646",confidencePenalty:.1,type:"dual-accusative"},{pattern:"\u0647\u0627",confidencePenalty:.1,type:"pronoun-her"},{pattern:"\u0647\u0645",confidencePenalty:.1,type:"pronoun-them"},{pattern:"\u0647\u0646",confidencePenalty:.1,type:"pronoun-them-f"},{pattern:"\u0646\u0627",confidencePenalty:.1,type:"pronoun-us"},{pattern:"\u0643\u0645",confidencePenalty:.1,type:"pronoun-you-pl"},{pattern:"\u0643",confidencePenalty:.08,type:"pronoun-you"},{pattern:"\u0647",confidencePenalty:.08,type:"pronoun-him"},{pattern:"\u064A",confidencePenalty:.08,type:"pronoun-me"},{pattern:"\u0629",confidencePenalty:.08,type:"feminine"}],xt=class{constructor(){this.language="ar"}isNormalizable(e){return!(!Gl(e)||e.length<2)}normalize(e){let t=Yl(e),r=1,i=[],a=[];for(let o of Xl)if(t.startsWith(o.pattern)){let l=t.slice(o.pattern.length);if(l.length>=2){t=l,r-=o.confidencePenalty,i.push(o.pattern);break}}if(i.length===0){for(let o of Zl)if(t.startsWith(o.pattern)){let l=t.slice(o.pattern.length),c=o.minRemaining??2;if(l.length>=c){t=l,r-=o.confidencePenalty,i.push(o.pattern);break}}}if(!(t.endsWith("\u0627\u062A")||t.endsWith("\u0629")||t.endsWith("\u0648\u0646")||t.endsWith("\u064A\u0646")||t.endsWith("\u0647\u0627")||t.endsWith("\u0647\u0645")||t.endsWith("\u0647\u0646")||t.endsWith("\u0646\u0627")||t.endsWith("\u0643\u0645"))&&(i.length===0||i[0]==="\u0648"||i[0]==="\u0641")){for(let o of Jl)if(t.startsWith(o.pattern)){let l=t.slice(o.pattern.length),c=o.minRemaining??3;if(l.length>=c){t=l,r-=o.confidencePenalty,i.push(o.pattern);break}}}for(let o of Ql)if(t.endsWith(o.pattern)){let l=t.slice(0,-o.pattern.length);l.length>=2&&(t=l,r-=o.confidencePenalty,a.push(o.pattern))}return r=Math.max(.5,r),i.length===0&&a.length===0?Y(e):O(t,r,{removedPrefixes:i,removedSuffixes:a})}},Lf=new xt;var ec=new Set(["\u0648\u0644","\u0648\u0628","\u0648\u0643","\u0641\u0644","\u0641\u0628","\u0641\u0643"]),tc=new Set(["\u0641\u064A","\u0639\u0644\u0649","\u0645\u0646","\u0625\u0644\u0649","\u0627\u0644\u0649","\u0645\u0639","\u0639\u0646","\u0642\u0628\u0644","\u0628\u0639\u062F","\u0628\u064A\u0646","\u0628","\u0644","\u0643"]),rc=[{native:"\u0635\u062D\u064A\u062D",normalized:"true"},{native:"\u062E\u0637\u0623",normalized:"false"},{native:"null",normalized:"null"},{native:"\u0641\u0627\u0631\u063A",normalized:"null"},{native:"\u063A\u064A\u0631 \u0645\u0639\u0631\u0641",normalized:"undefined"},{native:"\u0627\u0644\u0623\u0648\u0644",normalized:"first"},{native:"\u0623\u0648\u0644",normalized:"first"},{native:"\u0627\u0644\u0623\u062E\u064A\u0631",normalized:"last"},{native:"\u0622\u062E\u0631",normalized:"last"},{native:"\u0627\u0644\u062A\u0627\u0644\u064A",normalized:"next"},{native:"\u0627\u0644\u0633\u0627\u0628\u0642",normalized:"previous"},{native:"\u0627\u0644\u0623\u0642\u0631\u0628",normalized:"closest"},{native:"\u0627\u0644\u0623\u0628",normalized:"parent"},{native:"\u0627\u0644\u0646\u0642\u0631",normalized:"click"},{native:"\u0646\u0642\u0631",normalized:"click"},{native:"\u0627\u0644\u0625\u062F\u062E\u0627\u0644",normalized:"input"},{native:"\u0625\u062F\u062E\u0627\u0644",normalized:"input"},{native:"\u0627\u0644\u062A\u063A\u064A\u064A\u0631",normalized:"change"},{native:"\u062A\u063A\u064A\u064A\u0631",normalized:"change"},{native:"\u0627\u0644\u0625\u0631\u0633\u0627\u0644",normalized:"submit"},{native:"\u0625\u0631\u0633\u0627\u0644",normalized:"submit"},{native:"\u0627\u0644\u062A\u0631\u0643\u064A\u0632",normalized:"focus"},{native:"\u0641\u0642\u062F\u0627\u0646 \u0627\u0644\u062A\u0631\u0643\u064A\u0632",normalized:"blur"},{native:"\u0636\u063A\u0637",normalized:"keydown"},{native:"\u0631\u0641\u0639",normalized:"keyup"},{native:"\u062A\u0645\u0631\u064A\u0631 \u0627\u0644\u0641\u0623\u0631\u0629",normalized:"mouseover"},{native:"\u0645\u063A\u0627\u062F\u0631\u0629 \u0627\u0644\u0641\u0623\u0631\u0629",normalized:"mouseout"},{native:"\u062A\u062D\u0645\u064A\u0644",normalized:"load"},{native:"\u062A\u0645\u0631\u064A\u0631",normalized:"scroll"},{native:"\u0641\u0623\u0631\u0629 \u0623\u0633\u0641\u0644",normalized:"mousedown"},{native:"\u0641\u0623\u0631\u0629 \u0623\u0639\u0644\u0649",normalized:"mouseup"},{native:"\u0641\u0623\u0631\u0629 \u062F\u062E\u0648\u0644",normalized:"mouseenter"},{native:"\u0641\u0623\u0631\u0629 \u062E\u0631\u0648\u062C",normalized:"mouseleave"},{native:"\u0641\u0623\u0631\u0629 \u0641\u0648\u0642",normalized:"mouseover"},{native:"\u0641\u0623\u0631\u0629 \u062E\u0627\u0631\u062C",normalized:"mouseout"},{native:"\u0641\u0623\u0631\u0629 \u062A\u062D\u0631\u0643",normalized:"mousemove"},{native:"\u0645\u0641\u062A\u0627\u062D \u0623\u0633\u0641\u0644",normalized:"keydown"},{native:"\u0645\u0641\u062A\u0627\u062D \u0623\u0639\u0644\u0649",normalized:"keyup"},{native:"\u0647\u064A",normalized:"it"},{native:"\u062B\u0627\u0646\u064A\u0629",normalized:"s"},{native:"\u062B\u0648\u0627\u0646\u064A",normalized:"s"},{native:"\u0645\u0644\u064A \u062B\u0627\u0646\u064A\u0629",normalized:"ms"},{native:"\u062F\u0642\u064A\u0642\u0629",normalized:"m"},{native:"\u062F\u0642\u0627\u0626\u0642",normalized:"m"},{native:"\u0633\u0627\u0639\u0629",normalized:"h"},{native:"\u0633\u0627\u0639\u0627\u062A",normalized:"h"},{native:"\u0639\u0646\u062F\u0645\u0627",normalized:"on"},{native:"\u062D\u064A\u0646\u0645\u0627",normalized:"on"},{native:"\u0639\u0646\u062F",normalized:"on"},{native:"\u062D\u064A\u0646",normalized:"on"},{native:"\u0644\u0645\u0651\u0627",normalized:"on"},{native:"\u0644\u0645\u0627",normalized:"on"},{native:"\u0644\u062F\u0649",normalized:"on"}],qr=class extends V{constructor(){super();this.language="ar";this.direction="rtl";this.initializeKeywordsFromProfile(Ke,rc),this.normalizer=new xt,this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractor(new ve),this.registerExtractor(new Gt),this.registerExtractor(new Ut),this.registerExtractor(new Ft),this.registerExtractor(new K),this.registerExtractor(new q)}tokenizeWithExtractors(t){let r=[],i=0;for(;i<t.length;){for(;i<t.length&&pe(t[i]);)i++;if(i>=t.length)break;let a=this.tryMultiWordKeyword(t,i);if(a){r.push(a),i=a.position.end;continue}let s=!1;for(let o of this.extractors)if(o.canExtract(t,i)){let l=o.extract(t,i);if(l){let c=l.metadata?.normalized,d=l.metadata?.stem,p=l.metadata?.stemConfidence,u={};if(l.metadata)for(let[y,g]of Object.entries(l.metadata))y!=="normalized"&&y!=="stem"&&y!=="stemConfidence"&&(u[y]=g);let m;u.procliticType==="conjunction"?m="conjunction":u.procliticType==="preposition"?m="particle":m=this.classifyToken(l.value);let f={};c&&(f.normalized=c),d&&(f.stem=d),p!==void 0&&(f.stemConfidence=p),Object.keys(u).length>0&&(f.metadata=u),r.push($(l.value,m,_(i,i+l.length),Object.keys(f).length>0?f:void 0)),i+=l.length,s=!0;break}}if(!s){let o=t[i],l=this.classifyUnknownChar(o);r.push($(o,l,_(i,i+1))),i++}}return new re(r,this.language)}classifyToken(t){return ec.has(t)?"conjunction":tc.has(t)?"particle":this.isKeyword(t)?"keyword":t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("http")?"url":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||/^\d/.test(t)?"literal":"identifier"}},Qt=new qr;function nc(n){return/[áéíóúüñÁÉÍÓÚÜÑ]/.test(n)}var ic=[{ending:"ando",stem:"ar",confidence:.88,type:"gerund"},{ending:"ado",stem:"ar",confidence:.88,type:"participle"},{ending:"ada",stem:"ar",confidence:.88,type:"participle"},{ending:"ados",stem:"ar",confidence:.88,type:"participle"},{ending:"adas",stem:"ar",confidence:.88,type:"participle"},{ending:"o",stem:"ar",confidence:.75,type:"present"},{ending:"as",stem:"ar",confidence:.82,type:"present"},{ending:"a",stem:"ar",confidence:.75,type:"present"},{ending:"amos",stem:"ar",confidence:.85,type:"present"},{ending:"\xE1is",stem:"ar",confidence:.85,type:"present"},{ending:"ais",stem:"ar",confidence:.82,type:"present"},{ending:"an",stem:"ar",confidence:.8,type:"present"},{ending:"\xE9",stem:"ar",confidence:.85,type:"past"},{ending:"aste",stem:"ar",confidence:.88,type:"past"},{ending:"\xF3",stem:"ar",confidence:.82,type:"past"},{ending:"amos",stem:"ar",confidence:.85,type:"past"},{ending:"asteis",stem:"ar",confidence:.88,type:"past"},{ending:"aron",stem:"ar",confidence:.88,type:"past"},{ending:"aba",stem:"ar",confidence:.88,type:"past"},{ending:"abas",stem:"ar",confidence:.88,type:"past"},{ending:"\xE1bamos",stem:"ar",confidence:.88,type:"past"},{ending:"abamos",stem:"ar",confidence:.85,type:"past"},{ending:"abais",stem:"ar",confidence:.88,type:"past"},{ending:"aban",stem:"ar",confidence:.88,type:"past"},{ending:"e",stem:"ar",confidence:.72,type:"subjunctive"},{ending:"es",stem:"ar",confidence:.78,type:"subjunctive"},{ending:"emos",stem:"ar",confidence:.82,type:"subjunctive"},{ending:"\xE9is",stem:"ar",confidence:.85,type:"subjunctive"},{ending:"eis",stem:"ar",confidence:.82,type:"subjunctive"},{ending:"en",stem:"ar",confidence:.78,type:"subjunctive"},{ending:"a",stem:"ar",confidence:.75,type:"imperative"},{ending:"ad",stem:"ar",confidence:.85,type:"imperative"},{ending:"ar",stem:"ar",confidence:.92,type:"dictionary"}],ac=[{ending:"iendo",stem:"er",confidence:.88,type:"gerund"},{ending:"ido",stem:"er",confidence:.85,type:"participle"},{ending:"ida",stem:"er",confidence:.85,type:"participle"},{ending:"idos",stem:"er",confidence:.85,type:"participle"},{ending:"idas",stem:"er",confidence:.85,type:"participle"},{ending:"o",stem:"er",confidence:.72,type:"present"},{ending:"es",stem:"er",confidence:.78,type:"present"},{ending:"e",stem:"er",confidence:.72,type:"present"},{ending:"emos",stem:"er",confidence:.85,type:"present"},{ending:"\xE9is",stem:"er",confidence:.85,type:"present"},{ending:"eis",stem:"er",confidence:.82,type:"present"},{ending:"en",stem:"er",confidence:.78,type:"present"},{ending:"\xED",stem:"er",confidence:.85,type:"past"},{ending:"iste",stem:"er",confidence:.88,type:"past"},{ending:"i\xF3",stem:"er",confidence:.85,type:"past"},{ending:"io",stem:"er",confidence:.82,type:"past"},{ending:"imos",stem:"er",confidence:.85,type:"past"},{ending:"isteis",stem:"er",confidence:.88,type:"past"},{ending:"ieron",stem:"er",confidence:.88,type:"past"},{ending:"\xEDa",stem:"er",confidence:.88,type:"past"},{ending:"ia",stem:"er",confidence:.85,type:"past"},{ending:"\xEDas",stem:"er",confidence:.88,type:"past"},{ending:"ias",stem:"er",confidence:.85,type:"past"},{ending:"\xEDamos",stem:"er",confidence:.88,type:"past"},{ending:"iamos",stem:"er",confidence:.85,type:"past"},{ending:"\xEDais",stem:"er",confidence:.88,type:"past"},{ending:"iais",stem:"er",confidence:.85,type:"past"},{ending:"\xEDan",stem:"er",confidence:.88,type:"past"},{ending:"ian",stem:"er",confidence:.85,type:"past"},{ending:"er",stem:"er",confidence:.92,type:"dictionary"}],oc=[{ending:"iendo",stem:"ir",confidence:.88,type:"gerund"},{ending:"ido",stem:"ir",confidence:.85,type:"participle"},{ending:"ida",stem:"ir",confidence:.85,type:"participle"},{ending:"idos",stem:"ir",confidence:.85,type:"participle"},{ending:"idas",stem:"ir",confidence:.85,type:"participle"},{ending:"o",stem:"ir",confidence:.72,type:"present"},{ending:"es",stem:"ir",confidence:.78,type:"present"},{ending:"e",stem:"ir",confidence:.72,type:"present"},{ending:"imos",stem:"ir",confidence:.85,type:"present"},{ending:"\xEDs",stem:"ir",confidence:.85,type:"present"},{ending:"is",stem:"ir",confidence:.82,type:"present"},{ending:"en",stem:"ir",confidence:.78,type:"present"},{ending:"\xED",stem:"ir",confidence:.85,type:"past"},{ending:"iste",stem:"ir",confidence:.88,type:"past"},{ending:"i\xF3",stem:"ir",confidence:.85,type:"past"},{ending:"io",stem:"ir",confidence:.82,type:"past"},{ending:"imos",stem:"ir",confidence:.85,type:"past"},{ending:"isteis",stem:"ir",confidence:.88,type:"past"},{ending:"ieron",stem:"ir",confidence:.88,type:"past"},{ending:"\xEDa",stem:"ir",confidence:.88,type:"past"},{ending:"ia",stem:"ir",confidence:.85,type:"past"},{ending:"\xEDas",stem:"ir",confidence:.88,type:"past"},{ending:"ias",stem:"ir",confidence:.85,type:"past"},{ending:"\xEDamos",stem:"ir",confidence:.88,type:"past"},{ending:"iamos",stem:"ir",confidence:.85,type:"past"},{ending:"\xEDais",stem:"ir",confidence:.88,type:"past"},{ending:"iais",stem:"ir",confidence:.85,type:"past"},{ending:"\xEDan",stem:"ir",confidence:.88,type:"past"},{ending:"ian",stem:"ir",confidence:.85,type:"past"},{ending:"ir",stem:"ir",confidence:.92,type:"dictionary"}],sc=[...ic,...ac,...oc].sort((n,e)=>e.ending.length-n.ending.length),bt=class extends Pr{constructor(){super({language:"es",minWordLength:3,minStemLength:2,endings:sc,reflexiveSuffixes:["se","me","te","nos","os"],infinitiveEndings:["ar","er","ir"]})}isNormalizable(e){if(e.length<3)return!1;let t=e.toLowerCase();if(t.endsWith("ar")||t.endsWith("er")||t.endsWith("ir")||t.endsWith("ando")||t.endsWith("iendo")||t.endsWith("ado")||t.endsWith("ido")||t.endsWith("arse")||t.endsWith("erse")||t.endsWith("irse"))return!0;for(let r of e)if(nc(r))return!0;return!1}},Kf=new bt;function lc(n){return{isLetter:r=>n.test(r),isIdentifierChar:r=>/[0-9]/.test(r)||n.test(r)}}var{isLetter:mi,isIdentifierChar:cc}=lc(/[a-zA-ZáéíóúüñÁÉÍÓÚÜÑ]/),pc=new Set(["en","a","de","desde","hasta","con","sin","por","para","sobre","entre","antes","despu\xE9s","despues","dentro","fuera","al","del"]),Br=class{constructor(){this.name="spanish-keyword"}setContext(e){this.context=e}canExtract(e,t){return mi(e[t])}extract(e,t){if(!this.context)throw new Error("SpanishKeywordExtractor: context not set");let r=this.tryMultiWordPhrase(e,t);return r||this.extractSpanishWord(e,t)}tryMultiWordPhrase(e,t){if(!this.context)return null;let r=["de lo contrario","de lo normal","por defecto","de nuevo","de otra manera"];for(let i of r)if(e.slice(t,t+i.length).toLowerCase()===i.toLowerCase()){let s=t+i.length;if(s>=e.length||pe(e[s])||!mi(e[s])){let o=this.context.lookupKeyword(i);return{value:e.slice(t,s),length:i.length,metadata:{normalized:o?.normalized,multiWord:!0}}}}return null}extractSpanishWord(e,t){if(!this.context)return null;let r=t,i="";for(;r<e.length&&cc(e[r]);)i+=e[r++];if(!i)return null;let a=i.toLowerCase(),s=pc.has(a),o=this.context.lookupKeyword(i),l=o&&o.normalized!==o.native?o.normalized:void 0,c;if(!o&&this.context.normalizer){let d=this.context.normalizer.normalize(i);if(d.stem!==i&&d.confidence>=.7){let p=this.context.lookupKeyword(d.stem);p&&(c=p.normalized)}}return{value:i,length:r-t,metadata:{normalized:l||c,isPreposition:s}}}};function fi(){return[new Br]}var dc=new Set(["en","a","de","desde","hasta","con","sin","por","para","sobre","entre","antes","despu\xE9s","despues","dentro","fuera","al","del"]),uc=[{native:"verdadero",normalized:"true"},{native:"falso",normalized:"false"},{native:"nulo",normalized:"null"},{native:"indefinido",normalized:"undefined"},{native:"segundo",normalized:"s"},{native:"segundos",normalized:"s"},{native:"milisegundo",normalized:"ms"},{native:"milisegundos",normalized:"ms"},{native:"minuto",normalized:"m"},{native:"minutos",normalized:"m"},{native:"hora",normalized:"h"},{native:"horas",normalized:"h"},{native:"m\xED",normalized:"me"},{native:"destino",normalized:"target"}],Dr=class extends V{constructor(){super();this.language="es";this.direction="ltr";this.initializeKeywordsFromProfile(Be,uc),this.setNormalizer(new bt),this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractors(fi()),this.registerExtractor(new K),this.registerExtractor(new q)}classifyToken(t){let r=t.toLowerCase();return dc.has(r)?"particle":this.isKeyword(r)?"keyword":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||/^\d/.test(t)?"literal":["==","!=","<=",">=","<",">","&&","||","!"].includes(t)?"operator":t.startsWith("/")||t.startsWith("./")||t.startsWith("http")?"url":"identifier"}},er=new Dr;function mc(n){let e=n.charCodeAt(0);return e>=65&&e<=90||e>=97&&e<=122?!0:"\xE7\xC7\u011F\u011E\u0131\u0130\xF6\xD6\u015F\u015E\xFC\xDC".includes(n)}function fc(n){for(let e of n)if(mc(e))return!0;return!1}function Hr(n){return"a\u0131ouAIOU".includes(n)}function yi(n){return"ei\xF6\xFCE\u0130\xD6\xDC".includes(n)}function gi(n){return Hr(n)||yi(n)}function yc(n){for(let e=n.length-1;e>=0;e--)if(gi(n[e]))return n[e];return null}function gc(n,e){let t=yc(n);if(!t)return!0;let r=e.split("").find(i=>gi(i));return r?Hr(t)?Hr(r):yi(r):!0}var hc=[{pattern:"iyorsunuz",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\u0131yorsunuz",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\xFCyorsunuz",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"uyorsunuz",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"iyorsun",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\u0131yorsun",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\xFCyorsun",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"uyorsun",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"iyoruz",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\u0131yoruz",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\xFCyoruz",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"uyoruz",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"iyorum",confidence:.85,conjugationType:"progressive",minStemLength:2},{pattern:"\u0131yorum",confidence:.85,conjugationType:"progressive",minStemLength:2},{pattern:"\xFCyorum",confidence:.85,conjugationType:"progressive",minStemLength:2},{pattern:"uyorum",confidence:.85,conjugationType:"progressive",minStemLength:2},{pattern:"iyorlar",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\u0131yorlar",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\xFCyorlar",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"uyorlar",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"eceksiniz",confidence:.82,conjugationType:"future",minStemLength:2},{pattern:"acaks\u0131n\u0131z",confidence:.82,conjugationType:"future",minStemLength:2},{pattern:"eceksin",confidence:.82,conjugationType:"future",minStemLength:2},{pattern:"acaks\u0131n",confidence:.82,conjugationType:"future",minStemLength:2},{pattern:"ece\u011Fiz",confidence:.82,conjugationType:"future",minStemLength:2},{pattern:"aca\u011F\u0131z",confidence:.82,conjugationType:"future",minStemLength:2},{pattern:"ece\u011Fim",confidence:.85,conjugationType:"future",minStemLength:2},{pattern:"aca\u011F\u0131m",confidence:.85,conjugationType:"future",minStemLength:2},{pattern:"ecekler",confidence:.82,conjugationType:"future",minStemLength:2},{pattern:"acaklar",confidence:.82,conjugationType:"future",minStemLength:2},{pattern:"mi\u015Fsiniz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"m\u0131\u015Fs\u0131n\u0131z",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"m\xFC\u015Fs\xFCn\xFCz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"mu\u015Fsunuz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"mi\u015Fsin",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"m\u0131\u015Fs\u0131n",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"m\xFC\u015Fs\xFCn",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"mu\u015Fsun",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"mi\u015Fiz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"m\u0131\u015F\u0131z",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"m\xFC\u015F\xFCz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"mu\u015Fuz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"mi\u015Fim",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"m\u0131\u015F\u0131m",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"m\xFC\u015F\xFCm",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"mu\u015Fum",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"mi\u015Fler",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"m\u0131\u015Flar",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"m\xFC\u015Fler",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"mu\u015Flar",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"diniz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"d\u0131n\u0131z",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"d\xFCn\xFCz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"dunuz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"tiniz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"t\u0131n\u0131z",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"t\xFCn\xFCz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"tunuz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"diler",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"d\u0131lar",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"d\xFCler",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"dular",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"tiler",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"t\u0131lar",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"t\xFCler",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"tular",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"din",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"d\u0131n",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"d\xFCn",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"dun",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"tin",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"t\u0131n",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"t\xFCn",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"tun",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"dik",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"d\u0131k",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"d\xFCk",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"duk",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"tik",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"t\u0131k",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"t\xFCk",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"tuk",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"dim",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"d\u0131m",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"d\xFCm",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"dum",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"tim",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"t\u0131m",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"t\xFCm",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"tum",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"iyor",confidence:.85,conjugationType:"progressive",minStemLength:2},{pattern:"\u0131yor",confidence:.85,conjugationType:"progressive",minStemLength:2},{pattern:"\xFCyor",confidence:.85,conjugationType:"progressive",minStemLength:2},{pattern:"uyor",confidence:.85,conjugationType:"progressive",minStemLength:2},{pattern:"ecek",confidence:.85,conjugationType:"future",minStemLength:2},{pattern:"acak",confidence:.85,conjugationType:"future",minStemLength:2},{pattern:"mi\u015F",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"m\u0131\u015F",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"m\xFC\u015F",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"mu\u015F",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"di",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"d\u0131",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"d\xFC",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"du",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"ti",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"t\u0131",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"t\xFC",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"tu",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"mek",confidence:.88,conjugationType:"dictionary",minStemLength:2},{pattern:"mak",confidence:.88,conjugationType:"dictionary",minStemLength:2},{pattern:"eyelim",confidence:.82,conjugationType:"optative",minStemLength:2},{pattern:"ayal\u0131m",confidence:.82,conjugationType:"optative",minStemLength:2},{pattern:"eyim",confidence:.82,conjugationType:"optative",minStemLength:2},{pattern:"ay\u0131m",confidence:.82,conjugationType:"optative",minStemLength:2},{pattern:"elim",confidence:.82,conjugationType:"optative",minStemLength:2},{pattern:"al\u0131m",confidence:.82,conjugationType:"optative",minStemLength:2},{pattern:"melisiniz",confidence:.82,conjugationType:"necessitative",minStemLength:2},{pattern:"mal\u0131s\u0131n\u0131z",confidence:.82,conjugationType:"necessitative",minStemLength:2},{pattern:"melisin",confidence:.82,conjugationType:"necessitative",minStemLength:2},{pattern:"mal\u0131s\u0131n",confidence:.82,conjugationType:"necessitative",minStemLength:2},{pattern:"meliyiz",confidence:.82,conjugationType:"necessitative",minStemLength:2},{pattern:"mal\u0131y\u0131z",confidence:.82,conjugationType:"necessitative",minStemLength:2},{pattern:"meliyim",confidence:.85,conjugationType:"necessitative",minStemLength:2},{pattern:"mal\u0131y\u0131m",confidence:.85,conjugationType:"necessitative",minStemLength:2},{pattern:"meliler",confidence:.82,conjugationType:"necessitative",minStemLength:2},{pattern:"mal\u0131lar",confidence:.82,conjugationType:"necessitative",minStemLength:2},{pattern:"meli",confidence:.85,conjugationType:"necessitative",minStemLength:2},{pattern:"mal\u0131",confidence:.85,conjugationType:"necessitative",minStemLength:2},{pattern:"ebiliyor",confidence:.82,conjugationType:"potential",minStemLength:2},{pattern:"abiliyor",confidence:.82,conjugationType:"potential",minStemLength:2},{pattern:"ebilir",confidence:.85,conjugationType:"potential",minStemLength:2},{pattern:"abilir",confidence:.85,conjugationType:"potential",minStemLength:2},{pattern:"ebildi",confidence:.82,conjugationType:"potential",minStemLength:2},{pattern:"abildi",confidence:.82,conjugationType:"potential",minStemLength:2},{pattern:"ebilmek",confidence:.85,conjugationType:"potential",minStemLength:2},{pattern:"abilmek",confidence:.85,conjugationType:"potential",minStemLength:2},{pattern:"iniz",confidence:.82,conjugationType:"imperative",minStemLength:2},{pattern:"\u0131n\u0131z",confidence:.82,conjugationType:"imperative",minStemLength:2},{pattern:"\xFCn\xFCz",confidence:.82,conjugationType:"imperative",minStemLength:2},{pattern:"unuz",confidence:.82,conjugationType:"imperative",minStemLength:2},{pattern:"in",confidence:.8,conjugationType:"imperative",minStemLength:2},{pattern:"\u0131n",confidence:.8,conjugationType:"imperative",minStemLength:2},{pattern:"\xFCn",confidence:.8,conjugationType:"imperative",minStemLength:2},{pattern:"un",confidence:.8,conjugationType:"imperative",minStemLength:2},{pattern:"ildi",confidence:.82,conjugationType:"passive",minStemLength:2},{pattern:"\u0131ld\u0131",confidence:.82,conjugationType:"passive",minStemLength:2},{pattern:"\xFCld\xFC",confidence:.82,conjugationType:"passive",minStemLength:2},{pattern:"uldu",confidence:.82,conjugationType:"passive",minStemLength:2},{pattern:"ilir",confidence:.82,conjugationType:"passive",minStemLength:2},{pattern:"\u0131l\u0131r",confidence:.82,conjugationType:"passive",minStemLength:2},{pattern:"\xFCl\xFCr",confidence:.82,conjugationType:"passive",minStemLength:2},{pattern:"ulur",confidence:.82,conjugationType:"passive",minStemLength:2},{pattern:"tirmek",confidence:.82,conjugationType:"causative",minStemLength:2},{pattern:"t\u0131rmak",confidence:.82,conjugationType:"causative",minStemLength:2},{pattern:"t\xFCrmek",confidence:.82,conjugationType:"causative",minStemLength:2},{pattern:"turmak",confidence:.82,conjugationType:"causative",minStemLength:2},{pattern:"dirmek",confidence:.82,conjugationType:"causative",minStemLength:2},{pattern:"d\u0131rmak",confidence:.82,conjugationType:"causative",minStemLength:2},{pattern:"d\xFCrmek",confidence:.82,conjugationType:"causative",minStemLength:2},{pattern:"durmak",confidence:.82,conjugationType:"causative",minStemLength:2},{pattern:"miyorsunuz",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"m\u0131yorsunuz",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"m\xFCyorsunuz",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"muyorsunuz",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"miyorsun",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"m\u0131yorsun",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"m\xFCyorsun",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"muyorsun",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"miyoruz",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"m\u0131yoruz",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"m\xFCyoruz",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"muyoruz",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"miyorum",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"m\u0131yorum",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"m\xFCyorum",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"muyorum",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"miyor",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"m\u0131yor",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"m\xFCyor",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"muyor",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"medi",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"mad\u0131",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"me",confidence:.75,conjugationType:"negative",minStemLength:3},{pattern:"ma",confidence:.75,conjugationType:"negative",minStemLength:3}],St=class{constructor(){this.language="tr"}isNormalizable(e){return!(!fc(e)||e.length<3)}normalize(e){let t=e.toLowerCase();for(let r of hc)if(t.endsWith(r.pattern)){let i=t.slice(0,-r.pattern.length),a=r.minStemLength??2;if(i.length<a)continue;if(!gc(i,r.pattern)){let o=r.confidence*.9,l={removedSuffixes:[r.pattern]};return r.conjugationType&&(l.conjugationType=r.conjugationType),O(i,o,l)}let s={removedSuffixes:[r.pattern]};return r.conjugationType&&(s.conjugationType=r.conjugationType),O(i,r.confidence,s)}return Y(e)}},Qf=new St;var vc=new Set(["ile","i\xE7in","kadar","gibi","\xF6nce","\xFCzerinde","alt\u0131nda","i\xE7inde","d\u0131\u015F\u0131nda","aras\u0131nda","kar\u015F\u0131","g\xF6re","ra\u011Fmen","boyunca"]),kc=new Set(["de","da","te","ta","den","dan","ten","tan","e","a","ye","ya","i","\u0131","u","\xFC","in","\u0131n","un","\xFCn","le","la","yle","yla"]),xc=[{native:"do\u011Fru",normalized:"true"},{native:"dogru",normalized:"true"},{native:"yanl\u0131\u015F",normalized:"false"},{native:"yanlis",normalized:"false"},{native:"null",normalized:"null"},{native:"bo\u015F",normalized:"null"},{native:"bos",normalized:"null"},{native:"tan\u0131ms\u0131z",normalized:"undefined"},{native:"tanimsiz",normalized:"undefined"},{native:"ilk",normalized:"first"},{native:"son",normalized:"last"},{native:"sonuncu",normalized:"last"},{native:"sonraki",normalized:"next"},{native:"\xF6nceki",normalized:"previous"},{native:"onceki",normalized:"previous"},{native:"enyak\u0131n",normalized:"closest"},{native:"enyakin",normalized:"closest"},{native:"ebeveyn",normalized:"parent"},{native:"fare \xFCzerinde",normalized:"mouseover"},{native:"fare uzerinde",normalized:"mouseover"},{native:"fare d\u0131\u015F\u0131nda",normalized:"mouseout"},{native:"fare disinda",normalized:"mouseout"},{native:"farebas",normalized:"mousedown"},{native:"fareb\u0131rak",normalized:"mouseup"},{native:"farebirak",normalized:"mouseup"},{native:"kayd\u0131r",normalized:"scroll"},{native:"kaydir",normalized:"scroll"},{native:"tu\u015F_bas",normalized:"keydown"},{native:"tus_bas",normalized:"keydown"},{native:"tu\u015F_b\u0131rak",normalized:"keyup"},{native:"tus_birak",normalized:"keyup"},{native:"saniye",normalized:"s"},{native:"milisaniye",normalized:"ms"},{native:"dakika",normalized:"m"},{native:"saat",normalized:"h"}],Fr=class extends V{constructor(){super();this.language="tr";this.direction="ltr";this.initializeKeywordsFromProfile(Ye,xc),this.setNormalizer(new St),this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractor(pi()),this.registerExtractor(new K),this.registerExtractor(new q)}classifyToken(t){let r=t.toLowerCase();return vc.has(r)||kc.has(r)?"particle":this.isKeyword(r)?"keyword":t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("http")?"url":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||/^\d/.test(t)?"literal":["==","!=","<=",">=","<",">","&&","||","!"].includes(t)?"operator":"identifier"}},tr=new Fr;var bc=new Set(["\u628A","\u5728","\u4ECE","\u5230","\u5411","\u7ED9","\u5BF9","\u7528","\u88AB","\u8BA9","\u7684","\u5730","\u5F97","\u4E86","\u7740","\u8FC7","\u5417","\u5462","\u5427"]),Sc=[{native:"\u771F",normalized:"true"},{native:"\u5047",normalized:"false"},{native:"\u7A7A",normalized:"null"},{native:"\u672A\u5B9A\u4E49",normalized:"undefined"},{native:"\u7B2C\u4E00\u4E2A",normalized:"first"},{native:"\u9996\u4E2A",normalized:"first"},{native:"\u6700\u540E\u4E00\u4E2A",normalized:"last"},{native:"\u672B\u4E2A",normalized:"last"},{native:"\u4E0B\u4E00\u4E2A",normalized:"next"},{native:"\u4E0A\u4E00\u4E2A",normalized:"previous"},{native:"\u6700\u8FD1\u7684",normalized:"closest"},{native:"\u7236\u7EA7",normalized:"parent"},{native:"\u70B9\u51FB",normalized:"click"},{native:"\u53CC\u51FB",normalized:"dblclick"},{native:"\u8F93\u5165",normalized:"input"},{native:"\u53D8\u66F4",normalized:"change"},{native:"\u6539\u53D8",normalized:"change"},{native:"\u63D0\u4EA4",normalized:"submit"},{native:"\u6309\u952E",normalized:"keydown"},{native:"\u91CA\u653E\u952E",normalized:"keyup"},{native:"\u9F20\u6807\u79FB\u5165",normalized:"mouseover"},{native:"\u9F20\u6807\u79FB\u51FA",normalized:"mouseout"},{native:"\u83B7\u5F97\u7126\u70B9",normalized:"focus"},{native:"\u5931\u53BB\u7126\u70B9",normalized:"blur"},{native:"\u52A0\u8F7D",normalized:"load"},{native:"\u6EDA\u52A8",normalized:"scroll"},{native:"\u6211\u7684",normalized:"my"},{native:"\u5B83\u7684",normalized:"its"},{native:"\u79D2",normalized:"s"},{native:"\u6BEB\u79D2",normalized:"ms"},{native:"\u5206\u949F",normalized:"m"},{native:"\u5C0F\u65F6",normalized:"h"},{native:"\u548C",normalized:"and"},{native:"\u6216\u8005",normalized:"or"},{native:"\u6216",normalized:"or"},{native:"\u4E0D",normalized:"not"},{native:"\u975E",normalized:"not"},{native:"\u662F",normalized:"is"},{native:"\u82E5",normalized:"if"},{native:"\u4E0D\u7136",normalized:"else"},{native:"\u5FAA\u73AF",normalized:"repeat"},{native:"\u904D\u5386",normalized:"for"},{native:"\u6BCF\u4E2A",normalized:"for"},{native:"\u4E3A\u6BCF",normalized:"for"},{native:"\u4E2D\u6B62",normalized:"halt"},{native:"\u629B",normalized:"throw"},{native:"\u547C\u53EB",normalized:"call"},{native:"\u56DE",normalized:"return"},{native:"\u811A\u672C",normalized:"js"},{native:"\u901A\u77E5",normalized:"tell"},{native:"\u7F3A\u7701",normalized:"default"},{native:"\u521D\u59CB",normalized:"init"},{native:"\u52A8\u4F5C",normalized:"behavior"},{native:"\u6FC0\u53D1",normalized:"trigger"},{native:"\u5BF9\u7126",normalized:"focus"},{native:"\u6A21\u7CCA",normalized:"blur"},{native:"\u8DF3\u8F6C",normalized:"go"},{native:"\u5BFC\u822A",normalized:"go"},{native:"\u6293\u53D6",normalized:"fetch"},{native:"\u83B7\u53D6\u6570\u636E",normalized:"fetch"},{native:"\u5B89\u5B9A",normalized:"settle"},{native:"\u62FF\u53D6",normalized:"take"},{native:"\u53D6",normalized:"take"},{native:"\u521B\u5EFA",normalized:"make"},{native:"\u514B\u9686",normalized:"clone"},{native:"\u8BB0\u5F55",normalized:"log"},{native:"\u6253\u5370",normalized:"log"},{native:"\u52A8\u753B",normalized:"transition"},{native:"\u5230\u91CC\u9762",normalized:"into"},{native:"\u91CC",normalized:"into"},{native:"\u524D",normalized:"before"},{native:"\u540E",normalized:"after"},{native:"\u90A3\u4E48",normalized:"then"},{native:"\u5B8C",normalized:"end"}],Ur=class extends V{constructor(){super();this.language="zh";this.direction="ltr";this.initializeKeywordsFromProfile(Xe,Sc),this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractor(new ve),this.registerExtractor(new Ht),this.registerExtractor(new Dt),this.registerExtractor(new K),this.registerExtractor(new q)}classifyToken(t){return bc.has(t)?"particle":this.isKeyword(t)?"keyword":t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("http")?"url":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||t.startsWith("\u201C")||t.startsWith("\u2018")||/^\d/.test(t)?"literal":"identifier"}},rr=new Ur;function wc(n){return/[áàâãéêíóôõúüçÁÀÂÃÉÊÍÓÔÕÚÜÇ]/.test(n)}function zc(n){let e=n.toLowerCase();if(e.endsWith("ar")||e.endsWith("er")||e.endsWith("ir")||e.endsWith("ando")||e.endsWith("endo")||e.endsWith("indo")||e.endsWith("ado")||e.endsWith("ido")||e.endsWith("ar-se")||e.endsWith("er-se")||e.endsWith("ir-se"))return!0;for(let t of n)if(wc(t))return!0;return!1}var hi=["-se","-me","-te","-nos","-vos"],Tc=[{ending:"ando",stem:"ar",confidence:.88,type:"gerund"},{ending:"ado",stem:"ar",confidence:.88,type:"participle"},{ending:"ada",stem:"ar",confidence:.88,type:"participle"},{ending:"ados",stem:"ar",confidence:.88,type:"participle"},{ending:"adas",stem:"ar",confidence:.88,type:"participle"},{ending:"o",stem:"ar",confidence:.75,type:"present"},{ending:"as",stem:"ar",confidence:.82,type:"present"},{ending:"a",stem:"ar",confidence:.75,type:"present"},{ending:"amos",stem:"ar",confidence:.85,type:"present"},{ending:"ais",stem:"ar",confidence:.85,type:"present"},{ending:"am",stem:"ar",confidence:.8,type:"present"},{ending:"ei",stem:"ar",confidence:.88,type:"past"},{ending:"aste",stem:"ar",confidence:.88,type:"past"},{ending:"ou",stem:"ar",confidence:.88,type:"past"},{ending:"\xE1mos",stem:"ar",confidence:.88,type:"past"},{ending:"amos",stem:"ar",confidence:.85,type:"past"},{ending:"astes",stem:"ar",confidence:.88,type:"past"},{ending:"aram",stem:"ar",confidence:.88,type:"past"},{ending:"ava",stem:"ar",confidence:.88,type:"past"},{ending:"avas",stem:"ar",confidence:.88,type:"past"},{ending:"\xE1vamos",stem:"ar",confidence:.88,type:"past"},{ending:"avamos",stem:"ar",confidence:.85,type:"past"},{ending:"\xE1veis",stem:"ar",confidence:.88,type:"past"},{ending:"aveis",stem:"ar",confidence:.85,type:"past"},{ending:"avam",stem:"ar",confidence:.88,type:"past"},{ending:"e",stem:"ar",confidence:.72,type:"subjunctive"},{ending:"es",stem:"ar",confidence:.78,type:"subjunctive"},{ending:"emos",stem:"ar",confidence:.82,type:"subjunctive"},{ending:"eis",stem:"ar",confidence:.82,type:"subjunctive"},{ending:"em",stem:"ar",confidence:.78,type:"subjunctive"},{ending:"a",stem:"ar",confidence:.75,type:"imperative"},{ending:"ai",stem:"ar",confidence:.85,type:"imperative"},{ending:"ar",stem:"ar",confidence:.92,type:"dictionary"}],Ec=[{ending:"endo",stem:"er",confidence:.88,type:"gerund"},{ending:"ido",stem:"er",confidence:.85,type:"participle"},{ending:"ida",stem:"er",confidence:.85,type:"participle"},{ending:"idos",stem:"er",confidence:.85,type:"participle"},{ending:"idas",stem:"er",confidence:.85,type:"participle"},{ending:"o",stem:"er",confidence:.72,type:"present"},{ending:"es",stem:"er",confidence:.78,type:"present"},{ending:"e",stem:"er",confidence:.72,type:"present"},{ending:"emos",stem:"er",confidence:.85,type:"present"},{ending:"eis",stem:"er",confidence:.82,type:"present"},{ending:"em",stem:"er",confidence:.78,type:"present"},{ending:"i",stem:"er",confidence:.85,type:"past"},{ending:"este",stem:"er",confidence:.88,type:"past"},{ending:"eu",stem:"er",confidence:.88,type:"past"},{ending:"emos",stem:"er",confidence:.85,type:"past"},{ending:"estes",stem:"er",confidence:.88,type:"past"},{ending:"eram",stem:"er",confidence:.88,type:"past"},{ending:"ia",stem:"er",confidence:.85,type:"past"},{ending:"ias",stem:"er",confidence:.85,type:"past"},{ending:"\xEDamos",stem:"er",confidence:.88,type:"past"},{ending:"iamos",stem:"er",confidence:.85,type:"past"},{ending:"\xEDeis",stem:"er",confidence:.88,type:"past"},{ending:"ieis",stem:"er",confidence:.85,type:"past"},{ending:"iam",stem:"er",confidence:.85,type:"past"},{ending:"er",stem:"er",confidence:.92,type:"dictionary"}],Pc=[{ending:"indo",stem:"ir",confidence:.88,type:"gerund"},{ending:"ido",stem:"ir",confidence:.85,type:"participle"},{ending:"ida",stem:"ir",confidence:.85,type:"participle"},{ending:"idos",stem:"ir",confidence:.85,type:"participle"},{ending:"idas",stem:"ir",confidence:.85,type:"participle"},{ending:"o",stem:"ir",confidence:.72,type:"present"},{ending:"es",stem:"ir",confidence:.78,type:"present"},{ending:"e",stem:"ir",confidence:.72,type:"present"},{ending:"imos",stem:"ir",confidence:.85,type:"present"},{ending:"is",stem:"ir",confidence:.82,type:"present"},{ending:"em",stem:"ir",confidence:.78,type:"present"},{ending:"i",stem:"ir",confidence:.85,type:"past"},{ending:"iste",stem:"ir",confidence:.88,type:"past"},{ending:"iu",stem:"ir",confidence:.88,type:"past"},{ending:"imos",stem:"ir",confidence:.85,type:"past"},{ending:"istes",stem:"ir",confidence:.88,type:"past"},{ending:"iram",stem:"ir",confidence:.88,type:"past"},{ending:"ia",stem:"ir",confidence:.85,type:"past"},{ending:"ias",stem:"ir",confidence:.85,type:"past"},{ending:"\xEDamos",stem:"ir",confidence:.88,type:"past"},{ending:"iamos",stem:"ir",confidence:.85,type:"past"},{ending:"\xEDeis",stem:"ir",confidence:.88,type:"past"},{ending:"ieis",stem:"ir",confidence:.85,type:"past"},{ending:"iam",stem:"ir",confidence:.85,type:"past"},{ending:"ir",stem:"ir",confidence:.92,type:"dictionary"}],Lc=[...Tc,...Ec,...Pc].sort((n,e)=>e.ending.length-n.ending.length),wt=class{constructor(){this.language="pt"}isNormalizable(e){return e.length<3?!1:zc(e)}normalize(e){let t=e.toLowerCase();if((t.endsWith("ar")||t.endsWith("er")||t.endsWith("ir"))&&!hi.some(a=>t.endsWith(a)))return Y(e);let r=this.tryReflexiveNormalization(t);if(r)return r;let i=this.tryConjugationNormalization(t);return i||Y(e)}tryReflexiveNormalization(e){for(let t of hi)if(e.endsWith(t)){let r=e.slice(0,-t.length);if(r.endsWith("ar")||r.endsWith("er")||r.endsWith("ir"))return O(r,.88,{removedSuffixes:[t],conjugationType:"reflexive"});let i=this.tryConjugationNormalization(r);if(i&&i.stem!==r)return O(i.stem,i.confidence*.95,{removedSuffixes:[t,...i.metadata?.removedSuffixes||[]],conjugationType:"reflexive"})}return null}tryConjugationNormalization(e){for(let t of Lc)if(e.endsWith(t.ending)){let r=e.slice(0,-t.ending.length);if(r.length<2)continue;let i=r+t.stem;return O(i,t.confidence,{removedSuffixes:[t.ending],conjugationType:t.type})}return null}},hy=new wt;function Cc(n){return{isLetter:r=>n.test(r),isIdentifierChar:r=>/[0-9]/.test(r)||n.test(r)}}var{isLetter:Rc,isIdentifierChar:Nc}=Cc(/[a-zA-ZáâãéêíóôõúçÁÂÃÉÊÍÓÔÕÚÇ]/),Ac=new Set(["em","a","de","para","com","sem","por","sobre","entre","antes","depois","dentro","fora","ao","do","da","no","na"]),Gr=class{constructor(){this.name="portuguese-keyword"}setContext(e){this.context=e}canExtract(e,t){return Rc(e[t])}extract(e,t){if(!this.context)throw new Error("PortugueseKeywordExtractor: context not set");let r=t,i="";for(;r<e.length&&Nc(e[r]);)i+=e[r++];if(!i)return null;let a=i.toLowerCase(),s=Ac.has(a),o=this.context.lookupKeyword(a),l=o&&o.normalized!==o.native?o.normalized:void 0,c;if(!o&&this.context.normalizer){let d=this.context.normalizer.normalize(i);if(d.stem!==i&&d.confidence>=.7){let p=this.context.lookupKeyword(d.stem);p&&(c=p.normalized)}}return{value:i,length:r-t,metadata:{normalized:l||c,isPreposition:s}}}};function vi(){return[new Gr]}var Mc=new Set(["em","a","de","desde","at\xE9","ate","com","sem","por","para","sobre","entre","antes","depois","dentro","fora","ao","do","no","na"]),Oc=[{native:"verdadeiro",normalized:"true"},{native:"falso",normalized:"false"},{native:"nulo",normalized:"null"},{native:"indefinido",normalized:"undefined"},{native:"primeiro",normalized:"first"},{native:"primeira",normalized:"first"},{native:"\xFAltimo",normalized:"last"},{native:"ultima",normalized:"last"},{native:"pr\xF3ximo",normalized:"next"},{native:"proximo",normalized:"next"},{native:"anterior",normalized:"previous"},{native:"maispr\xF3ximo",normalized:"closest"},{native:"maisproximo",normalized:"closest"},{native:"pai",normalized:"parent"},{native:"clique",normalized:"click"},{native:"click",normalized:"click"},{native:"entrada",normalized:"input"},{native:"mudan\xE7a",normalized:"change"},{native:"mudanca",normalized:"change"},{native:"envio",normalized:"submit"},{native:"tecla baixo",normalized:"keydown"},{native:"tecla cima",normalized:"keyup"},{native:"mouse sobre",normalized:"mouseover"},{native:"mouse fora",normalized:"mouseout"},{native:"foco",normalized:"focus"},{native:"desfoque",normalized:"blur"},{native:"carregar",normalized:"load"},{native:"rolagem",normalized:"scroll"},{native:"meu",normalized:"my"},{native:"minha",normalized:"my"},{native:"isso",normalized:"it"},{native:"segundo",normalized:"s"},{native:"segundos",normalized:"s"},{native:"milissegundo",normalized:"ms"},{native:"milissegundos",normalized:"ms"},{native:"minuto",normalized:"m"},{native:"minutos",normalized:"m"},{native:"hora",normalized:"h"},{native:"horas",normalized:"h"},{native:"senao",normalized:"else"},{native:"transicao",normalized:"transition"},{native:"ate",normalized:"until"},{native:"entao",normalized:"then"},{native:"lancar",normalized:"throw"},{native:"assincrono",normalized:"async"},{native:"padrao",normalized:"default"},{native:"at\xE9 que",normalized:"until"},{native:"dentro de",normalized:"into"}],Yr=class extends V{constructor(){super();this.language="pt";this.direction="ltr";this.initializeKeywordsFromProfile(Ge,Oc),this.setNormalizer(new wt),this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractors(vi()),this.registerExtractor(new K),this.registerExtractor(new q)}classifyToken(t){let r=t.toLowerCase();return Mc.has(r)?"particle":this.isKeyword(r)?"keyword":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||/^\d/.test(t)?"literal":t.startsWith("/")||t.startsWith("./")||t.startsWith("http")?"url":"identifier"}},nr=new Yr;function jc(n){let e=n.toLowerCase();return!!(e.endsWith("er")||e.endsWith("ir")||e.endsWith("re")||e.endsWith("ant")||e.endsWith("\xE9")||e.endsWith("i")||e.endsWith("u")||/[àâäéèêëïîôùûüÿçœæ]/i.test(n))}var Ic=["toi","vous","nous"],Wc=[{ending:"ant",stem:"er",confidence:.88,type:"gerund"},{ending:"\xE9",stem:"er",confidence:.88,type:"participle"},{ending:"\xE9e",stem:"er",confidence:.88,type:"participle"},{ending:"\xE9s",stem:"er",confidence:.88,type:"participle"},{ending:"\xE9es",stem:"er",confidence:.88,type:"participle"},{ending:"e",stem:"er",confidence:.75,type:"present"},{ending:"es",stem:"er",confidence:.78,type:"present"},{ending:"ons",stem:"er",confidence:.85,type:"present"},{ending:"ez",stem:"er",confidence:.85,type:"present"},{ending:"ent",stem:"er",confidence:.82,type:"present"},{ending:"ais",stem:"er",confidence:.82,type:"past"},{ending:"ait",stem:"er",confidence:.82,type:"past"},{ending:"ions",stem:"er",confidence:.85,type:"past"},{ending:"iez",stem:"er",confidence:.85,type:"past"},{ending:"aient",stem:"er",confidence:.85,type:"past"},{ending:"ai",stem:"er",confidence:.8,type:"past"},{ending:"as",stem:"er",confidence:.78,type:"past"},{ending:"a",stem:"er",confidence:.75,type:"past"},{ending:"\xE2mes",stem:"er",confidence:.88,type:"past"},{ending:"\xE2tes",stem:"er",confidence:.88,type:"past"},{ending:"\xE8rent",stem:"er",confidence:.88,type:"past"},{ending:"erai",stem:"er",confidence:.85,type:"future"},{ending:"eras",stem:"er",confidence:.85,type:"future"},{ending:"era",stem:"er",confidence:.82,type:"future"},{ending:"erons",stem:"er",confidence:.88,type:"future"},{ending:"erez",stem:"er",confidence:.88,type:"future"},{ending:"eront",stem:"er",confidence:.88,type:"future"},{ending:"erais",stem:"er",confidence:.85,type:"conditional"},{ending:"erait",stem:"er",confidence:.85,type:"conditional"},{ending:"erions",stem:"er",confidence:.88,type:"conditional"},{ending:"eriez",stem:"er",confidence:.88,type:"conditional"},{ending:"eraient",stem:"er",confidence:.88,type:"conditional"},{ending:"ions",stem:"er",confidence:.8,type:"subjunctive"},{ending:"iez",stem:"er",confidence:.8,type:"subjunctive"},{ending:"ons",stem:"er",confidence:.82,type:"imperative"},{ending:"ez",stem:"er",confidence:.82,type:"imperative"},{ending:"er",stem:"er",confidence:.92,type:"dictionary"}],Vc=[{ending:"issant",stem:"ir",confidence:.88,type:"gerund"},{ending:"i",stem:"ir",confidence:.8,type:"participle"},{ending:"ie",stem:"ir",confidence:.82,type:"participle"},{ending:"is",stem:"ir",confidence:.78,type:"participle"},{ending:"ies",stem:"ir",confidence:.82,type:"participle"},{ending:"is",stem:"ir",confidence:.78,type:"present"},{ending:"it",stem:"ir",confidence:.78,type:"present"},{ending:"issons",stem:"ir",confidence:.88,type:"present"},{ending:"issez",stem:"ir",confidence:.88,type:"present"},{ending:"issent",stem:"ir",confidence:.88,type:"present"},{ending:"issais",stem:"ir",confidence:.85,type:"past"},{ending:"issait",stem:"ir",confidence:.85,type:"past"},{ending:"issions",stem:"ir",confidence:.88,type:"past"},{ending:"issiez",stem:"ir",confidence:.88,type:"past"},{ending:"issaient",stem:"ir",confidence:.88,type:"past"},{ending:"irai",stem:"ir",confidence:.85,type:"future"},{ending:"iras",stem:"ir",confidence:.85,type:"future"},{ending:"ira",stem:"ir",confidence:.82,type:"future"},{ending:"irons",stem:"ir",confidence:.88,type:"future"},{ending:"irez",stem:"ir",confidence:.88,type:"future"},{ending:"iront",stem:"ir",confidence:.88,type:"future"},{ending:"ir",stem:"ir",confidence:.9,type:"dictionary"}],_c=[{ending:"ant",stem:"re",confidence:.82,type:"gerund"},{ending:"u",stem:"re",confidence:.8,type:"participle"},{ending:"ue",stem:"re",confidence:.82,type:"participle"},{ending:"us",stem:"re",confidence:.82,type:"participle"},{ending:"ues",stem:"re",confidence:.82,type:"participle"},{ending:"s",stem:"re",confidence:.72,type:"present"},{ending:"d",stem:"re",confidence:.75,type:"present"},{ending:"ons",stem:"re",confidence:.82,type:"present"},{ending:"ez",stem:"re",confidence:.82,type:"present"},{ending:"ent",stem:"re",confidence:.8,type:"present"},{ending:"re",stem:"re",confidence:.9,type:"dictionary"}],$c=[...Wc,...Vc,..._c].sort((n,e)=>e.ending.length-n.ending.length),zt=class{constructor(){this.language="fr"}isNormalizable(e){return e.length<3?!1:jc(e)}normalize(e){let t=e.toLowerCase();if((t.endsWith("er")||t.endsWith("ir")||t.endsWith("re"))&&t.length>=4)return Y(e);let r=this.tryReflexiveNormalization(t);if(r)return r;let i=this.tryConjugationNormalization(t);return i||Y(e)}tryReflexiveNormalization(e){for(let t of Ic){let r="-"+t;if(e.endsWith(r)){let i=e.slice(0,-r.length),a=this.tryConjugationNormalization(i);if(a&&a.stem!==i)return O(a.stem,a.confidence*.95,{removedSuffixes:[r,...a.metadata?.removedSuffixes||[]],conjugationType:"reflexive"})}}return null}tryConjugationNormalization(e){for(let t of $c)if(e.endsWith(t.ending)){let r=e.slice(0,-t.ending.length);if(r.length<2)continue;let i=r+t.stem;return O(i,t.confidence,{removedSuffixes:[t.ending],conjugationType:t.type})}return null}},Ly=new zt;function Kc(n){return{isLetter:r=>n.test(r),isIdentifierChar:r=>/[0-9]/.test(r)||n.test(r)}}var{isLetter:qc,isIdentifierChar:Bc}=Kc(/[a-zA-ZàâæçéèêëïîôùûüÿœÀÂÆÇÉÈÊËÏÎÔÙÛÜŸŒ]/),Dc=new Set(["\xE0","a","de","du","des","dans","sur","sous","avec","sans","par","pour","entre","avant","apr\xE8s","apres","depuis","vers","chez","contre","au","aux"]),Xr=class{constructor(){this.name="french-keyword"}setContext(e){this.context=e}canExtract(e,t){return qc(e[t])}extract(e,t){if(!this.context)throw new Error("FrenchKeywordExtractor: context not set");let r=t,i="";for(;r<e.length&&Bc(e[r]);)i+=e[r++];if(!i)return null;let a=i.toLowerCase(),s=Dc.has(a),o=this.context.lookupKeyword(a),l=o&&o.normalized!==o.native?o.normalized:void 0,c;if(!o&&this.context.normalizer){let d=this.context.normalizer.normalize(i);if(d.stem!==i&&d.confidence>=.7){let p=this.context.lookupKeyword(d.stem);p&&(c=p.normalized)}}return{value:i,length:r-t,metadata:{normalized:l||c,isPreposition:s}}}};function ki(){return[new Xr]}var Hc=[{native:"vrai",normalized:"true"},{native:"faux",normalized:"false"},{native:"nul",normalized:"null"},{native:"ind\xE9fini",normalized:"undefined"},{native:"indefini",normalized:"undefined"},{native:"premier",normalized:"first"},{native:"premi\xE8re",normalized:"first"},{native:"premiere",normalized:"first"},{native:"dernier",normalized:"last"},{native:"derni\xE8re",normalized:"last"},{native:"derniere",normalized:"last"},{native:"suivant",normalized:"next"},{native:"pr\xE9c\xE9dent",normalized:"previous"},{native:"precedent",normalized:"previous"},{native:"proche",normalized:"closest"},{native:"parent",normalized:"parent"},{native:"clic",normalized:"click"},{native:"click",normalized:"click"},{native:"entr\xE9e",normalized:"input"},{native:"entree",normalized:"input"},{native:"changement",normalized:"change"},{native:"soumission",normalized:"submit"},{native:"touche bas",normalized:"keydown"},{native:"touche haut",normalized:"keyup"},{native:"souris dessus",normalized:"mouseover"},{native:"souris dehors",normalized:"mouseout"},{native:"focus",normalized:"focus"},{native:"flou",normalized:"blur"},{native:"chargement",normalized:"load"},{native:"d\xE9filement",normalized:"scroll"},{native:"defilement",normalized:"scroll"},{native:"je",normalized:"me"},{native:"mon",normalized:"my"},{native:"ma",normalized:"my"},{native:"mes",normalized:"my"},{native:"\xE7a",normalized:"it"},{native:"ca",normalized:"it"},{native:"resultat",normalized:"result"},{native:"evenement",normalized:"event"},{native:"seconde",normalized:"s"},{native:"secondes",normalized:"s"},{native:"milliseconde",normalized:"ms"},{native:"millisecondes",normalized:"ms"},{native:"minute",normalized:"m"},{native:"minutes",normalized:"m"},{native:"heure",normalized:"h"},{native:"heures",normalized:"h"},{native:"prefixer",normalized:"prepend"},{native:"creer",normalized:"make"},{native:"definir",normalized:"set"},{native:"etablir",normalized:"set"},{native:"incrementer",normalized:"increment"},{native:"decrementer",normalized:"decrement"},{native:"declencher",normalized:"trigger"},{native:"defocaliser",normalized:"blur"},{native:"recuperer",normalized:"fetch"},{native:"repeter",normalized:"repeat"},{native:"arreter",normalized:"halt"},{native:"defaut",normalized:"default"},{native:"jusqua",normalized:"until"},{native:"apres",normalized:"after"},{native:"journaliser",normalized:"log"},{native:"transmuter",normalized:"morph"},{native:"tant que",normalized:"while"}],Zr=class extends V{constructor(){super();this.language="fr";this.direction="ltr";this.initializeKeywordsFromProfile(De,Hc),this.normalizer=new zt,this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractors(ki()),this.registerExtractor(new K),this.registerExtractor(new q)}classifyToken(t){return this.isKeyword(t)?"keyword":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||/^\d/.test(t)?"literal":["==","!=","<=",">=","<",">","&&","||","!"].includes(t)?"operator":t.startsWith("/")||t.startsWith("./")||t.startsWith("http")?"url":"identifier"}},ir=new Zr;var Fc=["an","auf","aus","ein","mit","vor","zu","ab","bei","nach","weg","um","her","hin"];function Uc(n){let e=n.toLowerCase();return!!(e.endsWith("en")||e.endsWith("eln")||e.endsWith("ern")||e.startsWith("ge")&&e.endsWith("t")||e.startsWith("ge")&&e.endsWith("en")||/[äöüß]/i.test(n))}var Gc=[{ending:"end",stem:"en",confidence:.88,type:"gerund"},{ending:"e",stem:"en",confidence:.75,type:"present"},{ending:"st",stem:"en",confidence:.8,type:"present"},{ending:"t",stem:"en",confidence:.78,type:"present"},{ending:"en",stem:"en",confidence:.85,type:"dictionary"},{ending:"test",stem:"en",confidence:.85,type:"past"},{ending:"ten",stem:"en",confidence:.82,type:"past"},{ending:"tet",stem:"en",confidence:.85,type:"past"},{ending:"te",stem:"en",confidence:.82,type:"past"},{ending:"test",stem:"en",confidence:.8,type:"subjunctive"},{ending:"ten",stem:"en",confidence:.78,type:"subjunctive"},{ending:"tet",stem:"en",confidence:.8,type:"subjunctive"},{ending:"te",stem:"en",confidence:.78,type:"subjunctive"},{ending:"e",stem:"en",confidence:.72,type:"imperative"},{ending:"t",stem:"en",confidence:.72,type:"imperative"},{ending:"en",stem:"en",confidence:.75,type:"imperative"}],Yc=[{ending:"le",stem:"eln",confidence:.82,type:"present"},{ending:"elst",stem:"eln",confidence:.85,type:"present"},{ending:"elt",stem:"eln",confidence:.85,type:"present"},{ending:"eln",stem:"eln",confidence:.88,type:"dictionary"},{ending:"re",stem:"ern",confidence:.82,type:"present"},{ending:"erst",stem:"ern",confidence:.85,type:"present"},{ending:"ert",stem:"ern",confidence:.85,type:"present"},{ending:"ern",stem:"ern",confidence:.88,type:"dictionary"}],Xc=[...Gc,...Yc].sort((n,e)=>e.ending.length-n.ending.length),Tt=class{constructor(){this.language="de"}isNormalizable(e){return e.length<3?!1:Uc(e)}normalize(e){let t=e.toLowerCase();if(t.endsWith("en")&&t.length>=4)return Y(e);if((t.endsWith("eln")||t.endsWith("ern"))&&t.length>=5)return Y(e);let r=this.tryParticipleNormalization(t);if(r)return r;let i=this.tryConjugationNormalization(t);return i||Y(e)}tryParticipleNormalization(e){for(let t of Fc)if(e.startsWith(t+"ge")){let r=e.slice(t.length),i=this.trySimpleParticipleNormalization(r);if(i){let a={removedPrefixes:["ge"],conjugationType:"participle"};return i.metadata?.removedSuffixes&&(a.removedSuffixes=i.metadata.removedSuffixes),O(t+i.stem,i.confidence*.95,a)}}return this.trySimpleParticipleNormalization(e)}trySimpleParticipleNormalization(e){if(!e.startsWith("ge"))return null;let t=e.slice(2);if(t.endsWith("t")&&t.length>=3){let r=t.slice(0,-1);return O(r+"en",.85,{removedPrefixes:["ge"],removedSuffixes:["t"],conjugationType:"participle"})}return t.endsWith("en")&&t.length>=4?O(t,.82,{removedPrefixes:["ge"],conjugationType:"participle"}):null}tryConjugationNormalization(e){for(let t of Xc)if(e.endsWith(t.ending)){let r=e.slice(0,-t.ending.length);if(r.length<2)continue;let i=r+t.stem;return O(i,t.confidence,{removedSuffixes:[t.ending],conjugationType:t.type})}return null}},_y=new Tt;function Zc(n){return{isLetter:r=>n.test(r),isIdentifierChar:r=>/[0-9]/.test(r)||n.test(r)}}var{isLetter:Jc,isIdentifierChar:Qc}=Zc(/[a-zA-ZäöüÄÖÜß]/),ep=new Set(["an","auf","aus","bei","durch","f\xFCr","fur","gegen","in","mit","nach","ohne","seit","\xFCber","uber","um","unter","von","vor","zu","zwischen","bis","gegen\xFCber","gegenuber","w\xE4hrend","wahrend","wegen","trotz","statt","innerhalb","au\xDFerhalb","ausserhalb"]),Jr=class{constructor(){this.name="german-keyword"}setContext(e){this.context=e}canExtract(e,t){return Jc(e[t])}extract(e,t){if(!this.context)throw new Error("GermanKeywordExtractor: context not set");return this.extractGermanWord(e,t)}extractGermanWord(e,t){if(!this.context)return null;let r=t,i="";for(;r<e.length&&Qc(e[r]);)i+=e[r++];if(!i)return null;let a=i.toLowerCase(),s=ep.has(a),o=this.context.lookupKeyword(i),l=o&&o.normalized!==o.native?o.normalized:void 0,c;if(!o&&this.context.normalizer){let d=this.context.normalizer.normalize(i);if(d.stem!==i&&d.confidence>=.7){let p=this.context.lookupKeyword(d.stem);p&&(c=p.normalized)}}return{value:i,length:r-t,metadata:{normalized:l||c,isPreposition:s}}}};function xi(){return[new Jr]}var tp=[{native:"wahr",normalized:"true"},{native:"falsch",normalized:"false"},{native:"null",normalized:"null"},{native:"undefiniert",normalized:"undefined"},{native:"erste",normalized:"first"},{native:"erster",normalized:"first"},{native:"erstes",normalized:"first"},{native:"letzte",normalized:"last"},{native:"letzter",normalized:"last"},{native:"letztes",normalized:"last"},{native:"n\xE4chste",normalized:"next"},{native:"nachste",normalized:"next"},{native:"n\xE4chstgelegene",normalized:"closest"},{native:"nachstgelegene",normalized:"closest"},{native:"vorherige",normalized:"previous"},{native:"eltern",normalized:"parent"},{native:"klick",normalized:"click"},{native:"click",normalized:"click"},{native:"eingabe",normalized:"input"},{native:"\xE4nderung",normalized:"change"},{native:"anderung",normalized:"change"},{native:"absenden",normalized:"submit"},{native:"taste unten",normalized:"keydown"},{native:"taste oben",normalized:"keyup"},{native:"maus dr\xFCber",normalized:"mouseover"},{native:"maus druber",normalized:"mouseover"},{native:"maus weg",normalized:"mouseout"},{native:"fokus",normalized:"focus"},{native:"unsch\xE4rfe",normalized:"blur"},{native:"unscharfe",normalized:"blur"},{native:"scrollen",normalized:"scroll"},{native:"meine",normalized:"my"},{native:"meinen",normalized:"my"},{native:"ergebnis",normalized:"result"},{native:"ziel",normalized:"target"},{native:"sekunde",normalized:"s"},{native:"sekunden",normalized:"s"},{native:"millisekunde",normalized:"ms"},{native:"millisekunden",normalized:"ms"},{native:"minute",normalized:"m"},{native:"minuten",normalized:"m"},{native:"stunde",normalized:"h"},{native:"stunden",normalized:"h"},{native:"hinzufugen",normalized:"add"},{native:"hinzufgen",normalized:"add"},{native:"loschen",normalized:"remove"},{native:"anhangen",normalized:"append"},{native:"erhohen",normalized:"increment"},{native:"ubergang",normalized:"transition"},{native:"auslosen",normalized:"trigger"},{native:"zuruckgeben",normalized:"return"},{native:"anschliessend",normalized:"then"},{native:"erh\xF6he",normalized:"increment"},{native:"erhohe",normalized:"increment"},{native:"verringere",normalized:"decrement"}],Qr=class extends V{constructor(){super();this.language="de";this.direction="ltr";this.initializeKeywordsFromProfile(qe,tp),this.normalizer=new Tt,this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractors(xi()),this.registerExtractor(new K),this.registerExtractor(new q)}classifyToken(t){return this.isKeyword(t)?"keyword":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||/^\d/.test(t)?"literal":t.startsWith("/")||t.startsWith("./")||t.startsWith("http")?"url":"identifier"}},ar=new Qr;var rp=new Set(["di","ke","dari","pada","dengan","tanpa","untuk","oleh","antara","sebelum","sesudah","setelah","selama","sampai","hingga","sejak","menuju","tentang","terhadap","melalui","dalam","luar"]),np=[{native:"benar",normalized:"true"},{native:"salah",normalized:"false"},{native:"null",normalized:"null"},{native:"kosong",normalized:"null"},{native:"tidakdidefinisikan",normalized:"undefined"},{native:"pertama",normalized:"first"},{native:"terakhir",normalized:"last"},{native:"berikutnya",normalized:"next"},{native:"sebelumnya",normalized:"previous"},{native:"terdekat",normalized:"closest"},{native:"induk",normalized:"parent"},{native:"klik",normalized:"click"},{native:"click",normalized:"click"},{native:"ubah",normalized:"change"},{native:"kirim",normalized:"submit"},{native:"tekan",normalized:"keydown"},{native:"arahkan",normalized:"mouseover"},{native:"tinggalkan",normalized:"mouseout"},{native:"kabur",normalized:"blur"},{native:"muat",normalized:"load"},{native:"gulir",normalized:"scroll"},{native:"input",normalized:"input"},{native:"milik",normalized:"my"},{native:"detik",normalized:"s"},{native:"milidetik",normalized:"ms"},{native:"menit",normalized:"m"},{native:"jam",normalized:"h"},{native:"atau",normalized:"or"},{native:"tidak",normalized:"not"},{native:"adalah",normalized:"is"},{native:"ada",normalized:"exists"}],en=class extends V{constructor(){super();this.language="id";this.direction="ltr";this.initializeKeywordsFromProfile(He,np),this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractors(ci()),this.registerExtractor(new K),this.registerExtractor(new q)}classifyToken(t){let r=t.toLowerCase();return rp.has(r)?"particle":this.isKeyword(r)?"keyword":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||/^\d/.test(t)?"literal":["==","!=","<=",">=","<",">","&&","||","!"].includes(t)?"operator":t.startsWith("/")||t.startsWith("./")||t.startsWith("http")?"url":"identifier"}},or=new en;function ie(n,e){return En(n,e)}function sr(){return br()}var cr=["if","unless","repeat","for","while"];function ke(n,e){let t=new Set([e]),i=I(n)?.keywords?.[e];if(i){i.primary&&t.add(i.primary.toLowerCase());for(let a of i.alternatives??[])t.add(a.toLowerCase())}return t}function de(n,e){return e.has(n.value.toLowerCase())?!0:n.normalized?e.has(n.normalized.toLowerCase()):!1}var ap=new Set(cr);function rn(n,e){let t=n.normalized?.toLowerCase();return t?ap.has(t):e.some(r=>de(n,r))}var bi=new Set(["me","it","you","the","body","window","document","its","event","result","target","self","this","them","parent","next","previous","closest","first","last"]),op=new Set(["destination","source","style","patient","on","from","to"]);function sp(n){if(!n||n.kind==="selector")return!1;let e=(n.normalized??n.value).toLowerCase(),t=n.value.toLowerCase();return!(bi.has(e)||bi.has(t)||op.has(e))}var Si=new Set(["ja","ko"]);function tn(n){let e=new Set;n?.primary&&e.add(n.primary.toLowerCase());for(let t of n?.alternatives??[])e.add(t.toLowerCase());return e}function zi(n,e){let t=[],r=e.position.end,i=n.slice(e.position.end).match(/^\s*\(([^)]*)\)/);if(i){r=e.position.end+i[0].length;for(let a of i[1].split(/[,،、]/)){let s=a.trim();s&&t.push(s)}}return{parameters:t,headerEnd:r}}function Ti(n,e,t){let r=e+1;if(r>=n.length)return-1;let i=tn(I(t)?.roleMarkers?.patient);return i.size>0&&de(n[r],i)&&r++,r<n.length?r:-1}function Ei(n,e,t){if(!I(e))return null;let r=ke(e,"behavior"),i=ke(e,"def"),a=n.toLowerCase(),s=[...r].some(d=>a.includes(d)),o=/\bdef\b/.test(a)||[...i].some(d=>d!=="def"&&a.includes(d));if(!s&&!o)return null;let l=ie(n,e).tokens;if(l.length<2)return null;if(de(l[0],r))return wi(n,e,l,t,0);let c=l.findIndex((d,p)=>p>0&&de(d,r));return c>0&&/^[A-Z][A-Za-z0-9_]*$/.test(l[0].value)?wi(n,e,l,t,c):de(l[0],i)?lp(n,e,l,t):null}function Pi(n,e,t){let r=I(e);if(!r)return null;let i=r.wordOrder!=="SOV",a=Si.has(e)?tn(r.roleMarkers?.event):new Set,s=Si.has(e)?tn(r.keywords?.on):new Set,o=a.size>0&&s.size>0,l=ke(e,"end"),c=ke(e,"on"),d=n.toLowerCase(),p=[...l].some(k=>d.includes(k)),u=(i||o)&&(()=>{let k=0;for(let T of c)if(T){for(let v=d.indexOf(T);v>=0;v=d.indexOf(T,v+T.length))if(++k>=2)return!0}return!1})();if(!p&&!u)return null;let m=ie(n,e).tokens;if(m.length<2)return null;let f=cr.map(k=>ke(e,k)),y=k=>rn(k,f),g=k=>de(k,l),h=[],b=0,z=0;for(let k=0;k<m.length;k++){let T=m[k];if(g(T)){if(b>0){b--;continue}let v=n.slice(m[z].position.start,T.position.start).trim();v&&h.push(v),z=k+1}else if(y(T))b++;else if(i&&b===0&&k>z&&de(T,c)&&sp(m[k+1])){let v=n.slice(m[z].position.start,T.position.start).trim();v&&h.push(v),z=k}else if(o&&b===0&&k-1>z&&de(T,a)&&m[k+1]!==void 0&&de(m[k+1],s)){let v=m[k-1],S=n.slice(m[z].position.start,v.position.start).trim();S&&h.push(S),z=k-1}}if(z<m.length){let k=n.slice(m[z].position.start).trim();k&&h.push(k)}if(h.length<2)return null;let E=[],x=[];for(let k of h){let T;try{T=t.statement(k,e)}catch{return null}if(!T||T.kind!=="event-handler")return null;let v=T;E.push(v);let S=!v.body||v.body.length===0;x.push(S?.2:v.metadata?.confidence??.75)}return pt(E,"then",{sourceLanguage:e,confidence:lr(x),sourceText:n})}function lr(n){return n.length>0?n.reduce((e,t)=>e+t,0)/n.length:0}function Li(n){let e=[];for(let t of n){let r=t.statements;t.kind==="compound"&&Array.isArray(r)?e.push(...r):e.push(t)}return e}function wi(n,e,t,r,i){let a=i>0,s=a?0:Ti(t,i,e);if(s<0)return null;let o=t[s],l=o.value;if(!/^[A-Z][A-Za-z0-9_]*$/.test(l))return null;let{parameters:c,headerEnd:d}=zi(n,o),p=a?i+1:t.findIndex(v=>v.position.start>=d);p<=s&&(p=s+1);let u=ke(e,"init"),m=ke(e,"end"),f=cr.map(v=>ke(e,v)),y=v=>rn(v,f),g=v=>de(v,m),h=[],b=[],z=[],E=!1,x=0,k=p;for(let v=p;v<t.length;v++){let S=t[v];if(g(S)){if(x>0){x--;continue}if(v===k){E=!0;break}if(de(t[k],u)){let L=n.slice(t[k].position.end,S.position.start).trim();if(L)try{let P=Li(r.body(L,e));b.push(...P),z.push(lr(P.map(j=>j.metadata?.confidence??.75)))}catch{z.push(0)}}else{let L=n.slice(t[k].position.start,S.position.start).trim();try{let P=r.statement(L,e);if(P&&P.kind==="event-handler"){let j=P;h.push(j);let A=!j.body||j.body.length===0;z.push(A?.2:j.metadata?.confidence??.75)}else z.push(0)}catch{z.push(0)}}k=v+1}else y(S)&&x++}if(h.length===0&&b.length===0)return null;let T=(E?1:.8)*lr(z);return $n(l,c,h,b.length>0?b:void 0,{sourceLanguage:e,confidence:T,sourceText:n})}function lp(n,e,t,r){let i=Ti(t,0,e);if(i<0)return null;let a=t[i],s=a.value;if(!/^[a-zA-Z_$][\w$]*(?:\.[a-zA-Z_$][\w$]*)*$/.test(s))return null;let{parameters:o,headerEnd:l}=zi(n,a),c=t.findIndex(x=>x.position.start>=l);c<=i&&(c=i+1);let d=ke(e,"end"),p=cr.map(x=>ke(e,x)),u=x=>rn(x,p),m=x=>de(x,d),f=0,y=-1;for(let x=c;x<t.length;x++)if(m(t[x])){if(f===0){y=x;break}f--}else u(t[x])&&f++;let g=t[c]?.position.start??l,h=y>=0?t[y].position.start:n.length,b=n.slice(g,h).trim();if(!b)return null;let z;try{z=Li(r.body(b,e))}catch{return null}if(z.length===0)return null;let E=lr(z.map(x=>x.metadata?.confidence??.75));return y<0&&(E*=.8),Kn(s,o,z,{sourceLanguage:e,confidence:E,sourceText:n})}var Ie={ko:{\uD074\uB9AD:"click",\uC785\uB825:"input",\uBCC0\uACBD:"change",\uC81C\uCD9C:"submit",\uD0A4\uB2E4\uC6B4:"keydown",\uD0A4\uC5C5:"keyup",\uB9C8\uC6B0\uC2A4\uC624\uBC84:"mouseover",\uB9C8\uC6B0\uC2A4\uC544\uC6C3:"mouseout",\uB9C8\uC6B0\uC2A4\uB2E4\uC6B4:"mousedown",\uB9C8\uC6B0\uC2A4\uC5C5:"mouseup",\uD3EC\uCEE4\uC2A4:"focus",\uBE14\uB7EC:"blur",\uB85C\uB4DC:"load",\uB9AC\uC0AC\uC774\uC988:"resize",\uC2A4\uD06C\uB864:"scroll"},ja:{\u30AF\u30EA\u30C3\u30AF:"click",\u5165\u529B:"input",\u5909\u66F4:"change",\u9001\u4FE1:"submit",\u30AD\u30FC\u30C0\u30A6\u30F3:"keydown",\u30AD\u30FC\u30A2\u30C3\u30D7:"keyup",\u30AD\u30FC\u30D7\u30EC\u30B9:"keypress",\u30DE\u30A6\u30B9\u30AA\u30FC\u30D0\u30FC:"mouseover",\u30DE\u30A6\u30B9\u30A2\u30A6\u30C8:"mouseout",\u30DE\u30A6\u30B9\u62BC\u4E0B:"mousedown",\u30DE\u30A6\u30B9\u89E3\u653E:"mouseup",\u30D5\u30A9\u30FC\u30AB\u30B9:"focus",\u30D6\u30E9\u30FC:"blur",\u30ED\u30FC\u30C9:"load",\u8AAD\u307F\u8FBC\u307F:"load",\u30B5\u30A4\u30BA\u5909\u66F4:"resize",\u30B9\u30AF\u30ED\u30FC\u30EB:"scroll"},ar:{\u0627\u0644\u0646\u0642\u0631:"click",\u0646\u0642\u0631:"click",\u0627\u0644\u0625\u062F\u062E\u0627\u0644:"input",\u0625\u062F\u062E\u0627\u0644:"input",\u0627\u0644\u062A\u063A\u064A\u064A\u0631:"change",\u062A\u063A\u064A\u064A\u0631:"change",\u0627\u0644\u0625\u0631\u0633\u0627\u0644:"submit",\u0625\u0631\u0633\u0627\u0644:"submit","\u0636\u063A\u0637 \u0627\u0644\u0645\u0641\u062A\u0627\u062D":"keydown","\u0631\u0641\u0639 \u0627\u0644\u0645\u0641\u062A\u0627\u062D":"keyup","\u062A\u0645\u0631\u064A\u0631 \u0627\u0644\u0645\u0627\u0648\u0633":"mouseover",\u0627\u0644\u062A\u0631\u0643\u064A\u0632:"focus",\u062A\u062D\u0645\u064A\u0644:"load",\u062A\u0645\u0631\u064A\u0631:"scroll"},es:{clic:"click",click:"click",entrada:"input",cambio:"change",env\u00EDo:"submit",enviar:"submit","tecla abajo":"keydown","tecla arriba":"keyup","rat\xF3n encima":"mouseover","rat\xF3n fuera":"mouseout",enfoque:"focus",desenfoque:"blur",carga:"load",desplazamiento:"scroll"},tr:{t\u0131klama:"click",t\u0131kla:"click",t\u0131k:"click",giri\u015F:"input",girdi:"input",de\u011Fi\u015Fiklik:"change",de\u011Fi\u015Fim:"change",g\u00F6nderme:"submit",g\u00F6nder:"submit",tu\u015Fbasma:"keydown",tu\u015Fb\u0131rakma:"keyup",fare_bas:"mousedown",fare_b\u0131rak:"mouseup",farei\u00E7inde:"mouseover",fared\u0131\u015F\u0131nda:"mouseout",odaklanma:"focus",odak:"focus",bulan\u0131kl\u0131k:"blur",y\u00FCkleme:"load",y\u00FCkle:"load",boyutland\u0131rma:"resize",boyutland\u0131r:"resize",kayd\u0131rma:"scroll"},pt:{clique:"click",clicar:"click",click:"click",entrada:"input",inserir:"input",mudan\u00E7a:"change",mudanca:"change",alterar:"change",envio:"submit",enviar:"submit","tecla baixo":"keydown","tecla cima":"keyup","pressionar tecla":"keydown","soltar tecla":"keyup","mouse sobre":"mouseover","mouse fora":"mouseout",foco:"focus",focar:"focus",desfoque:"blur",desfocar:"blur",carregar:"load",carregamento:"load",rolagem:"scroll",rolar:"scroll"},zh:{\u70B9\u51FB:"click",\u5355\u51FB:"click",\u53CC\u51FB:"dblclick",\u8F93\u5165:"input",\u6539\u53D8:"change",\u53D8\u5316:"change",\u53D8\u66F4:"change",\u63D0\u4EA4:"submit",\u53D1\u9001:"submit",\u6309\u952E:"keydown",\u952E\u5165:"keydown",\u677E\u952E:"keyup",\u9F20\u6807\u8FDB\u5165:"mouseover",\u9F20\u6807\u79FB\u5165:"mouseover",\u9F20\u6807\u79BB\u5F00:"mouseout",\u9F20\u6807\u79FB\u51FA:"mouseout",\u7126\u70B9:"focus",\u805A\u7126:"focus",\u5931\u7126:"blur",\u6A21\u7CCA:"blur",\u52A0\u8F7D:"load",\u8F7D\u5165:"load",\u6EDA\u52A8:"scroll"},fr:{clic:"click",cliquer:"click",click:"click",saisie:"input",entr\u00E9e:"input",changement:"change",changer:"change",soumettre:"submit",soumission:"submit",envoi:"submit","touche bas":"keydown","touche haut":"keyup","souris dessus":"mouseover","souris dehors":"mouseout",focus:"focus",focaliser:"focus",d\u00E9focus:"blur",d\u00E9focaliser:"blur",chargement:"load",charger:"load",d\u00E9filement:"scroll",d\u00E9filer:"scroll"},de:{klick:"click",klicken:"click",click:"click",eingabe:"input",eingeben:"input",\u00E4nderung:"change",\u00E4ndern:"change",absenden:"submit",einreichen:"submit","taste runter":"keydown","taste hoch":"keyup","maus \xFCber":"mouseover","maus raus":"mouseout",fokus:"focus",fokussieren:"focus",defokussieren:"blur",unsch\u00E4rfe:"blur",laden:"load",ladung:"load",scrollen:"scroll",bl\u00E4ttern:"scroll"},id:{klik:"click",click:"click",masukan:"input",input:"input",ubah:"change",perubahan:"change",kirim:"submit","tekan tombol":"keydown","lepas tombol":"keyup","mouse masuk":"mouseover","mouse keluar":"mouseout",fokus:"focus",blur:"blur",muat:"load",memuat:"load",gulir:"scroll",menggulir:"scroll"},bn:{\u0995\u09CD\u09B2\u09BF\u0995:"click",\u0987\u09A8\u09AA\u09C1\u099F:"input",\u099C\u09AE\u09BE:"submit",\u09B2\u09CB\u09A1:"load",\u09B8\u09CD\u0995\u09CD\u09B0\u09CB\u09B2:"scroll",\u09B0\u09BF\u09B8\u09BE\u0987\u099C:"resize",\u099D\u09BE\u09AA\u09B8\u09BE:"blur",\u09AB\u09CB\u0995\u09BE\u09B8:"focus",\u09AA\u09B0\u09BF\u09AC\u09B0\u09CD\u09A4\u09A8:"change"},qu:{click:"click","\xF1it'iy":"click",\u00F1itiy:"click",yaykuchiy:"input",yaykuy:"input",tikray:"change","t'ikray":"change",apachiy:"submit",kachay:"submit","llave uray":"keydown","llave hawa":"keyup","q'away":"focus",qhaway:"focus",paqariy:"blur","mana q'away":"blur",cargay:"load",apakuy:"load",apamuy:"load",kunray:"scroll",muyuy:"scroll",hatun_kay:"resize"},sw:{bofya:"click",click:"click",kubofya:"click",ingiza:"input",kubadilisha:"change",mabadiliko:"change",tuma:"submit",kutuma:"submit","bonyeza chini":"keydown","bonyeza juu":"keyup","panya juu":"mouseover","panya nje":"mouseout",lenga:"focus",kulenga:"focus",blur:"blur",pakia:"load",kupakia:"load",sogeza:"scroll",kusogeza:"scroll"}};var cp=Object.fromEntries(Object.entries(Ie).map(([n,e])=>{let t={};for(let[r,i]of Object.entries(e))i in t||(t[i]=r);return[n,t]})),pp={ar:new Set(["mouseover"]),bn:new Set(["resize"]),de:new Set(["keydown","keyup","load","mouseout","mouseover"]),fr:new Set(["blur"]),id:new Set(["input","keyup","mouseout","mouseover"]),ja:new Set(["keypress","mousedown","mouseup","resize"]),qu:new Set(["change","focus","load","resize","submit"]),sw:new Set(["change","click","input","keydown","keyup","mouseout","mouseover","submit"]),tr:new Set(["keydown","keyup","load","mousedown","mouseout","mouseover","mouseup","resize","scroll"]),zh:new Set(["focus","keyup","mouseout","mouseover"])};function Ci(n,e){return pp[e]?.has(n)?n:cp[e]?.[n]??n}function dp(){return[{id:"event-handler-bn-sov",language:"bn",command:"on",priority:100,template:{format:"{event} \u09A4\u09C7 {action}",tokens:[{type:"role",role:"event"},{type:"literal",value:"\u09A4\u09C7",alternatives:["\u098F"]},{type:"role",role:"action"}]},extraction:{event:{position:0},action:{position:2}}},{id:"event-handler-bn-with-source",language:"bn",command:"on",priority:95,template:{format:"{source} \u09A5\u09C7\u0995\u09C7 {event} \u09A4\u09C7 {action}",tokens:[{type:"role",role:"source"},{type:"literal",value:"\u09A5\u09C7\u0995\u09C7"},{type:"role",role:"event"},{type:"literal",value:"\u09A4\u09C7",alternatives:["\u098F"]},{type:"role",role:"action"}]},extraction:{source:{position:0},event:{marker:"\u09A4\u09C7",position:2},action:{position:4}}},{id:"event-handler-bn-when",language:"bn",command:"on",priority:90,template:{format:"\u09AF\u0996\u09A8 {event} {action}",tokens:[{type:"literal",value:"\u09AF\u0996\u09A8"},{type:"role",role:"event"},{type:"role",role:"action"}]},extraction:{event:{position:1},action:{position:2}}}]}function up(){return[{id:"event-de-wenn-source",language:"de",command:"on",priority:115,template:{format:"wenn {event} von {source} {body}",tokens:[{type:"literal",value:"wenn",alternatives:["falls","sobald"]},{type:"role",role:"event"},{type:"literal",value:"von",alternatives:["aus"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"von",markerAlternatives:["aus"]}}},{id:"event-de-wenn",language:"de",command:"on",priority:105,template:{format:"wenn {event} {body}",tokens:[{type:"literal",value:"wenn",alternatives:["falls","sobald"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-de-bei-source",language:"de",command:"on",priority:110,template:{format:"bei {event} von {source} {body}",tokens:[{type:"literal",value:"bei",alternatives:["beim"]},{type:"role",role:"event"},{type:"literal",value:"von",alternatives:["aus"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"von",markerAlternatives:["aus"]}}},{id:"event-de-bei",language:"de",command:"on",priority:100,template:{format:"bei {event} {body}",tokens:[{type:"literal",value:"bei",alternatives:["beim"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-de-auf",language:"de",command:"on",priority:95,template:{format:"auf {event} {body}",tokens:[{type:"literal",value:"auf"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-de-im-falle",language:"de",command:"on",priority:90,template:{format:"im Falle von {event} {body}",tokens:[{type:"literal",value:"im Falle von",alternatives:["im Fall von"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function mp(){return[{id:"event-en-when-source",language:"en",command:"on",priority:115,template:{format:"when {event} from {source} {body}",tokens:[{type:"literal",value:"when"},{type:"role",role:"event"},{type:"literal",value:"from"},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"from"}}},{id:"event-en-when",language:"en",command:"on",priority:105,template:{format:"when {event} {body}",tokens:[{type:"literal",value:"when"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-en-source",language:"en",command:"on",priority:110,template:{format:"on {event} from {source} {body}",tokens:[{type:"literal",value:"on"},{type:"role",role:"event"},{type:"literal",value:"from"},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"from"}}},{id:"event-en-standard",language:"en",command:"on",priority:100,template:{format:"on {event} {body}",tokens:[{type:"literal",value:"on"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-en-upon",language:"en",command:"on",priority:98,template:{format:"upon {event} {body}",tokens:[{type:"literal",value:"upon"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-en-if",language:"en",command:"on",priority:95,template:{format:"if {event} {body}",tokens:[{type:"literal",value:"if"},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function fp(){return[{id:"event-es-native-al-source",language:"es",command:"on",priority:115,template:{format:"al {event} en {source} {body}",tokens:[{type:"literal",value:"al"},{type:"role",role:"event"},{type:"literal",value:"en",alternatives:["de"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"en",markerAlternatives:["de"]}}},{id:"event-es-cuando-source",language:"es",command:"on",priority:112,template:{format:"cuando {event} en {source} {body}",tokens:[{type:"literal",value:"cuando"},{type:"role",role:"event"},{type:"literal",value:"en",alternatives:["de"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"en",markerAlternatives:["de"]}}},{id:"event-es-native-al",language:"es",command:"on",priority:108,template:{format:"al {event} {body}",tokens:[{type:"literal",value:"al"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-es-standard",language:"es",command:"on",priority:100,template:{format:"en {event} {body}",tokens:[{type:"literal",value:"en",alternatives:["al","cuando"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-es-source",language:"es",command:"on",priority:110,template:{format:"en {event} desde {source} {body}",tokens:[{type:"literal",value:"en",alternatives:["al"]},{type:"role",role:"event"},{type:"literal",value:"desde",alternatives:["de"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"desde",markerAlternatives:["de"]}}},{id:"event-es-when",language:"es",command:"on",priority:95,template:{format:"cuando {event} {body}",tokens:[{type:"literal",value:"cuando"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-es-conditional-si",language:"es",command:"on",priority:85,template:{format:"si {event} {body}",tokens:[{type:"literal",value:"si"},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function yp(){return[{id:"event-fr-quand-source",language:"fr",command:"on",priority:115,template:{format:"quand {event} de {source} {body}",tokens:[{type:"literal",value:"quand",alternatives:["lorsque"]},{type:"role",role:"event"},{type:"literal",value:"de",alternatives:["depuis"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"de",markerAlternatives:["depuis"]}}},{id:"event-fr-quand",language:"fr",command:"on",priority:105,template:{format:"quand {event} {body}",tokens:[{type:"literal",value:"quand",alternatives:["lorsque"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-fr-sur-source",language:"fr",command:"on",priority:110,template:{format:"sur {event} de {source} {body}",tokens:[{type:"literal",value:"sur",alternatives:["lors de"]},{type:"role",role:"event"},{type:"literal",value:"de",alternatives:["depuis"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"de",markerAlternatives:["depuis"]}}},{id:"event-fr-sur",language:"fr",command:"on",priority:100,template:{format:"sur {event} {body}",tokens:[{type:"literal",value:"sur",alternatives:["lors de"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-fr-si",language:"fr",command:"on",priority:95,template:{format:"si {event} {body}",tokens:[{type:"literal",value:"si"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-fr-a",language:"fr",command:"on",priority:90,template:{format:"\xE0 {event} {body}",tokens:[{type:"literal",value:"\xE0",alternatives:["au"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function gp(){return[{id:"event-hi-standard",language:"hi",command:"on",priority:100,template:{format:"{event} \u092A\u0930",tokens:[{type:"role",role:"event"},{type:"literal",value:"\u092A\u0930",alternatives:["\u092E\u0947\u0902","\u091C\u092C"]}]},extraction:{event:{position:0}}},{id:"event-hi-with-source",language:"hi",command:"on",priority:95,template:{format:"{source} \u0938\u0947 {event} \u092A\u0930",tokens:[{type:"role",role:"source"},{type:"literal",value:"\u0938\u0947"},{type:"role",role:"event"},{type:"literal",value:"\u092A\u0930",alternatives:["\u092E\u0947\u0902","\u091C\u092C"]}]},extraction:{source:{position:0},event:{marker:"\u0938\u0947",position:2}}},{id:"event-hi-bare",language:"hi",command:"on",priority:80,template:{format:"{event}",tokens:[{type:"role",role:"event"}]},extraction:{event:{position:0}}}]}function hp(){return[{id:"event-id-ketika-source",language:"id",command:"on",priority:115,template:{format:"ketika {event} dari {source} {body}",tokens:[{type:"literal",value:"ketika",alternatives:["saat","waktu"]},{type:"role",role:"event"},{type:"literal",value:"dari"},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"dari"}}},{id:"event-id-ketika",language:"id",command:"on",priority:105,template:{format:"ketika {event} {body}",tokens:[{type:"literal",value:"ketika",alternatives:["saat","waktu"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-id-pada-source",language:"id",command:"on",priority:110,template:{format:"pada {event} dari {source} {body}",tokens:[{type:"literal",value:"pada"},{type:"role",role:"event"},{type:"literal",value:"dari"},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"dari"}}},{id:"event-id-pada",language:"id",command:"on",priority:100,template:{format:"pada {event} {body}",tokens:[{type:"literal",value:"pada"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-id-jika",language:"id",command:"on",priority:95,template:{format:"jika {event} {body}",tokens:[{type:"literal",value:"jika",alternatives:["kalau","apabila"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-id-bila",language:"id",command:"on",priority:90,template:{format:"bila {event} {body}",tokens:[{type:"literal",value:"bila"},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function vp(){return[{id:"event-handler-it-full",language:"it",command:"on",priority:100,template:{format:"su {event} {action}",tokens:[{type:"literal",value:"su",alternatives:["quando","al","on"]},{type:"role",role:"event"},{type:"role",role:"action"}]},extraction:{event:{position:1},action:{position:2}}},{id:"event-handler-it-from",language:"it",command:"on",priority:95,template:{format:"su {event} da {source} {action}",tokens:[{type:"literal",value:"su",alternatives:["quando","al","on"]},{type:"role",role:"event"},{type:"literal",value:"da",alternatives:["di"]},{type:"role",role:"source"},{type:"role",role:"action"}]},extraction:{event:{position:1},source:{marker:"da",markerAlternatives:["di"]},action:{position:-1}}}]}function kp(){return[{id:"event-ms-apabila",language:"ms",command:"on",priority:100,template:{format:"apabila {event} {body}",tokens:[{type:"literal",value:"apabila",alternatives:["bila","ketika"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-ms-apabila-source",language:"ms",command:"on",priority:110,template:{format:"apabila {event} dari {source} {body}",tokens:[{type:"literal",value:"apabila",alternatives:["bila","ketika"]},{type:"role",role:"event"},{type:"literal",value:"dari"},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"dari"}}}]}function xp(){return[{id:"event-handler-pl-full",language:"pl",command:"on",priority:100,template:{format:"gdy {event} na {source}",tokens:[{type:"literal",value:"gdy",alternatives:["kiedy","przy","na"]},{type:"role",role:"event"},{type:"group",optional:!0,tokens:[{type:"literal",value:"na",alternatives:["w","przy","z"]},{type:"role",role:"source"}]}]},extraction:{event:{position:1},source:{marker:"na",markerAlternatives:["w","przy","z"],default:{type:"reference",value:"me"}}}},{id:"event-handler-pl-simple",language:"pl",command:"on",priority:90,template:{format:"gdy {event}",tokens:[{type:"literal",value:"gdy",alternatives:["kiedy","przy","na"]},{type:"role",role:"event"}]},extraction:{event:{position:1},source:{default:{type:"reference",value:"me"}}}}]}function bp(){return[{id:"event-pt-ao-source",language:"pt",command:"on",priority:115,template:{format:"ao {event} em {source} {body}",tokens:[{type:"literal",value:"ao",alternatives:["\xE0"]},{type:"role",role:"event"},{type:"literal",value:"em",alternatives:["de","no","na"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"em",markerAlternatives:["de","no","na"]}}},{id:"event-pt-quando-source",language:"pt",command:"on",priority:110,template:{format:"quando {event} de {source} {body}",tokens:[{type:"literal",value:"quando"},{type:"role",role:"event"},{type:"literal",value:"de",alternatives:["em","no","na"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"de",markerAlternatives:["em","no","na"]}}},{id:"event-pt-ao",language:"pt",command:"on",priority:105,template:{format:"ao {event} {body}",tokens:[{type:"literal",value:"ao",alternatives:["\xE0"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-pt-quando",language:"pt",command:"on",priority:100,template:{format:"quando {event} {body}",tokens:[{type:"literal",value:"quando"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-pt-em",language:"pt",command:"on",priority:95,template:{format:"em {event} {body}",tokens:[{type:"literal",value:"em",alternatives:["no","na"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-pt-se",language:"pt",command:"on",priority:90,template:{format:"se {event} {body}",tokens:[{type:"literal",value:"se"},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function Sp(){return[{id:"event-qu-maykama",language:"qu",command:"on",priority:115,template:{format:"maykama {event} {body}",tokens:[{type:"literal",value:"maykama"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-qu-kaqtin",language:"qu",command:"on",priority:105,template:{format:"{event} kaqtin {body}",tokens:[{type:"role",role:"event"},{type:"literal",value:"kaqtin",alternatives:["qtin","ptin"]}]},extraction:{event:{position:0}}},{id:"event-qu-standard",language:"qu",command:"on",priority:100,template:{format:"{event} pi {body}",tokens:[{type:"role",role:"event"},{type:"literal",value:"pi",alternatives:["kaqpi","kaqpim"]}]},extraction:{event:{position:0}}}]}function wp(){return[{id:"event-handler-ru-full",language:"ru",command:"on",priority:100,template:{format:"\u043F\u0440\u0438 {event} \u043D\u0430 {source}",tokens:[{type:"literal",value:"\u043F\u0440\u0438",alternatives:["\u043A\u043E\u0433\u0434\u0430"]},{type:"role",role:"event"},{type:"group",optional:!0,tokens:[{type:"literal",value:"\u043D\u0430",alternatives:["\u0432","\u043E\u0442"]},{type:"role",role:"source"}]}]},extraction:{event:{position:1},source:{marker:"\u043D\u0430",markerAlternatives:["\u0432","\u043E\u0442"],default:{type:"reference",value:"me"}}}},{id:"event-handler-ru-simple",language:"ru",command:"on",priority:90,template:{format:"\u043F\u0440\u0438 {event}",tokens:[{type:"literal",value:"\u043F\u0440\u0438",alternatives:["\u043A\u043E\u0433\u0434\u0430"]},{type:"role",role:"event"}]},extraction:{event:{position:1},source:{default:{type:"reference",value:"me"}}}}]}function zp(){return[{id:"event-sw-unapo-source",language:"sw",command:"on",priority:115,template:{format:"unapo {event} kutoka {source} {body}",tokens:[{type:"literal",value:"unapo",alternatives:["wakati wa","wakati"]},{type:"role",role:"event"},{type:"literal",value:"kutoka"},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"kutoka"}}},{id:"event-sw-unapo",language:"sw",command:"on",priority:105,template:{format:"unapo {event} {body}",tokens:[{type:"literal",value:"unapo",alternatives:["wakati wa","wakati"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-sw-kwa-source",language:"sw",command:"on",priority:110,template:{format:"kwa {event} kutoka {source} {body}",tokens:[{type:"literal",value:"kwa"},{type:"role",role:"event"},{type:"literal",value:"kutoka"},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"kutoka"}}},{id:"event-sw-kwa",language:"sw",command:"on",priority:100,template:{format:"kwa {event} {body}",tokens:[{type:"literal",value:"kwa"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-sw-ikiwa",language:"sw",command:"on",priority:95,template:{format:"ikiwa {event} {body}",tokens:[{type:"literal",value:"ikiwa",alternatives:["kama"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-sw-baada-ya",language:"sw",command:"on",priority:90,template:{format:"baada ya {event} {body}",tokens:[{type:"literal",value:"baada ya"},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function Tp(){return[{id:"event-handler-th-svo",language:"th",command:"on",priority:100,template:{format:"\u0E40\u0E21\u0E37\u0E48\u0E2D {event} {action}",tokens:[{type:"literal",value:"\u0E40\u0E21\u0E37\u0E48\u0E2D",alternatives:["\u0E15\u0E2D\u0E19"]},{type:"role",role:"event"},{type:"role",role:"action"}]},extraction:{event:{position:1},action:{position:2}}},{id:"event-handler-th-with-source",language:"th",command:"on",priority:95,template:{format:"\u0E40\u0E21\u0E37\u0E48\u0E2D {event} \u0E08\u0E32\u0E01 {source} {action}",tokens:[{type:"literal",value:"\u0E40\u0E21\u0E37\u0E48\u0E2D",alternatives:["\u0E15\u0E2D\u0E19"]},{type:"role",role:"event"},{type:"literal",value:"\u0E08\u0E32\u0E01"},{type:"role",role:"source"},{type:"role",role:"action"}]},extraction:{event:{position:1},source:{marker:"\u0E08\u0E32\u0E01",position:3},action:{position:4}}}]}function nn(n){let e=n.verbAlts?{type:"literal",value:n.verb,alternatives:n.verbAlts}:{type:"literal",value:n.verb},t=n.eventMarkerAlts?{type:"literal",value:n.eventMarker,alternatives:n.eventMarkerAlts}:{type:"literal",value:n.eventMarker};return["before","after"].map(r=>{let i={type:"literal",value:r==="before"?n.before:n.after},a={type:"role",role:"patient"},s={type:"role",role:"destination"},o={type:"role",role:"event"},l=n.order==="verb-first"?[e,a,i,s,t,o]:[t,o,e,a,i,s],c=n.order==="verb-first"?{action:{value:"put"},patient:{position:1},destination:{position:3},event:{position:5},manner:{default:{type:"literal",value:r}}}:{action:{value:"put"},event:{position:1},patient:{position:3},destination:{position:5},manner:{default:{type:"literal",value:r}}};return{id:`put-event-${n.lang}-vso-${r}`,language:n.lang,command:"on",priority:160,template:{format:`${n.lang} put ${r}`,tokens:l},extraction:c}})}function Ep(){return[...nn({lang:"tl",verb:"ilagay",verbAlts:["maglagay"],eventMarker:"kapag",eventMarkerAlts:["sa"],before:"bago",after:"matapos",order:"verb-first"}),{id:"event-tl-kapag-source",language:"tl",command:"on",priority:115,template:{format:"kapag {event} mula_sa {source} {body}",tokens:[{type:"literal",value:"kapag",alternatives:["sa"]},{type:"role",role:"event"},{type:"literal",value:"mula_sa",alternatives:["galing_sa"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"mula_sa"}}},{id:"event-tl-kapag",language:"tl",command:"on",priority:105,template:{format:"kapag {event} {body}",tokens:[{type:"literal",value:"kapag",alternatives:["sa"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function Pp(){return[...nn({lang:"uk",verb:"\u043F\u043E\u043A\u043B\u0430\u0441\u0442\u0438",verbAlts:["\u043F\u043E\u043A\u043B\u0430\u0434\u0438","\u043F\u043E\u043C\u0456\u0441\u0442\u0438\u0442\u0438","\u043F\u043E\u043C\u0456\u0441\u0442\u0438","\u0432\u0441\u0442\u0430\u0432\u0438\u0442\u0438","\u0432\u0441\u0442\u0430\u0432"],eventMarker:"\u043F\u0440\u0438",eventMarkerAlts:["\u043A\u043E\u043B\u0438"],before:"\u0434\u043E",after:"\u043F\u0456\u0441\u043B\u044F",order:"event-first"}),{id:"event-handler-uk-full",language:"uk",command:"on",priority:100,template:{format:"\u043F\u0440\u0438 {event} \u043D\u0430 {source}",tokens:[{type:"literal",value:"\u043F\u0440\u0438",alternatives:["\u043A\u043E\u043B\u0438"]},{type:"role",role:"event"},{type:"group",optional:!0,tokens:[{type:"literal",value:"\u043D\u0430",alternatives:["\u0432","\u0432\u0456\u0434"]},{type:"role",role:"source"}]}]},extraction:{event:{position:1},source:{marker:"\u043D\u0430",markerAlternatives:["\u0432","\u0432\u0456\u0434"],default:{type:"reference",value:"me"}}}},{id:"event-handler-uk-simple",language:"uk",command:"on",priority:90,template:{format:"\u043F\u0440\u0438 {event}",tokens:[{type:"literal",value:"\u043F\u0440\u0438",alternatives:["\u043A\u043E\u043B\u0438"]},{type:"role",role:"event"}]},extraction:{event:{position:1},source:{default:{type:"reference",value:"me"}}}}]}function Lp(){return[{id:"event-handler-vi-full",language:"vi",command:"on",priority:100,template:{format:"khi {event} tr\xEAn {source}",tokens:[{type:"literal",value:"khi",alternatives:["l\xFAc","tr\xEAn"]},{type:"role",role:"event"},{type:"group",optional:!0,tokens:[{type:"literal",value:"tr\xEAn",alternatives:["t\u1EA1i"]},{type:"role",role:"source"}]}]},extraction:{event:{position:1},source:{marker:"tr\xEAn",markerAlternatives:["t\u1EA1i"],default:{type:"reference",value:"me"}}}},{id:"event-handler-vi-simple",language:"vi",command:"on",priority:90,template:{format:"khi {event}",tokens:[{type:"literal",value:"khi",alternatives:["l\xFAc","tr\xEAn"]},{type:"role",role:"event"}]},extraction:{event:{position:1},source:{default:{type:"reference",value:"me"}}}}]}function Cp(){return[{id:"event-zh-temporal-source",language:"zh",command:"on",priority:115,template:{format:"{event} \u7684\u65F6\u5019 \u4ECE {source} {body}",tokens:[{type:"role",role:"event"},{type:"literal",value:"\u7684\u65F6\u5019",alternatives:["\u65F6\u5019","\u65F6"]},{type:"literal",value:"\u4ECE",alternatives:["\u5728"]},{type:"role",role:"source"}]},extraction:{event:{position:0},source:{marker:"\u4ECE",markerAlternatives:["\u5728"]}}},{id:"event-zh-source",language:"zh",command:"on",priority:110,template:{format:"\u5F53 {event} \u4ECE {source} {body}",tokens:[{type:"literal",value:"\u5F53"},{type:"role",role:"event"},{type:"literal",value:"\u4ECE",alternatives:["\u5728"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"\u4ECE",markerAlternatives:["\u5728"]}}},{id:"event-zh-immediate",language:"zh",command:"on",priority:108,template:{format:"\u4E00 {event} \u5C31 {body}",tokens:[{type:"literal",value:"\u4E00"},{type:"role",role:"event"},{type:"literal",value:"\u5C31"}]},extraction:{event:{position:1}}},{id:"event-zh-temporal",language:"zh",command:"on",priority:105,template:{format:"{event} \u7684\u65F6\u5019 {body}",tokens:[{type:"role",role:"event"},{type:"literal",value:"\u7684\u65F6\u5019",alternatives:["\u65F6\u5019","\u65F6"]}]},extraction:{event:{position:0}}},{id:"event-zh-whenever",language:"zh",command:"on",priority:103,template:{format:"\u6BCF\u5F53 {event} {body}",tokens:[{type:"literal",value:"\u6BCF\u5F53",alternatives:["\u6BCF\u6B21"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-zh-circumfix",language:"zh",command:"on",priority:106,template:{format:"\u5F53 {event} \u65F6 {body}",tokens:[{type:"literal",value:"\u5F53"},{type:"role",role:"event"},{type:"literal",value:"\u65F6",alternatives:["\u7684\u65F6\u5019","\u65F6\u5019"]}]},extraction:{event:{position:1}}},{id:"event-zh-standard",language:"zh",command:"on",priority:100,template:{format:"\u5F53 {event} {body}",tokens:[{type:"literal",value:"\u5F53"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-zh-completion",language:"zh",command:"on",priority:95,template:{format:"{event} \u4E86 {body}",tokens:[{type:"role",role:"event"},{type:"literal",value:"\u4E86"}]},extraction:{event:{position:0}}},{id:"event-zh-conditional",language:"zh",command:"on",priority:90,template:{format:"\u5982\u679C {event} {body}",tokens:[{type:"literal",value:"\u5982\u679C",alternatives:["\u82E5","\u5047\u5982"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function Rp(){return[{id:"event-ja-when",language:"ja",command:"on",priority:95,template:{format:"\u3068\u304D {event} {body}",tokens:[{type:"literal",value:"\u3068\u304D",alternatives:["\u6642","\u3068\u304D\u306B"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function Np(){return[{id:"event-tr-when",language:"tr",command:"on",priority:95,template:{format:"iken {event} {body}",tokens:[{type:"literal",value:"iken",alternatives:["durumunda","oldu\u011Funda"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function Ap(){return[...nn({lang:"ar",verb:"\u0636\u0639",verbAlts:["\u0627\u062C\u0639\u0644"],eventMarker:"\u0639\u0646\u062F",eventMarkerAlts:["\u0641\u064A","\u0644\u062F\u0649","\u0639\u0646\u062F\u0645\u0627","\u062D\u064A\u0646","\u062D\u064A\u0646\u0645\u0627","\u0644\u0645\u0651\u0627","\u0644\u0645\u0627"],before:"\u0642\u0628\u0644",after:"\u0628\u0639\u062F",order:"verb-first"}),{id:"event-ar-when",language:"ar",command:"on",priority:95,template:{format:"\u0639\u0646\u062F\u0645\u0627 {event} {body}",tokens:[{type:"literal",value:"\u0639\u0646\u062F\u0645\u0627",alternatives:["\u062D\u064A\u0646","\u0644\u0645\u0651\u0627"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function Mp(){return[{id:"event-he-when",language:"he",command:"on",priority:95,template:{format:"\u05DB\u05D0\u05E9\u05E8 {event} {body}",tokens:[{type:"literal",value:"\u05DB\u05D0\u05E9\u05E8",alternatives:["\u05DB\u05E9"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function Ri(n){switch(n){case"bn":return dp();case"de":return up();case"en":return mp();case"es":return fp();case"fr":return yp();case"hi":return gp();case"id":return hp();case"it":return vp();case"ms":return kp();case"pl":return xp();case"pt":return bp();case"qu":return Sp();case"ru":return wp();case"sw":return zp();case"th":return Tp();case"tl":return Ep();case"uk":return Pp();case"vi":return Lp();case"zh":return Cp();case"ja":return Rp();case"tr":return Np();case"ar":return Ap();case"he":return Mp();default:return[]}}var pr=class{render(e,t){if(e.kind==="compound")return this.renderCompound(e,t);if(e.kind==="behavior")return this.renderBehavior(e,t);if(e.kind==="def")return this.renderDef(e,t);let r=wr(t,e.action);if(r.length===0)return this.renderExplicit(e);let i=this.findBestPattern(e,r);return i?this.renderWithPattern(e,i):this.renderExplicit(e)}renderCompound(e,t){if(e.statements.length>1&&e.statements.every(a=>a.kind==="event-handler")){let a=this.keyword(t,"end"),s=[];for(let o of e.statements)s.push(this.render(o,t),a);return s.join(`
2
+ `?(r++,i=1):i++,f}function l(){for(;t<n.length&&/\s/.test(n[t]);)o()}function c(f){let y="";for(;t<n.length&&f(n[t]);)y+=o();return y}function d(f){let y=f;for(o();t<n.length&&n[t]!==f;)n[t]==="\\"&&t+1<n.length&&(y+=o()),y+=o();return t<n.length&&(y+=o()),y}function p(){let f="`";for(o();t<n.length&&n[t]!=="`";)n[t]==="\\"&&t+1<n.length&&(f+=o()),f+=o();return t<n.length&&(f+=o()),f}function u(){let f="<";for(o();t<n.length&&(f+=o(),!f.endsWith("/>")););return f}function m(f,y,g){return{type:f,value:y,start:g,end:t,line:r,column:i-y.length}}for(;t<n.length&&(l(),!(t>=n.length));){let f=t,y=s();if(y==="'"&&s(1)==="s"&&!/\w/.test(s(2))){o(),o(),e.push(m("POSSESSIVE","'s",f));continue}if(y==='"'||y==="'"){let g=d(y);e.push(m("STRING",g,f));continue}if(y==="`"){let g=p();e.push(m("TEMPLATE_LITERAL",g,f));continue}if(y==="<"&&/[a-zA-Z.#\[]/.test(s(1))){let g=u();e.push(m("QUERY_SELECTOR",g,f));continue}if(y==="#"&&a()){o();let g=c(h=>/[\w-]/.test(h));e.push(m("ID_SELECTOR","#"+g,f));continue}if(y==="."&&/[a-zA-Z_-]/.test(s(1))&&a()){o();let g=c(h=>/[\w-]/.test(h));e.push(m("CLASS_SELECTOR","."+g,f));continue}if(y==="@"&&/[a-zA-Z_]/.test(s(1))){o();let g=c(h=>/[\w-]/.test(h));e.push(m("ATTRIBUTE_REF","@"+g,f));continue}if(y==="["&&a()){let g=s(1);if(g==="@"||/[a-zA-Z]/.test(g)){let h="";for(h+=o();t<n.length&&n[t]!=="]";)n[t]==='"'||n[t]==="'"?h+=d(n[t]):h+=o();t<n.length&&(h+=o()),e.push(m("ATTRIBUTE_SELECTOR",h,f));continue}}if(y==="["){o(),e.push(m("LBRACKET","[",f));continue}if(y==="]"){o(),e.push(m("RBRACKET","]",f));continue}if(/\d/.test(y)){let g=c(z=>/[\d.]/.test(z)),h=t,b=c(z=>/[a-zA-Z]/.test(z));ua.has(b)?e.push(m("TIME_EXPRESSION",g+b,f)):(t=h,e.push(m("NUMBER",g,f)));continue}if(y==="("){o(),e.push(m("LPAREN","(",f));continue}if(y===")"){o(),e.push(m("RPAREN",")",f));continue}if(y==="{"){o(),e.push(m("LBRACE","{",f));continue}if(y==="}"){o(),e.push(m("RBRACE","}",f));continue}if(y===","){o(),e.push(m("COMMA",",",f));continue}if(y===":"){o(),e.push(m("COLON",":",f));continue}if(y==="."){o(),e.push(m("DOT",".",f));continue}if(y==="+"||y==="-"||y==="*"||y==="/"||y==="%"){o(),e.push(m("OPERATOR",y,f));continue}if(y==="="||y==="!"||y==="<"||y===">"){let g=o();s()==="="&&(g+=o()),e.push(m("COMPARISON",g,f));continue}if(/[a-zA-Z_$]/.test(y)){let g=c(b=>/[\w$]/.test(b)),h=g.toLowerCase();sa.has(h)?e.push(m("CONTEXT_VAR",g,f)):la.has(h)?e.push(m("LOGICAL",g,f)):ca.has(h)?e.push(m("BOOLEAN",g,f)):e.push(m("IDENTIFIER",g,f));continue}o()}return e.push(m("EOF","",t)),e}var ma=new Set(["my","its","your"]),fa=new Set(["is","matches","match","contains","in","exists","does"]),ya=new Set(["next","previous","closest","first","last"]),Ct=class{constructor(){this.tokens=[];this.current=0}parse(e){try{return this.tokens=xn(e),this.current=0,this.isAtEnd()?{success:!1,error:"Empty expression"}:{success:!0,node:this.parseExpression(),consumed:this.current}}catch(t){return{success:!1,error:t instanceof Error?t.message:"Parse error"}}}peek(){return this.tokens[this.current]??{type:"EOF",value:"",start:0,end:0}}peekAt(e){return this.tokens[this.current+e]??{type:"EOF",value:"",start:0,end:0}}previous(){return this.tokens[this.current-1]??{type:"EOF",value:"",start:0,end:0}}isAtEnd(){return this.peek().type==="EOF"}advance(){return this.isAtEnd()||this.current++,this.previous()}check(e){return this.peek().type===e}checkValue(e){return this.peek().value.toLowerCase()===e.toLowerCase()}match(...e){for(let t of e)if(this.check(t))return this.advance(),!0;return!1}parseExpression(){return this.parseOr()}parseOr(){let e=this.parseAnd();for(;this.checkValue("or");){let t=this.advance().value,r=this.parseAnd();e=this.createBinaryExpression(t,e,r)}return e}parseAnd(){let e=this.parseEquality();for(;this.checkValue("and");){let t=this.advance().value,r=this.parseEquality();e=this.createBinaryExpression(t,e,r)}return e}parseEquality(){let e=this.parseComparison();for(;;){let t;if(this.match("COMPARISON"))t=this.previous().value;else if(this.checkValue("is")||this.checkValue("matches")||this.checkValue("match")||this.checkValue("contains")||this.checkValue("in")){let i=this.advance().value;t=i.toLowerCase()==="match"?"matches":i}else break;if(t.toLowerCase()==="is"){if(this.checkValue("empty")){this.advance(),e=this.createPostfixUnary("is empty",e);continue}if(this.checkValue("not")&&this.peekAt(1).value.toLowerCase()==="empty"){this.advance(),this.advance(),e=this.createPostfixUnary("is not empty",e);continue}}let r=this.parseComparison();e=this.createBinaryExpression(t,e,r)}return e}parseComparison(){let e=this.parseAddition();for(;this.check("COMPARISON");){let t=this.advance().value,r=this.parseAddition();e=this.createBinaryExpression(t,e,r)}return e}parseAddition(){let e=this.parseMultiplication();for(;this.peek().value==="+"||this.peek().value==="-";){let t=this.advance().value,r=this.parseMultiplication();e=this.createBinaryExpression(t,e,r)}return e}parseMultiplication(){let e=this.parseUnary();for(;this.peek().value==="*"||this.peek().value==="/"||this.peek().value==="%";){let t=this.advance().value,r=this.parseUnary();e=this.createBinaryExpression(t,e,r)}return e}parseUnary(){if(this.checkValue("not")||this.checkValue("no")||this.peek().value==="-"){let e=this.advance().value,t=this.parseUnary();return this.createUnaryExpression(e,t)}return this.parsePostfix()}parsePostfix(){let e=this.parsePrimary();for(;;)if(this.match("DOT"))if(this.check("IDENTIFIER")||this.check("CONTEXT_VAR")){let t=this.advance().value;e=this.createPropertyAccess(e,t)}else break;else if(this.match("POSSESSIVE"))if(this.check("IDENTIFIER")||this.check("CONTEXT_VAR")){let t=this.advance().value;e=this.createPossessiveExpression(e,t)}else break;else if(this.match("LPAREN")){let t=this.parseArguments();e=this.createCallExpression(e,t)}else if(this.match("LBRACKET")){let t=this.parseExpression();if(!this.match("RBRACKET"))throw new Error("Expected ] after index");e=this.createPropertyAccess(e,t)}else if(e.type==="contextReference"&&ma.has(e.contextType??"")&&this.check("IDENTIFIER")&&!fa.has(this.peek().value.toLowerCase())){let t=this.advance().value;e=this.createPropertyAccess(e,t)}else if(this.checkValue("exists")&&this.peekAt(1).type!=="LPAREN")this.advance(),e=this.createPostfixUnary("exists",e);else break;return e}parsePrimary(){let e=this.peek();if(this.match("NUMBER"))return this.createLiteral(parseFloat(e.value),"number",e);if(this.match("STRING")){let t=e.value.slice(1,-1);return this.createLiteral(t,"string",e)}if(this.match("BOOLEAN")){let t=e.value==="true"?!0:e.value==="false"?!1:e.value==="null"?null:void 0,r={true:"boolean",false:"boolean",null:"null",undefined:"undefined"};return this.createLiteral(t,r[e.value]??"string",e)}if(this.match("TEMPLATE_LITERAL"))return{type:"templateLiteral",value:e.value,start:e.start,end:e.end,line:e.line,column:e.column};if(this.match("TIME_EXPRESSION"))return this.parseTimeExpression(e);if(this.match("ID_SELECTOR"))return this.createSelector(e.value,"id",e);if(this.match("CLASS_SELECTOR"))return this.createSelector(e.value,"class",e);if(this.match("ATTRIBUTE_SELECTOR"))return this.createSelector(e.value,"attribute",e);if(this.match("ATTRIBUTE_REF"))return{type:"attributeAccess",attributeName:e.value.slice(1),start:e.start,end:e.end};if(this.match("QUERY_SELECTOR")){let t=e.value.slice(1,-2);return this.createSelector(t,"query",e)}if(this.match("CONTEXT_VAR"))return this.createContextReference(e.value,e);if(this.match("IDENTIFIER")){if(ya.has(e.value.toLowerCase())&&(this.check("CLASS_SELECTOR")||this.check("ID_SELECTOR")||this.check("QUERY_SELECTOR"))){let t=this.advance(),r=t.type==="QUERY_SELECTOR"?t.value.slice(1,-2):t.value,i=t.type==="CLASS_SELECTOR"?"class":t.type==="ID_SELECTOR"?"id":"query";return{type:"callExpression",callee:this.createIdentifier(e.value,e),arguments:[this.createSelector(r,i,t)],start:e.start,end:t.end}}return this.createIdentifier(e.value,e)}if(this.match("LPAREN")){let t=this.parseExpression();if(!this.match("RPAREN"))throw new Error("Expected ) after expression");return t}if(this.match("LBRACKET"))return this.parseArrayLiteral();if(this.match("LBRACE"))return this.parseObjectLiteral();throw new Error(`Unexpected token: ${e.value}`)}parseArguments(){let e=[];if(!this.check("RPAREN"))do e.push(this.parseExpression());while(this.match("COMMA"));if(!this.match("RPAREN"))throw new Error("Expected ) after arguments");return e}parseArrayLiteral(){let e=[],t=this.previous().start;if(!this.check("RBRACKET"))do e.push(this.parseExpression());while(this.match("COMMA"));if(!this.match("RBRACKET"))throw new Error("Expected ] after array elements");return{type:"arrayLiteral",elements:e,start:t,end:this.previous().end}}parseObjectLiteral(){let e=[],t=this.previous().start;if(!this.check("RBRACE"))do{let r;if(this.check("STRING"))r=this.advance().value.slice(1,-1);else if(this.check("IDENTIFIER"))r=this.advance().value;else throw new Error("Expected property name");if(!this.match("COLON"))throw new Error("Expected : after property name");let i=this.parseExpression();e.push({key:r,value:i})}while(this.match("COMMA"));if(!this.match("RBRACE"))throw new Error("Expected } after object properties");return{type:"objectLiteral",properties:e.map(r=>({type:"objectProperty",key:r.key,value:r.value})),start:t,end:this.previous().end}}parseTimeExpression(e){let t=e.value.match(/^(\d+(?:\.\d+)?)(ms|s|seconds?|milliseconds?|minutes?|hours?)$/i);if(!t)throw new Error(`Invalid time expression: ${e.value}`);let r=parseFloat(t[1]),i=t[2].toLowerCase();return{type:"timeExpression",value:r,unit:i,raw:e.value,start:e.start,end:e.end,line:e.line,column:e.column}}createLiteral(e,t,r){return{type:"literal",value:e,dataType:t,raw:r.value,start:r.start,end:r.end,line:r.line,column:r.column}}createSelector(e,t,r){return{type:"selector",value:e,selector:e,selectorType:t,start:r.start,end:r.end,line:r.line,column:r.column}}createContextReference(e,t){return{type:"contextReference",contextType:e,name:t.value,start:t.start,end:t.end,line:t.line,column:t.column}}createIdentifier(e,t){return{type:"identifier",name:e,start:t.start,end:t.end,line:t.line,column:t.column}}createPropertyAccess(e,t){return{type:"propertyAccess",object:e,property:typeof t=="string"?t:t.type==="identifier"?t.name:"",start:e.start,end:this.previous().end}}createPossessiveExpression(e,t){return{type:"possessiveExpression",object:e,property:t,start:e.start,end:this.previous().end}}createBinaryExpression(e,t,r){return{type:"binaryExpression",operator:e,left:t,right:r,start:t.start,end:r.end}}createUnaryExpression(e,t){return{type:"unaryExpression",operator:e,operand:t,prefix:!0,start:this.previous().start,end:t.end}}createPostfixUnary(e,t){return{type:"unaryExpression",operator:e,operand:t,prefix:!1,start:t.start,end:this.previous().end}}createCallExpression(e,t){return{type:"callExpression",callee:e,arguments:t,start:e.start,end:this.previous().end}}};function yr(n){return new Ct().parse(n)}function ae(n,e){switch(n.type){case"literal":return ga(n);case"selector":return ha(n,e);case"reference":return va(n);case"property-path":return ka(n,e);case"expression":return xa(n);case"flag":return{type:"literal",value:n.enabled};default:let t=n;throw new Error(`Unknown semantic value type: ${t.type}`)}}function ga(n){let e={type:"literal",value:n.value};return n.dataType?{...e,dataType:n.dataType}:e}function ha(n,e){return n.value.startsWith("@")&&/^[a-zA-Z_]/.test(n.value.slice(1))?{type:"attributeAccess",attributeName:n.value.slice(1)}:(e&&n.value.startsWith("*")&&/^[a-zA-Z-]/.test(n.value.slice(1))&&e.push(`Converted '${n.value}' to a CSS selector, but it looks like a CSS property name. CSS properties in commands like 'transition' should be literal strings, not selectors. Consider using expectedTypes: ['literal'] instead of ['literal', 'selector'] in the command schema.`),n.value.startsWith("<")?{type:"selector",value:n.value,selector:n.value,selectorType:n.selectorKind,raw:n.value}:{type:"selector",value:n.value,selector:n.value,selectorType:n.selectorKind})}function va(n){return{type:"contextReference",contextType:n.value,name:n.value}}function ka(n,e){return{type:"propertyAccess",object:ae(n.object,e),property:n.property}}function xa(n){let e=yr(n.raw);return!e.success||!e.node?{type:"identifier",name:n.raw}:e.node}function gr(n,e){return n.roles.get(e)}function w(n,e,t){let r=gr(n,e);return r?ae(r,t):void 0}function C(n,e=[],t,r={}){let i={type:"command",name:n,args:e};return t&&Object.keys(t).length>0&&(i.modifiers=t),r.isBlocking&&(i.isBlocking=r.isBlocking),r.implicitTarget&&(i.implicitTarget=r.implicitTarget),r.semanticRoles&&Object.keys(r.semanticRoles).length>0&&(i.semanticRoles=r.semanticRoles),i}var ba={action:"toggle",toAST(n,e){let t=w(n,"patient"),r=w(n,"destination"),i=w(n,"duration"),a=t?[t]:[],s={};return r&&(s.on=r),i&&(s.for=i),C("toggle",a,s)}},Sa={action:"add",toAST(n,e){let t=w(n,"patient"),r=w(n,"destination"),i=t?[t]:[],a={};return r&&(a.to=r),C("add",i,a)}},wa={action:"remove",toAST(n,e){let t=w(n,"patient"),r=w(n,"source"),i=t?[t]:[],a={};return r&&(a.from=r),C("remove",i,a)}},za={action:"set",toAST(n,e){let t=w(n,"destination"),r=w(n,"patient"),i=w(n,"scope"),a=[],s={};return t&&a.push(t),r&&(s.to=r),i&&(s.on=i),C("set",a,s)}},Ta={action:"show",toAST(n,e){let t=w(n,"destination"),r=w(n,"patient"),i=w(n,"duration"),a=[],s={},o=t??r;return o&&a.push(o),i&&(s.with=i),C("show",a,s)}},Ea={action:"hide",toAST(n,e){let t=w(n,"destination"),r=w(n,"patient"),i=w(n,"duration"),a=[],s={},o=t??r;return o&&a.push(o),i&&(s.with=i),C("hide",a,s)}},Pa={action:"increment",toAST(n,e){let t=w(n,"destination"),r=w(n,"patient"),i=w(n,"quantity"),a=[],s={},o=t??r;return o&&a.push(o),i&&(s.by=i),C("increment",a,s)}},La={action:"decrement",toAST(n,e){let t=w(n,"destination"),r=w(n,"patient"),i=w(n,"quantity"),a=[],s={},o=t??r;return o&&a.push(o),i&&(s.by=i),C("decrement",a,s)}},Ca={action:"wait",toAST(n,e){let t=w(n,"event");if(t){let a={for:t},s=w(n,"source");return s&&(a.from=s),C("wait",[],a,{isBlocking:!0})}let r=w(n,"duration");return C("wait",r?[r]:[],void 0,{isBlocking:!0})}},Ra={action:"log",toAST(n,e){let t=w(n,"patient"),r=[];return t&&r.push(t),C("log",r)}},Na={action:"put",toAST(n,e){let t=w(n,"patient"),r=w(n,"destination"),i=gr(n,"manner")??gr(n,"method"),a=t?[t]:[],s={};if(r){let o=i?.type==="literal"?String(i.value):"into";s[o]=r}return C("put",a,s)}},Aa={action:"fetch",toAST(n,e){let t=w(n,"source"),r=w(n,"method"),i=w(n,"responseType"),a=w(n,"patient"),s=t?[t]:[],o={};return r&&(o.with=r),i&&(o.as=i),a&&(o.body=a),C("fetch",s,o,{isBlocking:!0})}},Ma={action:"append",toAST(n,e){let t=w(n,"patient"),r=w(n,"destination"),i=t?[t]:[],a={};return r&&(a.to=r),C("append",i,a)}},Oa={action:"prepend",toAST(n,e){let t=w(n,"patient"),r=w(n,"destination"),i=t?[t]:[],a={};return r&&(a.to=r),C("prepend",i,a)}},ja={action:"trigger",toAST(n,e){let t=w(n,"event"),r=w(n,"destination"),i=t?[t]:[],a={};return r&&(a.on=r),C("trigger",i,a)}},Ia={action:"send",toAST(n,e){let t=w(n,"event"),r=w(n,"destination"),i=w(n,"patient"),a=t?[t]:[],s={};return r&&(s.to=r),i&&(s.detail=i),C("send",a,s)}},Wa={action:"go",toAST(n,e){let t=w(n,"source"),r=w(n,"destination"),i=[],a={};return t&&i.push(t),r&&(a.to=r),C("go",i,a)}},Va={action:"transition",toAST(n,e){let t=w(n,"patient"),r=w(n,"goal"),i=w(n,"duration"),a=w(n,"destination"),s=t?[t]:[],o={};return r&&(o.to=r),i&&(o.over=i),a&&(o.on=a),C("transition",s,o)}},_a={action:"focus",toAST(n,e){let t=w(n,"destination"),r=w(n,"patient"),i=[],a={},s=t??r;return s&&i.push(s),C("focus",i,a)}},$a={action:"blur",toAST(n,e){let t=w(n,"destination"),r=w(n,"patient"),i=[],a=t??r;return a&&i.push(a),C("blur",i)}},Ka={action:"get",toAST(n,e){let t=w(n,"source"),r=w(n,"patient"),i=[],a=t??r;return a&&i.push(a),C("get",i)}},qa={action:"take",toAST(n,e){let t=w(n,"patient"),r=w(n,"source"),i=t?[t]:[],a={};return r&&(a.from=r),C("take",i,a)}},Ba={action:"call",toAST(n,e){let t=w(n,"patient");return C("call",t?[t]:[])}},Da={action:"return",toAST(n,e){let t=w(n,"patient");return C("return",t?[t]:[])}},Ha={action:"halt",toAST(n,e){let t=n.roles.get("patient");return t?C("halt",[ae(t)]):C("halt",[])}},Fa={action:"throw",toAST(n,e){let t=w(n,"patient");return C("throw",t?[t]:[])}},Ua={action:"settle",toAST(n,e){let t=w(n,"destination"),r=w(n,"patient"),i=[],a=t??r;return a&&i.push(a),C("settle",i,void 0,{isBlocking:!0})}},Ga={action:"swap",toAST(n,e){let t=w(n,"patient"),r=w(n,"source"),i=w(n,"destination"),a=w(n,"style"),s=[],o={};return t&&s.push(t),r&&s.push(r),i&&(o.on=i),a&&(o.with=a),C("swap",s,o)}},Ya={action:"morph",toAST(n,e){let t=w(n,"source"),r=w(n,"destination"),i=w(n,"patient"),a=[],s={},o=t??r;return o&&a.push(o),i&&(s.on=i),C("morph",a,s)}},Xa={action:"clone",toAST(n,e){let t=w(n,"source"),r=w(n,"destination"),i=w(n,"patient"),a=[],s={},o=t??i;return o&&a.push(o),r&&(s.into=r),C("clone",a,s)}},Za={action:"make",toAST(n,e){let t=w(n,"patient");return C("make",t?[t]:[])}},Ja={action:"measure",toAST(n,e){let t=w(n,"patient"),r=w(n,"destination"),i=w(n,"source"),a=[],s={};t&&a.push(t);let o=r??i;return o&&(s.of=o),C("measure",a,s)}},Qa={action:"tell",toAST(n,e){let t=w(n,"destination"),r=w(n,"patient"),i=[],a=t??r;return a&&i.push(a),C("tell",i)}},eo={action:"js",toAST(n,e){let t=w(n,"patient");return C("js",t?[t]:[])}},to={action:"async",toAST(n,e){return C("async",[])}},ro={action:"if",toAST(n,e){let t=w(n,"condition");return C("if",t?[t]:[])}},no={action:"unless",toAST(n,e){let t=w(n,"condition");return C("unless",t?[t]:[])}},io={action:"repeat",toAST(n,e){let t=w(n,"quantity"),r=w(n,"patient"),i=[],a=t??r;return a&&i.push(a),C("repeat",i)}},ao={action:"for",toAST(n,e){let t=w(n,"patient"),r=w(n,"source"),i=t?[t]:[],a={};return r&&(a.in=r),C("for",i,a)}},oo={action:"while",toAST(n,e){let t=w(n,"condition");return C("while",t?[t]:[])}},so={action:"continue",toAST(n,e){return C("continue",[])}},lo={action:"default",toAST(n,e){let t=w(n,"patient"),r=w(n,"source"),i=t?[t]:[],a={};return r&&(a.to=r),C("default",i,a)}},co={action:"init",toAST(n,e){return C("init",[])}},po={action:"behavior",toAST(n,e){let t=w(n,"patient");return C("behavior",t?[t]:[])}},uo={action:"install",toAST(n,e){let t=w(n,"patient"),r=w(n,"destination"),i=t?[t]:[],a={};return r&&(a.on=r),C("install",i,a)}},mo={action:"on",toAST(n,e){let t=w(n,"event"),r=w(n,"source"),i=t?[t]:[],a={};return r&&(a.from=r),C("on",i,a)}},bn=new Map([["toggle",ba],["add",Sa],["remove",wa],["set",za],["show",Ta],["hide",Ea],["increment",Pa],["decrement",La],["wait",Ca],["log",Ra],["put",Na],["fetch",Aa],["append",Ma],["prepend",Oa],["get",Ka],["take",qa],["trigger",ja],["send",Ia],["on",mo],["go",Wa],["transition",Va],["focus",_a],["blur",$a],["call",Ba],["return",Da],["halt",Ha],["throw",Fa],["settle",Ua],["swap",Ga],["morph",Ya],["clone",Xa],["measure",Ja],["make",Za],["tell",Qa],["default",lo],["js",eo],["async",to],["if",ro],["unless",no],["repeat",io],["for",ao],["while",oo],["continue",so],["init",co],["behavior",po],["install",uo]]);function ot(n){return bn.get(n)}function hr(n){bn.set(n.action,n)}var st=class{constructor(e={}){this.warnings=[]}build(e){switch(e.kind){case"command":return this.buildCommand(e);case"event-handler":return this.buildEventHandler(e);case"conditional":return this.buildConditional(e);case"compound":return this.buildCompound(e);case"loop":return this.buildLoop(e);case"behavior":return this.buildBehavior(e);case"def":return this.buildDef(e);default:throw new Error(`Unknown semantic node kind: ${e.kind}`)}}buildBehavior(e){let t=e.eventHandlers.map(i=>this.buildEventHandler(i)),r={type:"behavior",name:e.name,parameters:[...e.parameters],eventHandlers:t};return e.initBlock&&e.initBlock.length>0&&(r.initBlock={type:"initBlock",commands:e.initBlock.map(i=>this.build(i))}),r}buildDef(e){return{type:"def",name:e.name,params:[...e.parameters],body:e.body.map(t=>this.build(t))}}buildCommand(e){let t=ot(e.action),r;if(t){let i=t.toAST(e,this);if("ast"in i&&"warnings"in i){let a=i;this.warnings.push(...a.warnings),r=a.ast}else r=i}else r=this.buildGenericCommand(e);if(e.roles&&e.roles.size>0){let i={};for(let[a,s]of e.roles)i[a]=ae(s);Object.keys(i).length>0&&(r.semanticRoles=i)}return r}buildGenericCommand(e){let t=[],r={},i=["patient","source","quantity"],a=["destination","duration","method","style"];for(let o of i){let l=e.roles.get(o);l&&t.push(ae(l))}for(let o of a){let l=e.roles.get(o);if(l){let c=this.roleToModifierKey(o);r[c]=ae(l)}}let s={type:"command",name:e.action,args:t};return Object.keys(r).length>0?{...s,modifiers:r}:s}roleToModifierKey(e){return{destination:"on",duration:"for",source:"from",condition:"if",method:"via",style:"with"}[e]??e}buildEventHandler(e){let t=e.roles.get("event"),r="click",i,a=t?.type==="literal"?String(t.value):t?.type==="expression"?t.raw:t?.type==="reference"?t.value:void 0;a!==void 0&&(a.includes("|")||a.includes(" or ")?(i=a.split(/\s+or\s+|\|/).map(h=>h.trim()),r=i[0]):r=a);let s=e.body.map(h=>this.build(h)),o=e.roles.get("source"),l,c;o?.type==="selector"?(l=o.value,c=o.value):o?.type==="reference"?c=o.value:o?.type==="literal"&&(c=String(o.value));let d=e.roles.get("condition"),p=d?ae(d):void 0,u=e.roles.get("destination"),m=u?ae(u):void 0,f=e.eventModifiers,y=l;if(f?.from){let h=f.from;h.type==="selector"&&!l&&(y=h.value)}let g=e.parameterNames?[...e.parameterNames]:void 0;return{type:"eventHandler",event:r,commands:s,...i&&i.length>1?{events:i}:{},...y?{selector:y}:{},...c?{target:c}:{},...p?{condition:p}:{},...m?{watchTarget:m}:{},...g&&g.length>0?{args:g,params:g}:{}}}buildConditional(e){let t=e.roles.get("condition");if(!t)throw new Error("Conditional node missing condition");let r=ae(t),i=e.thenBranch.map(o=>this.build(o)),a=e.elseBranch?.map(o=>this.build(o)),s=[r,{type:"block",commands:i}];return a&&a.length>0&&s.push({type:"block",commands:a}),{type:"command",name:"if",args:s}}buildCompound(e){let t=e.statements.map(i=>this.build(i));return t.length===1?t[0]:t.length===0?{type:"block",commands:[]}:t.every(i=>i.type==="eventHandler")?{type:"Program",statements:t}:{type:"CommandSequence",commands:t}}buildLoop(e){let t=e.body.map(i=>this.build(i)),r=[{type:"identifier",name:e.loopVariant}];switch(e.loopVariant){case"times":{let i=e.roles.get("quantity");i&&r.push(ae(i));break}case"for":{e.loopVariable&&r.push({type:"string",value:e.loopVariable});let i=e.roles.get("source");i&&r.push(ae(i));break}case"while":case"until":{let i=e.roles.get("condition");i&&r.push(ae(i));break}case"forever":break}return r.push({type:"block",commands:t}),{type:"command",name:"repeat",args:r}}buildBlock(e){return{type:"block",commands:e.map(r=>this.build(r))}}};function Sn(n){let e=new st;return{ast:e.build(n),warnings:e.warnings}}var Ae=new Map,Me=new Map,Ve=new Map;var wn=null;function zn(n,e){let t={...n};for(let r of Object.keys(e)){let i=e[r],a=n[r];i!==void 0&&(typeof i=="object"&&i!==null&&!Array.isArray(i)&&typeof a=="object"&&a!==null&&!Array.isArray(a)?t[r]=zn(a,i):t[r]=i)}return t}function Tn(n,e){return zn(n,e)}function kr(n){if(!n.extends)return n;let e=Me.get(n.extends);if(!e)return console.warn(`[Registry] Profile '${n.code}' extends '${n.extends}' but base is not registered. Make sure to import the base language before the variant.`),n;let t=kr(e);return Tn(t,n)}function D(n,e,t){Ae.set(n,e),Me.set(n,t),Ve.delete(n)}var vr=new Map;function xr(n,e){vr.set(n,e),Ve.delete(n)}function _e(n){return n.split("-")[0]}function $e(n){return n.includes("-")}function Rt(n){let e=Ae.get(n);if(!e&&$e(n)){let t=_e(n);e=Ae.get(t)}if(!e){let t=Array.from(Ae.keys()).join(", ");throw new Error(`Language '${n}' is not registered. Registered languages: ${t||"none"}. Import the language module first: import '@lokascript/semantic/languages/${n}';`)}return e}function Nt(n){let e=Me.get(n);if(!e&&$e(n)){let t=_e(n);e=Me.get(t)}if(!e){let t=Array.from(Me.keys()).join(", ");throw new Error(`Language profile '${n}' is not registered. Registered languages: ${t||"none"}. Import the language module first: import '@lokascript/semantic/languages/${n}';`)}return kr(e)}function I(n){let e=Me.get(n);return!e&&$e(n)&&(e=Me.get(_e(n))),e?kr(e):void 0}function br(){return Array.from(Ae.keys())}function Sr(n){return Ae.has(n)?!0:$e(n)?Ae.has(_e(n)):!1}function En(n,e){return Rt(e).tokenize(n)}function le(n){let e=Ve.get(n);if(!e&&$e(n)&&(e=Ve.get(_e(n))),e)return e;let t=vr.get(n);if(!t&&$e(n)&&(t=vr.get(_e(n))),t)return Ve.set(n,t),t;if(!wn)throw new Error(`No patterns registered for language '${n}'. Either import the language module or set a pattern generator.`);let r=Nt(n),i=wn(r);return Ve.set(n,i),i}function wr(n,e){return le(n).filter(t=>t.command===e).sort((t,r)=>r.priority-t.priority)}var Ke={code:"ar",name:"Arabic",nativeName:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",regions:["priority"],direction:"rtl",script:"arabic",wordOrder:"VSO",markingStrategy:"preposition",usesSpaces:!0,verb:{position:"start",subjectDrop:!0},references:{me:"\u0623\u0646\u0627",it:"\u0647\u0648",you:"\u0623\u0646\u062A",result:"\u0627\u0644\u0646\u062A\u064A\u062C\u0629",event:"\u0627\u0644\u062D\u062F\u062B",target:"\u0627\u0644\u0647\u062F\u0641",body:"\u062C\u0633\u0645"},possessive:{marker:"",markerPosition:"after-object",usePossessiveAdjectives:!0,specialForms:{me:"\u0644\u064A",it:"\u0644\u0647",you:"\u0644\u0643"},keywords:{\u0644\u064A:"me",\u0644\u0643:"you",\u0644\u0647:"it",\u0644\u0647\u0627:"it"}},roleMarkers:{destination:{primary:"\u0639\u0644\u0649",alternatives:["\u0641\u064A","\u0625\u0644\u0649","\u0628","\u0642\u0628\u0644","\u0628\u0639\u062F"],position:"before"},source:{primary:"\u0645\u0646",position:"before"},patient:{primary:"",position:"before"},style:{primary:"\u0628\u0640",alternatives:["\u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645"],position:"before"}},keywords:{toggle:{primary:"\u0628\u062F\u0651\u0644",alternatives:["\u0628\u062F\u0644","\u063A\u064A\u0651\u0631","\u063A\u064A\u0631"],normalized:"toggle"},add:{primary:"\u0623\u0636\u0641",alternatives:["\u0627\u0636\u0641"],normalized:"add"},remove:{primary:"\u0627\u062D\u0630\u0641",alternatives:["\u0623\u0632\u0644","\u0627\u0645\u0633\u062D"],normalized:"remove"},put:{primary:"\u0636\u0639",alternatives:["\u0627\u062C\u0639\u0644"],normalized:"put"},append:{primary:"\u0623\u0644\u062D\u0642",normalized:"append"},prepend:{primary:"\u0633\u0628\u0642",normalized:"prepend"},take:{primary:"\u062E\u0630",normalized:"take"},make:{primary:"\u0627\u0635\u0646\u0639",alternatives:["\u0623\u0646\u0634\u0626"],normalized:"make"},clone:{primary:"\u0627\u0633\u062A\u0646\u0633\u062E",normalized:"clone"},swap:{primary:"\u0627\u0633\u062A\u0628\u062F\u0644",alternatives:["\u062A\u0628\u0627\u062F\u0644"],normalized:"swap"},morph:{primary:"\u062D\u0648\u0651\u0644",normalized:"morph"},set:{primary:"\u0627\u0636\u0628\u0637",alternatives:["\u0639\u064A\u0651\u0646","\u062D\u062F\u062F"],normalized:"set"},get:{primary:"\u0627\u062D\u0635\u0644",normalized:"get"},increment:{primary:"\u0632\u0650\u062F",alternatives:["\u0632\u062F","\u0627\u0631\u0641\u0639"],normalized:"increment"},decrement:{primary:"\u0623\u0646\u0642\u0635",alternatives:["\u0627\u0646\u0642\u0635","\u0642\u0644\u0644"],normalized:"decrement"},log:{primary:"\u0633\u062C\u0644",normalized:"log"},show:{primary:"\u0627\u0638\u0647\u0631",alternatives:["\u0623\u0638\u0647\u0631","\u0627\u0639\u0631\u0636"],normalized:"show"},hide:{primary:"\u0627\u062E\u0641",alternatives:["\u0623\u062E\u0641\u0650","\u0627\u062E\u0641\u064A","\u0623\u062E\u0641"],normalized:"hide"},transition:{primary:"\u0627\u0646\u062A\u0642\u0627\u0644",alternatives:["\u0627\u0646\u062A\u0642\u0644"],normalized:"transition"},on:{primary:"\u0639\u0644\u0649",alternatives:["\u0639\u0646\u062F","\u0644\u062F\u0649","\u062D\u064A\u0646"],normalized:"on"},trigger:{primary:"\u062A\u0634\u063A\u064A\u0644",alternatives:["\u0623\u0637\u0644\u0642","\u0641\u0639\u0651\u0644"],normalized:"trigger"},send:{primary:"\u0623\u0631\u0633\u0644",normalized:"send"},focus:{primary:"\u062A\u0631\u0643\u064A\u0632",alternatives:["\u0631\u0643\u0632"],normalized:"focus"},blur:{primary:"\u0636\u0628\u0627\u0628\u064A\u0629",alternatives:["\u0634\u0648\u0634"],normalized:"blur"},empty:{primary:"\u0625\u0641\u0631\u0627\u063A",alternatives:["\u0641\u0627\u0631\u063A"],normalized:"empty"},open:{primary:"\u0627\u0641\u062A\u062D",normalized:"open"},close:{primary:"\u0623\u063A\u0644\u0642",normalized:"close"},select:{primary:"\u0638\u0644\u0644",normalized:"select"},clear:{primary:"\u0646\u0638\u0651\u0641",normalized:"clear"},reset:{primary:"\u0625\u0639\u0627\u062F\u0629-\u0636\u0628\u0637",alternatives:["\u0623\u0639\u062F-\u062A\u0639\u064A\u064A\u0646"],normalized:"reset"},breakpoint:{primary:"\u0646\u0642\u0637\u0629-\u062A\u0648\u0642\u0641",normalized:"breakpoint"},go:{primary:"\u0627\u0630\u0647\u0628",normalized:"go"},scroll:{primary:"\u0645\u0631\u0631",alternatives:["\u062A\u0645\u0631\u064A\u0631"],normalized:"scroll"},push:{primary:"\u0627\u062F\u0641\u0639",alternatives:["\u062F\u0641\u0639"],normalized:"push"},replace:{primary:"\u0627\u0633\u062A\u0628\u062F\u0644_\u0639\u0646\u0648\u0627\u0646",alternatives:["\u0623\u0639\u062F_\u062A\u0639\u064A\u064A\u0646_\u0639\u0646\u0648\u0627\u0646"],normalized:"replace"},process:{primary:"\u0639\u0627\u0644\u062C",alternatives:["\u0645\u0639\u0627\u0644\u062C\u0629"],normalized:"process"},wait:{primary:"\u0627\u0646\u062A\u0638\u0631",normalized:"wait"},fetch:{primary:"\u0627\u062D\u0636\u0631",alternatives:["\u062C\u0644\u0628"],normalized:"fetch"},settle:{primary:"\u0627\u0633\u062A\u0642\u0631",normalized:"settle"},if:{primary:"\u0625\u0630\u0627",normalized:"if"},unless:{primary:"\u0625\u0644\u0627",normalized:"unless"},when:{primary:"\u0639\u0646\u062F\u0645\u0627",normalized:"when"},where:{primary:"\u0623\u064A\u0646",normalized:"where"},else:{primary:"\u0648\u0625\u0644\u0627",alternatives:["\u062E\u0644\u0627\u0641 \u0630\u0644\u0643"],normalized:"else"},repeat:{primary:"\u0643\u0631\u0631",normalized:"repeat"},for:{primary:"\u0644\u0643\u0644",normalized:"for"},while:{primary:"\u0628\u064A\u0646\u0645\u0627",normalized:"while"},forever:{primary:"forever",normalized:"forever"},continue:{primary:"\u0648\u0627\u0635\u0644",normalized:"continue"},halt:{primary:"\u0623\u0648\u0642\u0641",normalized:"halt"},throw:{primary:"\u0627\u0631\u0645",alternatives:["\u0627\u0631\u0645\u0650"],normalized:"throw"},call:{primary:"\u0627\u0633\u062A\u062F\u0639",alternatives:["\u0646\u0627\u062F\u0650"],normalized:"call"},return:{primary:"\u0627\u0631\u062C\u0639",alternatives:["\u0639\u064F\u062F"],normalized:"return"},then:{primary:"\u062B\u0645",alternatives:["\u0628\u0639\u062F\u0647\u0627","\u062B\u0645\u0651"],normalized:"then"},and:{primary:"\u0648\u0623\u064A\u0636\u0627\u064B",alternatives:["\u0623\u064A\u0636\u0627\u064B"],normalized:"and"},end:{primary:"\u0646\u0647\u0627\u064A\u0629",alternatives:["\u0627\u0646\u062A\u0647\u0649","\u0627\u0644\u0646\u0647\u0627\u064A\u0629"],normalized:"end"},js:{primary:"\u062C\u0627\u0641\u0627\u0633\u0643\u0631\u0628\u062A",alternatives:["js"],normalized:"js"},async:{primary:"\u0645\u062A\u0632\u0627\u0645\u0646",normalized:"async"},tell:{primary:"\u0623\u062E\u0628\u0631",normalized:"tell"},default:{primary:"\u0627\u0641\u062A\u0631\u0627\u0636\u064A",normalized:"default"},init:{primary:"\u062A\u0647\u064A\u0626\u0629",alternatives:["\u0628\u062F\u0621"],normalized:"init"},behavior:{primary:"\u0633\u0644\u0648\u0643",normalized:"behavior"},install:{primary:"\u062A\u062B\u0628\u064A\u062A",alternatives:["\u062B\u0628\u0651\u062A"],normalized:"install"},measure:{primary:"\u0642\u064A\u0627\u0633",alternatives:["\u0642\u0650\u0633","\u0642\u0633"],normalized:"measure"},beep:{primary:"\u0635\u0641\u0651\u0631",normalized:"beep"},break:{primary:"\u062A\u0648\u0642\u0641",normalized:"break"},copy:{primary:"\u0627\u0646\u0633\u062E",normalized:"copy"},exit:{primary:"\u0627\u062E\u0631\u062C",normalized:"exit"},pick:{primary:"\u0627\u062E\u062A\u0631",normalized:"pick"},render:{primary:"\u0627\u0631\u0633\u0645",normalized:"render"},into:{primary:"\u0641\u064A",alternatives:["\u0625\u0644\u0649"],normalized:"into"},before:{primary:"\u0642\u0628\u0644",normalized:"before"},after:{primary:"\u0628\u0639\u062F",normalized:"after"},until:{primary:"\u062D\u062A\u0649",normalized:"until"},event:{primary:"\u062D\u062F\u062B",normalized:"event"},from:{primary:"\u0645\u0646",normalized:"from"},connect:{primary:"\u0627\u062A\u0635\u0644",alternatives:["\u0627\u062A\u0635\u0627\u0644"],normalized:"connect"},stream:{primary:"\u062A\u062F\u0641\u0642",alternatives:["\u0628\u062B"],normalized:"stream"},live:{primary:"\u0645\u0628\u0627\u0634\u0631",alternatives:["\u062D\u064A"],normalized:"live"},socket:{primary:"\u0645\u0642\u0628\u0633",alternatives:["websocket"],normalized:"socket"},bind:{primary:"\u0627\u0631\u0628\u0637",alternatives:["\u0631\u0628\u0637","bind"],normalized:"bind"},intercept:{primary:"\u0627\u0639\u062A\u0631\u0636",alternatives:["\u0627\u0639\u062A\u0631\u0627\u0636","intercept"],normalized:"intercept"},worker:{primary:"\u0639\u0627\u0645\u0644",alternatives:["worker"],normalized:"worker"},eventsource:{primary:"eventsource",alternatives:["\u0645\u0635\u062F\u0631-\u0627\u0644\u0623\u062D\u062F\u0627\u062B"],normalized:"eventsource"}},tokenization:{prefixes:["\u0627\u0644","\u0648","\u0641","\u0628","\u0643","\u0644"]},eventHandler:{eventMarker:{primary:"\u0639\u0646\u062F",alternatives:["\u0641\u064A","\u0644\u062F\u0649","\u0639\u0646\u062F\u0645\u0627","\u062D\u064A\u0646","\u062D\u064A\u0646\u0645\u0627","\u0644\u0645\u0651\u0627","\u0644\u0645\u0627"],position:"before"},temporalMarkers:["\u0639\u0646\u062F\u0645\u0627","\u062D\u064A\u0646","\u0644\u0645\u0651\u0627"],negationMarker:{primary:"\u0639\u062F\u0645",alternatives:["\u0639\u062F\u0645"],position:"before"}}};var qe={code:"de",name:"German",nativeName:"Deutsch",regions:["western","priority"],direction:"ltr",script:"latin",wordOrder:"SVO",markingStrategy:"preposition",usesSpaces:!0,defaultVerbForm:"infinitive",verb:{position:"start",subjectDrop:!1},references:{me:"ich",it:"es",you:"du",result:"Ergebnis",event:"Ereignis",target:"Ziel",body:"K\xF6rper"},possessive:{marker:"",markerPosition:"before-property",usePossessiveAdjectives:!0,specialForms:{me:"mein",it:"sein",you:"dein"},keywords:{mein:"me",meine:"me",meinen:"me",dein:"you",deine:"you",deinen:"you",sein:"it",seine:"it",seinen:"it"}},roleMarkers:{destination:{primary:"auf",alternatives:["zu","in"],position:"before"},source:{primary:"von",alternatives:["aus"],position:"before"},patient:{primary:"",position:"before"},style:{primary:"mit",position:"before"}},keywords:{toggle:{primary:"umschalten",alternatives:["wechseln"],normalized:"toggle"},add:{primary:"hinzuf\xFCgen",normalized:"add"},remove:{primary:"entfernen",alternatives:["l\xF6schen"],normalized:"remove"},put:{primary:"setzen",alternatives:["stellen","platzieren"],normalized:"put"},append:{primary:"anh\xE4ngen",normalized:"append"},prepend:{primary:"voranstellen",normalized:"prepend"},take:{primary:"nehmen",normalized:"take"},make:{primary:"machen",alternatives:["erstellen","erzeugen"],normalized:"make"},clone:{primary:"klonen",alternatives:["duplizieren"],normalized:"clone"},swap:{primary:"austauschen",alternatives:["tauschen","vertauschen"],normalized:"swap"},morph:{primary:"verwandeln",alternatives:["transformieren"],normalized:"morph"},set:{primary:"festlegen",alternatives:["definieren"],normalized:"set"},get:{primary:"holen",alternatives:["bekommen","erhalten"],normalized:"get"},increment:{primary:"erh\xF6hen",normalized:"increment"},decrement:{primary:"verringern",alternatives:["vermindern"],normalized:"decrement"},log:{primary:"protokollieren",alternatives:["ausgeben"],normalized:"log"},show:{primary:"zeigen",alternatives:["anzeigen"],normalized:"show"},hide:{primary:"verbergen",alternatives:["verstecken"],normalized:"hide"},transition:{primary:"\xFCbergang",alternatives:["animieren"],normalized:"transition"},on:{primary:"bei",alternatives:["auf"],normalized:"on"},trigger:{primary:"ausl\xF6sen",normalized:"trigger"},send:{primary:"senden",alternatives:["schicken"],normalized:"send"},focus:{primary:"fokussieren",normalized:"focus"},blur:{primary:"defokussieren",alternatives:["entfokussieren"],normalized:"blur"},empty:{primary:"leeren",alternatives:["leer"],normalized:"empty"},open:{primary:"\xF6ffnen",alternatives:["oeffnen"],normalized:"open"},close:{primary:"schlie\xDFen",alternatives:["schliessen"],normalized:"close"},select:{primary:"markieren",normalized:"select"},clear:{primary:"bereinigen",normalized:"clear"},reset:{primary:"zur\xFCcksetzen",alternatives:["zuruecksetzen"],normalized:"reset"},breakpoint:{primary:"haltepunkt",normalized:"breakpoint"},go:{primary:"gehen",alternatives:["navigieren"],normalized:"go"},scroll:{primary:"scrollen",normalized:"scroll"},push:{primary:"dr\xFCcken",alternatives:["push"],normalized:"push"},replace:{primary:"ersetzen",normalized:"replace"},process:{primary:"verarbeiten",normalized:"process"},wait:{primary:"warten",normalized:"wait"},fetch:{primary:"abrufen",alternatives:["laden"],normalized:"fetch"},settle:{primary:"stabilisieren",normalized:"settle"},if:{primary:"falls",alternatives:["sofern"],normalized:"if"},unless:{primary:"wennnicht",normalized:"unless"},when:{primary:"wenn",normalized:"when"},where:{primary:"wo",normalized:"where"},else:{primary:"sonst",alternatives:["ansonsten"],normalized:"else"},repeat:{primary:"wiederholen",normalized:"repeat"},for:{primary:"f\xFCr",normalized:"for"},while:{primary:"solange",alternatives:["w\xE4hrend"],normalized:"while"},forever:{primary:"forever",normalized:"forever"},continue:{primary:"fortfahren",alternatives:["weiter"],normalized:"continue"},halt:{primary:"anhalten",alternatives:["stoppen"],normalized:"halt"},throw:{primary:"werfen",normalized:"throw"},call:{primary:"aufrufen",normalized:"call"},return:{primary:"zur\xFCckgeben",normalized:"return"},then:{primary:"dann",alternatives:["danach","anschlie\xDFend"],normalized:"then"},and:{primary:"und",alternatives:["sowie","auch"],normalized:"and"},is:{primary:"ist",normalized:"is"},end:{primary:"ende",alternatives:["fertig"],normalized:"end"},js:{primary:"js",alternatives:["javascript"],normalized:"js"},async:{primary:"asynchron",normalized:"async"},tell:{primary:"sagen",normalized:"tell"},default:{primary:"standard",normalized:"default"},init:{primary:"initialisieren",normalized:"init"},behavior:{primary:"verhalten",normalized:"behavior"},install:{primary:"installieren",normalized:"install"},measure:{primary:"messen",normalized:"measure"},beep:{primary:"piepton",normalized:"beep"},break:{primary:"unterbrechen",normalized:"break"},copy:{primary:"kopieren",normalized:"copy"},exit:{primary:"beenden",normalized:"exit"},pick:{primary:"ausw\xE4hlen",normalized:"pick"},render:{primary:"rendern",normalized:"render"},into:{primary:"hinein",normalized:"into"},before:{primary:"vor",normalized:"before"},after:{primary:"nach",normalized:"after"},click:{primary:"Klick",alternatives:["Klicken"],normalized:"click"},hover:{primary:"Hover",alternatives:["Schweben"],normalized:"hover"},submit:{primary:"Absenden",alternatives:["Senden"],normalized:"submit"},input:{primary:"Eingabe",normalized:"input"},change:{primary:"\xC4nderung",alternatives:["\xC4ndern"],normalized:"change"},resize:{primary:"gr\xF6\xDFe\xE4ndern",normalized:"resize"},until:{primary:"bis",normalized:"until"},event:{primary:"Ereignis",alternatives:["Event"],normalized:"event"},from:{primary:"von",alternatives:["aus"],normalized:"from"},connect:{primary:"verbinden",alternatives:["Verbindung"],normalized:"connect"},stream:{primary:"stream",alternatives:["Strom"],normalized:"stream"},live:{primary:"direkt",alternatives:["live","echtzeit"],normalized:"live"},socket:{primary:"socket",alternatives:["websocket"],normalized:"socket"},bind:{primary:"binden",alternatives:["verknuepfen","bind"],normalized:"bind"},intercept:{primary:"abfangen",alternatives:["intercept"],normalized:"intercept"},worker:{primary:"arbeiter",alternatives:["worker"],normalized:"worker"},eventsource:{primary:"eventsource",alternatives:["ereignisquelle"],normalized:"eventsource"}},eventHandler:{keyword:{primary:"bei",alternatives:["auf"],normalized:"on"},sourceMarker:{primary:"von",alternatives:["aus"],position:"before"},conditionalKeyword:{primary:"wenn",alternatives:["falls"]},eventMarker:{primary:"bei",alternatives:["beim"],position:"before"},temporalMarkers:["wenn","bei"]}};var Ee={code:"en",name:"English",nativeName:"English",regions:["western","priority"],direction:"ltr",script:"latin",wordOrder:"SVO",markingStrategy:"preposition",usesSpaces:!0,defaultVerbForm:"base",verb:{position:"start",subjectDrop:!1},references:{me:"me",it:"it",you:"you",result:"result",event:"event",target:"target",body:"body"},possessive:{marker:"'s",markerPosition:"after-object",specialForms:{me:"my",it:"its",you:"your"},keywords:{my:"me",your:"you",its:"it"}},roleMarkers:{destination:{primary:"on",alternatives:["to","from"],position:"before"},source:{primary:"from",position:"before"},patient:{primary:"",position:"before"},style:{primary:"with",alternatives:["by","using"],position:"before"},responseType:{primary:"as",position:"before"},method:{primary:"via",alternatives:["using"],position:"before"}},keywords:{toggle:{primary:"toggle"},add:{primary:"add"},remove:{primary:"remove"},put:{primary:"put"},append:{primary:"append"},prepend:{primary:"prepend"},take:{primary:"take"},make:{primary:"make"},clone:{primary:"clone"},swap:{primary:"swap"},morph:{primary:"morph"},set:{primary:"set"},get:{primary:"get"},increment:{primary:"increment"},decrement:{primary:"decrement"},log:{primary:"log"},show:{primary:"show"},hide:{primary:"hide"},transition:{primary:"transition"},on:{primary:"on"},trigger:{primary:"trigger"},send:{primary:"send"},focus:{primary:"focus"},blur:{primary:"blur"},empty:{primary:"empty",normalized:"empty"},open:{primary:"open",normalized:"open"},close:{primary:"close",normalized:"close"},select:{primary:"select",normalized:"select"},clear:{primary:"clear",normalized:"clear"},reset:{primary:"reset",normalized:"reset"},breakpoint:{primary:"breakpoint",normalized:"breakpoint"},go:{primary:"go"},scroll:{primary:"scroll",normalized:"scroll"},push:{primary:"push",normalized:"push"},replace:{primary:"replace",normalized:"replace"},process:{primary:"process",normalized:"process"},wait:{primary:"wait"},fetch:{primary:"fetch"},settle:{primary:"settle"},if:{primary:"if"},when:{primary:"when",normalized:"when"},where:{primary:"where",normalized:"where"},else:{primary:"else"},repeat:{primary:"repeat"},for:{primary:"for"},while:{primary:"while"},continue:{primary:"continue"},halt:{primary:"halt"},throw:{primary:"throw"},call:{primary:"call"},return:{primary:"return"},then:{primary:"then"},and:{primary:"and"},end:{primary:"end"},js:{primary:"js"},async:{primary:"async"},tell:{primary:"tell"},default:{primary:"default"},init:{primary:"init"},behavior:{primary:"behavior"},install:{primary:"install"},measure:{primary:"measure"},beep:{primary:"beep"},break:{primary:"break"},copy:{primary:"copy"},exit:{primary:"exit"},pick:{primary:"pick"},render:{primary:"render"},into:{primary:"into"},before:{primary:"before"},after:{primary:"after"},until:{primary:"until"},event:{primary:"event"},from:{primary:"from"},connect:{primary:"connect",normalized:"connect"},stream:{primary:"stream",normalized:"stream"},live:{primary:"live",normalized:"live"},socket:{primary:"socket",alternatives:["websocket"],normalized:"socket"},bind:{primary:"bind",normalized:"bind"},eventsource:{primary:"eventsource",normalized:"eventsource"},worker:{primary:"worker",normalized:"worker"},intercept:{primary:"intercept",normalized:"intercept"}}};var Be={code:"es",name:"Spanish",nativeName:"Espa\xF1ol",regions:["western","priority"],direction:"ltr",script:"latin",wordOrder:"SVO",markingStrategy:"preposition",usesSpaces:!0,defaultVerbForm:"infinitive",verb:{position:"start",subjectDrop:!0},references:{me:"yo",it:"ello",you:"t\xFA",result:"resultado",event:"evento",target:"objetivo",body:"cuerpo"},possessive:{marker:"de",markerPosition:"before-property",usePossessiveAdjectives:!0,specialForms:{me:"mi",it:"su",you:"tu"},keywords:{mi:"me",tu:"you",su:"it"}},roleMarkers:{destination:{primary:"en",alternatives:["sobre","a"],position:"before"},source:{primary:"de",alternatives:["desde"],position:"before"},patient:{primary:"",position:"before"},style:{primary:"con",position:"before"}},keywords:{toggle:{primary:"alternar",alternatives:["conmutar","toggle"],normalized:"toggle"},add:{primary:"agregar",alternatives:["a\xF1adir"],normalized:"add"},remove:{primary:"quitar",alternatives:["eliminar","remover","sacar","borrar"],normalized:"remove"},put:{primary:"poner",alternatives:["colocar","pon"],normalized:"put"},append:{primary:"anexar",normalized:"append"},prepend:{primary:"anteponer",normalized:"prepend"},take:{primary:"tomar",normalized:"take"},make:{primary:"hacer",alternatives:["crear"],normalized:"make"},clone:{primary:"clonar",alternatives:["duplicar"],normalized:"clone"},swap:{primary:"intercambiar",alternatives:["permutar"],normalized:"swap"},morph:{primary:"transformar",alternatives:["convertir"],normalized:"morph"},set:{primary:"establecer",alternatives:["fijar","definir"],normalized:"set"},get:{primary:"obtener",alternatives:["conseguir"],normalized:"get"},increment:{primary:"incrementar",alternatives:["aumentar"],normalized:"increment"},decrement:{primary:"decrementar",alternatives:["disminuir"],normalized:"decrement"},log:{primary:"registrar",alternatives:["imprimir"],normalized:"log"},show:{primary:"mostrar",alternatives:["ense\xF1ar"],normalized:"show"},hide:{primary:"ocultar",alternatives:["esconder"],normalized:"hide"},transition:{primary:"transici\xF3n",alternatives:["animar"],normalized:"transition"},on:{primary:"en",alternatives:["al"],normalized:"on"},trigger:{primary:"disparar",alternatives:["activar"],normalized:"trigger"},send:{primary:"enviar",normalized:"send"},focus:{primary:"enfocar",alternatives:["enfoque"],normalized:"focus"},blur:{primary:"desenfocar",alternatives:["desenfoque"],normalized:"blur"},open:{primary:"abrir",normalized:"open"},close:{primary:"cerrar",normalized:"close"},select:{primary:"seleccionar",normalized:"select"},clear:{primary:"limpiar",normalized:"clear"},reset:{primary:"reiniciar",alternatives:["restablecer"],normalized:"reset"},breakpoint:{primary:"punto-interrupci\xF3n",alternatives:["punto-interrupcion"],normalized:"breakpoint"},click:{primary:"clic",alternatives:["hacer clic","click"],normalized:"click"},resize:{primary:"redimensionar",normalized:"resize"},hover:{primary:"sobrevolar",alternatives:["pasar por encima"],normalized:"hover"},submit:{primary:"env\xEDo",alternatives:["envio","someter"],normalized:"submit"},input:{primary:"entrada",alternatives:["introducir"],normalized:"input"},change:{primary:"cambio",alternatives:["cambiar"],normalized:"change"},load:{primary:"carga",alternatives:["cargar"],normalized:"load"},scroll:{primary:"desplazar",alternatives:["desplazamiento"],normalized:"scroll"},keydown:{primary:"tecla abajo",normalized:"keydown"},keyup:{primary:"tecla arriba",normalized:"keyup"},mouseover:{primary:"rat\xF3n encima",alternatives:["raton encima"],normalized:"mouseover"},mouseout:{primary:"rat\xF3n fuera",alternatives:["raton fuera"],normalized:"mouseout"},mousedown:{primary:"rat\xF3nabajo",normalized:"mousedown"},mouseup:{primary:"rat\xF3narriba",normalized:"mouseup"},go:{primary:"ir",alternatives:["navegar"],normalized:"go"},push:{primary:"empujar",alternatives:["push"],normalized:"push"},replace:{primary:"reemplazar",alternatives:["sustituir"],normalized:"replace"},process:{primary:"procesar",normalized:"process"},wait:{primary:"esperar",normalized:"wait"},fetch:{primary:"buscar",alternatives:["recuperar"],normalized:"fetch"},settle:{primary:"estabilizar",normalized:"settle"},if:{primary:"si",normalized:"if"},unless:{primary:"menos",alternatives:["a menos que","salvo"],normalized:"unless"},when:{primary:"cuando",normalized:"when"},where:{primary:"donde",normalized:"where"},else:{primary:"sino",alternatives:["de lo contrario"],normalized:"else"},repeat:{primary:"repetir",normalized:"repeat"},for:{primary:"para",normalized:"for"},while:{primary:"mientras",normalized:"while"},forever:{primary:"forever",normalized:"forever"},continue:{primary:"continuar",normalized:"continue"},halt:{primary:"detener",alternatives:["parar"],normalized:"halt"},throw:{primary:"lanzar",alternatives:["arrojar"],normalized:"throw"},call:{primary:"llamar",normalized:"call"},return:{primary:"retornar",alternatives:["devolver"],normalized:"return"},then:{primary:"entonces",alternatives:["luego"],normalized:"then"},and:{primary:"y",alternatives:["adem\xE1s","tambi\xE9n"],normalized:"and"},or:{primary:"o",normalized:"or"},not:{primary:"no",normalized:"not"},is:{primary:"es",normalized:"is"},exists:{primary:"existe",normalized:"exists"},empty:{primary:"vac\xEDo",alternatives:["vacio"],normalized:"empty"},end:{primary:"fin",alternatives:["final","terminar"],normalized:"end"},js:{primary:"js",normalized:"js"},async:{primary:"as\xEDncrono",alternatives:["asincrono"],normalized:"async"},tell:{primary:"decir",normalized:"tell"},default:{primary:"predeterminar",alternatives:["por defecto"],normalized:"default"},init:{primary:"iniciar",alternatives:["inicializar"],normalized:"init"},behavior:{primary:"comportamiento",normalized:"behavior"},install:{primary:"instalar",normalized:"install"},measure:{primary:"medir",normalized:"measure"},beep:{primary:"pitido",normalized:"beep"},break:{primary:"romper",normalized:"break"},copy:{primary:"copiar",normalized:"copy"},exit:{primary:"salir",normalized:"exit"},pick:{primary:"escoger",normalized:"pick"},render:{primary:"renderizar",normalized:"render"},first:{primary:"primero",alternatives:["primera"],normalized:"first"},last:{primary:"\xFAltimo",alternatives:["ultima"],normalized:"last"},next:{primary:"siguiente",normalized:"next"},previous:{primary:"anterior",normalized:"previous"},closest:{primary:"cercano",normalized:"closest"},parent:{primary:"padre",normalized:"parent"},into:{primary:"dentro",alternatives:["adentro","dentro de"],normalized:"into"},before:{primary:"antes",alternatives:["antes de"],normalized:"before"},after:{primary:"despu\xE9s",alternatives:["despues","despu\xE9s de","despues de"],normalized:"after"},out:{primary:"fuera",alternatives:["fuera de"],normalized:"out"},until:{primary:"hasta",alternatives:["hasta que"],normalized:"until"},event:{primary:"evento",normalized:"event"},from:{primary:"de",alternatives:["desde"],normalized:"from"},connect:{primary:"conectar",alternatives:["conectarse"],normalized:"connect"},stream:{primary:"transmitir",alternatives:["flujo"],normalized:"stream"},live:{primary:"en-vivo",alternatives:["vivo","directo"],normalized:"live"},socket:{primary:"socket",alternatives:["websocket"],normalized:"socket"},bind:{primary:"vincular",alternatives:["enlazar","bind"],normalized:"bind"},intercept:{primary:"interceptar",alternatives:["intercept"],normalized:"intercept"},worker:{primary:"trabajador",alternatives:["worker"],normalized:"worker"},eventsource:{primary:"eventsource",alternatives:["fuente-de-eventos"],normalized:"eventsource"}},eventHandler:{keyword:{primary:"al",alternatives:["cuando","en"],normalized:"on"},sourceMarker:{primary:"de",alternatives:["desde"],position:"before"},eventMarker:{primary:"al",alternatives:["cuando","en"],position:"before"},temporalMarkers:["cuando","al"]}};var De={code:"fr",name:"French",nativeName:"Fran\xE7ais",regions:["western","priority"],direction:"ltr",script:"latin",wordOrder:"SVO",markingStrategy:"preposition",usesSpaces:!0,defaultVerbForm:"infinitive",verb:{position:"start",subjectDrop:!1},references:{me:"moi",it:"il",you:"toi",result:"r\xE9sultat",event:"\xE9v\xE9nement",target:"cible",body:"corps"},possessive:{marker:"de",markerPosition:"before-property",usePossessiveAdjectives:!0,specialForms:{me:"ma",it:"sa",you:"ta"},keywords:{mon:"me",ma:"me",mes:"me",ton:"you",ta:"you",tes:"you",son:"it",sa:"it",ses:"it"}},roleMarkers:{destination:{primary:"sur",alternatives:["\xE0","dans"],position:"before"},source:{primary:"de",alternatives:["depuis"],position:"before"},patient:{primary:"",position:"before"},style:{primary:"avec",position:"before"}},keywords:{toggle:{primary:"basculer",alternatives:["alterner"],normalized:"toggle"},add:{primary:"ajouter",normalized:"add"},remove:{primary:"supprimer",alternatives:["enlever","retirer"],normalized:"remove"},put:{primary:"mettre",alternatives:["placer"],normalized:"put"},append:{primary:"annexer",normalized:"append"},prepend:{primary:"pr\xE9fixer",normalized:"prepend"},take:{primary:"prendre",normalized:"take"},make:{primary:"faire",alternatives:["cr\xE9er"],normalized:"make"},clone:{primary:"cloner",alternatives:["dupliquer"],normalized:"clone"},swap:{primary:"\xE9changer",alternatives:["permuter"],normalized:"swap"},morph:{primary:"transformer",alternatives:["m\xE9tamorphoser"],normalized:"morph"},set:{primary:"d\xE9finir",alternatives:["\xE9tablir"],normalized:"set"},get:{primary:"obtenir",normalized:"get"},increment:{primary:"incr\xE9menter",alternatives:["augmenter"],normalized:"increment"},decrement:{primary:"d\xE9cr\xE9menter",alternatives:["diminuer"],normalized:"decrement"},log:{primary:"enregistrer",alternatives:["journaliser"],normalized:"log"},show:{primary:"montrer",alternatives:["afficher"],normalized:"show"},hide:{primary:"cacher",alternatives:["masquer"],normalized:"hide"},transition:{primary:"transition",alternatives:["animer"],normalized:"transition"},on:{primary:"sur",alternatives:["lors"],normalized:"on"},trigger:{primary:"d\xE9clencher",normalized:"trigger"},send:{primary:"envoyer",normalized:"send"},focus:{primary:"focaliser",alternatives:["concentrer"],normalized:"focus"},blur:{primary:"d\xE9focaliser",normalized:"blur"},empty:{primary:"vider",alternatives:["vide"],normalized:"empty"},open:{primary:"ouvrir",normalized:"open"},close:{primary:"fermer",normalized:"close"},select:{primary:"s\xE9lectionner",alternatives:["selectionner"],normalized:"select"},clear:{primary:"effacer",normalized:"clear"},reset:{primary:"r\xE9initialiser",alternatives:["reinitialiser"],normalized:"reset"},breakpoint:{primary:"point-arr\xEAt",alternatives:["point-arret"],normalized:"breakpoint"},go:{primary:"aller",alternatives:["naviguer"],normalized:"go"},scroll:{primary:"d\xE9filer",alternatives:["faire-d\xE9filer"],normalized:"scroll"},push:{primary:"pousser",normalized:"push"},replace:{primary:"remplacer",normalized:"replace"},process:{primary:"traiter",normalized:"process"},wait:{primary:"attendre",normalized:"wait"},fetch:{primary:"chercher",alternatives:["r\xE9cup\xE9rer"],normalized:"fetch"},settle:{primary:"stabiliser",normalized:"settle"},if:{primary:"si",normalized:"if"},unless:{primary:"saufsi",normalized:"unless"},when:{primary:"quand",normalized:"when"},where:{primary:"o\xF9",normalized:"where"},else:{primary:"sinon",normalized:"else"},repeat:{primary:"r\xE9p\xE9ter",normalized:"repeat"},for:{primary:"pour",normalized:"for"},while:{primary:"pendant",normalized:"while"},forever:{primary:"forever",normalized:"forever"},continue:{primary:"continuer",normalized:"continue"},halt:{primary:"arr\xEAter",alternatives:["stopper"],normalized:"halt"},throw:{primary:"lancer",normalized:"throw"},call:{primary:"appeler",normalized:"call"},return:{primary:"retourner",alternatives:["renvoyer"],normalized:"return"},then:{primary:"puis",alternatives:["ensuite","alors"],normalized:"then"},and:{primary:"et",alternatives:["aussi","\xE9galement"],normalized:"and"},end:{primary:"fin",alternatives:["terminer","finir"],normalized:"end"},js:{primary:"js",normalized:"js"},async:{primary:"asynchrone",normalized:"async"},tell:{primary:"dire",normalized:"tell"},default:{primary:"d\xE9faut",normalized:"default"},init:{primary:"initialiser",normalized:"init"},behavior:{primary:"comportement",normalized:"behavior"},install:{primary:"installer",normalized:"install"},measure:{primary:"mesurer",normalized:"measure"},beep:{primary:"bip",normalized:"beep"},break:{primary:"interrompre",normalized:"break"},copy:{primary:"copier",normalized:"copy"},exit:{primary:"sortir",normalized:"exit"},pick:{primary:"choisir",normalized:"pick"},render:{primary:"rendu",normalized:"render"},into:{primary:"dans",normalized:"into"},before:{primary:"avant",normalized:"before"},after:{primary:"apr\xE8s",normalized:"after"},click:{primary:"clic",alternatives:["clique"],normalized:"click"},resize:{primary:"redimensionner",normalized:"resize"},hover:{primary:"survol",alternatives:["survoler"],normalized:"hover"},submit:{primary:"soumission",alternatives:["soumettre"],normalized:"submit"},input:{primary:"saisie",alternatives:["entr\xE9e"],normalized:"input"},change:{primary:"changement",alternatives:["modifier","changer"],normalized:"change"},load:{primary:"charger",alternatives:["chargement"],normalized:"load"},until:{primary:"jusqu'\xE0",alternatives:["jusque"],normalized:"until"},event:{primary:"\xE9v\xE9nement",normalized:"event"},from:{primary:"de",alternatives:["depuis"],normalized:"from"},connect:{primary:"connecter",alternatives:["connexion"],normalized:"connect"},stream:{primary:"flux",alternatives:["streaming"],normalized:"stream"},live:{primary:"en-direct",alternatives:["direct","vif"],normalized:"live"},socket:{primary:"socket",alternatives:["websocket"],normalized:"socket"},bind:{primary:"lier",alternatives:["relier","bind"],normalized:"bind"},intercept:{primary:"intercepter",alternatives:["intercept"],normalized:"intercept"},worker:{primary:"travailleur",alternatives:["worker"],normalized:"worker"},eventsource:{primary:"eventsource",alternatives:["source-d-evenements"],normalized:"eventsource"}},eventHandler:{keyword:{primary:"sur",alternatives:["lors"],normalized:"on"},sourceMarker:{primary:"de",alternatives:["depuis"],position:"before"},conditionalKeyword:{primary:"quand",alternatives:["lorsque"]},eventMarker:{primary:"au",alternatives:["lors du","lors de","sur"],position:"before"},temporalMarkers:["quand","lorsque"]}};var He={code:"id",name:"Indonesian",nativeName:"Bahasa Indonesia",regions:["priority"],direction:"ltr",script:"latin",wordOrder:"SVO",markingStrategy:"preposition",usesSpaces:!0,verb:{position:"start",subjectDrop:!0},references:{me:"saya",it:"itu",you:"anda",result:"hasil",event:"peristiwa",target:"target",body:"badan"},possessive:{marker:"",markerPosition:"after-object",usePossessiveAdjectives:!0,specialForms:{me:"saya",it:"nya",you:"anda"},keywords:{saya:"me",aku:"me",ku:"me",my:"me",anda:"you",kamu:"you",mu:"you",nya:"it",dia:"it",miliknya:"it"},connectors:["punya"]},roleMarkers:{destination:{primary:"pada",alternatives:["ke","di"],position:"before"},source:{primary:"dari",position:"before"},patient:{primary:"",position:"before"},style:{primary:"dengan",position:"before"}},keywords:{toggle:{primary:"alihkan",normalized:"toggle"},add:{primary:"tambah",alternatives:["tambahkan"],normalized:"add"},remove:{primary:"hapus",alternatives:["buang","hilangkan"],normalized:"remove"},put:{primary:"taruh",alternatives:["letakkan","masukkan"],normalized:"put"},append:{primary:"sisipkan",normalized:"append"},prepend:{primary:"awali",normalized:"prepend"},take:{primary:"ambil",normalized:"take"},make:{primary:"buat",alternatives:["bikin","ciptakan"],normalized:"make"},clone:{primary:"klon",alternatives:["tiru"],normalized:"clone"},swap:{primary:"tukar",alternatives:["ganti"],normalized:"swap"},morph:{primary:"ubah",alternatives:["transformasi"],normalized:"morph"},set:{primary:"atur",alternatives:["tetapkan"],normalized:"set"},get:{primary:"dapatkan",alternatives:["peroleh"],normalized:"get"},increment:{primary:"tingkatkan",alternatives:["naikkan"],normalized:"increment"},decrement:{primary:"turunkan",alternatives:["kurangi"],normalized:"decrement"},log:{primary:"catat",alternatives:["rekam","cetak"],normalized:"log"},show:{primary:"tampilkan",alternatives:["perlihatkan"],normalized:"show"},hide:{primary:"sembunyikan",alternatives:["tutup"],normalized:"hide"},transition:{primary:"transisi",alternatives:["animasikan"],normalized:"transition"},on:{primary:"pada",alternatives:["saat"],normalized:"on"},trigger:{primary:"picu",alternatives:["jalankan"],normalized:"trigger"},send:{primary:"kirim",alternatives:["kirimkan"],normalized:"send"},focus:{primary:"fokus",alternatives:["fokuskan"],normalized:"focus"},blur:{primary:"blur",normalized:"blur"},empty:{primary:"kosongkan",alternatives:["kosong"],normalized:"empty"},open:{primary:"buka",normalized:"open"},close:{primary:"tutupkan",normalized:"close"},select:{primary:"tandai",normalized:"select"},clear:{primary:"bersihkan",normalized:"clear"},reset:{primary:"setel-ulang",alternatives:["reset"],normalized:"reset"},breakpoint:{primary:"titik-henti",normalized:"breakpoint"},go:{primary:"pergi",alternatives:["pindah","navigasi"],normalized:"go"},scroll:{primary:"gulir",alternatives:["gulung"],normalized:"scroll"},push:{primary:"dorong",alternatives:["push"],normalized:"push"},replace:{primary:"ganti_url",alternatives:["gantikan_url"],normalized:"replace"},process:{primary:"proses",normalized:"process"},wait:{primary:"tunggu",normalized:"wait"},fetch:{primary:"muat",normalized:"fetch"},settle:{primary:"stabilkan",normalized:"settle"},if:{primary:"jika",alternatives:["kalau","bila"],normalized:"if"},unless:{primary:"kecuali",normalized:"unless"},when:{primary:"ketika",normalized:"when"},where:{primary:"di_mana",normalized:"where"},else:{primary:"selainnya",alternatives:["lainnya"],normalized:"else"},repeat:{primary:"ulangi",normalized:"repeat"},for:{primary:"untuk",normalized:"for"},while:{primary:"selama",normalized:"while"},forever:{primary:"forever",normalized:"forever"},continue:{primary:"lanjutkan",alternatives:["terus"],normalized:"continue"},halt:{primary:"hentikan",alternatives:["berhenti"],normalized:"halt"},throw:{primary:"lempar",normalized:"throw"},call:{primary:"panggil",normalized:"call"},return:{primary:"kembalikan",alternatives:["kembali"],normalized:"return"},then:{primary:"lalu",alternatives:["kemudian","setelah itu"],normalized:"then"},and:{primary:"dan",alternatives:["juga","serta"],normalized:"and"},end:{primary:"selesai",alternatives:["akhir","tamat"],normalized:"end"},js:{primary:"js",alternatives:["javascript"],normalized:"js"},async:{primary:"asinkron",normalized:"async"},tell:{primary:"katakan",alternatives:["beritahu"],normalized:"tell"},default:{primary:"bawaan",normalized:"default"},init:{primary:"inisialisasi",alternatives:["mulai"],normalized:"init"},behavior:{primary:"perilaku",normalized:"behavior"},install:{primary:"pasang",alternatives:["instal"],normalized:"install"},measure:{primary:"ukur",normalized:"measure"},beep:{primary:"bunyi",normalized:"beep"},break:{primary:"putuskan",normalized:"break"},copy:{primary:"salin",normalized:"copy"},exit:{primary:"keluar",normalized:"exit"},pick:{primary:"pilih",normalized:"pick"},render:{primary:"olah",normalized:"render"},into:{primary:"ke dalam",normalized:"into"},before:{primary:"sebelum",normalized:"before"},after:{primary:"sesudah",alternatives:["setelah"],normalized:"after"},click:{primary:"klik",alternatives:["tekan"],normalized:"click"},hover:{primary:"hover",alternatives:["arahkan"],normalized:"hover"},submit:{primary:"ajukan",normalized:"submit"},input:{primary:"masuk",alternatives:["input","masukan"],normalized:"input"},change:{primary:"berubah",normalized:"change"},until:{primary:"sampai",normalized:"until"},event:{primary:"peristiwa",alternatives:["event"],normalized:"event"},from:{primary:"dari",normalized:"from"},connect:{primary:"sambungkan",alternatives:["hubungkan","koneksi"],normalized:"connect"},stream:{primary:"alirkan",alternatives:["streaming"],normalized:"stream"},live:{primary:"langsung",alternatives:["live"],normalized:"live"},socket:{primary:"soket",alternatives:["socket","websocket"],normalized:"socket"},bind:{primary:"ikat",alternatives:["kaitkan","bind"],normalized:"bind"},intercept:{primary:"cegat",alternatives:["tangkap","intercept"],normalized:"intercept"},worker:{primary:"pekerja",alternatives:["worker"],normalized:"worker"},eventsource:{primary:"eventsource",alternatives:["sumber peristiwa"],normalized:"eventsource"}},eventHandler:{keyword:{primary:"pada",alternatives:["ketika","saat"],normalized:"on"},sourceMarker:{primary:"dari",position:"before"},conditionalKeyword:{primary:"ketika",alternatives:["saat","waktu"]},eventMarker:{primary:"saat",alternatives:["ketika","pada"],position:"before"},temporalMarkers:["ketika","saat"]}};var Fe={code:"ja",name:"Japanese",nativeName:"\u65E5\u672C\u8A9E",regions:["east-asian","priority"],direction:"ltr",script:"cjk",wordOrder:"SOV",markingStrategy:"particle",usesSpaces:!1,defaultVerbForm:"base",verb:{position:"end",suffixes:["\u308B","\u3066","\u305F","\u307E\u3059","\u306A\u3044"],subjectDrop:!0},references:{me:"\u81EA\u5206",it:"\u305D\u308C",you:"\u3042\u306A\u305F",result:"\u7D50\u679C",event:"\u30A4\u30D9\u30F3\u30C8",target:"\u30BF\u30FC\u30B2\u30C3\u30C8",body:"\u30DC\u30C7\u30A3"},possessive:{marker:"\u306E",markerPosition:"between",keywords:{\u79C1\u306E:"me",\u3042\u306A\u305F\u306E:"you",\u305D\u306E:"it"}},roleMarkers:{patient:{primary:"\u3092",position:"after"},destination:{primary:"\u306B",alternatives:["\u3078","\u3067","\u306E"],position:"after"},source:{primary:"\u304B\u3089",position:"after"},style:{primary:"\u3067",position:"after"},event:{primary:"\u3092",position:"after"}},keywords:{toggle:{primary:"\u5207\u308A\u66FF\u3048",alternatives:["\u5207\u308A\u66FF\u3048\u308B","\u30C8\u30B0\u30EB","\u30C8\u30B0\u30EB\u3059\u308B"],normalized:"toggle"},add:{primary:"\u8FFD\u52A0",alternatives:["\u8FFD\u52A0\u3059\u308B","\u52A0\u3048\u308B"],normalized:"add"},remove:{primary:"\u524A\u9664",alternatives:["\u524A\u9664\u3059\u308B","\u53D6\u308A\u9664\u304F"],normalized:"remove"},put:{primary:"\u7F6E\u304F",alternatives:["\u5165\u308C\u308B"],normalized:"put"},append:{primary:"\u672B\u5C3E\u8FFD\u52A0",alternatives:["\u672B\u5C3E\u306B\u8FFD\u52A0","\u30A2\u30DA\u30F3\u30C9"],normalized:"append"},prepend:{primary:"\u5148\u982D\u8FFD\u52A0",alternatives:["\u5148\u982D\u306B\u8FFD\u52A0","\u30D7\u30EA\u30DA\u30F3\u30C9"],normalized:"prepend"},take:{primary:"\u53D6\u308B",normalized:"take"},make:{primary:"\u4F5C\u308B",alternatives:["\u4F5C\u6210"],normalized:"make"},clone:{primary:"\u8907\u88FD",alternatives:["\u30AF\u30ED\u30FC\u30F3"],normalized:"clone"},swap:{primary:"\u4EA4\u63DB",alternatives:["\u30B9\u30EF\u30C3\u30D7","\u5165\u308C\u66FF\u3048"],normalized:"swap"},morph:{primary:"\u5909\u5F62",alternatives:["\u30E2\u30FC\u30D5","\u5909\u63DB"],normalized:"morph"},set:{primary:"\u8A2D\u5B9A",alternatives:["\u8A2D\u5B9A\u3059\u308B"],normalized:"set"},get:{primary:"\u53D6\u5F97",alternatives:["\u53D6\u5F97\u3059\u308B","\u30B2\u30C3\u30C8"],normalized:"get"},increment:{primary:"\u5897\u52A0",alternatives:["\u5897\u3084\u3059","\u30A4\u30F3\u30AF\u30EA\u30E1\u30F3\u30C8"],normalized:"increment"},decrement:{primary:"\u6E1B\u5C11",alternatives:["\u6E1B\u3089\u3059","\u30C7\u30AF\u30EA\u30E1\u30F3\u30C8"],normalized:"decrement"},log:{primary:"\u8A18\u9332",alternatives:["\u30ED\u30B0","\u51FA\u529B"],normalized:"log"},show:{primary:"\u8868\u793A",alternatives:["\u8868\u793A\u3059\u308B","\u898B\u305B\u308B"],normalized:"show"},hide:{primary:"\u96A0\u3059",alternatives:["\u975E\u8868\u793A","\u975E\u8868\u793A\u306B\u3059\u308B"],normalized:"hide"},transition:{primary:"\u9077\u79FB",alternatives:["\u30C8\u30E9\u30F3\u30B8\u30B7\u30E7\u30F3","\u30A2\u30CB\u30E1\u30FC\u30B7\u30E7\u30F3"],normalized:"transition"},on:{primary:"\u3067",alternatives:["\u6642"],normalized:"on"},trigger:{primary:"\u5F15\u304D\u91D1",alternatives:["\u767A\u706B","\u30C8\u30EA\u30AC\u30FC"],normalized:"trigger"},send:{primary:"\u9001\u308B",alternatives:["\u9001\u4FE1"],normalized:"send"},focus:{primary:"\u30D5\u30A9\u30FC\u30AB\u30B9",alternatives:["\u96C6\u4E2D"],normalized:"focus"},blur:{primary:"\u307C\u304B\u3057",alternatives:["\u30D5\u30A9\u30FC\u30AB\u30B9\u89E3\u9664","\u30D6\u30E9\u30FC"],normalized:"blur"},empty:{primary:"\u7A7A\u306B",alternatives:["\u7A7A\u306B\u3059\u308B"],normalized:"empty"},open:{primary:"\u958B\u304F",alternatives:["\u30AA\u30FC\u30D7\u30F3"],normalized:"open"},close:{primary:"\u9589\u3058\u308B",alternatives:["\u30AF\u30ED\u30FC\u30BA"],normalized:"close"},select:{primary:"\u9078\u3076",alternatives:["\u30BB\u30EC\u30AF\u30C8"],normalized:"select"},clear:{primary:"\u30AF\u30EA\u30A2",alternatives:["\u6D88\u53BB"],normalized:"clear"},reset:{primary:"\u30EA\u30BB\u30C3\u30C8",alternatives:["\u518D\u8A2D\u5B9A"],normalized:"reset"},breakpoint:{primary:"\u30D6\u30EC\u30FC\u30AF\u30DD\u30A4\u30F3\u30C8",normalized:"breakpoint"},go:{primary:"\u79FB\u52D5",alternatives:["\u884C\u304F","\u30CA\u30D3\u30B2\u30FC\u30C8"],normalized:"go"},scroll:{primary:"\u30B9\u30AF\u30ED\u30FC\u30EB",normalized:"scroll"},push:{primary:"\u30D7\u30C3\u30B7\u30E5",normalized:"push"},replace:{primary:"\u7F6E\u63DB",alternatives:["\u7F6E\u304D\u63DB\u3048"],normalized:"replace"},process:{primary:"\u51E6\u7406",normalized:"process"},wait:{primary:"\u5F85\u3064",alternatives:["\u5F85\u6A5F"],normalized:"wait"},fetch:{primary:"\u30D5\u30A7\u30C3\u30C1",normalized:"fetch"},settle:{primary:"\u5B89\u5B9A",alternatives:["\u843D\u3061\u7740\u304F"],normalized:"settle"},if:{primary:"\u3082\u3057",normalized:"if"},when:{primary:"\u3068\u304D",alternatives:["\u3068\u304D\u306B"],normalized:"when"},where:{primary:"\u3069\u3053",normalized:"where"},else:{primary:"\u305D\u3046\u3067\u306A\u3051\u308C\u3070",alternatives:["\u305D\u308C\u4EE5\u5916"],normalized:"else"},unless:{primary:"\u306A\u3044\u9650\u308A",normalized:"unless"},repeat:{primary:"\u7E70\u308A\u8FD4\u3057",alternatives:["\u7E70\u308A\u8FD4\u3059","\u30EA\u30D4\u30FC\u30C8"],normalized:"repeat"},for:{primary:"\u305F\u3081\u306B",alternatives:["\u5404"],normalized:"for"},while:{primary:"\u306E\u9593",alternatives:["\u9593"],normalized:"while"},forever:{primary:"forever",normalized:"forever"},continue:{primary:"\u7D9A\u3051\u308B",alternatives:["\u7D99\u7D9A"],normalized:"continue"},halt:{primary:"\u505C\u6B62",alternatives:["\u6B62\u3081\u308B","\u30CF\u30EB\u30C8"],normalized:"halt"},throw:{primary:"\u6295\u3052\u308B",alternatives:["\u30B9\u30ED\u30FC"],normalized:"throw"},call:{primary:"\u547C\u3073\u51FA\u3057",alternatives:["\u30B3\u30FC\u30EB","\u547C\u3076"],normalized:"call"},return:{primary:"\u623B\u308B",alternatives:["\u8FD4\u3059","\u30EA\u30BF\u30FC\u30F3"],normalized:"return"},then:{primary:"\u305D\u308C\u304B\u3089",alternatives:["\u6B21\u306B","\u306A\u3089\u3070","\u306A\u3089"],normalized:"then"},and:{primary:"\u307E\u305F",alternatives:["\u3068","\u305D\u3057\u3066"],normalized:"and"},end:{primary:"\u7D42\u308F\u308A",alternatives:["\u304A\u308F\u308A"],normalized:"end"},js:{primary:"JS\u5B9F\u884C",alternatives:["js"],normalized:"js"},async:{primary:"\u975E\u540C\u671F",alternatives:["\u30A2\u30B7\u30F3\u30AF"],normalized:"async"},tell:{primary:"\u4F1D\u3048\u308B",alternatives:["\u30C6\u30EB"],normalized:"tell"},default:{primary:"\u65E2\u5B9A",alternatives:["\u30C7\u30D5\u30A9\u30EB\u30C8"],normalized:"default"},init:{primary:"\u521D\u671F\u5316",alternatives:["\u30A4\u30CB\u30C3\u30C8"],normalized:"init"},behavior:{primary:"\u632F\u308B\u821E\u3044",alternatives:["\u30D3\u30D8\u30A4\u30D3\u30A2"],normalized:"behavior"},install:{primary:"\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB",alternatives:["\u5C0E\u5165"],normalized:"install"},measure:{primary:"\u6E2C\u5B9A",alternatives:["\u8A08\u6E2C","\u30E1\u30B8\u30E3\u30FC"],normalized:"measure"},beep:{primary:"\u30D3\u30FC\u30D7",normalized:"beep"},break:{primary:"\u4E2D\u65AD",normalized:"break"},copy:{primary:"\u30B3\u30D4\u30FC",normalized:"copy"},exit:{primary:"\u9000\u51FA",normalized:"exit"},pick:{primary:"\u9078\u629E",normalized:"pick"},render:{primary:"\u63CF\u753B",normalized:"render"},into:{primary:"\u3078",alternatives:["\u306B"],normalized:"into"},before:{primary:"\u524D\u306B",alternatives:["\u524D"],normalized:"before"},after:{primary:"\u5F8C\u306B",alternatives:["\u5F8C"],normalized:"after"},until:{primary:"\u307E\u3067",alternatives:["\u8FC4"],normalized:"until"},event:{primary:"\u30A4\u30D9\u30F3\u30C8",alternatives:["\u4E8B\u8C61"],normalized:"event"},from:{primary:"\u304B\u3089",normalized:"from"},connect:{primary:"\u63A5\u7D9A",alternatives:["\u63A5\u7D9A\u3059\u308B"],normalized:"connect"},stream:{primary:"\u30B9\u30C8\u30EA\u30FC\u30E0",alternatives:["\u914D\u4FE1"],normalized:"stream"},live:{primary:"\u30E9\u30A4\u30D6",alternatives:["\u5B9F\u6642\u9593"],normalized:"live"},socket:{primary:"\u30BD\u30B1\u30C3\u30C8",alternatives:["websocket"],normalized:"socket"},bind:{primary:"\u30D0\u30A4\u30F3\u30C9",alternatives:["\u7D50\u3073\u3064\u3051\u308B","bind"],normalized:"bind"},intercept:{primary:"\u30A4\u30F3\u30BF\u30FC\u30BB\u30D7\u30C8",alternatives:["\u508D\u53D7","intercept"],normalized:"intercept"},worker:{primary:"\u30EF\u30FC\u30AB\u30FC",alternatives:["worker"],normalized:"worker"},eventsource:{primary:"eventsource",alternatives:["\u30A4\u30D9\u30F3\u30C8\u30BD\u30FC\u30B9"],normalized:"eventsource"}},tokenization:{particles:["\u3092","\u306B","\u3067","\u304B\u3089","\u306E","\u304C","\u306F","\u3082","\u3078","\u3068"],boundaryStrategy:"particle"},eventHandler:{eventMarker:{primary:"\u3067",position:"after"},temporalMarkers:["\u6642","\u3068\u304D"]}};var Ue={code:"ko",name:"Korean",nativeName:"\uD55C\uAD6D\uC5B4",regions:["east-asian","priority"],direction:"ltr",script:"hangul",wordOrder:"SOV",markingStrategy:"particle",usesSpaces:!0,verb:{position:"end",suffixes:["\uB2E4","\uC694","\uB2C8\uB2E4","\uC138\uC694"],subjectDrop:!0},references:{me:"\uB098",it:"\uADF8\uAC83",you:"\uB108",result:"\uACB0\uACFC",event:"\uC774\uBCA4\uD2B8",target:"\uB300\uC0C1",body:"\uBC14\uB514"},possessive:{marker:"\uC758",markerPosition:"between",specialForms:{me:"\uB0B4",it:"\uADF8\uAC83\uC758",you:"\uB124"},keywords:{\uB0B4:"me",\uB124:"you",\uADF8\uC758:"it"}},roleMarkers:{patient:{primary:"\uC744",alternatives:["\uB97C"],position:"after"},destination:{primary:"\uC5D0",alternatives:["\uC73C\uB85C","\uB85C","\uC758"],position:"after"},source:{primary:"\uC5D0\uC11C",alternatives:["\uBD80\uD130"],position:"after"},style:{primary:"\uB85C",alternatives:["\uC73C\uB85C"],position:"after"},event:{primary:"\uC744",alternatives:["\uB97C"],position:"after"}},keywords:{toggle:{primary:"\uD1A0\uAE00",normalized:"toggle"},add:{primary:"\uCD94\uAC00",normalized:"add"},remove:{primary:"\uC81C\uAC70",alternatives:["\uC0AD\uC81C"],normalized:"remove"},put:{primary:"\uB123\uB2E4",alternatives:["\uB123\uAE30","\uB193\uAE30"],normalized:"put"},append:{primary:"\uB367\uBD99\uC774\uB2E4",alternatives:["\uB05D\uC5D0\uCD94\uAC00"],normalized:"append"},prepend:{primary:"\uC55E\uC5D0\uCD94\uAC00",alternatives:["\uC120\uB450\uCD94\uAC00"],normalized:"prepend"},take:{primary:"\uAC00\uC838\uC624\uB2E4",normalized:"take"},make:{primary:"\uB9CC\uB4E4\uB2E4",normalized:"make"},clone:{primary:"\uBCF5\uC81C",normalized:"clone"},swap:{primary:"\uAD50\uD658",alternatives:["\uBC14\uAFB8\uB2E4"],normalized:"swap"},morph:{primary:"\uBCC0\uD615",alternatives:["\uBCC0\uD658"],normalized:"morph"},set:{primary:"\uC124\uC815",normalized:"set"},get:{primary:"\uC5BB\uB2E4",normalized:"get"},increment:{primary:"\uC99D\uAC00",normalized:"increment"},decrement:{primary:"\uAC10\uC18C",normalized:"decrement"},log:{primary:"\uB85C\uADF8",normalized:"log"},show:{primary:"\uBCF4\uC774\uB2E4",alternatives:["\uD45C\uC2DC","\uBCF4\uC774\uAE30"],normalized:"show"},hide:{primary:"\uC228\uAE30\uB2E4",alternatives:["\uC228\uAE30\uAE30"],normalized:"hide"},transition:{primary:"\uD2B8\uB79C\uC9C0\uC158",alternatives:["\uC804\uD658"],normalized:"transition"},on:{primary:"\uC5D0",alternatives:["\uC2DC","\uD560 \uB54C"],normalized:"on"},trigger:{primary:"\uD2B8\uB9AC\uAC70",normalized:"trigger"},send:{primary:"\uBCF4\uB0B4\uB2E4",normalized:"send"},focus:{primary:"\uD3EC\uCEE4\uC2A4",normalized:"focus"},blur:{primary:"\uBE14\uB7EC",normalized:"blur"},empty:{primary:"\uBE44\uC6B0\uAE30",normalized:"empty"},open:{primary:"\uC5F4\uAE30",normalized:"open"},close:{primary:"\uB2EB\uAE30",normalized:"close"},select:{primary:"\uACE0\uB974\uAE30",normalized:"select"},clear:{primary:"\uC9C0\uC6B0\uAE30",normalized:"clear"},reset:{primary:"\uC7AC\uC124\uC815",normalized:"reset"},breakpoint:{primary:"\uC911\uB2E8\uC810",normalized:"breakpoint"},click:{primary:"\uD074\uB9AD",normalized:"click"},hover:{primary:"\uD638\uBC84",normalized:"hover"},submit:{primary:"\uC81C\uCD9C",normalized:"submit"},input:{primary:"\uC785\uB825",normalized:"input"},change:{primary:"\uBCC0\uACBD",normalized:"change"},go:{primary:"\uC774\uB3D9",normalized:"go"},scroll:{primary:"\uC2A4\uD06C\uB864",normalized:"scroll"},push:{primary:"\uD478\uC2DC",normalized:"push"},replace:{primary:"\uAD50\uCCB4",alternatives:["\uBC14\uAFB8\uAE30"],normalized:"replace"},process:{primary:"\uCC98\uB9AC",normalized:"process"},wait:{primary:"\uB300\uAE30",normalized:"wait"},fetch:{primary:"\uD328\uCE58",alternatives:["\uAC00\uC838\uC624\uAE30"],normalized:"fetch"},settle:{primary:"\uC548\uC815",normalized:"settle"},if:{primary:"\uB9CC\uC57D",normalized:"if"},when:{primary:"\uB54C",normalized:"when"},where:{primary:"\uC5B4\uB514",normalized:"where"},else:{primary:"\uC544\uB2C8\uBA74",normalized:"else"},unless:{primary:"\uC544\uB2C8\uB77C\uBA74",normalized:"unless"},repeat:{primary:"\uBC18\uBCF5",normalized:"repeat"},for:{primary:"\uAC01\uAC01",normalized:"for"},while:{primary:"\uB3D9\uC548",normalized:"while"},forever:{primary:"forever",normalized:"forever"},continue:{primary:"\uACC4\uC18D",normalized:"continue"},halt:{primary:"\uC815\uC9C0",normalized:"halt"},throw:{primary:"\uB358\uC9C0\uB2E4",normalized:"throw"},call:{primary:"\uD638\uCD9C",normalized:"call"},return:{primary:"\uBC18\uD658",normalized:"return"},then:{primary:"\uADF8\uB2E4\uC74C",alternatives:["\uADF8\uB7F0\uD6C4"],normalized:"then"},and:{primary:"\uADF8\uB9AC\uACE0",alternatives:["\uB610\uD55C","\uBC0F"],normalized:"and"},matches:{primary:"\uC77C\uCE58",normalized:"matches"},end:{primary:"\uB05D",alternatives:["\uB9C8\uCE68"],normalized:"end"},js:{primary:"JS\uC2E4\uD589",alternatives:["js"],normalized:"js"},async:{primary:"\uBE44\uB3D9\uAE30",normalized:"async"},tell:{primary:"\uB9D0\uD558\uB2E4",normalized:"tell"},default:{primary:"\uAE30\uBCF8\uAC12",normalized:"default"},init:{primary:"\uCD08\uAE30\uD654",normalized:"init"},behavior:{primary:"\uB3D9\uC791",normalized:"behavior"},install:{primary:"\uC124\uCE58",normalized:"install"},measure:{primary:"\uCE21\uC815",normalized:"measure"},beep:{primary:"\uBE44\uD504",normalized:"beep"},break:{primary:"\uC911\uB2E8",normalized:"break"},copy:{primary:"\uBCF5\uC0AC",normalized:"copy"},exit:{primary:"\uB098\uAC00\uAE30",normalized:"exit"},pick:{primary:"\uC120\uD0DD",normalized:"pick"},render:{primary:"\uB80C\uB354\uB9C1",normalized:"render"},into:{primary:"\uC73C\uB85C",normalized:"into"},before:{primary:"\uC804\uC5D0",normalized:"before"},after:{primary:"\uD6C4\uC5D0",normalized:"after"},until:{primary:"\uAE4C\uC9C0",normalized:"until"},event:{primary:"\uC774\uBCA4\uD2B8",normalized:"event"},from:{primary:"\uC5D0\uC11C",normalized:"from"},connect:{primary:"\uC5F0\uACB0",alternatives:["\uC811\uC18D"],normalized:"connect"},stream:{primary:"\uC2A4\uD2B8\uB9BC",alternatives:["\uC2A4\uD2B8\uB9AC\uBC0D"],normalized:"stream"},live:{primary:"\uC2E4\uC2DC\uAC04",alternatives:["\uB77C\uC774\uBE0C"],normalized:"live"},socket:{primary:"\uC18C\uCF13",alternatives:["websocket"],normalized:"socket"},bind:{primary:"\uBC14\uC778\uB4DC",alternatives:["bind"],normalized:"bind"},intercept:{primary:"\uAC00\uB85C\uCC44\uAE30",alternatives:["\uC778\uD130\uC149\uD2B8","intercept"],normalized:"intercept"},worker:{primary:"\uC6CC\uCEE4",alternatives:["worker"],normalized:"worker"},eventsource:{primary:"eventsource",alternatives:["\uC774\uBCA4\uD2B8\uC18C\uC2A4"],normalized:"eventsource"}},tokenization:{particles:["\uC744","\uB97C","\uC774","\uAC00","\uC740","\uB294","\uC5D0","\uC5D0\uC11C","\uC73C\uB85C","\uB85C","\uC640","\uACFC","\uB3C4"],boundaryStrategy:"space"},eventHandler:{eventMarker:{primary:"\uD560 \uB54C",alternatives:["\uD560\uB54C","\uB54C","\uC5D0"],position:"after"},temporalMarkers:["\uD560 \uB54C","\uD560\uB54C","\uB54C"]}};var Ge={code:"pt",name:"Portuguese",nativeName:"Portugu\xEAs",regions:["western","priority"],direction:"ltr",script:"latin",wordOrder:"SVO",markingStrategy:"preposition",usesSpaces:!0,verb:{position:"start",subjectDrop:!0},references:{me:"eu",it:"ele",you:"voc\xEA",result:"resultado",event:"evento",target:"alvo",body:"corpo"},possessive:{marker:"de",markerPosition:"before-property",usePossessiveAdjectives:!0,specialForms:{me:"meu",it:"seu",you:"teu"},keywords:{meu:"me",minha:"me",teu:"you",tua:"you",seu:"it",sua:"it"}},roleMarkers:{destination:{primary:"em",alternatives:["para","a"],position:"before"},source:{primary:"de",alternatives:["desde"],position:"before"},patient:{primary:"",position:"before"},style:{primary:"com",position:"before"}},keywords:{toggle:{primary:"alternar",alternatives:[],normalized:"toggle"},add:{primary:"adicionar",alternatives:["acrescentar"],normalized:"add"},remove:{primary:"remover",alternatives:["eliminar","apagar"],normalized:"remove"},put:{primary:"colocar",alternatives:["p\xF4r","por"],normalized:"put"},append:{primary:"anexar",normalized:"append"},prepend:{primary:"preceder",normalized:"prepend"},take:{primary:"pegar",normalized:"take"},make:{primary:"fazer",alternatives:["criar"],normalized:"make"},clone:{primary:"clonar",alternatives:[],normalized:"clone"},swap:{primary:"trocar",alternatives:["substituir"],normalized:"swap"},morph:{primary:"transformar",alternatives:["converter"],normalized:"morph"},set:{primary:"definir",alternatives:["configurar"],normalized:"set"},get:{primary:"obter",normalized:"get"},increment:{primary:"incrementar",alternatives:["aumentar"],normalized:"increment"},decrement:{primary:"decrementar",alternatives:["diminuir"],normalized:"decrement"},log:{primary:"registrar",alternatives:["imprimir"],normalized:"log"},show:{primary:"mostrar",alternatives:["exibir"],normalized:"show"},hide:{primary:"ocultar",alternatives:["esconder"],normalized:"hide"},transition:{primary:"transi\xE7\xE3o",alternatives:["animar"],normalized:"transition"},on:{primary:"em",alternatives:["ao"],normalized:"on"},trigger:{primary:"disparar",alternatives:["ativar"],normalized:"trigger"},send:{primary:"enviar",normalized:"send"},focus:{primary:"focar",normalized:"focus"},blur:{primary:"desfocar",normalized:"blur"},empty:{primary:"esvaziar",alternatives:["vazio"],normalized:"empty"},open:{primary:"abrir",normalized:"open"},close:{primary:"fechar",normalized:"close"},select:{primary:"selecionar",normalized:"select"},clear:{primary:"limpar",normalized:"clear"},reset:{primary:"redefinir",alternatives:["resetar"],normalized:"reset"},breakpoint:{primary:"ponto-interrup\xE7\xE3o",alternatives:["ponto-interrupcao"],normalized:"breakpoint"},go:{primary:"ir",alternatives:["navegar"],normalized:"go"},scroll:{primary:"rolar",alternatives:["scroll"],normalized:"scroll"},push:{primary:"empurrar",alternatives:["push"],normalized:"push"},replace:{primary:"repor",alternatives:["recolocar"],normalized:"replace"},process:{primary:"processar",normalized:"process"},wait:{primary:"esperar",alternatives:["aguardar"],normalized:"wait"},fetch:{primary:"buscar",normalized:"fetch"},settle:{primary:"estabilizar",normalized:"settle"},if:{primary:"se",normalized:"if"},unless:{primary:"salvo",alternatives:["a_menos"],normalized:"unless"},when:{primary:"quando",normalized:"when"},where:{primary:"onde",normalized:"where"},else:{primary:"sen\xE3o",normalized:"else"},repeat:{primary:"repetir",normalized:"repeat"},for:{primary:"para",normalized:"for"},while:{primary:"enquanto",normalized:"while"},forever:{primary:"forever",normalized:"forever"},continue:{primary:"continuar",normalized:"continue"},halt:{primary:"parar",normalized:"halt"},throw:{primary:"lan\xE7ar",normalized:"throw"},call:{primary:"chamar",normalized:"call"},return:{primary:"retornar",alternatives:["devolver"],normalized:"return"},then:{primary:"ent\xE3o",alternatives:["logo"],normalized:"then"},and:{primary:"e",alternatives:["tamb\xE9m","al\xE9m disso"],normalized:"and"},end:{primary:"fim",alternatives:["final","t\xE9rmino"],normalized:"end"},js:{primary:"js",normalized:"js"},async:{primary:"ass\xEDncrono",normalized:"async"},tell:{primary:"dizer",normalized:"tell"},default:{primary:"padr\xE3o",normalized:"default"},init:{primary:"iniciar",alternatives:["inicializar"],normalized:"init"},behavior:{primary:"comportamento",normalized:"behavior"},install:{primary:"instalar",normalized:"install"},measure:{primary:"medir",normalized:"measure"},beep:{primary:"apitar",normalized:"beep"},break:{primary:"interromper",normalized:"break"},copy:{primary:"copiar",normalized:"copy"},exit:{primary:"sair",normalized:"exit"},pick:{primary:"escolher",normalized:"pick"},render:{primary:"renderizar",normalized:"render"},into:{primary:"dentro",alternatives:["dentro de"],normalized:"into"},before:{primary:"antes",normalized:"before"},after:{primary:"depois",normalized:"after"},click:{primary:"clique",alternatives:["clicar"],normalized:"click"},resize:{primary:"redimensionar",normalized:"resize"},hover:{primary:"sobrevoar",alternatives:["passar"],normalized:"hover"},submit:{primary:"envio",alternatives:["submeter"],normalized:"submit"},input:{primary:"entrada",alternatives:["inser\xE7\xE3o"],normalized:"input"},change:{primary:"altera\xE7\xE3o",alternatives:["mudan\xE7a"],normalized:"change"},mousedown:{primary:"mouseBaixo",normalized:"mousedown"},mouseup:{primary:"mouseCima",normalized:"mouseup"},until:{primary:"at\xE9",normalized:"until"},event:{primary:"evento",normalized:"event"},from:{primary:"de",alternatives:["desde"],normalized:"from"},connect:{primary:"conectar",alternatives:["conex\xE3o"],normalized:"connect"},stream:{primary:"transmitir",alternatives:["fluxo"],normalized:"stream"},live:{primary:"ao-vivo",alternatives:["vivo","direto"],normalized:"live"},socket:{primary:"soquete",alternatives:["websocket"],normalized:"socket"},bind:{primary:"vincular",alternatives:["ligar","bind"],normalized:"bind"},intercept:{primary:"interceptar",alternatives:["intercept"],normalized:"intercept"},worker:{primary:"trabalhador",alternatives:["worker"],normalized:"worker"},eventsource:{primary:"eventsource",alternatives:["fonte-de-eventos"],normalized:"eventsource"}},eventHandler:{keyword:{primary:"em",alternatives:["ao"],normalized:"on"},sourceMarker:{primary:"de",alternatives:["desde"],position:"before"},conditionalKeyword:{primary:"quando",alternatives:["se"]},eventMarker:{primary:"ao",alternatives:["no","em"],position:"before"},temporalMarkers:["quando","ao"]}};var Ye={code:"tr",name:"Turkish",nativeName:"T\xFCrk\xE7e",regions:["priority"],direction:"ltr",script:"latin",wordOrder:"SOV",markingStrategy:"case-suffix",usesSpaces:!0,markersOptional:!0,verb:{position:"end",suffixes:["mek","mak","yor","di","mi\u015F"],subjectDrop:!0},references:{me:"ben",it:"o",you:"sen",result:"sonu\xE7",event:"olay",target:"hedef",body:"g\xF6vde"},possessive:{marker:"\u0131n",markerPosition:"after-object",usePossessiveAdjectives:!0,specialForms:{me:"benim",it:"onun",you:"senin"},keywords:{benim:"me",senin:"you",onun:"it"}},roleMarkers:{patient:{primary:"i",alternatives:["\u0131","u","\xFC","yi","y\u0131","yu","y\xFC","ni","n\u0131","nu","n\xFC"],position:"after"},destination:{primary:"e",alternatives:["a","ye","ya","ne","na","de","da","te","ta","\u0131n","in","un","\xFCn","n\u0131n","nin","nun","n\xFCn"],position:"after"},source:{primary:"den",alternatives:["dan","ten","tan"],position:"after"},style:{primary:"le",alternatives:["la","yle","yla"],position:"after"},event:{primary:"i",alternatives:["\u0131","u","\xFC"],position:"after"}},keywords:{toggle:{primary:"de\u011Fi\u015Ftir",alternatives:["a\xE7/kapat"],normalized:"toggle"},add:{primary:"ekle",normalized:"add"},remove:{primary:"kald\u0131r",alternatives:["sil"],normalized:"remove"},put:{primary:"koy",normalized:"put"},append:{primary:"ili\u015Ftir",normalized:"append"},prepend:{primary:"ba\u015F\u0131naekle",normalized:"prepend"},take:{primary:"tut",normalized:"take"},make:{primary:"yap",normalized:"make"},clone:{primary:"klonla",normalized:"clone"},swap:{primary:"takas",normalized:"swap"},morph:{primary:"d\xF6n\xFC\u015Ft\xFCr",alternatives:["\u015Fekil de\u011Fi\u015Ftir"],normalized:"morph"},set:{primary:"ayarla",alternatives:["belirle"],normalized:"set"},get:{primary:"al",normalized:"get"},increment:{primary:"art\u0131r",normalized:"increment"},decrement:{primary:"azalt",normalized:"decrement"},log:{primary:"kaydet",normalized:"log"},show:{primary:"g\xF6ster",normalized:"show"},hide:{primary:"gizle",normalized:"hide"},transition:{primary:"ge\xE7i\u015F",normalized:"transition"},on:{primary:"\xFCzerinde",alternatives:["zaman"],normalized:"on"},trigger:{primary:"tetikle",normalized:"trigger"},send:{primary:"g\xF6nder",normalized:"send"},focus:{primary:"odak",alternatives:["odaklanma"],normalized:"focus"},blur:{primary:"bulan\u0131k",alternatives:["bulan\u0131kl\u0131k","bulanik"],normalized:"blur"},empty:{primary:"bo\u015Falt",alternatives:["bosalt","bo\u015F"],normalized:"empty"},open:{primary:"a\xE7",alternatives:["ac"],normalized:"open"},close:{primary:"kapat",normalized:"close"},select:{primary:"vurgula",normalized:"select"},clear:{primary:"temizle",normalized:"clear"},reset:{primary:"s\u0131f\u0131rla",alternatives:["sifirla"],normalized:"reset"},breakpoint:{primary:"kesme-noktas\u0131",alternatives:["kesme-noktasi"],normalized:"breakpoint"},click:{primary:"t\u0131klama",alternatives:["t\u0131kla","tiklama","t\u0131k","tik"],normalized:"click"},hover:{primary:"\xFCzerine gelme",alternatives:["\xFCzerinde gezinme"],normalized:"hover"},submit:{primary:"g\xF6nderme",normalized:"submit"},input:{primary:"giri\u015F",alternatives:["girdi","giris"],normalized:"input"},change:{primary:"de\u011Fi\u015Fiklik",alternatives:["de\u011Fi\u015Fim","degisim"],normalized:"change"},load:{primary:"y\xFCkle",normalized:"load"},go:{primary:"git",normalized:"go"},scroll:{primary:"kayd\u0131r",alternatives:["kaydir"],normalized:"scroll"},push:{primary:"itele",alternatives:["push"],normalized:"push"},replace:{primary:"de\u011Fi\u015Ftir_url",alternatives:["degistir_url"],normalized:"replace"},process:{primary:"i\u015Fle",alternatives:["isle"],normalized:"process"},wait:{primary:"bekle",normalized:"wait"},fetch:{primary:"getir",normalized:"fetch"},settle:{primary:"sabitlen",normalized:"settle"},if:{primary:"e\u011Fer",normalized:"if"},unless:{primary:"de\u011Filse",normalized:"unless"},when:{primary:"iken",alternatives:["durumunda","oldu\u011Funda"],normalized:"when"},where:{primary:"nerede",normalized:"where"},else:{primary:"yoksa",normalized:"else"},repeat:{primary:"tekrarla",normalized:"repeat"},for:{primary:"i\xE7in",normalized:"for"},while:{primary:"s\xFCresince",normalized:"while"},forever:{primary:"forever",normalized:"forever"},continue:{primary:"devam",normalized:"continue"},halt:{primary:"durdur",normalized:"halt"},throw:{primary:"f\u0131rlat",normalized:"throw"},call:{primary:"\xE7a\u011F\u0131r",normalized:"call"},return:{primary:"d\xF6n",normalized:"return"},then:{primary:"ard\u0131ndan",alternatives:["daha sonra","ardindan"],normalized:"then"},and:{primary:"ve",alternatives:["ayr\u0131ca","hem de"],normalized:"and"},or:{primary:"veya",normalized:"or"},not:{primary:"de\u011Fil",alternatives:["degil"],normalized:"not"},end:{primary:"son",alternatives:["biti\u015F","bitti"],normalized:"end"},js:{primary:"js",normalized:"js"},async:{primary:"asenkron",normalized:"async"},tell:{primary:"s\xF6yle",normalized:"tell"},default:{primary:"varsay\u0131lan",normalized:"default"},init:{primary:"ba\u015Flat",normalized:"init"},behavior:{primary:"davran\u0131\u015F",normalized:"behavior"},install:{primary:"kur",alternatives:["y\xFCklemek"],normalized:"install"},measure:{primary:"\xF6l\xE7",normalized:"measure"},beep:{primary:"bip",normalized:"beep"},break:{primary:"dur",normalized:"break"},copy:{primary:"kopyala",normalized:"copy"},exit:{primary:"\xE7\u0131k",normalized:"exit"},pick:{primary:"se\xE7",normalized:"pick"},render:{primary:"render",normalized:"render"},into:{primary:"i\xE7ine",normalized:"into"},before:{primary:"\xF6nce",normalized:"before"},after:{primary:"sonra",normalized:"after"},until:{primary:"kadar",normalized:"until"},event:{primary:"olay",normalized:"event"},from:{primary:"den",alternatives:["dan"],normalized:"from"},connect:{primary:"ba\u011Flan",alternatives:["ba\u011Fla","ba\u011Flant\u0131"],normalized:"connect"},stream:{primary:"yay\u0131nla",alternatives:["ak\u0131t","ak\u0131\u015F"],normalized:"stream"},live:{primary:"canl\u0131",alternatives:["ger\xE7ek-zamanl\u0131"],normalized:"live"},socket:{primary:"soket",alternatives:["websocket"],normalized:"socket"},bind:{primary:"bind",normalized:"bind"},intercept:{primary:"yakala",alternatives:["araya-gir","intercept"],normalized:"intercept"},worker:{primary:"i\u015F\xE7i",alternatives:["worker"],normalized:"worker"},eventsource:{primary:"eventsource",alternatives:["olay-kayna\u011F\u0131"],normalized:"eventsource"}},eventHandler:{eventMarker:{primary:"da",alternatives:["de","ta","te"],position:"after"},temporalMarkers:["d\u0131\u011F\u0131nda","di\u011Finde"]}};var Xe={code:"zh",name:"Chinese",nativeName:"\u4E2D\u6587",regions:["east-asian","priority"],direction:"ltr",script:"cjk",wordOrder:"SVO",markingStrategy:"preposition",usesSpaces:!1,verb:{position:"second",subjectDrop:!0},references:{me:"\u6211",it:"\u5B83",you:"\u4F60",result:"\u7ED3\u679C",event:"\u4E8B\u4EF6",target:"\u76EE\u6807",body:"\u4E3B\u4F53"},possessive:{marker:"\u7684",markerPosition:"between",keywords:{\u6211\u7684:"me",\u4F60\u7684:"you",\u5B83\u7684:"it",\u4ED6\u7684:"it",\u5979\u7684:"it"}},roleMarkers:{destination:{primary:"\u5728",alternatives:["\u5230","\u4E8E"],position:"before"},source:{primary:"\u4ECE",alternatives:["\u7531"],position:"before"},patient:{primary:"\u628A",position:"before"},style:{primary:"\u7528",alternatives:["\u4EE5"],position:"before"}},keywords:{toggle:{primary:"\u5207\u6362",normalized:"toggle"},add:{primary:"\u6DFB\u52A0",alternatives:["\u52A0"],normalized:"add"},remove:{primary:"\u79FB\u9664",alternatives:["\u5220\u9664","\u53BB\u6389"],normalized:"remove"},put:{primary:"\u653E\u7F6E",alternatives:["\u653E","\u653E\u5165"],normalized:"put"},append:{primary:"\u8FFD\u52A0",alternatives:["\u9644\u52A0"],normalized:"append"},prepend:{primary:"\u524D\u7F6E",alternatives:["\u9884\u7F6E"],normalized:"prepend"},take:{primary:"\u62FF\u53D6",normalized:"take"},make:{primary:"\u5236\u4F5C",normalized:"make"},clone:{primary:"\u514B\u9686",normalized:"clone"},swap:{primary:"\u4EA4\u6362",normalized:"swap"},morph:{primary:"\u53D8\u5F62",alternatives:["\u8F6C\u6362"],normalized:"morph"},set:{primary:"\u8BBE\u7F6E",alternatives:["\u8BBE\u5B9A"],normalized:"set"},get:{primary:"\u83B7\u53D6",alternatives:["\u83B7\u5F97","\u53D6\u5F97"],normalized:"get"},increment:{primary:"\u589E\u52A0",normalized:"increment"},decrement:{primary:"\u51CF\u5C11",normalized:"decrement"},log:{primary:"\u65E5\u5FD7",normalized:"log"},show:{primary:"\u663E\u793A",alternatives:["\u5C55\u793A"],normalized:"show"},hide:{primary:"\u9690\u85CF",normalized:"hide"},transition:{primary:"\u8FC7\u6E21",normalized:"transition"},on:{primary:"\u5F53",alternatives:["\u5728...\u65F6"],normalized:"on"},trigger:{primary:"\u89E6\u53D1",normalized:"trigger"},send:{primary:"\u53D1\u9001",normalized:"send"},focus:{primary:"\u805A\u7126",normalized:"focus"},blur:{primary:"\u5931\u7126",normalized:"blur"},empty:{primary:"\u6E05\u7A7A",alternatives:["\u7A7A\u7684"],normalized:"empty"},open:{primary:"\u6253\u5F00",normalized:"open"},close:{primary:"\u5173\u95ED",normalized:"close"},select:{primary:"\u9009\u62E9",normalized:"select"},clear:{primary:"\u6E05\u9664",normalized:"clear"},reset:{primary:"\u91CD\u7F6E",normalized:"reset"},breakpoint:{primary:"\u65AD\u70B9",normalized:"breakpoint"},click:{primary:"\u70B9\u51FB",normalized:"click"},hover:{primary:"\u60AC\u505C",alternatives:["\u60AC\u6D6E"],normalized:"hover"},submit:{primary:"\u63D0\u4EA4",normalized:"submit"},input:{primary:"\u8F93\u5165",normalized:"input"},change:{primary:"\u6539\u53D8",alternatives:["\u53D8\u5316"],normalized:"change"},go:{primary:"\u524D\u5F80",normalized:"go"},scroll:{primary:"\u6EDA\u52A8",normalized:"scroll"},push:{primary:"\u63A8\u9001",normalized:"push"},replace:{primary:"\u66FF\u6362",normalized:"replace"},process:{primary:"\u5904\u7406",normalized:"process"},wait:{primary:"\u7B49\u5F85",normalized:"wait"},fetch:{primary:"\u6293\u53D6",normalized:"fetch"},settle:{primary:"\u7A33\u5B9A",normalized:"settle"},if:{primary:"\u5982\u679C",normalized:"if"},unless:{primary:"\u9664\u975E",normalized:"unless"},when:{primary:"\u4F55\u65F6",normalized:"when"},where:{primary:"\u54EA\u91CC",normalized:"where"},else:{primary:"\u5426\u5219",normalized:"else"},matches:{primary:"\u5339\u914D",normalized:"matches"},repeat:{primary:"\u91CD\u590D",normalized:"repeat"},for:{primary:"\u4E3A",normalized:"for"},while:{primary:"\u6301\u7EED",normalized:"while"},continue:{primary:"\u7EE7\u7EED",normalized:"continue"},halt:{primary:"\u505C\u6B62",normalized:"halt"},throw:{primary:"\u629B\u51FA",normalized:"throw"},call:{primary:"\u8C03\u7528",normalized:"call"},return:{primary:"\u8FD4\u56DE",normalized:"return"},then:{primary:"\u7136\u540E",alternatives:["\u63A5\u7740","\u90A3\u4E48"],normalized:"then"},and:{primary:"\u5E76\u4E14",alternatives:["\u548C","\u800C\u4E14"],normalized:"and"},end:{primary:"\u7ED3\u675F",alternatives:["\u7EC8\u6B62","\u5B8C"],normalized:"end"},js:{primary:"JS\u6267\u884C",alternatives:["js"],normalized:"js"},async:{primary:"\u5F02\u6B65",normalized:"async"},tell:{primary:"\u544A\u8BC9",normalized:"tell"},default:{primary:"\u9ED8\u8BA4",normalized:"default"},init:{primary:"\u521D\u59CB\u5316",normalized:"init"},behavior:{primary:"\u884C\u4E3A",normalized:"behavior"},install:{primary:"\u5B89\u88C5",normalized:"install"},measure:{primary:"\u6D4B\u91CF",normalized:"measure"},beep:{primary:"\u8702\u9E23",normalized:"beep"},break:{primary:"\u4E2D\u65AD",normalized:"break"},copy:{primary:"\u590D\u5236",normalized:"copy"},exit:{primary:"\u9000\u51FA",normalized:"exit"},pick:{primary:"\u9009\u53D6",normalized:"pick"},render:{primary:"\u6E32\u67D3",normalized:"render"},into:{primary:"\u8FDB\u5165",normalized:"into"},before:{primary:"\u4E4B\u524D",normalized:"before"},after:{primary:"\u4E4B\u540E",normalized:"after"},until:{primary:"\u76F4\u5230",normalized:"until"},event:{primary:"\u4E8B\u4EF6",normalized:"event"},from:{primary:"\u4ECE",normalized:"from"},connect:{primary:"\u8FDE\u63A5",alternatives:["\u8FDE\u63A5\u5668"],normalized:"connect"},stream:{primary:"\u6D41",alternatives:["\u6D41\u5F0F\u4F20\u8F93"],normalized:"stream"},live:{primary:"\u5B9E\u65F6",alternatives:["\u76F4\u64AD"],normalized:"live"},socket:{primary:"\u5957\u63A5\u5B57",alternatives:["websocket","socket"],normalized:"socket"},bind:{primary:"\u7ED1\u5B9A",alternatives:["bind"],normalized:"bind"},intercept:{primary:"\u62E6\u622A",alternatives:["intercept"],normalized:"intercept"},worker:{primary:"\u5DE5\u4F5C\u7EBF\u7A0B",alternatives:["\u5DE5\u4F5C\u8005","worker"],normalized:"worker"},eventsource:{primary:"eventsource",alternatives:["\u4E8B\u4EF6\u6E90"],normalized:"eventsource"}},tokenization:{boundaryStrategy:"character"},eventHandler:{keyword:{primary:"\u5F53",alternatives:["\u5728...\u65F6"],normalized:"on"},sourceMarker:{primary:"\u4ECE",position:"before"},eventMarker:{primary:"\u5F53",alternatives:["\u5728"],position:"before"},temporalMarkers:["\u5F53","\u5728...\u65F6"]}};function ee(n,e){return e?{type:"literal",value:n,dataType:e}:{type:"literal",value:n}}function lt(n,e){return e?{type:"selector",value:n,selectorKind:e}:{type:"selector",value:n}}function Ze(n){return{type:"reference",value:n}}function Mt(n,e){return{type:"property-path",object:n,property:e}}function zr(n,e=!0){return{type:"flag",name:n,enabled:e}}function Ln(n,e,t){let r=e instanceof Map?e:new Map(Object.entries(e)),i={kind:"command",action:n,roles:r};return t?{...i,metadata:t}:i}function Tr(n,e,t,r,i){let a=e instanceof Map?e:new Map(Object.entries(e));return{kind:"event-handler",action:n,roles:a,body:t,...i&&{eventModifiers:i},...r&&{metadata:r}}}function Cn(n,e,t,r,i){let a=e instanceof Map?e:new Map(Object.entries(e));return{kind:"conditional",action:n,roles:a,thenBranch:t,...r&&{elseBranch:r},...i&&{metadata:i}}}function Rn(n,e,t,r,i,a,s){let o=e instanceof Map?e:new Map(Object.entries(e));return{kind:"loop",action:n,roles:o,loopVariant:t,body:r,...i&&{loopVariable:i},...a&&{indexVariable:a},...s&&{metadata:s}}}var Er=new Set(["me","you","it","result","event","target","body"]);function Ot(n,e=Er){return e.has(n)}var Pn=new Set(["body","then","else","condition","loop-body","variable","catch","finally"]);function fo(n){let e=n.slice(1,-1),t=0;for(let r of e)if(r==="[")t++;else if(r==="]")t--;else if(t===0&&(r===" "||r===":"))return!0;return!1}function jt(n,e={}){let t=n.trim(),r=e.collectDiagnostics===!0,i=[];if(!t.startsWith("[")||!t.endsWith("]"))throw new Error("Explicit syntax must be wrapped in brackets: [command role:value ...]");let a=t.slice(1,-1).trim();if(!a)throw new Error("Empty explicit statement");let s=go(a);if(s.length===0)throw new Error("No command specified in explicit statement");let o=s[0].toLowerCase(),l=new Map,c=e.referenceSet??Er,d=e.schemaLookup?.getSchema(o),p=d?new Set(d.roles.map(m=>m.role)):null;for(let m=1;m<s.length;m++){let f=s[m];if(f.startsWith("+")||f.startsWith("~")){let E=f.startsWith("+"),x=f.slice(1);if(!x){if(r){i.push({severity:"error",code:"EMPTY_FLAG",message:`Empty flag name: "${f}"`,source:"schema"});continue}throw new Error(`Empty flag name: "${f}"`)}if(p&&!p.has(x)){if(r){i.push({severity:"error",code:"UNKNOWN_FLAG",message:`Unknown flag "${x}" for command "${o}"`,source:"schema",suggestions:[...p].map(k=>`+${k}`)}),l.set(x,zr(x,E));continue}throw new Error(`Unknown flag "${x}" for command "${o}". Valid roles: ${[...p].join(", ")}`)}l.set(x,zr(x,E));continue}let y=f.indexOf(":");if(y===-1){if(r){i.push({severity:"error",code:"INVALID_ROLE_FORMAT",message:`Invalid role format: "${f}". Expected role:value or +flag`,source:"schema"});continue}throw new Error(`Invalid role format: "${f}". Expected role:value or +flag`)}let g=f.slice(0,y);if(p&&!Pn.has(g)&&!p.has(g))if(r)i.push({severity:"error",code:"UNKNOWN_ROLE",message:`Unknown role "${g}" for command "${o}"`,source:"schema",suggestions:[...p]});else throw new Error(`Unknown role "${g}" for command "${o}". Valid roles: ${[...p].join(", ")}`);let h=g,b=f.slice(y+1);if(Pn.has(g)&&b.startsWith("[")&&fo(b)){let E=vo(f,y+1),x=f.slice(y+1,E+1);l.set(h,{type:"expression",raw:x});continue}let z=ho(b,c);l.set(h,z)}if(d&&o!=="on"){for(let m of d.roles)if(m.required&&!l.has(m.role)&&!m.default)if(r)i.push({severity:"error",code:"MISSING_REQUIRED_ROLE",message:`Missing required role "${m.role}" for command "${o}": ${m.description}`,source:"schema"});else throw new Error(`Missing required role "${m.role}" for command "${o}": ${m.description}`)}let u=m=>i.length===0?m:{...m,diagnostics:i};switch(o){case"on":{if(!l.get("event")){if(r)return i.push({severity:"error",code:"MISSING_EVENT_ROLE",message:"Event handler requires event role: [on event:click ...]",source:"schema"}),u(Tr("on",l,[],{sourceLanguage:"explicit"}));throw new Error("Event handler requires event role: [on event:click ...]")}let f=At(l,"body",e);return l.delete("body"),u(Tr("on",l,f,{sourceLanguage:"explicit"}))}case"if":{let m=At(l,"then",e),f=At(l,"else",e);return l.delete("then"),l.delete("else"),u(Cn(o,l,m,f.length>0?f:void 0,{sourceLanguage:"explicit"}))}case"repeat":{let m=At(l,"loop-body",e),f=l.get("loop-variant"),y=l.get("variable"),g=l.get("index-variable");l.delete("loop-body"),l.delete("loop-variant"),l.delete("variable"),l.delete("index-variable");let h;f&&f.type==="literal"&&typeof f.value=="string"?h=f.value:l.has("quantity")?h="times":l.has("source")?h="for":l.has("condition")?h="while":h="forever";let b=y?.type==="literal"&&typeof y.value=="string"?y.value:y?.type==="expression"?y.raw:void 0,z=g?.type==="literal"&&typeof g.value=="string"?g.value:void 0;return u(Rn(o,l,h,m,b,z,{sourceLanguage:"explicit"}))}default:return u(Ln(o,l,{sourceLanguage:"explicit"}))}}function Pe(n){let e=n.trim();return e.startsWith("[")&&e.endsWith("]")}function At(n,e,t){let r=n.get(e);return r?r.type==="expression"?[jt(r.raw,t)]:[]:[]}function yo(n){if(n){if(n.startsWith("#"))return"id";if(n.startsWith("."))return"class";if(n.startsWith("["))return"attribute";if(n.startsWith("<")||n.startsWith("*"))return"element";if(/[>+~ ]/.test(n)&&n.length>1)return"complex"}}function go(n){let e=[],t="",r=!1,i="",a=0;for(let s=0;s<n.length;s++){let o=n[s];if(r){t+=o,o===i&&n[s-1]!=="\\"&&(r=!1);continue}if(o==='"'||o==="'"){r=!0,i=o,t+=o;continue}if(o==="["){a++,t+=o;continue}if(o==="]"){a--,t+=o;continue}if(o===" "&&a===0){t&&(e.push(t),t="");continue}t+=o}return t&&e.push(t),e}function ho(n,e){if(n.startsWith("#")||n.startsWith(".")||n.startsWith("[")||n.startsWith("@")||n.startsWith("*"))return lt(n,yo(n));if(n.startsWith('"')||n.startsWith("'"))return ee(n.slice(1,-1),"string");if(n==="true")return ee(!0,"boolean");if(n==="false")return ee(!1,"boolean");let t=n.toLowerCase();if(Ot(t,e))return Ze(t);let r=n.match(/^(-?\d+(?:\.\d+)?)(ms|s|m|h)?$/);if(r){let i=parseFloat(r[1]);return r[2]?ee(n,"duration"):ee(i,"number")}return ee(n)}function vo(n,e){let t=0;for(let r=e;r<n.length;r++)if(n[r]==="[")t++;else if(n[r]==="]"&&(t--,t===0))return r;return n.length-1}function ce(n){let e;if(n.kind==="compound"){let t=n;e=t.statements.map(r=>ce(r)).join(` ${t.chainType} `)}else e=ko(n);return n.annotations&&n.annotations.length>0?n.annotations.map(r=>r.value!==void 0?`@${r.name}(${r.value})`:`@${r.name}`).join(" ")+" "+e:e}function ko(n){let e=[n.action];for(let[t,r]of n.roles)r.type==="flag"?e.push(r.enabled?`+${r.name}`:`~${r.name}`):e.push(`${t}:${Nn(r)}`);if(n.kind==="event-handler"){let t=n;t.body&&t.body.length>0&&e.push(`body:${t.body.map(r=>ce(r)).join(" ")}`)}if(n.kind==="conditional"){let t=n;t.thenBranch&&t.thenBranch.length>0&&e.push(`then:${t.thenBranch.map(r=>ce(r)).join(" ")}`),t.elseBranch&&t.elseBranch.length>0&&e.push(`else:${t.elseBranch.map(r=>ce(r)).join(" ")}`)}if(n.kind==="loop"){let t=n;t.loopVariant&&e.push(`loop-variant:${t.loopVariant}`),t.loopVariable&&e.push(`variable:${t.loopVariable}`),t.indexVariable&&e.push(`index-variable:${t.indexVariable}`),t.body&&t.body.length>0&&e.push(`loop-body:${t.body.map(r=>ce(r)).join(" ")}`)}if(n.kind==="command"){let t=n;t.body&&t.body.length>0&&e.push(`body:${t.body.map(r=>ce(r)).join(" ")}`),t.catchBranch&&t.catchBranch.length>0&&e.push(`catch:${t.catchBranch.map(r=>ce(r)).join(" ")}`),t.finallyBranch&&t.finallyBranch.length>0&&e.push(`finally:${t.finallyBranch.map(r=>ce(r)).join(" ")}`),t.asyncVariant&&e.push(`async-variant:${t.asyncVariant}`),t.asyncBody&&t.asyncBody.length>0&&e.push(`async-body:${t.asyncBody.map(r=>ce(r)).join(" ")}`)}return`[${e.join(" ")}]`}function Nn(n){switch(n.type){case"literal":return typeof n.value=="string"?n.dataType==="string"||/\s/.test(n.value)?`"${n.value}"`:n.value:String(n.value);case"selector":return n.value;case"reference":return n.value;case"property-path":return`${Nn(n.object)}'s ${n.property}`;case"expression":return n.raw;case"flag":return n.name}}var xo=class{constructor(n){this.namespace=n,this.enabled=this.checkEnabled()}checkEnabled(){if(typeof process<"u"&&process.env){let n=process.env.DEBUG||"";return n==="*"||n.includes("framework:*")||n.includes(`framework:${this.namespace}`)}return!1}log(n,e,...t){if(!this.enabled)return;let r=`[framework:${this.namespace}]`,i=new Date().toISOString();switch(n){case"debug":console.debug(`${i} ${r} DEBUG:`,e,...t);break;case"info":console.info(`${i} ${r} INFO:`,e,...t);break;case"warn":console.warn(`${i} ${r} WARN:`,e,...t);break;case"error":console.error(`${i} ${r} ERROR:`,e,...t);break}}debug(n,...e){this.log("debug",n,...e)}info(n,...e){this.log("info",n,...e)}warn(n,...e){this.log("warn",n,...e)}error(n,...e){this.log("error",n,...e)}isEnabled(){return this.enabled}enable(){this.enabled=!0}disable(){this.enabled=!1}};function bo(n){return new xo(n)}function Je(n,e){return!e||e.length===0||e.includes(n)||e.includes("expression")?!0:n==="property-path"?e.some(t=>["selector","reference","expression"].includes(t)):!1}function So(n,e){return n?.possessive?.keywords?.[e]}function An(n){return!1}var ct=class Qe{constructor(){this.logger=bo("pattern-matcher"),this.stemMatchCount=0,this.totalKeywordMatches=0}safeToLowerCase(e){return typeof e=="string"?e.toLowerCase():e==null?"":String(e).toLowerCase()}matchPattern(e,t,r){let i=e.mark(),a=new Map;if(this.logger.debug("========================================"),this.logger.debug("matchPattern ENTRY"),this.logger.debug("Pattern ID:",t.id),this.logger.debug("Pattern command:",t.command),this.logger.debug("Pattern language:",t.language),this.logger.debug("Pattern template:",JSON.stringify(t.template,null,2)),this.logger.isEnabled()){let l=[];for(let c=0;c<10;c++){let d=e.peek(c);if(d)l.push({type:d.type,value:d.value,kind:d.kind});else break}this.logger.debug("Input tokens (first 10):",l),this.logger.debug("Profile code:",r?.code)}this.currentProfile=r,this.stemMatchCount=0,this.totalKeywordMatches=0,this.logger.debug("--- Calling matchTokenSequence ---"),this.logger.debug("Pattern tokens to match:",JSON.stringify(t.template.tokens,null,2));let s=this.matchTokenSequence(e,t.template.tokens,a);if(this.logger.debug("matchTokenSequence returned:",s),this.logger.debug("Captured roles:",Array.from(a.entries()).map(([l,c])=>[l,JSON.stringify(c)])),!s)return this.logger.debug(">>> MATCH FAILED - resetting token position"),e.reset(i),null;let o=this.calculateConfidence(t,a);return this.applyExtractionRules(t,a),{pattern:t,captured:a,consumedTokens:e.position()-i.position,confidence:o}}matchBest(e,t,r){let i=[];for(let s of t){let o=e.mark(),l=this.matchPattern(e,s,r);l&&i.push(l),e.reset(o)}if(i.length===0)return null;i.sort((s,o)=>{let l=o.pattern.priority-s.pattern.priority;if(l!==0)return l;let c=o.confidence-s.confidence;return Math.abs(c)>.001?c:o.consumedTokens-s.consumedTokens});let a=i[0];return this.matchPattern(e,a.pattern),a}matchTokenSequence(e,t,r,i){let a=t[0],s=a?.type==="literal"&&(a.value==="and"||a.value==="then"||a.alternatives?.includes("and")||a.alternatives?.includes("then"));if(this.currentProfile?.code==="ar"&&!s)for(;e.peek()?.kind==="conjunction";)e.advance();let o=null,l=null;for(let c=0;c<t.length;c++){let d=t[c];this.logger.debug(" >> Matching pattern token:",JSON.stringify(d,null,2));let p=e.peek();if(this.logger.debug(" >> Current input token:",p?JSON.stringify({type:p.type,value:p.value,kind:p.kind}):"EOF"),d.type==="role"&&d.greedy){let g=this.collectStopMarkers(t,c+1);if(i)for(let b of i)g.add(b);let h=[];for(;!e.isAtEnd();){let b=e.peek();if(!b||this.isStopMarker(b,g))break;h.push(b.value),e.advance()}if(h.length>0){r.set(d.role,{type:"expression",raw:h.join(" ")}),o=null,l=null;continue}else{if(d.optional)continue;return!1}}if(d.type==="group"){let g=this.collectStopMarkers(t,c+1);if(i)for(let b of i)g.add(b);if(this.matchGroupToken(e,d,r,g)){o=null,l=null;continue}if(this.isOptional(d))continue;return!1}let u=d.type==="role"&&d.optional===!0,m=u?e.mark():null;if(d.type==="role"&&!u){let g=c+1<t.length?t[c+1]:null;if(g?.type==="literal"){let h=e.peek();if(h&&this.getMatchType(h,g.value)!=="none"){if(this.logger.debug(" >> MARKER-STEAL GUARD: current token matches next literal, skipping role"),this.logger.debug(" >> Token match FAILED"),this.isOptional(d))continue;if(o&&l){this.logger.debug(" >> BACKTRACKING: undoing optional role",l),e.reset(o),r.delete(l),o=null,l=null;let b=this.matchPatternToken(e,d,r);if(this.logger.debug(" >> Backtrack retry result:",b),b)continue}return!1}}}let y=this.matchPatternToken(e,d,r);if(this.logger.debug(" >> Match result:",y),y){u?(o=m,l=d.role):(o=null,l=null);continue}if(this.logger.debug(" >> Token match FAILED"),!this.isOptional(d)){if(o&&l){this.logger.debug(" >> BACKTRACKING: undoing optional role",l),e.reset(o),r.delete(l),o=null,l=null;let g=this.matchPatternToken(e,d,r);if(this.logger.debug(" >> Backtrack retry result:",g),g)continue}return!1}}return!0}matchPatternToken(e,t,r){switch(t.type){case"literal":return this.matchLiteralToken(e,t);case"role":return this.matchRoleToken(e,t,r);case"group":return this.matchGroupToken(e,t,r);default:return!1}}matchLiteralToken(e,t){let r=e.peek();if(this.logger.debug(" >>> matchLiteralToken: expecting",t.value),this.logger.debug(" >>> matchLiteralToken: got token",r?JSON.stringify({type:r.type,value:r.value,kind:r.kind}):"null"),!r)return this.logger.debug(" >>> matchLiteralToken: FAIL - no token"),!1;let i=this.getMatchType(r,t.value);if(this.logger.debug(" >>> matchType for",r.value,"vs",t.value,":",i),i!=="none")return this.totalKeywordMatches++,i==="stem"&&this.stemMatchCount++,e.advance(),!0;if(t.alternatives)for(let a of t.alternatives){let s=this.getMatchType(r,a);if(s!=="none")return this.totalKeywordMatches++,s==="stem"&&this.stemMatchCount++,e.advance(),!0}return!1}matchRoleToken(e,t,r){this.logger.debug(" >>> matchRoleToken ENTRY: capturing role",t.role),this.logger.debug(" >>> matchRoleToken: expected types",t.expectedTypes),this.logger.debug(" >>> matchRoleToken: optional?",t.optional),this.skipNoiseWords(e);let i=e.peek();if(this.logger.debug(" >>> After skipNoiseWords, current token:",i?JSON.stringify({value:i.value,kind:i.kind}):"null"),!i)return t.optional||!1;let a=this.tryMatchPossessiveExpression(e);if(a)return t.expectedTypes&&t.expectedTypes.length>0&&!Je(a.type,t.expectedTypes)?t.optional||!1:(r.set(t.role,a),!0);let s=this.tryMatchMethodCallExpression(e);if(s)return t.expectedTypes&&t.expectedTypes.length>0&&!Je(s.type,t.expectedTypes)?t.optional||!1:(r.set(t.role,s),!0);let o=this.tryMatchPossessiveSelectorExpression(e);if(o)return t.expectedTypes&&t.expectedTypes.length>0&&!Je(o.type,t.expectedTypes)?t.optional||!1:(r.set(t.role,o),!0);let l=this.tryMatchPropertyAccessExpression(e);if(l)return t.expectedTypes&&t.expectedTypes.length>0&&!Je(l.type,t.expectedTypes)?t.optional||!1:(r.set(t.role,l),!0);let c=this.tryMatchSelectorPropertyExpression(e);if(c)return t.expectedTypes&&t.expectedTypes.length>0&&!Je(c.type,t.expectedTypes)?t.optional||!1:(r.set(t.role,c),!0);this.logger.debug(" >>> Trying tokenToSemanticValue for token:",i?JSON.stringify({value:i.value,kind:i.kind}):"null");let d=this.tokenToSemanticValue(i);return this.logger.debug(" >>> tokenToSemanticValue returned:",d?JSON.stringify(d):"null"),d?(this.logger.debug(" >>> Validating type:",d.type,"against expected:",t.expectedTypes),t.expectedTypes&&t.expectedTypes.length>0&&!Je(d.type,t.expectedTypes)?(this.logger.debug(" >>> TYPE MISMATCH - returning",t.optional||!1),t.optional||!1):(this.logger.debug(" >>> Type validation PASSED"),r.set(t.role,d),e.advance(),!0)):t.optional||!1}tryMatchPossessiveExpression(e){let t=e.peek();if(!t||!this.currentProfile)return null;let r=t.normalized||t.value,i=this.safeToLowerCase(r),a=So(this.currentProfile,i);if(!a)return null;let s=e.mark();e.advance();let o=e.peek();if(!o)return e.reset(s),null;if(o.kind==="identifier"||o.kind==="keyword"&&!this.isStructuralKeyword(o.value)||o.kind==="selector"&&o.value.startsWith("*")||o.kind==="selector"&&o.value.startsWith("@")||o.kind==="selector"&&o.value.startsWith(".")&&/^\.[a-zA-Z_]\w*/.test(o.value)){e.advance();let l=o.value;o.kind==="selector"&&l.startsWith(".")&&/^\.[a-zA-Z_]\w*/.test(l)&&(l=l.substring(1));let c=l;for(;e.peek()?.kind==="selector"&&e.peek().value.startsWith(".")&&/^\.[a-zA-Z_]\w*/.test(e.peek().value);)c+=e.peek().value,e.advance();let d=e.peek();return d?.kind==="literal"&&d.value.startsWith("(")&&(c+=d.value,e.advance()),Mt(Ze(a),c)}return e.reset(s),null}isStructuralKeyword(e){return new Set(["into","in","to","from","at","by","with","without","before","after","of","as","on","then","end","else","if","repeat","while","for","toggle","add","remove","put","set","show","hide","increment","decrement","send","trigger","call"]).has(e.toLowerCase())}tryMatchMethodCallExpression(e){let t=e.peek();if(!t||t.kind!=="selector")return null;let r=e.mark();e.advance();let i=e.peek();if(!i||i.kind!=="operator"||i.value!==".")return e.reset(r),null;e.advance();let a=e.peek();if(!a||a.kind!=="identifier")return e.reset(r),null;e.advance();let s=e.peek();if(!s||s.kind!=="punctuation"||s.value!=="(")return e.reset(r),null;e.advance();let o=[];for(;!e.isAtEnd()&&o.length<Qe.MAX_METHOD_ARGS;){let c=e.peek();if(!c)break;if(c.kind==="punctuation"&&c.value===")"){e.advance();break}if(c.kind==="punctuation"&&c.value===","){e.advance();continue}o.push(c.value),e.advance()}return{type:"expression",raw:`${t.value}.${a.value}(${o.join(", ")})`}}tryMatchPropertyAccessExpression(e){let t=e.peek();if(!t||t.kind!=="identifier"&&t.kind!=="keyword")return null;let r=e.mark();e.advance();let i=e.peek();if(!i||i.kind!=="operator"||i.value!==".")return e.reset(r),null;e.advance();let a=e.peek();if(!a||a.kind!=="identifier")return e.reset(r),null;e.advance();let s=`${t.value}.${a.value}`,o=1;for(;!e.isAtEnd()&&o<Qe.MAX_PROPERTY_DEPTH;){let c=e.peek();if(!c||c.kind!=="operator"||c.value!==".")break;e.advance();let d=e.peek();if(!d||d.kind!=="identifier")break;e.advance(),s+=`.${d.value}`,o++}let l=e.peek();if(l&&l.kind==="punctuation"&&l.value==="("){e.advance();let c=[],d=0;for(;!e.isAtEnd()&&c.length<Qe.MAX_METHOD_ARGS;){let u=e.peek();if(!u)break;if(u.kind==="punctuation"&&u.value===")"){if(d===0){e.advance();break}d--}if(u.kind==="punctuation"&&u.value==="("&&d++,u.kind==="punctuation"&&u.value===","){e.advance();continue}c.push(u.value),e.advance()}return{type:"expression",raw:`${s}(${c.join(", ")})`}}return{type:"expression",raw:s}}tryMatchPossessiveSelectorExpression(e){let t=e.peek();if(!t||t.kind!=="selector")return null;let r=e.mark();e.advance();let i=e.peek();if(!i||i.kind!=="punctuation"||i.value!=="'s")return e.reset(r),null;e.advance();let a=e.peek();return!a||a.kind!=="selector"&&a.kind!=="identifier"?(e.reset(r),null):(e.advance(),Mt(lt(t.value),a.value))}tryMatchSelectorPropertyExpression(e){let t=e.peek();if(!t||t.kind!=="selector"||typeof t.value!="string"||!t.value.startsWith("#"))return null;let r=e.mark();e.advance();let i=e.peek();if(!i||i.kind!=="selector"||!i.value.startsWith("."))return e.reset(r),null;let a=e.peek(1);a&&a.kind,e.advance();let s=i.value.slice(1);return Mt(lt(t.value),s)}matchGroupToken(e,t,r,i){let a=e.mark(),s=new Set(r.keys());if(this.matchTokenSequence(e,t.tokens,r,i))return!0;e.reset(a);for(let c of r.keys())s.has(c)||r.delete(c);if(!t.optional)return!1;let l=this.getGroupLeadingMarker(t);if(l)for(let c=1;c<=Qe.MAX_MARKER_SCAN;c++){let d=e.peek(c);if(!d)break;if((d.normalized||d.value).toLowerCase()===l){this.logger.debug(" >> MARKER SCAN: found",l,"at offset",c,"- skipping intervening tokens");for(let m=0;m<c;m++)e.advance();if(this.matchTokenSequence(e,t.tokens,r,i))return!0;e.reset(a);for(let m of r.keys())s.has(m)||r.delete(m);break}}return!0}getGroupLeadingMarker(e){let t=e.tokens[0];return t?.type==="literal"?t.value.toLowerCase():null}getMatchType(e,t){return e.value===t?"exact":e.normalized===t?"normalized":e.stem===t&&e.stemConfidence!==void 0&&e.stemConfidence>=.7?"stem":e.kind==="keyword"&&this.safeToLowerCase(e.value)===t.toLowerCase()?"case-insensitive":"none"}collectStopMarkers(e,t){let r=new Set;for(let i=t;i<e.length;i++){let a=e[i];if(a.type==="literal"){if(r.add(a.value.toLowerCase()),a.alternatives)for(let s of a.alternatives)r.add(s.toLowerCase());break}if(a.type==="group"){for(let s of a.tokens)if(s.type==="literal"){if(r.add(s.value.toLowerCase()),s.alternatives)for(let o of s.alternatives)r.add(o.toLowerCase());break}if(!a.optional)break}}return r}isStopMarker(e,t){return t.size===0?!1:!!(t.has(e.value.toLowerCase())||e.normalized&&t.has(e.normalized.toLowerCase()))}tokenToSemanticValue(e){switch(e.kind){case"selector":return lt(e.value);case"literal":return this.parseLiteralValue(e.value);case"keyword":let t=e.normalized||e.value,r=this.safeToLowerCase(t);return An(r)?Ze(r):ee(e.normalized||e.value);case"identifier":if(typeof e.value=="string"&&e.value.startsWith(":"))return Ze(e.value);let i=this.safeToLowerCase(e.value);return An(i)?Ze(i):{type:"expression",raw:e.value};case"url":return ee(e.value,"string");default:return null}}parseLiteralValue(e){if(e.startsWith('"')||e.startsWith("'")||e.startsWith("`")||e.startsWith("\u300C")){let i=e.slice(1,-1);return ee(i,"string")}if(e==="true")return ee(!0,"boolean");if(e==="false")return ee(!1,"boolean");let t=e.match(/^(\d+(?:\.\d+)?)(ms|s|m|h)?$/);if(t){let i=parseFloat(t[1]);return t[2]?ee(e,"duration"):ee(i,"number")}let r=parseFloat(e);return isNaN(r)?ee(e,"string"):ee(r,"number")}applyExtractionRules(e,t){for(let[r,i]of Object.entries(e.extraction))t.has(r)||(i.value!==void 0?t.set(r,{type:"literal",value:i.value}):i.default&&t.set(r,i.default))}isOptional(e){return e.type!=="literal"&&e.optional===!0}calculateConfidence(e,t){let r=0,i=0,a=c=>e.extraction?.[c]?.default!==void 0;for(let c of e.template.tokens)if(c.type==="role")i+=1,t.has(c.role)&&(r+=1);else if(c.type==="group"){for(let d of c.tokens)if(d.type==="role"){let p=a(d.role),u=.8;i+=u,t.has(d.role)?r+=u:p&&(r+=u*.6)}}let s=i>0?r/i:1;if(this.stemMatchCount>0&&this.totalKeywordMatches>0){let c=this.stemMatchCount/this.totalKeywordMatches*.15;s=Math.max(.5,s-c)}let o=this.calculateVSOConfidenceBoost(e);s=Math.min(1,s+o);let l=this.arabicPrepositionDisambiguation(e,t);return s=Math.max(0,Math.min(1,s+l)),s}calculateVSOConfidenceBoost(e){if(e.language!=="ar")return 0;let t=e.template.tokens[0];if(!t||t.type!=="literal")return 0;let r=new Set(["\u0628\u062F\u0644","\u063A\u064A\u0631","\u0623\u0636\u0641","\u0623\u0632\u0644","\u0636\u0639","\u0627\u062C\u0639\u0644","\u0639\u064A\u0646","\u0632\u062F","\u0627\u0646\u0642\u0635","\u0633\u062C\u0644","\u0623\u0638\u0647\u0631","\u0623\u062E\u0641","\u0634\u063A\u0644","\u0623\u0631\u0633\u0644","\u0631\u0643\u0632","\u0634\u0648\u0634","\u062A\u0648\u0642\u0641","\u0627\u0646\u0633\u062E","\u0627\u062D\u0630\u0641","\u0627\u0635\u0646\u0639","\u0627\u0646\u062A\u0638\u0631","\u0627\u0646\u062A\u0642\u0627\u0644","\u0623\u0648"]);if(r.has(t.value))return .15;if(t.alternatives){for(let i of t.alternatives)if(r.has(i))return .15}return 0}arabicPrepositionDisambiguation(e,t){if(e.language!=="ar")return 0;let r=0,i={patient:["\u0639\u0644\u0649"],destination:["\u0625\u0644\u0649","\u0627\u0644\u0649"],source:["\u0645\u0646"],agent:["\u0645\u0646"],manner:["\u0628"],style:["\u0628"],goal:["\u0625\u0644\u0649","\u0627\u0644\u0649"],method:["\u0628"]};for(let[a,s]of t.entries()){let o=i[a];if(!o||o.length===0)continue;let l="metadata"in s?s.metadata:void 0;if(l&&typeof l.prepositionValue=="string"){let c=l.prepositionValue;o.includes(c)?r+=.1:r-=.1}}return Math.max(-.1,Math.min(.1,r))}skipNoiseWords(e){let t=e.peek();if(!t)return;let r=this.safeToLowerCase(t.value);if(Qe.ENGLISH_NOISE_WORDS.has(r)){let i=e.mark();e.advance();let a=e.peek();if(a&&a.kind==="selector")return;e.reset(i)}r==="class"&&e.advance()}extractEventModifiers(e){let t={},r=!1;for(;!e.isAtEnd();){let i=e.peek();if(!i||i.kind!=="event-modifier")break;let a=i.metadata;if(!a)break;switch(r=!0,a.modifierName){case"once":t.once=!0;break;case"debounce":typeof a.value=="number"&&(t.debounce=a.value);break;case"throttle":typeof a.value=="number"&&(t.throttle=a.value);break;case"queue":(a.value==="first"||a.value==="last"||a.value==="all"||a.value==="none")&&(t.queue=a.value);break}e.advance()}return r?t:void 0}};ct.MAX_MARKER_SCAN=3;ct.MAX_PROPERTY_DEPTH=10;ct.MAX_METHOD_ARGS=20;ct.ENGLISH_NOISE_WORDS=new Set(["the","a","an"]);var wo=ct,ju=new wo;var H=class{constructor(){this.name="string-literal"}canExtract(n,e){let t=n[e];return t==='"'||t==="'"||t==="`"||t==="\u201C"||t==="\u2018"}extract(n,e){let t=n[e];if(t==="\u201C"){let a=1;for(;e+a<n.length;){if(n[e+a]==="\u201D")return a++,{value:n.substring(e,e+a),length:a};a++}return null}if(t==="\u2018"){let a=1;for(;e+a<n.length;){if(n[e+a]==="\u2019")return a++,{value:n.substring(e,e+a),length:a};a++}return null}let r=1,i=!1;for(;e+r<n.length;){let a=n[e+r];if(i){i=!1,r++;continue}if(a==="\\"){i=!0,r++;continue}if(a===t)return r++,{value:n.substring(e,e+r),length:r};r++}return null}},F=class{constructor(){this.name="number"}canExtract(n,e){return/\d/.test(n[e])}extract(n,e){let t=0,r=!1;for(;e+t<n.length;){let s=n[e+t];if(/\d/.test(s))t++;else if(s==="."&&!r)r=!0,t++;else break}if(t===0)return null;let i=n.substring(e,e+t),a=e+t;if(a<n.length){let s=n.slice(a),o=[{pattern:"\u6BEB\u79D2",suffix:"ms"},{pattern:"\u5206\u949F",suffix:"m"},{pattern:"\u5C0F\u65F6",suffix:"h"},{pattern:"\u30DF\u30EA\u79D2",suffix:"ms"},{pattern:"\u6642\u9593",suffix:"h"}];for(let c of o)if(s.startsWith(c.pattern))return{value:i+c.suffix,length:t+c.pattern.length,metadata:{hasTimeUnit:!0}};if(s.startsWith("ms"))return{value:i+"ms",length:t+2,metadata:{hasTimeUnit:!0}};let l=[{pattern:"\u79D2",suffix:"s"},{pattern:"\u5206",suffix:"m"}];for(let c of l)if(s.startsWith(c.pattern))return{value:i+c.suffix,length:t+1,metadata:{hasTimeUnit:!0}};if(/^[smh](?![a-zA-Z])/.test(s))return{value:i+s[0],length:t+1,metadata:{hasTimeUnit:!0}}}return{value:i,length:t}}};function zo(n){return"setContext"in n&&typeof n.setContext=="function"}function To(n){let e={language:n.language,direction:n.direction,lookupKeyword:n.lookupKeyword.bind(n),isKeyword:n.isKeyword.bind(n),isKeywordStart:n.isKeywordStart.bind(n),...n.isKeywordStartAtBoundary?{isKeywordStartAtBoundary:n.isKeywordStartAtBoundary.bind(n)}:{}};return n.normalizer?{...e,normalizer:n.normalizer}:e}var re=class{constructor(n,e){this.pos=0,this.tokens=n,this.language=e}peek(n=0){let e=this.pos+n;return e<0||e>=this.tokens.length?null:this.tokens[e]}advance(){if(this.isAtEnd())throw new Error("Unexpected end of token stream");return this.tokens[this.pos++]}isAtEnd(){return this.pos>=this.tokens.length}mark(){return{position:this.pos}}reset(n){this.pos=n.position}position(){return this.pos}remaining(){return this.tokens.slice(this.pos)}takeWhile(n){let e=[];for(;!this.isAtEnd()&&n(this.peek());)e.push(this.advance());return e}skipWhile(n){for(;!this.isAtEnd()&&n(this.peek());)this.advance()}};function _(n,e){return{start:n,end:e}}function $(n,e,t,r){if(typeof n=="object"){let{value:a,kind:s,position:o,normalized:l,stem:c,stemConfidence:d,metadata:p}=n;return{value:a,kind:s,position:o,...l!==void 0&&{normalized:l},...c!==void 0&&{stem:c},...d!==void 0&&{stemConfidence:d},...p!==void 0&&{metadata:p}}}let i=n;if(!e||!t)throw new Error("createToken requires kind and position parameters");if(typeof r=="string")return{value:i,kind:e,position:t,normalized:r};if(r){let{normalized:a,stem:s,stemConfidence:o,metadata:l}=r;return{value:i,kind:e,position:t,...a!==void 0&&{normalized:a},...s!==void 0&&{stem:s},...o!==void 0&&{stemConfidence:o},...l!==void 0&&{metadata:l}}}return{value:i,kind:e,position:t}}function pe(n){return/\s/.test(n)}function It(n){return n==="#"||n==="."||n==="["||n==="@"||n==="*"||n==="<"}function Wt(n){return n==='"'||n==="'"||n==="`"||n==="\u300C"||n==="\u300D"}function ye(n){return/\d/.test(n)}function Vt(n){return/[a-zA-Z]/.test(n)}function J(n){return/[a-zA-Z0-9_-]/.test(n)}function Mn(n,e){if(e>=n.length)return null;let t=n[e];if(!It(t))return null;let r=e,i="";if(t==="#"||t==="."){for(i+=n[r++];r<n.length&&J(n[r]);)i+=n[r++];if(i.length<=1)return null;if(r<n.length&&n[r]==="."&&t==="#"){let s=r+1;for(;s<n.length&&J(n[s]);)s++;if(s<n.length&&n[s]==="(")return i}}else if(t==="["){let a=1,s=!1,o=null,l=!1;for(i+=n[r++];r<n.length&&a>0;){let c=n[r];i+=c,l?l=!1:c==="\\"?l=!0:s?c===o&&(s=!1,o=null):c==='"'||c==="'"||c==="`"?(s=!0,o=c):c==="["?a++:c==="]"&&a--,r++}if(a!==0)return null}else if(t==="@"){for(i+=n[r++];r<n.length&&J(n[r]);)i+=n[r++];if(i.length<=1)return null}else if(t==="*"){for(i+=n[r++];r<n.length&&J(n[r]);)i+=n[r++];if(i.length<=1)return null}else if(t==="<"){if(i+=n[r++],r>=n.length||!Vt(n[r]))return null;for(;r<n.length&&J(n[r]);)i+=n[r++];for(;r<n.length;){let a=n[r];if(a==="."){if(i+=n[r++],r>=n.length||!J(n[r]))return null;for(;r<n.length&&J(n[r]);)i+=n[r++]}else if(a==="#"){if(i+=n[r++],r>=n.length||!J(n[r]))return null;for(;r<n.length&&J(n[r]);)i+=n[r++]}else if(a==="["){let s=1,o=!1,l=null,c=!1;for(i+=n[r++];r<n.length&&s>0;){let d=n[r];i+=d,c?c=!1:d==="\\"?c=!0:o?d===l&&(o=!1,l=null):d==='"'||d==="'"||d==="`"?(o=!0,l=d):d==="["?s++:d==="]"&&s--,r++}if(s!==0)return null}else break}for(;r<n.length&&pe(n[r]);)i+=n[r++];if(r<n.length&&n[r]==="/")for(i+=n[r++];r<n.length&&pe(n[r]);)i+=n[r++];if(r>=n.length||n[r]!==">")return null;i+=n[r++]}return i||null}function Eo(n,e){if(e>=n.length||n[e]!=="'"||e+1>=n.length||n[e+1].toLowerCase()!=="s")return!1;if(e+2>=n.length)return!0;let r=n[e+2];return pe(r)||r==="*"||!J(r)}function On(n,e){if(e>=n.length)return null;let t=n[e];if(!Wt(t)||t==="'"&&Eo(n,e))return null;let i={'"':'"',"'":"'","`":"`","\u300C":"\u300D"}[t];if(!i)return null;let a=e+1,s=t,o=!1;for(;a<n.length;){let l=n[a];if(s+=l,o)o=!1;else if(l==="\\")o=!0;else if(l===i)return s;a++}return s}function jn(n,e){if(e>=n.length)return!1;let t=n[e],r=n[e+1]||"",i=n[e+2]||"";if(t==="/"&&r!=="/"&&/[a-zA-Z0-9._-]/.test(r)||t==="/"&&r==="/"&&/[a-zA-Z]/.test(i)||t==="."&&(r==="/"||r==="."&&i==="/"))return!0;let a=n.slice(e,e+8).toLowerCase();return!!(a.startsWith("http://")||a.startsWith("https://"))}function In(n,e){if(!jn(n,e))return null;let t=e,r="",i=/[a-zA-Z0-9/:._\-?&=%@+~!$'()*,;[\]]/;for(;t<n.length;){let a=n[t];if(a==="#"){if(r.length>0&&/[a-zA-Z0-9/.]$/.test(r))for(r+=a,t++;t<n.length&&/[a-zA-Z0-9_-]/.test(n[t]);)r+=n[t++];break}if(i.test(a))r+=a,t++;else break}return r.length<2?null:r}function Wn(n,e){if(e>=n.length)return null;let t=n[e];if(!ye(t)&&t!=="-"&&t!=="+")return null;let r=e,i="";if((n[r]==="-"||n[r]==="+")&&(i+=n[r++]),r>=n.length||!ye(n[r]))return null;for(;r<n.length&&ye(n[r]);)i+=n[r++];if(r<n.length&&n[r]===".")for(i+=n[r++];r<n.length&&ye(n[r]);)i+=n[r++];return r<n.length&&(n.slice(r,r+2)==="ms"?i+="ms":(n[r]==="s"||n[r]==="m"||n[r]==="h")&&(i+=n[r])),i}var Po=["===","!==","->","==","!=","<=",">=","&&","||","**","+=","-=","*=","/=","+","-","*","/","=",">","<","!","&","|","%","^","~"];var $u=new Set(Po),Lo=new Set(["patient","destination","source","style","event","eventMarker","agent","goal","manner","into","from","to","with","at","of","as","by","in","on","over","under","between","through","without"]),Co=["click","dblclick","input","change","submit","keydown","keyup","keypress","mousedown","mouseup","mouseover","mouseout","mouseenter","mouseleave","mousemove","pointerdown","pointerup","pointermove","focus","blur","load","resize","scroll"],Vn=class _n{constructor(){this.profileKeywords=[],this.multiWordKeywords=[],this.profileKeywordMap=new Map,this.rawExtraEntries=[],this.extractors=[]}getExtraKeywordEntries(){return this.rawExtraEntries}tokenize(e){if(this.isUsingExtractors())return this.tokenizeWithExtractors(e);throw new Error(`${this.constructor.name}: tokenize() not implemented and no extractors registered. Either register extractors or override tokenize() method.`)}registerExtractor(e){zo(e)&&e.setContext(To(this)),this.extractors.push(e)}registerExtractors(e){for(let t of e)this.registerExtractor(t)}clearExtractors(){this.extractors=[]}isUsingExtractors(){return this.extractors.length>0}tokenizeWithExtractors(e){let t=[],r=0;for(;r<e.length;){for(;r<e.length&&pe(e[r]);)r++;if(r>=e.length)break;let i=this.tryMultiWordKeyword(e,r);if(i){t.push(i),r=i.position.end;continue}let a=!1;for(let s of this.extractors)if(s.canExtract(e,r)){let o=s.extract(e,r);if(o){let l=o.metadata?.normalized,c=o.metadata?.stem,d=o.metadata?.stemConfidence,p={};if(o.metadata)for(let[m,f]of Object.entries(o.metadata))m!=="normalized"&&m!=="stem"&&m!=="stemConfidence"&&(p[m]=f);let u={};l&&(u.normalized=l),c&&(u.stem=c),d!==void 0&&(u.stemConfidence=d),Object.keys(p).length>0&&(u.metadata=p),t.push($(o.value,this.classifyToken(o.value),_(r,r+o.length),Object.keys(u).length>0?u:void 0)),r+=o.length,a=!0;break}}if(!a){let s=e[r],o=this.classifyUnknownChar(s);t.push($(s,o,_(r,r+1))),r++}}return new re(t,this.language)}classifyUnknownChar(e){return"()[]{},:;".includes(e)?"punctuation":"+-*/<>=!&|".includes(e)?"operator":"identifier"}tryPropertyAccess(e,t,r){if(e[t]!==".")return!1;let i=r[r.length-1],a=i&&i.position.end<t;if(i&&!a&&(i.kind==="identifier"||i.kind==="keyword"||i.kind==="selector"))return r.push($(".","operator",_(t,t+1))),!0;let l=t+1;for(;l<e.length&&J(e[l]);)l++;return l<e.length&&e[l]==="("?(r.push($(".","operator",_(t,t+1))),!0):!1}initializeKeywordsFromProfile(e,t=[]){let r=new Map;if(this.rawExtraEntries=t,e.keywords){for(let[i,a]of Object.entries(e.keywords))if(r.set(a.primary,{native:a.primary,normalized:a.normalized||i}),a.alternatives)for(let s of a.alternatives)r.set(s,{native:s,normalized:a.normalized||i})}if(e.references){for(let[i,a]of Object.entries(e.references))r.set(a,{native:a,normalized:i});for(let i of Object.keys(e.references))r.has(i)||r.set(i,{native:i,normalized:i})}if(e.roleMarkers){for(let[i,a]of Object.entries(e.roleMarkers))if(a.primary&&r.set(a.primary,{native:a.primary,normalized:i}),a.alternatives)for(let s of a.alternatives)r.set(s,{native:s,normalized:i})}if(e.possessive?.keywords)for(let[i,a]of Object.entries(e.possessive.keywords))r.set(i,{native:i,normalized:a});for(let i of Co)r.has(i)||r.set(i,{native:i,normalized:i});for(let i of t)r.set(i.native,i);this.profileKeywords=Array.from(r.values()).sort((i,a)=>a.native.length-i.native.length),this.multiWordKeywords=this.profileKeywords.filter(i=>i.native.includes(" ")&&!Lo.has(i.normalized)),this.profileKeywordMap=new Map;for(let i of this.profileKeywords){this.profileKeywordMap.set(i.native.toLowerCase(),i);let a=this.removeDiacritics(i.native);a!==i.native&&!this.profileKeywordMap.has(a.toLowerCase())&&this.profileKeywordMap.set(a.toLowerCase(),i)}}removeDiacritics(e){return e.replace(/[\u064B-\u0652\u0670]/g,"")}tryProfileKeyword(e,t){for(let r of this.profileKeywords)if(e.slice(t).startsWith(r.native))return $(r.native,"keyword",_(t,t+r.native.length),r.normalized);return null}tryMultiWordKeyword(e,t,r=i=>/[\p{L}\p{N}_]/u.test(i)){if(this.multiWordKeywords.length===0)return null;let i=e.slice(t);for(let a of this.multiWordKeywords){if(!i.startsWith(a.native))continue;let s=e[t+a.native.length];if(!(s!==void 0&&r(s)))return $(a.native,"keyword",_(t,t+a.native.length),a.normalized)}return null}isKeywordStart(e,t){let r=e.slice(t);return this.profileKeywords.some(i=>r.startsWith(i.native))}isKeywordStartAtBoundary(e,t,r=i=>/[\p{L}\p{N}_]/u.test(i)){let i=e.slice(t);return this.profileKeywords.some(a=>{if(!i.startsWith(a.native))return!1;let s=e[t+a.native.length];return s===void 0||!r(s)})}lookupKeyword(e){return this.profileKeywordMap.get(e.toLowerCase())}isKeyword(e){return this.profileKeywordMap.has(e.toLowerCase())}setNormalizer(e){this.normalizer=e}tryNormalize(e){if(!this.normalizer)return null;let t=this.normalizer.normalize(e);return t.stem!==e&&t.confidence>=.7?t:null}tryMorphKeywordMatch(e,t,r){let i=this.tryNormalize(e);if(!i)return null;let a=this.lookupKeyword(i.stem);if(!a)return null;let s={normalized:a.normalized,stem:i.stem,stemConfidence:i.confidence};return $(e,"keyword",_(t,r),s)}trySelector(e,t){let r=Mn(e,t);return r?$(r,"selector",_(t,t+r.length)):null}tryEventModifier(e,t){if(e[t]!==".")return null;let r=e.slice(t).match(/^\.(?:once|debounce|throttle|queue)(?:\(([^)]+)\))?(?:\s|$|\.)/);if(!r)return null;let i=r[0].replace(/(\s|\.)$/,""),a=i.slice(1).split("(")[0],s=r[1];return{...$(i,"event-modifier",_(t,t+i.length)),metadata:{modifierName:a,value:s?a==="queue"?s:parseInt(s,10):void 0}}}tryString(e,t){let r=On(e,t);return r?$(r,"literal",_(t,t+r.length)):null}tryNumber(e,t){let r=Wn(e,t);return r?$(r,"literal",_(t,t+r.length)):null}tryMatchTimeUnit(e,t,r,i=!1){let a=t;if(i)for(;a<e.length&&pe(e[a]);)a++;let s=e.slice(a);for(let o of r){let l=s.slice(0,o.length);if(o.caseInsensitive?l.toLowerCase()===o.pattern.toLowerCase():l===o.pattern){if(o.notFollowedBy&&(s[o.length]||"")===o.notFollowedBy)continue;if(o.checkBoundary){let d=s[o.length]||"";if(J(d))continue}return{suffix:o.suffix,endPos:a+o.length}}}return null}parseBaseNumber(e,t,r=!0){let i=t,a="";if(r&&(e[i]==="-"||e[i]==="+")&&(a+=e[i++]),i>=e.length||!ye(e[i]))return null;for(;i<e.length&&ye(e[i]);)a+=e[i++];if(i<e.length&&e[i]===".")for(a+=e[i++];i<e.length&&ye(e[i]);)a+=e[i++];return!a||a==="-"||a==="+"?null:{number:a,endPos:i}}tryNumberWithTimeUnits(e,t,r,i={}){let{allowSign:a=!0,skipWhitespace:s=!1}=i,o=this.parseBaseNumber(e,t,a);if(!o)return null;let{number:l,endPos:c}=o,d=[...r,..._n.STANDARD_TIME_UNITS],p=this.tryMatchTimeUnit(e,c,d,s);return p&&(l+=p.suffix,c=p.endPos),$(l,"literal",_(t,c))}tryUrl(e,t){let r=In(e,t);return r?$(r,"url",_(t,t+r.length)):null}tryVariableRef(e,t){if(e[t]!==":"||t+1>=e.length||!J(e[t+1]))return null;let r=t+1;for(;r<e.length&&J(e[r]);)r++;let i=e.slice(t,r);return $(i,"identifier",_(t,r))}tryOperator(e,t){let r=e.slice(t,t+2);if(["==","!=","<=",">=","&&","||","->"].includes(r))return $(r,"operator",_(t,t+2));let i=e[t];return["<",">","!","+","-","*","/","="].includes(i)?$(i,"operator",_(t,t+1)):["(",")","{","}",",",";",":"].includes(i)?$(i,"punctuation",_(t,t+1)):null}tryMultiCharParticle(e,t,r){for(let i of r)if(e.slice(t,t+i.length)===i)return $(i,"particle",_(t,t+i.length));return null}};Vn.STANDARD_TIME_UNITS=[{pattern:"ms",suffix:"ms",length:2},{pattern:"s",suffix:"s",length:1,checkBoundary:!0},{pattern:"m",suffix:"m",length:1,checkBoundary:!0,notFollowedBy:"s"},{pattern:"h",suffix:"h",length:1,checkBoundary:!0}];var V=Vn;function xe(n){return e=>{let t=e.charCodeAt(0);return n.some(([r,i])=>t>=r&&t<=i)}}function Y(n){return{stem:n,confidence:1}}function O(n,e,t){return t?{stem:n,confidence:e,metadata:t}:{stem:n,confidence:e}}var Pr=class{constructor(n){this.language=n.language,this.config={minWordLength:3,minStemLength:2,...n}}normalize(n){let e=n.toLowerCase();if(this.isAlreadyNormalized(e))return Y(n);if(this.config.reflexiveSuffixes){let t=this.tryReflexiveNormalization(e);if(t)return t}if(this.config.endings){let t=this.tryConjugationEndings(e);if(t)return t}if(this.config.suffixRules){let t=this.trySuffixRules(e);if(t)return t}if(this.config.prefixRules){let t=this.tryPrefixRules(e);if(t)return t}return Y(n)}isAlreadyNormalized(n){return this.config.infinitiveEndings?this.config.infinitiveEndings.some(e=>n.endsWith(e)):!1}tryReflexiveNormalization(n){let e=this.config.reflexiveSuffixes;if(!e)return null;for(let t of e){if(!n.endsWith(t))continue;let r=n.slice(0,-t.length);if(this.isAlreadyNormalized(r))return O(r,.88,{removedSuffixes:[t],conjugationType:"reflexive"});let i=this.tryConjugationEndings(r)||this.trySuffixRules(r);if(i&&i.stem!==r)return O(i.stem,i.confidence*.95,{removedSuffixes:[t,...i.metadata?.removedSuffixes||[]],conjugationType:"reflexive"})}return null}tryConjugationEndings(n){let e=this.config.endings;if(!e)return null;let t=this.config.minStemLength??2;for(let r of e){if(!n.endsWith(r.ending))continue;let i=n.slice(0,-r.ending.length);if(i.length<t)continue;let a=i+r.stem;return O(a,r.confidence,{removedSuffixes:[r.ending],conjugationType:r.type})}return null}trySuffixRules(n){let e=this.config.suffixRules;if(!e)return null;let t=this.config.minStemLength??2;for(let r of e){if(!n.endsWith(r.pattern))continue;let i=n.slice(0,-r.pattern.length),a=r.minStemLength??t;if(i.length<a)continue;let s=i+(r.replacement||"");return O(s,r.confidence,{removedSuffixes:[r.pattern],...r.conjugationType&&{conjugationType:r.conjugationType}})}return null}tryPrefixRules(n){let e=this.config.prefixRules;if(!e)return null;for(let t of e){if(!n.startsWith(t.pattern))continue;let r=n.slice(t.pattern.length),i=t.minRemaining??this.config.minStemLength??2;if(!(r.length<i))return O(r,1-t.confidencePenalty,{removedPrefixes:[t.pattern]})}return null}};function ue(n){let e="complex";return n.startsWith("#")&&!n.includes(" ")?e="id":n.startsWith(".")&&!n.includes(" ")?e="class":n.startsWith("[")&&n.endsWith("]")?e="attribute":/^[a-z][a-z0-9]*$/i.test(n)&&(e="element"),{type:"selector",value:n,selectorKind:e}}function U(n,e){let t={type:"literal",value:n};return e!==void 0?{type:"literal",value:n,dataType:e}:t}function Oe(n){return Ot(n)}function oe(n){return{type:"reference",value:n}}function ge(n,e){return{type:"property-path",object:n,property:e}}function ne(n,e,t){let r={kind:"command",action:n,roles:new Map(Object.entries(e))};return t!==void 0?{...r,metadata:t}:r}function Le(n,e,t,r,i,a){let s=new Map;s.set("event",n);let o={kind:"event-handler",action:"on",roles:s,body:e};return t!==void 0&&(o.eventModifiers=t),r!==void 0&&(o.metadata=r),i!==void 0&&i.length>0&&(o.parameterNames=i),a!==void 0&&a.length>0&&(o.additionalEvents=a),o}function $n(n,e,t,r,i){let a={kind:"behavior",action:"behavior",roles:new Map,name:n,parameters:e,eventHandlers:t};return r!==void 0&&r.length>0&&(a.initBlock=r),i!==void 0&&(a.metadata=i),a}function Kn(n,e,t,r){let i={kind:"def",action:"def",roles:new Map,name:n,parameters:e,body:t};return r!==void 0&&(i.metadata=r),i}function pt(n,e="then",t){let r={kind:"compound",action:"compound",roles:new Map,statements:n,chainType:e};return t!==void 0&&(r.metadata=t),r}function qn(n,e,t,r){let i=new Map;i.set("condition",n);let a={kind:"conditional",action:"if",roles:i,thenBranch:e};return t!==void 0&&(a.elseBranch=t),r!==void 0&&(a.metadata=r),a}function dt(n,e){return!e||e.length===0||e.includes(n)||e.includes("expression")?!0:n==="property-path"?e.some(t=>["selector","reference","expression"].includes(t)):n==="expression"?e.some(t=>["selector","reference","expression"].includes(t)):!1}function be(n){let e=n.roles.find(t=>t.role==="destination");return e?{destination:e.default?{fromRole:"destination",default:e.default}:{fromRole:"destination"}}:{}}function Se(n){let e=n.roles.find(t=>t.role==="source");return e?{source:e.default?{fromRole:"source",default:e.default}:{fromRole:"source"}}:{}}function we(n,e){return Bn(n,e,"source")}function _t(n,e){return Bn(n,e,"destination")}function Bn(n,e,t){if(!e||!n.roles.some(a=>a.role===t))return[];let r=e.alternatives?{type:"literal",value:e.primary,alternatives:[...e.alternatives]}:{type:"literal",value:e.primary},i={type:"role",role:t,optional:!0};return[{type:"group",optional:!0,tokens:e.position==="after"?[i,r]:[r,i]}]}var Ro={action:"toggle",description:"Toggle a class or attribute on/off",category:"dom-class",primaryRole:"patient",roles:[{role:"patient",description:"The class or attribute to toggle",required:!0,expectedTypes:["selector"],selectorKinds:["class","attribute"],svoPosition:1,sovPosition:2},{role:"destination",description:"The target element (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:2,sovPosition:1,markerVariants:{ko:["\uC5D0\uC11C"]}}],errorCodes:["MISSING_ARGUMENT","NO_VALID_CLASS_NAMES","INVALID_CSS_PROPERTY"],preconditions:[{condition:"Command has at least one argument",errorCode:"MISSING_ARGUMENT",message:"toggle command requires an argument"},{condition:"Class names are valid CSS identifiers",errorCode:"NO_VALID_CLASS_NAMES",message:"toggle command: no valid class names found"}],recoveryHints:{MISSING_ARGUMENT:"Add a class selector (.classname) or attribute to toggle",NO_VALID_CLASS_NAMES:"Ensure class names start with a dot (.) and are valid CSS identifiers",INVALID_CSS_PROPERTY:"Check CSS property name syntax (use kebab-case)"}},No={action:"add",description:"Add a class or attribute to an element",category:"dom-class",primaryRole:"patient",roles:[{role:"patient",description:"The class or attribute to add",required:!0,expectedTypes:["selector","literal"],svoPosition:1,sovPosition:2},{role:"destination",description:"The target element (defaults to me)",required:!1,expectedTypes:["selector","reference","expression"],default:{type:"reference",value:"me"},svoPosition:2,sovPosition:1,markerOverride:{en:"to"}}],errorCodes:["MISSING_ARGUMENT","NO_VALID_CLASS_NAMES","PROPERTY_REQUIRES_VALUE"],preconditions:[{condition:"Command has at least one argument",errorCode:"MISSING_ARGUMENT",message:"add command requires an argument"}],recoveryHints:{MISSING_ARGUMENT:"Add a class selector (.classname) or attribute to add",NO_VALID_CLASS_NAMES:"Ensure class names start with a dot (.) and are valid CSS identifiers",PROPERTY_REQUIRES_VALUE:"When adding a property (*prop), provide a value argument"}},Ao={action:"remove",description:"Remove a class or attribute from an element",category:"dom-class",primaryRole:"patient",targetRole:"source",roles:[{role:"patient",description:"The class/attribute to remove, or the element to remove",required:!0,expectedTypes:["selector","reference"],svoPosition:1,sovPosition:2},{role:"source",description:"The element to remove from (defaults to me)",required:!1,expectedTypes:["selector","reference","expression"],default:{type:"reference",value:"me"},svoPosition:2,sovPosition:1}],errorCodes:["MISSING_ARGUMENT","NO_VALID_CLASS_NAMES"],preconditions:[{condition:"Command has at least one argument",errorCode:"MISSING_ARGUMENT",message:"remove command requires an argument"}],recoveryHints:{MISSING_ARGUMENT:"Add a class selector (.classname) or attribute to remove",NO_VALID_CLASS_NAMES:"Ensure class names start with a dot (.) and are valid CSS identifiers"}},Mo={action:"put",description:"Put content into a target element or variable",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The content to put",required:!0,expectedTypes:["literal","selector","reference","expression"],svoPosition:1,sovPosition:1},{role:"destination",description:"Where to put the content",required:!0,expectedTypes:["selector","reference"],svoPosition:2,sovPosition:2,markerOverride:{en:"into"},markerVariants:{en:["before","after"]},methodCarrier:"method"}],errorCodes:["MISSING_ARGUMENTS","MISSING_CONTENT","MISSING_POSITION","INVALID_POSITION","NO_TARGET","NO_ELEMENTS"],preconditions:[{condition:"Command has content and position arguments",errorCode:"MISSING_ARGUMENTS",message:"put requires arguments"},{condition:"Content to put is specified",errorCode:"MISSING_CONTENT",message:"put requires content"},{condition:"Position keyword is specified (into, before, after, etc.)",errorCode:"MISSING_POSITION",message:"put requires position keyword"}],recoveryHints:{MISSING_ARGUMENTS:"Use syntax: put <content> into/before/after <target>",MISSING_CONTENT:"Add content to put (string, element, or expression)",MISSING_POSITION:"Add position keyword: into, before, after, at start of, at end of",INVALID_POSITION:"Valid positions: into, before, after, at start of, at end of",NO_TARGET:'Ensure target element exists or use "me" reference',NO_ELEMENTS:"Check that the selector matches existing elements"}},Oo={action:"set",description:"Set a property or variable to a value",category:"variable",primaryRole:"destination",roles:[{role:"destination",description:"The property or variable to set",required:!0,expectedTypes:["selector","reference","expression","property-path"],svoPosition:1,sovPosition:1,markerOverride:{en:"",ja:"\u3092",ko:"\uB97C",tr:"i",ar:"",sw:"",tl:"",bn:"\u0995\u09C7",qu:"ta",hi:"\u0915\u094B"}},{role:"patient",description:"The value to set",required:!0,expectedTypes:["literal","expression","reference"],svoPosition:2,sovPosition:2,markerOverride:{en:"to",es:"a",pt:"para",fr:"\xE0",de:"auf",id:"ke",ja:"\u306B",ko:"\uC5D0",tr:"e",ar:"\u0625\u0644\u0649",sw:"kwenye",tl:"sa",bn:"\u09A4\u09C7",qu:"man",hi:"\u092E\u0947\u0902"},markerVariants:{tr:["e","a","ye","ya"]}},{role:"scope",description:"The element(s) the attribute/property is set on (defaults to me)",required:!1,expectedTypes:["selector","reference"],svoPosition:3,sovPosition:3,markerOverride:{en:"on",es:"on",pt:"on",fr:"on",de:"on",it:"on",id:"on",ms:"on",sw:"on",tl:"on",zh:"on",vi:"on",ru:"on",uk:"on",pl:"on",th:"on",he:"on",ar:"on",ja:"on",ko:"on",tr:"on",hi:"on",bn:"on",qu:"on"}}],errorCodes:["MISSING_TARGET","INVALID_TARGET","MISSING_VALUE","INVALID_SYNTAX"],preconditions:[{condition:"Command has a target variable or property",errorCode:"MISSING_TARGET",message:"set command requires a target"},{condition:"Target is a valid variable or property reference",errorCode:"INVALID_TARGET",message:"set command target must be a string or object literal"},{condition:'Value is specified with "to" keyword',errorCode:"MISSING_VALUE",message:'set command requires a value (use "to" keyword)'}],recoveryHints:{MISSING_TARGET:"Add a target: set :variable to value OR set element.property to value",INVALID_TARGET:'Use local variable (:name), element property (el.prop), or "the X of Y" syntax',MISSING_VALUE:'Add "to <value>" to specify what to set',INVALID_SYNTAX:"Use syntax: set <target> to <value>"}},jo={action:"bind",description:"Reactively bind a variable to an element or property value",category:"variable",primaryRole:"destination",roles:[{role:"destination",description:"The variable to bind",required:!0,expectedTypes:["reference","expression"],svoPosition:1,sovPosition:1,markerOverride:{en:"",es:"",pt:"",fr:"",de:"",it:"",id:"",ms:"",vi:"",ru:"",uk:"",pl:"",th:"",zh:"",he:"",ar:"",sw:"",tl:"",ja:"\u3092",ko:"\uB97C",tr:"i",bn:"\u0995\u09C7",qu:"ta",hi:"\u0915\u094B"}},{role:"source",description:"The element or property to bind to",required:!0,expectedTypes:["selector","reference","expression"],svoPosition:2,sovPosition:2,markerOverride:{en:"to",es:"a",pt:"para",fr:"\xE0",de:"zu",it:"in",id:"ke",ms:"ke",vi:"v\xE0o",ru:"\u0432",uk:"\u0432",pl:"do",ja:"\u306B",ko:"\uC5D0",tr:"e",ar:"\u0625\u0644\u0649",zh:"\u5230",he:"\u05DC",sw:"kwa",th:"\u0E43\u0E19",tl:"sa",bn:"\u09A4\u09C7",qu:"man",hi:"\u092E\u0947\u0902"}}],errorCodes:["MISSING_TARGET","MISSING_VALUE","INVALID_SYNTAX"],recoveryHints:{MISSING_TARGET:"Add a variable to bind: bind $name to #input",MISSING_VALUE:'Add "to <element>" to specify the binding source',INVALID_SYNTAX:"Use syntax: bind <variable> to <element>"}},Io={action:"live",description:"Reactive block: re-run the body when its dependencies change",category:"control-flow",primaryRole:"patient",hasBody:!0,bareKeyword:!0,roles:[]},Wo={action:"eventsource",description:"Open a Server-Sent Events stream and handle its events",category:"async",primaryRole:"patient",hasBody:!0,bareKeyword:!0,roles:[]},Vo={action:"socket",description:"Open a WebSocket and handle its messages",category:"async",primaryRole:"patient",hasBody:!0,bareKeyword:!0,roles:[]},_o={action:"worker",description:"Define a Web Worker with inline methods",category:"async",primaryRole:"patient",hasBody:!0,bareKeyword:!0,roles:[]},$o={action:"intercept",description:"Service-worker fetch interception / caching strategies",category:"async",primaryRole:"patient",hasBody:!0,bareKeyword:!0,roles:[]},Ko={action:"show",description:"Make an element visible",category:"dom-visibility",primaryRole:"patient",roles:[{role:"patient",description:"The element to show",required:!0,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:1,sovPosition:1},{role:"style",description:"Animation style (fade, slide, etc.)",required:!1,expectedTypes:["literal"],svoPosition:2,sovPosition:2}]},qo={action:"hide",description:"Make an element invisible",category:"dom-visibility",primaryRole:"patient",roles:[{role:"patient",description:"The element to hide",required:!0,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:1,sovPosition:1},{role:"style",description:"Animation style (fade, slide, etc.)",required:!1,expectedTypes:["literal"],svoPosition:2,sovPosition:2}]},Bo={action:"on",description:"Handle an event",category:"event",primaryRole:"event",hasBody:!0,roles:[{role:"event",description:"The event to handle",required:!0,expectedTypes:["literal"],svoPosition:1,sovPosition:2},{role:"source",description:"The element to listen on (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:2,sovPosition:1}]},Do={action:"trigger",description:"Trigger/dispatch an event",category:"event",primaryRole:"event",roles:[{role:"event",description:"The event to trigger (supports namespaced events like draggable:start)",required:!0,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:2},{role:"destination",description:"The target element (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:2,sovPosition:1}]},Ho={action:"wait",description:"Wait for a duration or event",category:"async",primaryRole:"duration",roles:[{role:"duration",description:"Duration or event to wait for",required:!0,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:1}]},Fo={action:"fetch",description:"Fetch data from a URL",category:"async",primaryRole:"source",roles:[{role:"source",description:"The URL to fetch from",required:!0,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:1,renderOverride:{en:""}},{role:"responseType",description:"Response format (json, text, html, blob, etc.)",required:!1,expectedTypes:["literal","expression"],svoPosition:2,sovPosition:2,markerOverride:{en:"as"}},{role:"method",description:"HTTP method (GET, POST, etc.)",required:!1,expectedTypes:["literal"],svoPosition:3,sovPosition:3},{role:"destination",description:"Where to store the result",required:!1,expectedTypes:["selector","reference"],svoPosition:4,sovPosition:4}]},Uo={action:"increment",description:"Increment a numeric value",category:"variable",primaryRole:"patient",roles:[{role:"patient",description:"The value to increment",required:!0,expectedTypes:["selector","reference","expression"],svoPosition:1,sovPosition:1},{role:"quantity",description:"Amount to increment by (defaults to 1)",required:!1,expectedTypes:["literal"],default:{type:"literal",value:1,dataType:"number"},svoPosition:2,sovPosition:2,markerOverride:{en:"by",es:"por",pt:"por",fr:"par",de:"um"}}]},Go={action:"decrement",description:"Decrement a numeric value",category:"variable",primaryRole:"patient",roles:[{role:"patient",description:"The value to decrement",required:!0,expectedTypes:["selector","reference","expression"],svoPosition:1,sovPosition:1},{role:"quantity",description:"Amount to decrement by (defaults to 1)",required:!1,expectedTypes:["literal"],default:{type:"literal",value:1,dataType:"number"},svoPosition:2,sovPosition:2,markerOverride:{en:"by",es:"por",pt:"por",fr:"par",de:"um"}}]},Yo={action:"append",description:"Append content to an element",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The content to append",required:!0,expectedTypes:["literal","selector","expression"],svoPosition:1,sovPosition:2},{role:"destination",description:"The element to append to",required:!0,expectedTypes:["selector","reference"],svoPosition:2,sovPosition:1,markerOverride:{en:"to"}}]},Xo={action:"prepend",description:"Prepend content to an element",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The content to prepend",required:!0,expectedTypes:["literal","selector","expression"],svoPosition:1,sovPosition:2},{role:"destination",description:"The element to prepend to",required:!0,expectedTypes:["selector","reference"],svoPosition:2,sovPosition:1,markerOverride:{en:"to"}}]},Zo={action:"log",description:"Log a value to the console",category:"variable",primaryRole:"patient",roles:[{role:"patient",description:"The value to log",required:!0,expectedTypes:["literal","selector","reference","expression"],svoPosition:1,sovPosition:1}]},Jo={action:"get",description:"Get a value from a source",category:"variable",primaryRole:"source",roles:[{role:"source",description:"The source to get from",required:!0,expectedTypes:["selector","reference","expression"],svoPosition:1,sovPosition:2,markerOverride:{en:"",es:"",pt:"",fr:"",de:"",ja:"\u3092",zh:"",ko:"\uB97C",ar:"\u0639\u0644\u0649",tr:"i",id:"",he:"\u05D0\u05EA",sw:"",tl:"",bn:"\u0995\u09C7",qu:"ta"}},{role:"destination",description:"Where to store the result (optional)",required:!1,expectedTypes:["reference"],svoPosition:2,sovPosition:1}]},Qo={action:"take",description:"Take content from a source element",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The class or element to take",required:!0,expectedTypes:["selector"],svoPosition:1,sovPosition:2},{role:"source",description:"The element to take from (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:2,sovPosition:1}]},es={action:"make",description:"Create a new element",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The element type or selector to create",required:!0,expectedTypes:["literal","selector"],svoPosition:1,sovPosition:1}]},ts={action:"halt",description:"Halt/stop execution or event propagation",category:"control-flow",primaryRole:"patient",roles:[{role:"patient",description:"What to halt (event, default, bubbling, etc.)",required:!1,expectedTypes:["literal","reference","expression"],svoPosition:1,sovPosition:1}]},rs={action:"settle",description:"Wait for animations/transitions to settle",category:"async",primaryRole:"patient",roles:[{role:"patient",description:"The element to settle (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:1,sovPosition:1}]},ns={action:"throw",description:"Throw an error",category:"control-flow",primaryRole:"patient",roles:[{role:"patient",description:"The error message or object to throw",required:!0,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:1}]},is={action:"send",description:"Send an event to an element",category:"event",primaryRole:"event",roles:[{role:"event",description:"The event to send",required:!0,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:2},{role:"destination",description:"The target element (defaults to me)",required:!1,expectedTypes:["selector","reference","expression"],default:{type:"reference",value:"me"},svoPosition:2,sovPosition:1,markerOverride:{en:"to",ja:"\u306B",ar:"\u0625\u0644\u0649",es:"a",ko:"\uC5D0\uAC8C",zh:"\u5230",tr:"-e",pt:"para",fr:"\xE0",de:"an",id:"ke",qu:"-man",sw:"kwa"}}]},as={action:"if",description:"Conditional execution",category:"control-flow",primaryRole:"condition",hasBody:!0,roles:[{role:"condition",description:"The condition to evaluate",required:!0,expectedTypes:["expression","reference","selector"],svoPosition:1,sovPosition:1}]},os={action:"unless",description:"Negated conditional execution (executes when condition is false)",category:"control-flow",primaryRole:"condition",hasBody:!0,roles:[{role:"condition",description:"The condition to evaluate (body executes when false)",required:!0,expectedTypes:["expression","reference","selector"],svoPosition:1,sovPosition:1}]},ss={action:"else",description:"Else branch of conditional",category:"control-flow",primaryRole:"patient",hasBody:!0,roles:[]},ls={action:"repeat",description:"Repeat a block of commands",category:"control-flow",primaryRole:"loopType",hasBody:!0,roles:[{role:"loopType",description:"Loop variant: forever, times, for, while, until, until-event",required:!0,expectedTypes:["literal"],svoPosition:0,sovPosition:0},{role:"quantity",description:"Number of times to repeat",required:!1,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:1},{role:"event",description:"Event to wait for (terminates loop)",required:!1,expectedTypes:["literal","expression"],svoPosition:2,sovPosition:2},{role:"source",description:"Element to listen for event on",required:!1,expectedTypes:["selector","reference"],svoPosition:3,sovPosition:3}],notes:'Can also use "repeat forever", "repeat until condition", or "repeat until event X from Y"'},cs={action:"for",description:"Iterate over a collection",category:"control-flow",primaryRole:"patient",hasBody:!0,roles:[{role:"patient",description:"The iteration variable",required:!0,expectedTypes:["reference","expression"],svoPosition:1,sovPosition:2},{role:"source",description:"The collection to iterate over",required:!0,expectedTypes:["selector","reference","expression"],svoPosition:2,sovPosition:1,markerOverride:{en:"in",es:"en",fr:"en",de:"in",it:"in",pt:"dentro",id:"dalam",ms:"dalam",pl:"w",ru:"\u0432",uk:"\u0443",sw:"ndani",th:"\u0E43\u0E19",vi:"trong",ar:"\u0641\u064A",tl:"sa_loob",he:"in",zh:"\u5728"}}]},ps={action:"while",description:"Loop while condition is true",category:"control-flow",primaryRole:"condition",hasBody:!0,roles:[{role:"condition",description:"The condition to check",required:!0,expectedTypes:["expression"],svoPosition:1,sovPosition:1}]},ds={action:"continue",description:"Continue to next loop iteration",category:"control-flow",primaryRole:"patient",roles:[]},us={action:"go",description:"Navigate to a URL",category:"navigation",primaryRole:"destination",roles:[{role:"destination",description:"The URL to navigate to",required:!0,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:1,markerOverride:{en:"to"},renderOverride:{en:""},markerOptional:{en:!0},markerVariants:{he:["\u05D0\u05EA"],zh:["\u628A"]}}]},ms={action:"transition",description:"Transition an element with animation",category:"dom-visibility",primaryRole:"patient",omitRoleVariants:["goal"],roles:[{role:"patient",description:"The property to transition (opacity, *background-color, etc.)",required:!0,expectedTypes:["literal","expression","selector"],svoPosition:1,sovPosition:2,markerOverride:{en:"",ar:"",tl:"",sw:""}},{role:"goal",description:"The target value to transition to",required:!0,expectedTypes:["literal","expression"],svoPosition:2,sovPosition:3,markerOverride:{en:"to",ar:"\u0625\u0644\u0649",tl:"sa",sw:"kwa",bn:"\u09A4\u09C7",qu:"man",es:"a",pt:"para",fr:"\xE0",de:"zu",he:"\u05E2\u05DC",it:"in",ja:"\u306B",ko:"\uC5D0",ms:"ke",pl:"do",ru:"\u0432",th:"\u0E43\u0E19",tr:"e",uk:"\u0432",vi:"v\xE0o",zh:"\u5230",id:"ke"}},{role:"destination",description:"The target element (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:3,sovPosition:1},{role:"duration",description:"Transition duration (over 500ms, for 2 seconds)",required:!1,expectedTypes:["literal"],svoPosition:4,sovPosition:4,markerOverride:{en:"over"}},{role:"style",description:"Easing function (ease-in, linear, etc.)",required:!1,expectedTypes:["literal"],svoPosition:5,sovPosition:5}]},fs={action:"clone",description:"Clone an element",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The element to clone",required:!0,expectedTypes:["selector","reference"],svoPosition:1,sovPosition:2},{role:"destination",description:"Where to put the clone",required:!1,expectedTypes:["selector","reference"],svoPosition:2,sovPosition:1,markerOverride:{en:"into"}}]},ys={action:"focus",description:"Focus an element",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The element to focus (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:1,sovPosition:1}]},gs={action:"blur",description:"Remove focus from an element",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The element to blur (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:1,sovPosition:1}]},hs={action:"empty",description:"Remove all children from an element (sets innerHTML to empty)",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The element to empty (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:1,sovPosition:1}]},vs={action:"open",description:"Open a dialog, details element, or popover",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The element to open (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:2,sovPosition:2},{role:"style",description:"Open-mode variant (modal / non-modal) for <dialog>",required:!1,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:1,markerOverride:{en:"as"}}]},ks={action:"close",description:"Close a dialog, details element, or popover",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The element to close (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:1,sovPosition:1}]},xs={action:"select",description:"Select the contents of a text field or DOM element",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The element whose contents to select (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:1,sovPosition:1}]},bs={action:"clear",description:"Clear a variable, local, or input element",category:"variable",primaryRole:"patient",roles:[{role:"patient",description:"The variable or element to clear (defaults to me)",required:!1,expectedTypes:["selector","reference","expression"],default:{type:"reference",value:"me"},svoPosition:1,sovPosition:1}]},Ss={action:"reset",description:"Reset a <form> element to its default values",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The form element to reset (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:1,sovPosition:1}]},ws={action:"breakpoint",description:"Drop into the debugger",category:"control-flow",primaryRole:"patient",roles:[],bareKeyword:!0},zs={action:"call",description:"Call a function",category:"control-flow",primaryRole:"patient",roles:[{role:"patient",description:"The function to call",required:!0,expectedTypes:["expression","reference"],markerOptional:{he:!0,zh:!0},svoPosition:1,sovPosition:1}]},Ts={action:"return",description:"Return a value from a function",category:"control-flow",primaryRole:"patient",roles:[{role:"patient",description:"The value to return",required:!1,expectedTypes:["literal","expression","reference"],svoPosition:1,sovPosition:1}]},Es={action:"js",description:"Execute raw JavaScript code",category:"control-flow",primaryRole:"patient",hasBody:!0,roles:[{role:"patient",description:"The JavaScript code to execute",required:!1,expectedTypes:["expression"],svoPosition:1,sovPosition:1}]},Ps={action:"async",description:"Execute commands asynchronously",category:"async",primaryRole:"patient",hasBody:!0,roles:[]},Ls={action:"tell",description:"Execute commands in context of another element",category:"control-flow",primaryRole:"destination",hasBody:!0,roles:[{role:"destination",description:"The element to tell",required:!0,expectedTypes:["selector","reference"],svoPosition:1,sovPosition:1,markerOverride:{en:"",he:"\u05D0\u05EA",zh:"\u628A"}}]},Cs={action:"default",description:"Set a default value for a variable",category:"variable",primaryRole:"destination",roles:[{role:"destination",description:"The variable to set default for",required:!0,expectedTypes:["selector","reference","expression","property-path"],svoPosition:1,sovPosition:1,markerOverride:{en:"",ar:"",tl:"",sw:"",bn:"\u0995\u09C7",qu:"ta",ja:"\u3092",ko:"\uB97C",tr:"i",hi:"\u0915\u094B",de:"",es:"",fr:"",it:"",pt:"",pl:"",ru:"",uk:"",vi:"",id:"",ms:"",th:"",zh:"\u628A",he:"\u05D0\u05EA"}},{role:"patient",description:"The default value",required:!0,expectedTypes:["literal","expression"],svoPosition:2,sovPosition:2,markerOverride:{en:"to",ar:"\u0625\u0644\u0649",tl:"sa",sw:"kwa",bn:"\u09A4\u09C7",qu:"man",ja:"\u306B",ko:"\uC5D0",tr:"e",hi:"\u092E\u0947\u0902",de:"zu",es:"a",fr:"\xE0",it:"in",pt:"para",pl:"do",ru:"\u0432",uk:"\u0432",vi:"v\xE0o",id:"ke",ms:"ke",th:"\u0E43\u0E19",zh:"\u5230",he:"\u05E2\u05DC"}}]},Rs={action:"init",description:"Initialization block that runs once",category:"control-flow",primaryRole:"patient",hasBody:!0,roles:[]},Ns={action:"behavior",description:"Define a reusable behavior",category:"control-flow",primaryRole:"patient",hasBody:!0,roles:[{role:"patient",description:"The behavior name (PascalCase identifier)",required:!0,expectedTypes:["literal","reference","expression"],svoPosition:1,sovPosition:1}]},As={action:"install",description:"Install a behavior on an element",category:"control-flow",primaryRole:"patient",roles:[{role:"patient",description:"The behavior name to install",required:!0,expectedTypes:["literal","reference","expression"],svoPosition:1,sovPosition:2},{role:"destination",description:"Element to install on (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:2,sovPosition:1}]},Ms={action:"measure",description:"Measure element dimensions (x, y, width, height, etc.)",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"Property to measure (x, y, width, height, top, left, etc.)",required:!1,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:1},{role:"source",description:"Element to measure (defaults to me)",required:!1,expectedTypes:["selector","reference"],default:{type:"reference",value:"me"},svoPosition:2,sovPosition:2,markerOverride:{en:"of"}}]},Os={action:"swap",description:"Swap DOM content using various strategies (innerHTML, outerHTML, delete, etc.)",category:"dom-content",primaryRole:"destination",roles:[{role:"method",description:"The swap strategy (innerHTML, outerHTML, beforebegin, afterend, delete)",required:!1,expectedTypes:["literal"],svoPosition:1,sovPosition:3,markerOverride:{en:""}},{role:"destination",description:"The element to swap content in/for",required:!0,expectedTypes:["selector","reference"],svoPosition:2,sovPosition:1,markerOverride:{en:"of",es:"",fr:"",pt:"",it:"",de:"",pl:"",ru:"",uk:"",id:"",ms:"",sw:"",th:"",vi:"",he:"\u05D0\u05EA",zh:"\u628A"}},{role:"patient",description:"The content to swap in (optional for delete)",required:!1,expectedTypes:["literal","expression","selector"],svoPosition:3,sovPosition:2,markerOverride:{en:"with",es:"con",fr:"avec",pt:"com",it:"con",de:"mit",pl:"z",ru:"\u0441",uk:"\u0437",id:"dengan",ms:"dengan",sw:"na",th:"\u0E14\u0E49\u0E27\u0E22",vi:"v\u1EDBi",he:"\u05E2\u05DD",zh:"\u7528"}}]},js={action:"morph",description:"Morph an element into another using DOM diffing",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The element to morph",required:!0,expectedTypes:["selector","reference"],svoPosition:1,sovPosition:1,markerOverride:{en:""}},{role:"destination",description:"The target content/element to morph into",required:!0,expectedTypes:["literal","expression","selector","reference"],svoPosition:2,sovPosition:2,markerOverride:{en:"to"}}]},Is={action:"beep",description:"Debug output for expressions with type information",category:"variable",primaryRole:"patient",roles:[{role:"patient",description:"The expression(s) to debug",required:!1,expectedTypes:["literal","selector","reference","expression"],svoPosition:1,sovPosition:1}]},Ws={action:"break",description:"Exit from the current loop",category:"control-flow",primaryRole:"patient",roles:[]},Vs={action:"copy",description:"Copy text or element content to the clipboard",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The text or element to copy",required:!0,expectedTypes:["literal","selector","reference","expression"],svoPosition:1,sovPosition:1}]},_s={action:"exit",description:"Exit from the current event handler",category:"control-flow",primaryRole:"patient",roles:[],bareKeyword:!0},$s={action:"pick",description:"Select a random element from a collection",category:"variable",primaryRole:"patient",roles:[{role:"patient",description:"The items to pick from",required:!0,expectedTypes:["literal","expression","reference"],svoPosition:1,sovPosition:1},{role:"source",description:'The array to pick from (with "from" keyword)',required:!1,expectedTypes:["reference","expression"],svoPosition:2,sovPosition:2}]},Ks={action:"scroll",description:"Scroll the viewport to a target element",category:"navigation",primaryRole:"destination",argSkipTokens:["of","the","top","bottom","middle","center","nearest","left","right","smoothly","instantly"],roles:[{role:"destination",description:"The element to scroll to",required:!0,expectedTypes:["selector","reference","expression"],svoPosition:1,sovPosition:1,markerOverride:{en:"to"}}]},Dn={en:"url",es:"url",pt:"url",fr:"url",de:"url",it:"url",ja:"url",ko:"url",zh:"url",ar:"url",he:"url",hi:"url",bn:"url",tr:"url",ru:"url",uk:"url",pl:"url",id:"url",vi:"url",th:"url",ms:"url",tl:"url",sw:"url",qu:"url"},qs={en:"partials in",es:"partials in",pt:"partials in",fr:"partials in",de:"partials in",it:"partials in",ja:"partials in",ko:"partials in",zh:"partials in",ar:"partials in",he:"partials in",hi:"partials in",bn:"partials in",tr:"partials in",ru:"partials in",uk:"partials in",pl:"partials in",id:"partials in",vi:"partials in",th:"partials in",ms:"partials in",tl:"partials in",sw:"partials in",qu:"partials in"},Bs={action:"push",description:"Push a URL onto the browser history",category:"navigation",primaryRole:"patient",roles:[{role:"patient",description:"The URL to push (after the `url` keyword)",required:!0,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:1,markerOverride:Dn}]},Ds={action:"replace",description:"Replace the current browser history entry with a URL",category:"navigation",primaryRole:"patient",roles:[{role:"patient",description:"The URL to replace with (after the `url` keyword)",required:!0,expectedTypes:["literal","expression"],svoPosition:1,sovPosition:1,markerOverride:Dn}]},Hs={action:"process",description:"Process hx-partial markup in HTML content",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The HTML content (string, element, or response) to process",required:!0,expectedTypes:["literal","reference","expression"],svoPosition:1,sovPosition:1,markerOverride:qs}]},Fs={action:"render",description:"Render a template with optional variables",category:"dom-content",primaryRole:"patient",roles:[{role:"patient",description:"The template to render",required:!0,expectedTypes:["selector","reference","expression"],svoPosition:1,sovPosition:2},{role:"style",description:"Variables to pass to the template (with keyword)",required:!1,expectedTypes:["expression","reference"],svoPosition:2,sovPosition:1}]},je={toggle:Ro,add:No,remove:Ao,put:Mo,set:Oo,show:Ko,hide:qo,on:Bo,trigger:Do,wait:Ho,fetch:Fo,increment:Uo,decrement:Go,append:Yo,prepend:Xo,log:Zo,get:Jo,take:Qo,make:es,halt:ts,settle:rs,throw:ns,send:is,if:as,unless:os,else:ss,repeat:ls,for:cs,while:ps,continue:ds,go:us,scroll:Ks,push:Bs,replace:Ds,process:Hs,transition:ms,clone:fs,focus:ys,blur:gs,empty:hs,open:vs,close:ks,select:xs,clear:bs,reset:Ss,breakpoint:ws,call:zs,return:Ts,js:Es,async:Ps,tell:Ls,default:Cs,init:Rs,behavior:Ns,install:As,measure:Ms,swap:Os,morph:js,beep:Is,break:Ws,copy:Vs,exit:_s,pick:$s,render:Fs,bind:jo,live:Io,eventsource:Wo,socket:Vo,worker:_o,intercept:$o,compound:{action:"compound",description:"A compound node representing chained statements",primaryRole:"patient",category:"control-flow",hasBody:!0,roles:[]}};function me(n){return je[n]}function Hn(){return Object.values(je).filter(n=>n.roles.length>0||n.bareKeyword===!0)}function ze(n,e){let t=n.possessive?.keywords?.[e];if(t)return t;let r=n.possessive?.specialForms;if(r){for(let[i,a]of Object.entries(r))if(a===e)return i}}function Us(){return[{id:"put-bn-before",language:"bn",command:"put",priority:105,template:{format:"{patient} before {destination} \u0995\u09C7 \u09B0\u09BE\u0996\u09C1\u09A8",tokens:[{type:"role",role:"patient"},{type:"literal",value:"before"},{type:"role",role:"destination"},{type:"literal",value:"\u0995\u09C7"},{type:"literal",value:"\u09B0\u09BE\u0996\u09C1\u09A8",alternatives:["\u09B0\u09BE\u0996"]}]},extraction:{patient:{position:0},destination:{marker:"before"},manner:{default:{type:"literal",value:"before"}}}},{id:"put-bn-after",language:"bn",command:"put",priority:105,template:{format:"{patient} after {destination} \u0995\u09C7 \u09B0\u09BE\u0996\u09C1\u09A8",tokens:[{type:"role",role:"patient"},{type:"literal",value:"after"},{type:"role",role:"destination"},{type:"literal",value:"\u0995\u09C7"},{type:"literal",value:"\u09B0\u09BE\u0996\u09C1\u09A8",alternatives:["\u09B0\u09BE\u0996"]}]},extraction:{patient:{position:0},destination:{marker:"after"},manner:{default:{type:"literal",value:"after"}}}},{id:"put-bn-full",language:"bn",command:"put",priority:100,template:{format:"{patient} \u0995\u09C7 {destination} \u098F \u09B0\u09BE\u0996\u09C1\u09A8",tokens:[{type:"role",role:"patient"},{type:"literal",value:"\u0995\u09C7"},{type:"role",role:"destination"},{type:"literal",value:"\u098F",alternatives:["\u09A4\u09C7"]},{type:"literal",value:"\u09B0\u09BE\u0996\u09C1\u09A8",alternatives:["\u09B0\u09BE\u0996"]}]},extraction:{patient:{position:0},destination:{marker:"\u098F",position:2}}},{id:"put-bn-simple",language:"bn",command:"put",priority:90,template:{format:"\u09B0\u09BE\u0996\u09C1\u09A8 {patient} {destination} \u098F",tokens:[{type:"literal",value:"\u09B0\u09BE\u0996\u09C1\u09A8",alternatives:["\u09B0\u09BE\u0996"]},{type:"role",role:"patient"},{type:"role",role:"destination"},{type:"literal",value:"\u098F",alternatives:["\u09A4\u09C7"]}]},extraction:{patient:{position:1},destination:{position:2}}}]}function Gs(){return[{id:"put-en-into",language:"en",command:"put",priority:100,template:{format:"put {patient} into {destination}",tokens:[{type:"literal",value:"put"},{type:"role",role:"patient"},{type:"literal",value:"into",alternatives:["in","to"]},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"into",markerAlternatives:["in","to"]}}},{id:"put-en-before",language:"en",command:"put",priority:95,template:{format:"put {patient} before {destination}",tokens:[{type:"literal",value:"put"},{type:"role",role:"patient"},{type:"literal",value:"before"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"before"},manner:{default:{type:"literal",value:"before"}}}},{id:"put-en-after",language:"en",command:"put",priority:95,template:{format:"put {patient} after {destination}",tokens:[{type:"literal",value:"put"},{type:"role",role:"patient"},{type:"literal",value:"after"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"after"},manner:{default:{type:"literal",value:"after"}}}},{id:"put-en-at-end",language:"en",command:"put",priority:96,template:{format:"put {patient} at end of {destination}",tokens:[{type:"literal",value:"put"},{type:"role",role:"patient"},{type:"literal",value:"at"},{type:"literal",value:"end"},{type:"literal",value:"of"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{position:5},manner:{default:{type:"literal",value:"at end of"}}}},{id:"put-en-at-start",language:"en",command:"put",priority:96,template:{format:"put {patient} at start of {destination}",tokens:[{type:"literal",value:"put"},{type:"role",role:"patient"},{type:"literal",value:"at"},{type:"literal",value:"start"},{type:"literal",value:"of"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{position:5},manner:{default:{type:"literal",value:"at start of"}}}}]}function Ys(){return[{id:"put-es-full",language:"es",command:"put",priority:100,template:{format:"poner {patient} en {destination}",tokens:[{type:"literal",value:"poner",alternatives:["pon","colocar","put"]},{type:"role",role:"patient"},{type:"literal",value:"en",alternatives:["dentro de","a"]},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"en",markerAlternatives:["dentro de","a"]}}},{id:"put-es-before",language:"es",command:"put",priority:95,template:{format:"poner {patient} antes de {destination}",tokens:[{type:"literal",value:"poner",alternatives:["pon","colocar"]},{type:"role",role:"patient"},{type:"literal",value:"antes de",alternatives:["antes"]},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"antes de",markerAlternatives:["antes"]},manner:{default:{type:"literal",value:"before"}}}},{id:"put-es-after",language:"es",command:"put",priority:95,template:{format:"poner {patient} despu\xE9s de {destination}",tokens:[{type:"literal",value:"poner",alternatives:["pon","colocar"]},{type:"role",role:"patient"},{type:"literal",value:"despu\xE9s de",alternatives:["despues de","despu\xE9s"]},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"despu\xE9s de",markerAlternatives:["despues de","despu\xE9s"]},manner:{default:{type:"literal",value:"after"}}}}]}function Xs(){return[{id:"put-hi-before",language:"hi",command:"put",priority:106,template:{format:"{patient} before {destination} \u0915\u094B \u0930\u0916\u0947\u0902",tokens:[{type:"role",role:"patient"},{type:"literal",value:"before"},{type:"role",role:"destination"},{type:"literal",value:"\u0915\u094B"},{type:"literal",value:"\u0930\u0916\u0947\u0902",alternatives:["\u0930\u0916","\u0921\u093E\u0932\u0947\u0902","\u0921\u093E\u0932"]}]},extraction:{patient:{position:0},destination:{marker:"before"},manner:{default:{type:"literal",value:"before"}}}},{id:"put-hi-after",language:"hi",command:"put",priority:106,template:{format:"{patient} after {destination} \u0915\u094B \u0930\u0916\u0947\u0902",tokens:[{type:"role",role:"patient"},{type:"literal",value:"after"},{type:"role",role:"destination"},{type:"literal",value:"\u0915\u094B"},{type:"literal",value:"\u0930\u0916\u0947\u0902",alternatives:["\u0930\u0916","\u0921\u093E\u0932\u0947\u0902","\u0921\u093E\u0932"]}]},extraction:{patient:{position:0},destination:{marker:"after"},manner:{default:{type:"literal",value:"after"}}}},{id:"put-hi-verb-medial",language:"hi",command:"put",priority:105,template:{format:"{patient} \u0915\u094B \u0930\u0916\u0947\u0902 {destination} \u092E\u0947\u0902",tokens:[{type:"role",role:"patient"},{type:"literal",value:"\u0915\u094B"},{type:"literal",value:"\u0930\u0916\u0947\u0902",alternatives:["\u0930\u0916","\u0921\u093E\u0932\u0947\u0902","\u0921\u093E\u0932"]},{type:"role",role:"destination"},{type:"literal",value:"\u092E\u0947\u0902"}]},extraction:{patient:{position:0},destination:{marker:"\u092E\u0947\u0902",position:3}}},{id:"put-hi-full",language:"hi",command:"put",priority:100,template:{format:"{patient} \u0915\u094B {destination} \u092E\u0947\u0902 \u0930\u0916\u0947\u0902",tokens:[{type:"role",role:"patient"},{type:"literal",value:"\u0915\u094B"},{type:"role",role:"destination"},{type:"literal",value:"\u092E\u0947\u0902"},{type:"literal",value:"\u0930\u0916\u0947\u0902",alternatives:["\u0930\u0916","\u0921\u093E\u0932\u0947\u0902","\u0921\u093E\u0932"]}]},extraction:{patient:{position:0},destination:{marker:"\u092E\u0947\u0902",position:3}}},{id:"put-hi-simple",language:"hi",command:"put",priority:90,template:{format:"{patient} \u0930\u0916\u0947\u0902",tokens:[{type:"role",role:"patient"},{type:"literal",value:"\u0930\u0916\u0947\u0902",alternatives:["\u0930\u0916","\u0921\u093E\u0932\u0947\u0902","\u0921\u093E\u0932"]}]},extraction:{patient:{position:0},destination:{default:{type:"reference",value:"me"}}}},{id:"put-hi-bare",language:"hi",command:"put",priority:80,template:{format:"\u0930\u0916\u0947\u0902 {patient}",tokens:[{type:"literal",value:"\u0930\u0916\u0947\u0902",alternatives:["\u0930\u0916","\u0921\u093E\u0932\u0947\u0902","\u0921\u093E\u0932"]},{type:"role",role:"patient"}]},extraction:{patient:{position:1},destination:{default:{type:"reference",value:"me"}}}}]}function Zs(){return[{id:"put-id-full",language:"id",command:"put",priority:100,template:{format:"taruh {patient} ke dalam {destination}",tokens:[{type:"literal",value:"taruh",alternatives:["letakkan","masukkan","tempatkan","put"]},{type:"role",role:"patient",expectedTypes:["literal","selector","reference","expression"]},{type:"literal",value:"ke"},{type:"literal",value:"dalam",alternatives:["di"]},{type:"role",role:"destination",expectedTypes:["selector","reference"]}]},extraction:{patient:{position:1},destination:{position:4}}},{id:"put-id-simple-ke",language:"id",command:"put",priority:95,template:{format:"taruh {patient} ke {destination}",tokens:[{type:"literal",value:"taruh",alternatives:["letakkan","masukkan","tempatkan"]},{type:"role",role:"patient",expectedTypes:["literal","selector","reference","expression"]},{type:"literal",value:"ke",alternatives:["di","pada"]},{type:"role",role:"destination",expectedTypes:["selector","reference"]}]},extraction:{patient:{position:1},destination:{position:3}}},{id:"put-id-di",language:"id",command:"put",priority:90,template:{format:"taruh {patient} di {destination}",tokens:[{type:"literal",value:"taruh",alternatives:["letakkan","masukkan"]},{type:"role",role:"patient",expectedTypes:["literal","selector","reference","expression"]},{type:"literal",value:"di"},{type:"role",role:"destination",expectedTypes:["selector","reference"]}]},extraction:{patient:{position:1},destination:{position:3}}}]}function Js(){return[{id:"put-it-full",language:"it",command:"put",priority:100,template:{format:"mettere {patient} in {target}",tokens:[{type:"literal",value:"mettere",alternatives:["metti","inserire","put"]},{type:"role",role:"patient"},{type:"group",optional:!0,tokens:[{type:"literal",value:"in",alternatives:["dentro","nel"]},{type:"role",role:"destination"}]}]},extraction:{patient:{position:1},destination:{marker:"in",markerAlternatives:["dentro","nel"]}}},{id:"put-it-before",language:"it",command:"put",priority:105,template:{format:"mettere {patient} prima {target}",tokens:[{type:"literal",value:"mettere",alternatives:["metti","inserire","put"]},{type:"role",role:"patient"},{type:"literal",value:"prima"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"prima"},manner:{default:{type:"literal",value:"before"}}}},{id:"put-it-after",language:"it",command:"put",priority:105,template:{format:"mettere {patient} dopo {target}",tokens:[{type:"literal",value:"mettere",alternatives:["metti","inserire","put"]},{type:"role",role:"patient"},{type:"literal",value:"dopo"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"dopo"},manner:{default:{type:"literal",value:"after"}}}},{id:"put-it-simple",language:"it",command:"put",priority:90,template:{format:"mettere {patient}",tokens:[{type:"literal",value:"mettere",alternatives:["metti","inserire","put"]},{type:"role",role:"patient"}]},extraction:{patient:{position:1}}}]}function Qs(){return[{id:"put-pl-full",language:"pl",command:"put",priority:100,template:{format:"umie\u015B\u0107 {patient} w {destination}",tokens:[{type:"literal",value:"umie\u015B\u0107",alternatives:["umiesc","wstaw","w\u0142\xF3\u017C","wloz"]},{type:"role",role:"patient"},{type:"group",optional:!0,tokens:[{type:"literal",value:"w",alternatives:["do","na"]},{type:"role",role:"destination"}]}]},extraction:{patient:{position:1},destination:{marker:"w",markerAlternatives:["do","na"]}}},{id:"put-pl-before",language:"pl",command:"put",priority:105,template:{format:"umie\u015B\u0107 {patient} przed {destination}",tokens:[{type:"literal",value:"umie\u015B\u0107",alternatives:["umiesc","wstaw"]},{type:"role",role:"patient"},{type:"literal",value:"przed"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"przed"},manner:{default:{type:"literal",value:"before"}}}},{id:"put-pl-after",language:"pl",command:"put",priority:105,template:{format:"umie\u015B\u0107 {patient} po {destination}",tokens:[{type:"literal",value:"umie\u015B\u0107",alternatives:["umiesc","wstaw"]},{type:"role",role:"patient"},{type:"literal",value:"po"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"po"},manner:{default:{type:"literal",value:"after"}}}}]}function el(){return[{id:"put-ru-full",language:"ru",command:"put",priority:100,template:{format:"\u043F\u043E\u043B\u043E\u0436\u0438\u0442\u044C {patient} \u0432 {destination}",tokens:[{type:"literal",value:"\u043F\u043E\u043B\u043E\u0436\u0438\u0442\u044C",alternatives:["\u043F\u043E\u043B\u043E\u0436\u0438","\u043F\u043E\u043C\u0435\u0441\u0442\u0438\u0442\u044C","\u043F\u043E\u043C\u0435\u0441\u0442\u0438","\u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044C","\u0432\u0441\u0442\u0430\u0432\u044C"]},{type:"role",role:"patient"},{type:"group",optional:!0,tokens:[{type:"literal",value:"\u0432",alternatives:["\u0432\u043E","\u043D\u0430"]},{type:"role",role:"destination"}]}]},extraction:{patient:{position:1},destination:{marker:"\u0432",markerAlternatives:["\u0432\u043E","\u043D\u0430"]}}},{id:"put-ru-before",language:"ru",command:"put",priority:105,template:{format:"\u043F\u043E\u043B\u043E\u0436\u0438\u0442\u044C {patient} \u043F\u0435\u0440\u0435\u0434 {destination}",tokens:[{type:"literal",value:"\u043F\u043E\u043B\u043E\u0436\u0438\u0442\u044C",alternatives:["\u043F\u043E\u043B\u043E\u0436\u0438","\u043F\u043E\u043C\u0435\u0441\u0442\u0438\u0442\u044C","\u043F\u043E\u043C\u0435\u0441\u0442\u0438"]},{type:"role",role:"patient"},{type:"literal",value:"\u043F\u0435\u0440\u0435\u0434",alternatives:["\u0434\u043E"]},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"\u043F\u0435\u0440\u0435\u0434",markerAlternatives:["\u0434\u043E"]},manner:{default:{type:"literal",value:"before"}}}},{id:"put-ru-after",language:"ru",command:"put",priority:105,template:{format:"\u043F\u043E\u043B\u043E\u0436\u0438\u0442\u044C {patient} \u043F\u043E\u0441\u043B\u0435 {destination}",tokens:[{type:"literal",value:"\u043F\u043E\u043B\u043E\u0436\u0438\u0442\u044C",alternatives:["\u043F\u043E\u043B\u043E\u0436\u0438","\u043F\u043E\u043C\u0435\u0441\u0442\u0438\u0442\u044C","\u043F\u043E\u043C\u0435\u0441\u0442\u0438"]},{type:"role",role:"patient"},{type:"literal",value:"\u043F\u043E\u0441\u043B\u0435"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"\u043F\u043E\u0441\u043B\u0435"},manner:{default:{type:"literal",value:"after"}}}}]}function tl(){return[{id:"put-th-full",language:"th",command:"put",priority:100,template:{format:"\u0E43\u0E2A\u0E48 {patient} \u0E43\u0E19 {destination}",tokens:[{type:"literal",value:"\u0E43\u0E2A\u0E48",alternatives:["\u0E27\u0E32\u0E07"]},{type:"role",role:"patient"},{type:"literal",value:"\u0E43\u0E19"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"\u0E43\u0E19",position:3}}},{id:"put-th-before",language:"th",command:"put",priority:105,template:{format:"\u0E43\u0E2A\u0E48 {patient} \u0E01\u0E48\u0E2D\u0E19 {destination}",tokens:[{type:"literal",value:"\u0E43\u0E2A\u0E48",alternatives:["\u0E27\u0E32\u0E07"]},{type:"role",role:"patient"},{type:"literal",value:"\u0E01\u0E48\u0E2D\u0E19"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"\u0E01\u0E48\u0E2D\u0E19"},manner:{default:{type:"literal",value:"before"}}}},{id:"put-th-after",language:"th",command:"put",priority:105,template:{format:"\u0E43\u0E2A\u0E48 {patient} \u0E2B\u0E25\u0E31\u0E07 {destination}",tokens:[{type:"literal",value:"\u0E43\u0E2A\u0E48",alternatives:["\u0E27\u0E32\u0E07"]},{type:"role",role:"patient"},{type:"literal",value:"\u0E2B\u0E25\u0E31\u0E07"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"\u0E2B\u0E25\u0E31\u0E07"},manner:{default:{type:"literal",value:"after"}}}}]}function rl(){return[{id:"put-uk-full",language:"uk",command:"put",priority:100,template:{format:"\u043F\u043E\u043A\u043B\u0430\u0441\u0442\u0438 {patient} \u0432 {destination}",tokens:[{type:"literal",value:"\u043F\u043E\u043A\u043B\u0430\u0441\u0442\u0438",alternatives:["\u043F\u043E\u043A\u043B\u0430\u0434\u0438","\u043F\u043E\u043C\u0456\u0441\u0442\u0438\u0442\u0438","\u043F\u043E\u043C\u0456\u0441\u0442\u0438","\u0432\u0441\u0442\u0430\u0432\u0438\u0442\u0438","\u0432\u0441\u0442\u0430\u0432"]},{type:"role",role:"patient"},{type:"group",optional:!0,tokens:[{type:"literal",value:"\u0432",alternatives:["\u0443","\u043D\u0430"]},{type:"role",role:"destination"}]}]},extraction:{patient:{position:1},destination:{marker:"\u0432",markerAlternatives:["\u0443","\u043D\u0430"]}}},{id:"put-uk-before",language:"uk",command:"put",priority:95,template:{format:"\u043F\u043E\u043A\u043B\u0430\u0441\u0442\u0438 {patient} \u043F\u0435\u0440\u0435\u0434 {destination}",tokens:[{type:"literal",value:"\u043F\u043E\u043A\u043B\u0430\u0441\u0442\u0438",alternatives:["\u043F\u043E\u043A\u043B\u0430\u0434\u0438","\u043F\u043E\u043C\u0456\u0441\u0442\u0438\u0442\u0438","\u043F\u043E\u043C\u0456\u0441\u0442\u0438"]},{type:"role",role:"patient"},{type:"literal",value:"\u043F\u0435\u0440\u0435\u0434",alternatives:["\u0434\u043E"]},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"\u043F\u0435\u0440\u0435\u0434",markerAlternatives:["\u0434\u043E"]},manner:{default:{type:"literal",value:"before"}}}},{id:"put-uk-after",language:"uk",command:"put",priority:95,template:{format:"\u043F\u043E\u043A\u043B\u0430\u0441\u0442\u0438 {patient} \u043F\u0456\u0441\u043B\u044F {destination}",tokens:[{type:"literal",value:"\u043F\u043E\u043A\u043B\u0430\u0441\u0442\u0438",alternatives:["\u043F\u043E\u043A\u043B\u0430\u0434\u0438","\u043F\u043E\u043C\u0456\u0441\u0442\u0438\u0442\u0438","\u043F\u043E\u043C\u0456\u0441\u0442\u0438"]},{type:"role",role:"patient"},{type:"literal",value:"\u043F\u0456\u0441\u043B\u044F"},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"\u043F\u0456\u0441\u043B\u044F"},manner:{default:{type:"literal",value:"after"}}}}]}function nl(){return[{id:"put-vi-into",language:"vi",command:"put",priority:100,template:{format:"\u0111\u1EB7t {patient} v\xE0o {target}",tokens:[{type:"literal",value:"\u0111\u1EB7t",alternatives:["\u0111\u1EC3","\u0111\u01B0a"]},{type:"role",role:"patient"},{type:"literal",value:"v\xE0o",alternatives:["v\xE0o trong"]},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"v\xE0o",markerAlternatives:["v\xE0o trong"]}}},{id:"put-vi-before",language:"vi",command:"put",priority:105,template:{format:"\u0111\u1EB7t {patient} tr\u01B0\u1EDBc {target}",tokens:[{type:"literal",value:"\u0111\u1EB7t",alternatives:["\u0111\u1EC3","\u0111\u01B0a"]},{type:"role",role:"patient"},{type:"literal",value:"tr\u01B0\u1EDBc",alternatives:["tr\u01B0\u1EDBc khi"]},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"tr\u01B0\u1EDBc",markerAlternatives:["tr\u01B0\u1EDBc khi"]},manner:{default:{type:"literal",value:"before"}}}},{id:"put-vi-after",language:"vi",command:"put",priority:105,template:{format:"\u0111\u1EB7t {patient} sau {target}",tokens:[{type:"literal",value:"\u0111\u1EB7t",alternatives:["\u0111\u1EC3","\u0111\u01B0a"]},{type:"role",role:"patient"},{type:"literal",value:"sau",alternatives:["sau khi"]},{type:"role",role:"destination"}]},extraction:{patient:{position:1},destination:{marker:"sau",markerAlternatives:["sau khi"]},manner:{default:{type:"literal",value:"after"}}}}]}function il(){return[...["before","after"].map(n=>{let e=n==="before"?"\xF1awpaqpi":"qhepapi";return{id:`put-qu-${n}`,language:"qu",command:"put",priority:105,template:{format:`{patient} ${e} {destination} ta churay`,tokens:[{type:"role",role:"patient"},{type:"literal",value:e,alternatives:[n]},{type:"role",role:"destination"},{type:"group",optional:!0,tokens:[{type:"literal",value:"ta"}]},{type:"literal",value:"churay",alternatives:["tiyachiy"]}]},extraction:{patient:{position:0},destination:{position:2},manner:{default:{type:"literal",value:n}}}}}),{id:"put-qu-patient-first",language:"qu",command:"put",priority:96,template:{format:"{patient} ta {destination} man churay",tokens:[{type:"role",role:"patient"},{type:"literal",value:"ta"},{type:"role",role:"destination"},{type:"literal",value:"man"},{type:"literal",value:"churay",alternatives:["tiyachiy"]}]},extraction:{patient:{position:0},destination:{position:2}}}]}function al(){return[{id:"put-zh-full",language:"zh",command:"put",priority:100,template:{format:"\u653E\u7F6E {patient} \u5230 {destination}",tokens:[{type:"literal",value:"\u653E\u7F6E",alternatives:["\u653E","\u653E\u5165","\u7F6E\u5165","put"]},{type:"role",role:"patient",expectedTypes:["literal","selector","reference","expression"]},{type:"literal",value:"\u5230",alternatives:["\u5728","\u4E8E","\u5165"]},{type:"role",role:"destination",expectedTypes:["selector","reference"]}]},extraction:{patient:{position:1},destination:{position:3}}},{id:"put-zh-ba",language:"zh",command:"put",priority:95,template:{format:"\u628A {patient} \u653E\u7F6E \u5230 {destination}",tokens:[{type:"literal",value:"\u628A"},{type:"role",role:"patient",expectedTypes:["literal","selector","reference","expression"]},{type:"literal",value:"\u653E\u7F6E",alternatives:["\u653E\u5230","\u653E\u5728","\u653E\u5165","\u653E","\u7F6E\u5165"]},{type:"group",optional:!0,tokens:[{type:"literal",value:"\u5230",alternatives:["\u5728","\u4E8E","\u5165"]}]},{type:"role",role:"destination",expectedTypes:["selector","reference"]}]},extraction:{patient:{position:1},destination:{marker:"\u5230",markerAlternatives:["\u5728","\u4E8E","\u5165"]}}}]}var ol=[{lang:"de",verb:"setzen",before:"vor",after:"nach"},{lang:"fr",verb:"mettre",before:"avant",after:"apr\xE8s"},{lang:"he",verb:"\u05E9\u05D9\u05DD",patientPrefix:"\u05D0\u05EA",before:"\u05DC\u05E4\u05E0\u05D9",after:"\u05D0\u05D7\u05E8\u05D9"},{lang:"id",verb:"taruh",verbAlts:["letakkan","masukkan","tempatkan"],before:"sebelum",after:"setelah"},{lang:"ms",verb:"letak",before:"sebelum",after:"selepas"},{lang:"pt",verb:"colocar",before:"antes",after:"depois"},{lang:"sw",verb:"weka",before:"kabla",after:"baada"},{lang:"zh",verb:"\u653E\u7F6E",verbAlts:["\u653E","\u653E\u5165"],patientPrefix:"\u628A",patientPrefixOptional:!0,before:"\u4E4B\u524D",after:"\u4E4B\u540E"}],Lr=[{lang:"es",verb:"poner",verbAlts:["pon","colocar","put"],at:"en",end:"fin",of:"de"},{lang:"fr",verb:"mettre",at:"\xE0",end:"fin",of:"de"},{lang:"pt",verb:"colocar",at:"em",end:"fim",of:"de"},{lang:"it",verb:"mettere",at:"a",end:"fine",of:"di"},{lang:"de",verb:"setzen",at:"bei",end:"ende",of:"von"},{lang:"sw",verb:"weka",at:"katika",end:"mwisho",of:"ya"},{lang:"id",verb:"taruh",verbAlts:["letakkan","masukkan","tempatkan"],at:"di",end:"akhir",of:"dari"},{lang:"ms",verb:"letak",at:"di",end:"tamat",of:"daripada"},{lang:"vi",verb:"\u0111\u1EB7t",at:"t\u1EA1i",end:"k\u1EBFt th\xFAc",of:"c\u1EE7a"},{lang:"pl",verb:"umie\u015B\u0107",at:"przy",end:"koniec",of:"z"},{lang:"ru",verb:"\u043F\u043E\u043B\u043E\u0436\u0438\u0442\u044C",at:"\u0443",end:"\u043A\u043E\u043D\u0435\u0446",of:"\u0438\u0437"},{lang:"uk",verb:"\u043F\u043E\u043A\u043B\u0430\u0441\u0442\u0438",at:"\u0432",end:"\u043A\u0456\u043D\u0435\u0446\u044C",of:"\u0437"},{lang:"th",verb:"\u0E43\u0E2A\u0E48",at:"\u0E17\u0E35\u0E48",end:"\u0E08\u0E1A",of:"\u0E02\u0E2D\u0E07"},{lang:"tl",verb:"ilagay",at:"sa",end:"wakas",of:"ng"},{lang:"ar",verb:"\u0636\u0639",at:"\u0639\u0646\u062F",end:"\u0627\u0644\u0646\u0647\u0627\u064A\u0629",of:"\u0645\u0646"},{lang:"zh",verb:"\u653E\u7F6E",verbAlts:["\u653E","\u653E\u5165"],patientPrefix:"\u628A",at:"\u5728",end:"\u7ED3\u675F",of:"\u7684"},{lang:"he",verb:"\u05E9\u05D9\u05DD",patientPrefix:"\u05D0\u05EA",at:"at",end:"\u05E1\u05D5\u05E3",of:"of"},{lang:"tr",verb:"koy",sov:!0,objMarker:"i",at:"de",end:"son",of:"nin"},{lang:"ja",verb:"\u7F6E\u304F",sov:!0,objMarker:"\u3092",at:"\u3067",end:"\u7D42\u308F\u308A",of:"\u306E"},{lang:"ko",verb:"\uB123\uB2E4",sov:!0,objMarker:"\uB97C",at:"\uC5D0",end:"\uB05D",of:"\uC758"},{lang:"hi",verb:"\u0930\u0916\u0947\u0902",verbAlts:["\u0930\u0916","\u0921\u093E\u0932\u0947\u0902","\u0921\u093E\u0932"],sov:!0,objMarker:"\u0915\u094B",at:"\u092A\u0930",end:"\u0938\u092E\u093E\u092A\u094D\u0924",of:"\u0915\u093E"},{lang:"bn",verb:"\u09B0\u09BE\u0996\u09C1\u09A8",verbAlts:["\u09B0\u09BE\u0996"],sov:!0,objMarker:"\u0995\u09C7",at:"\u098F",end:"\u09B6\u09C7\u09B7",of:"\u09B0"},{lang:"qu",verb:"churay",sov:!0,objMarker:"ta",at:"pi",end:"tukuy",of:"pa"}];function Cr(n,e,t,r){let i=Lr.find(s=>s.lang===n);if(!i)return!1;let a=(s,o)=>(s??"").toLowerCase()===o.toLowerCase();return a(e,i.end)&&a(t,i.at)&&a(r,i.of)}function Fn(n,e){let t=Lr.find(i=>i.lang===n);if(!t)return!1;let r=e.toLowerCase();return r===t.at.toLowerCase()||r===t.of.toLowerCase()||r===t.end.toLowerCase()}function sl(n){let e=Lr.find(a=>a.lang===n);if(!e)return[];let t=[],r=e.verbAlts?{type:"literal",value:e.verb,alternatives:e.verbAlts}:{type:"literal",value:e.verb},i=a=>{t.push({type:"literal",value:a})};return e.sov?(t.push({type:"role",role:"patient"}),i(e.at),i(e.end),i(e.of),t.push({type:"role",role:"destination"}),e.objMarker&&t.push({type:"literal",value:e.objMarker}),t.push(r)):(t.push(r),e.patientPrefix&&t.push({type:"literal",value:e.patientPrefix}),t.push({type:"role",role:"patient"}),i(e.at),i(e.end),i(e.of),t.push({type:"role",role:"destination"})),[{id:`put-${e.lang}-at-end`,language:e.lang,command:"put",priority:110,template:{format:`put {patient} ${e.at} ${e.end} ${e.of} {destination}`,tokens:t},extraction:{manner:{default:{type:"literal",value:"at end of"}}}}]}function ll(){return["before","after"].map(n=>{let e=n==="before"?"\u524D\u306B":"\u5F8C\u306B",t=n==="before"?"\u524D":"\u5F8C";return{id:`put-ja-${n}`,language:"ja",command:"put",priority:105,template:{format:`{patient} ${e} {destination} \u3092 \u7F6E\u304F`,tokens:[{type:"role",role:"patient"},{type:"literal",value:e,alternatives:[t]},{type:"role",role:"destination"},{type:"literal",value:"\u3092"},{type:"literal",value:"\u7F6E\u304F",alternatives:["\u5165\u308C\u308B"]}]},extraction:{patient:{position:0},destination:{position:2},manner:{default:{type:"literal",value:n}}}}})}function cl(){return["before","after"].map(n=>{let e=n==="before"?"\uC804\uC5D0":"\uD6C4\uC5D0";return{id:`put-ko-${n}`,language:"ko",command:"put",priority:105,template:{format:`{patient} ${e} {destination} \uB97C \uB123\uB2E4`,tokens:[{type:"role",role:"patient"},{type:"literal",value:e},{type:"role",role:"destination"},{type:"literal",value:"\uB97C",alternatives:["\uC744"]},{type:"literal",value:"\uB123\uB2E4",alternatives:["\uB123\uAE30","\uB193\uAE30"]}]},extraction:{patient:{position:0},destination:{position:2},manner:{default:{type:"literal",value:n}}}}})}function pl(){let n=(e,t)=>({id:`put-tr-${e}`,language:"tr",command:"put",priority:105,template:{format:`{patient} ${t} {destination} i koy`,tokens:[{type:"role",role:"patient"},{type:"literal",value:t},{type:"role",role:"destination"},{type:"group",optional:!0,tokens:[{type:"literal",value:"i",alternatives:["\u0131","u","\xFC","yi","y\u0131","yu","y\xFC"]}]},{type:"literal",value:"koy",alternatives:["koymak"]}]},extraction:{patient:{position:0},destination:{position:2},manner:{default:{type:"literal",value:e}}}});return[n("before","\xF6nce"),n("after","sonra")]}function dl(n){let e=ol.find(t=>t.lang===n);return e?["before","after"].map(t=>{let r=e[t],i=[e.verbAlts?{type:"literal",value:e.verb,alternatives:e.verbAlts}:{type:"literal",value:e.verb}];return e.patientPrefix&&i.push(e.patientPrefixOptional?{type:"group",optional:!0,tokens:[{type:"literal",value:e.patientPrefix}]}:{type:"literal",value:e.patientPrefix}),i.push({type:"role",role:"patient"},{type:"literal",value:r},{type:"role",role:"destination"}),{id:`put-${e.lang}-${t}`,language:e.lang,command:"put",priority:95,template:{format:`${e.verb} {patient} ${r} {destination}`,tokens:i},extraction:{patient:{position:e.patientPrefix&&!e.patientPrefixOptional?2:1},destination:{marker:r},manner:{default:{type:"literal",value:t}}}}}):[]}function Un(n){let e=dl(n),t=sl(n);switch(n){case"bn":return[...Us(),...t];case"en":return Gs();case"es":return[...Ys(),...t];case"hi":return[...Xs(),...t];case"id":return[...Zs(),...e,...t];case"it":return[...Js(),...t];case"ja":return[...ll(),...t];case"ko":return[...cl(),...t];case"tr":return[...pl(),...t];case"pl":return[...Qs(),...t];case"ru":return[...el(),...t];case"qu":return[...il(),...t];case"th":return[...tl(),...t];case"uk":return[...rl(),...t];case"vi":return[...nl(),...t];case"zh":return[...al(),...e,...t];default:return[...e,...t]}}var Gn=new Set(["\u0628\u062F\u0644","\u063A\u064A\u0631","\u0623\u0636\u0641","\u0623\u0632\u0644","\u0636\u0639","\u0627\u062C\u0639\u0644","\u0639\u064A\u0646","\u0632\u062F","\u0627\u0646\u0642\u0635","\u0633\u062C\u0644","\u0623\u0638\u0647\u0631","\u0623\u062E\u0641","\u0634\u063A\u0644","\u0623\u0631\u0633\u0644","\u0631\u0643\u0632","\u0634\u0648\u0634","\u062A\u0648\u0642\u0641","\u0627\u0646\u0633\u062E","\u0627\u062D\u0630\u0641","\u0627\u0635\u0646\u0639","\u0627\u0646\u062A\u0638\u0631","\u0627\u0646\u062A\u0642\u0627\u0644","\u0623\u0648"]),ul={patient:["\u0639\u0644\u0649"],destination:["\u0625\u0644\u0649","\u0627\u0644\u0649"],source:["\u0645\u0646"],agent:["\u0645\u0646"],manner:["\u0628"],style:["\u0628"],goal:["\u0625\u0644\u0649","\u0627\u0644\u0649"],method:["\u0628"]},Rr=class{calculate(e){return this.calculateWithBreakdown(e).final}calculateWithBreakdown(e){let t=this.scoreRoleCoverage(e),r=this.scoreStemPenalty(e),i=this.scoreLanguageBoost(e),a=this.scoreLanguageAdjustment(e),s=t;return s=Math.max(.5,s+r),s=Math.min(1,s+i),s=Math.max(0,Math.min(1,s+a)),{roleCoverage:t,stemPenalty:r,languageBoost:i,languageAdjustment:a,final:s}}scoreRoleCoverage(e){let{pattern:t,captured:r}=e,i=0,a=0,s=o=>t.extraction?.[o]?.default!==void 0;for(let o of t.template.tokens)if(o.type==="role")a+=1,r.has(o.role)&&(i+=1);else if(o.type==="group")for(let l of o.tokens)l.type==="role"&&(a+=.8,r.has(l.role)?i+=.8:s(l.role)&&(i+=.8*.6));return a>0?i/a:1}scoreStemPenalty(e){let{stemMatchCount:t,totalKeywordMatches:r}=e;return t<=0||r<=0?0:-(t/r)*.15}scoreLanguageBoost(e){let{pattern:t}=e;if(t.language!=="ar")return 0;let r=t.template.tokens[0];return!r||r.type!=="literal"?0:Gn.has(r.value)||r.alternatives?.some(i=>Gn.has(i))?.15:0}scoreLanguageAdjustment(e){let{pattern:t,captured:r}=e;if(t.language!=="ar")return 0;let i=0;for(let[a,s]of r.entries()){let o=ul[a];if(!o||o.length===0)continue;let l="metadata"in s?s.metadata:void 0;l&&typeof l.prepositionValue=="string"&&(o.includes(l.prepositionValue)?i+=.1:i-=.1)}return Math.max(-.1,Math.min(.1,i))}},Yn=new Rr;var ml=new Set(Object.values(je).filter(n=>n.bareKeyword===!0).map(n=>n.action)),N=class N{constructor(e){this.matchCache=new Map;this.stemMatchCount=0;this.totalKeywordMatches=0;this.confidenceModel=e??Yn}matchPattern(e,t){let r=e.mark(),i=new Map;if(this.currentProfile=I(t.language),this.currentPatternCommand=t.command,this.stemMatchCount=0,this.totalKeywordMatches=0,!this.matchTokenSequence(e,t.template.tokens,i))return e.reset(r),null;let s=this.confidenceModel.calculate({pattern:t,captured:i,stemMatchCount:this.stemMatchCount,totalKeywordMatches:this.totalKeywordMatches});return this.applyExtractionRules(t,i),{pattern:t,captured:i,consumedTokens:e.position()-r.position,confidence:s}}matchBest(e,t){this.matchCache.clear();let r=[],i=e.position();for(let s of t){let o=e.mark(),l=`${i}:${s.id}`,c;this.matchCache.has(l)?c=this.matchCache.get(l):(c=this.matchPattern(e,s),this.matchCache.set(l,c)),c&&r.push(c),e.reset(o)}if(r.length===0)return null;r.sort((s,o)=>{let l=o.pattern.priority-s.pattern.priority;return l!==0?l:o.confidence-s.confidence});let a=r[0];return this.matchPattern(e,a.pattern),a}matchTokenSequence(e,t,r,i){let a=t[0],s=a?.type==="literal"&&(a.value==="and"||a.value==="then"||a.alternatives?.includes("and")||a.alternatives?.includes("then"));if(this.currentProfile?.code==="ar"&&!s)for(;e.peek()?.kind==="conjunction";)e.advance();let o=0;for(let l=0;l<t.length;l++){let c=t[l];o>0&&c.type==="literal"&&this.tryConsumeEventSourceClause(e,r,c);let d=this.matchPatternToken(e,c,r,t[l+1]??i);if(o=c.type==="role"&&c.role==="event"?2:Math.max(0,o-1),!d){if(this.isOptional(c))continue;return!1}}return!0}tryConsumeEventSourceClause(e,t,r){if(t.has("source"))return;let i=e.peek(),a=e.peek(1);if(!i||!a||this.patternTokenWouldMatch(r,i))return;let s=this.currentProfile?.roleMarkers?.source,o=c=>{if(c.kind!=="particle"&&c.kind!=="keyword")return!1;if((c.normalized??"").toLowerCase()==="source")return!0;if(!s)return!1;let d=c.value.toLowerCase();return s.primary?.toLowerCase()===d?!0:!!s.alternatives?.some(p=>p.toLowerCase()===d)},l=s?.position;if(l!=="after"&&o(i)&&a.kind==="selector"){e.advance();let c=this.tokenToSemanticValue(e.advance());c&&t.set("source",c);return}if(l==="after"&&i.kind==="selector"&&o(a)){let c=this.tokenToSemanticValue(i);e.advance(),e.advance(),c&&t.set("source",c)}}matchPatternToken(e,t,r,i){switch(t.type){case"literal":return this.matchLiteralToken(e,t);case"role":return this.matchRoleToken(e,t,r,i);case"group":return this.matchGroupToken(e,t,r,i);default:return!1}}matchLiteralToken(e,t){let r=e.peek();if(!r)return!1;let i=this.getMatchType(r,t.value);if(i!=="none")return this.totalKeywordMatches++,i==="stem"&&this.stemMatchCount++,e.advance(),!0;if(t.alternatives)for(let a of t.alternatives){let s=this.getMatchType(r,a);if(s!=="none")return this.totalKeywordMatches++,s==="stem"&&this.stemMatchCount++,e.advance(),!0}for(let a of[t.value,...t.alternatives??[]])for(let s of["-","_"])if(a.includes(s)&&this.tryMatchShatteredCompound(e,a,s))return this.totalKeywordMatches++,!0;return!1}tryFoldHyphenActionKeyword(e){let t=this.currentProfile;if(!t)return null;let r=e.mark(),i=[];for(;;){let s=e.peek();if(!s||s.kind!=="identifier"&&s.kind!=="keyword")break;i.push(s.value),e.advance();let o=e.peek();if(!o||o.value!=="-")break;e.advance(),i.push("-")}if(i.length<3||i[i.length-1]==="-")return e.reset(r),null;let a=i.join("").toLowerCase();for(let[s,o]of Object.entries(t.keywords))if(o.primary.toLowerCase()===a||o.alternatives?.some(l=>l.toLowerCase()===a))return U(s);return e.reset(r),null}tryMatchShatteredCompound(e,t,r){let i=t.split(r);if(i.length<2||i.some(s=>s.length===0))return!1;let a=e.mark();for(let s=0;s<i.length;s++){if(s>0){let l=e.peek();if(!l||l.value!==r)return e.reset(a),!1;e.advance()}let o=e.peek();if(!o||o.kind!=="identifier"&&o.kind!=="keyword"&&o.kind!=="particle"||o.value.toLowerCase()!==i[s].toLowerCase())return e.reset(a),!1;e.advance()}return!0}matchRoleToken(e,t,r,i){this.skipNoiseWords(e);let a=e.peek();if(!a)return t.optional||!1;if(t.role==="action"&&this.currentProfile&&e.peek(1)?.value==="-"){let h=this.tryFoldHyphenActionKeyword(e);if(h)return r.set(t.role,h),!0}if(t.role==="event"&&this.currentPatternCommand==="on"){if(!N.tokenLooksLikeEvent(a))return t.optional||!1;let h=(a.normalized??a.value).toLowerCase();if(N.POSITIONAL_OR_SCOPE_KEYWORDS.has(h)||this.currentProfile&&(ze(this.currentProfile,a.value)??ze(this.currentProfile,h))!==void 0||a.value.includes("?."))return t.optional||!1}if(t.role==="event"){let h=(a.normalized??a.value).toLowerCase();if(N.STRUCTURAL_NEVER_EVENT.has(h))return t.optional||!1}if(t.role==="duration"){let h=(a.normalized??a.value).toLowerCase();if(N.POSITIONAL_OR_SCOPE_KEYWORDS.has(h))return t.optional||!1}if(t.optional&&i===void 0&&t.role!=="event"&&t.role!=="action"&&a.kind==="keyword"&&(a.normalized??a.value).toLowerCase()in je)return!0;let s=this.tryMatchPositionalExpression(e);if(s)return t.expectedTypes&&t.expectedTypes.length>0&&!dt(s.type,t.expectedTypes)?t.optional||!1:(r.set(t.role,s),!0);let o=this.tryMatchCaretScopeExpression(e);if(o)return t.expectedTypes&&t.expectedTypes.length>0&&!dt(o.type,t.expectedTypes)?t.optional||!1:(r.set(t.role,o),!0);if(t.role!=="event"&&(!t.expectedTypes||t.expectedTypes.includes("expression"))){let h=this.tryMatchOperatorRunExpression(e);if(h)return r.set(t.role,h),!0}if(t.expectedTypes?.includes("property-path")){let h=this.tryMatchOfPossessiveExpression(e);if(h)return r.set(t.role,h),!0;let b=this.tryMatchPostNominalPossessiveExpression(e);if(b)return r.set(t.role,b),!0}let l=this.tryMatchPossessiveExpression(e);if(l)return t.expectedTypes&&t.expectedTypes.length>0&&!t.expectedTypes.includes(l.type)&&!t.expectedTypes.includes("expression")?t.optional||!1:(r.set(t.role,l),!0);let c=this.tryMatchMethodCallExpression(e);if(c)return t.expectedTypes&&t.expectedTypes.length>0&&!t.expectedTypes.includes(c.type)&&!t.expectedTypes.includes("expression")?t.optional||!1:(r.set(t.role,c),!0);let p=t.role==="event"&&this.currentPatternCommand==="on"||N.DECLARATION_COMMANDS.has(this.currentPatternCommand??"")?null:this.tryMatchBareCallExpression(e);if(p)return t.expectedTypes&&t.expectedTypes.length>0&&!t.expectedTypes.includes(p.type)&&!t.expectedTypes.includes("expression")?t.optional||!1:(r.set(t.role,p),!0);let u=this.tryMatchPossessiveSelectorExpression(e);if(u)return t.expectedTypes&&t.expectedTypes.length>0&&!dt(u.type,t.expectedTypes)?t.optional||!1:(r.set(t.role,u),!0);let m=t.role!=="condition",f=this.tryMatchPropertyAccessExpression(e,m);if(f)return t.expectedTypes&&t.expectedTypes.length>0&&!t.expectedTypes.includes(f.type)&&!t.expectedTypes.includes("expression")?t.optional||!1:(r.set(t.role,f),!0);let y=this.tryMatchSelectorPropertyExpression(e);if(y)return t.expectedTypes&&t.expectedTypes.length>0&&!dt(y.type,t.expectedTypes)?t.optional||!1:(r.set(t.role,y),!0);if(a.kind==="identifier"&&a.value==="{"&&(!t.expectedTypes?.length||t.expectedTypes.includes("literal"))){let h=this.tryMatchBraceRunLiteral(e);if(h)return r.set(t.role,h),!0}let g=this.tokenToSemanticValue(a);if(!g)return t.optional||!1;if(t.expectedTypes&&t.expectedTypes.length>0&&!t.expectedTypes.includes(g.type)){let h=g.type==="selector"&&String(g.value).startsWith("@"),b=t.expectedTypes.some(z=>z==="expression"||z==="reference");if(!(h&&b))return t.optional||!1}if(r.set(t.role,g),e.advance(),t.role==="event"){let h=e.peek();h&&h.kind==="selector"&&h.value.startsWith("[")&&"value"in g&&(r.set(t.role,U(`${String(g.value)}${h.value}`)),e.advance());let b=e.peek();if(b&&(b.kind==="particle"||b.kind==="keyword")&&(b.normalized??"").toLowerCase()==="source"&&!this.patternTokenWouldMatch(i,b)){let z=e.peek(1);if(z&&(z.kind==="selector"||z.kind==="identifier")){e.advance();let E=this.tokenToSemanticValue(e.advance());E&&!r.has("source")&&r.set("source",E)}}}return!0}patternTokenWouldMatch(e,t){return e?e.type==="literal"?this.getMatchType(t,e.value)!=="none"?!0:!!e.alternatives?.some(r=>this.getMatchType(t,r)!=="none"):e.type==="group"?this.patternTokenWouldMatch(e.tokens?.[0],t):!1:!1}tryMatchPositionalExpression(e){let t=e.peek();if(!t)return null;let r=(t.normalized??t.value).toLowerCase();if(!N.POSITIONAL_KEYWORDS.has(r)&&!N.POSITIONAL_KEYWORDS.has(t.value.toLowerCase()))return null;let i=e.mark(),a=[t.normalized??t.value];e.advance();let s=e.peek();if(!s||s.kind!=="selector")return e.reset(i),null;a.push(s.value),e.advance();let o=0;for(;o++<8;){let d=e.peek();if(d&&d.kind==="selector"&&d.value.startsWith("."))a.push(d.value),e.advance();else break}let l=e.peek(),c=e.peek(1);return l&&c&&c.kind==="selector"&&(l.kind==="keyword"||l.kind==="particle"||l.kind==="identifier")&&!N.POSITIONAL_KEYWORDS.has((l.normalized??l.value).toLowerCase())&&!N.COMMAND_ACTION_KEYWORDS.has((l.normalized??l.value).toLowerCase())&&(a.push(l.normalized??l.value,c.value),e.advance(),e.advance()),{type:"expression",raw:a.join(" ")}}tryMatchCaretScopeExpression(e){let t=e.peek();if(!t||t.kind!=="identifier"||!t.value.startsWith("^"))return null;let r=e.peek(1),i=e.peek(2),a=(r?.normalized??"").toLowerCase(),s=!!r&&(r.value.toLowerCase()==="on"||a==="destination"||a==="on");return!r||!i||i.kind!=="selector"||!s?null:(e.advance(),e.advance(),e.advance(),{type:"expression",raw:`${t.value} on ${i.value}`})}isOfPossessiveMarker(e){let t=e.value.toLowerCase(),r=(e.normalized??"").toLowerCase();if(t==="of"||t==="ng"||r==="of"||r==="source")return!0;let i=this.currentProfile?.code?N.OF_POSSESSIVE_MARKERS[this.currentProfile.code]:void 0;return!!i&&i.has(t)}tryMatchOperatorRunExpression(e){let t=e.mark(),r=e.position();if(!this.tryConsumeRunOperand(e))return e.reset(t),null;let i=1;for(;;){let s=e.peek();if(!s||!N.RUN_OPERATORS.has(s.value))break;let o=e.mark();if(e.advance(),!this.tryConsumeRunOperand(e)){e.reset(o);break}i++}if(i<2)return e.reset(t),null;let a=e.tokens.slice(r,e.position()).map(s=>s.value).join(" ");return{type:"expression",raw:a,value:a}}tryConsumeRunOperand(e){let t=e.peek();if(!t)return!1;if(t.value==="("){let r=e.mark(),i=0;for(;!e.isAtEnd();){let a=e.advance();if(a.value==="(")i++;else if(a.value===")"&&(i--,i===0))return!0}return e.reset(r),!1}return this.tryMatchPossessiveExpression(e)?!0:(t.kind==="literal"||t.kind==="identifier"||t.kind==="selector"||t.kind==="keyword")&&!N.RUN_OPERATORS.has(t.value)&&t.value!==")"?(e.advance(),!0):!1}tryMatchOfPossessiveExpression(e){let t=e.peek();if(!t||t.kind!=="selector")return null;let r=e.mark();e.advance();let i=e.peek();if(!i||!this.isOfPossessiveMarker(i))return e.reset(r),null;e.advance();let a=e.peek();return!a||a.kind!=="selector"?(e.reset(r),null):(e.advance(),ge(ue(a.value),t.value))}tryMatchPossessiveExpression(e){let t=e.peek();if(!t||!this.currentProfile)return null;let r=[t.value,t.normalized].filter(Boolean),i;for(let l of r)if(i=ze(this.currentProfile,l)??ze(this.currentProfile,l.toLowerCase()),i)break;if(!i)return null;let a=e.mark();e.advance();let s=this.currentProfile.possessive?.connectors;if(s&&s.length>0){let l=e.peek();if(l){let c=l.value.toLowerCase(),d=(l.normalized??"").toLowerCase();s.some(p=>p.toLowerCase()===c||p.toLowerCase()===d)&&e.advance()}}let o=e.peek();if(!o||Fn(this.currentProfile.code,o.value))return e.reset(a),null;if(o.kind==="identifier"||o.kind==="keyword"&&!this.isStructuralKeyword(o.value)&&!(o.normalized&&this.isStructuralKeyword(o.normalized))&&!(o.normalized&&this.isRoleMarkerConcept(o.normalized))||o.kind==="selector"&&o.value.startsWith("*")||o.kind==="selector"&&o.value.startsWith("@")||o.kind==="selector"&&o.value.startsWith(".")&&/^\.[a-zA-Z_]\w*/.test(o.value)){e.advance();let l=o.value;o.kind==="selector"&&l.startsWith(".")&&/^\.[a-zA-Z_]\w*/.test(l)&&(l=l.substring(1));let c=l;for(;e.peek()?.kind==="selector"&&e.peek().value.startsWith(".")&&/^\.[a-zA-Z_]\w*/.test(e.peek().value);)c+=e.peek().value,e.advance();let d=e.peek();if(d&&d.value.startsWith("(")){let p="",u=0,m=0;for(;!e.isAtEnd()&&m++<N.MAX_METHOD_ARGS+2;){let f=e.peek();if(!f)break;p+=f.value,e.advance();for(let y of f.value)y==="("?u++:y===")"&&u--;if(u<=0)break}c+=p}return ge(oe(i),c)}return e.reset(a),null}tryMatchPostNominalPossessiveExpression(e){if(!this.currentProfile||this.currentProfile.possessive?.markerPosition!=="after-object")return null;let t=p=>{for(let u of[p.value,p.normalized].filter(Boolean))if(ze(this.currentProfile,u)??ze(this.currentProfile,u.toLowerCase()))return!0;return!1},r=e.peek();if(!r)return null;let i=r.kind==="selector"&&r.value.startsWith(".")&&/^\.[a-zA-Z_]\w*/.test(r.value);if(!(r.kind==="identifier"&&!this.isStructuralKeyword(r.value)&&!(r.normalized&&this.isStructuralKeyword(r.normalized))&&!(r.normalized&&this.isRoleMarkerConcept(r.normalized))||r.kind==="selector"&&(r.value.startsWith("*")||r.value.startsWith("@"))||i)||t(r))return null;let s=e.mark(),o=r.value;i&&(o=o.substring(1)),e.advance();let l=o;for(;e.peek()?.kind==="selector"&&e.peek().value.startsWith(".")&&/^\.[a-zA-Z_]\w*/.test(e.peek().value);)l+=e.peek().value,e.advance();let c=e.peek();if(!c)return e.reset(s),null;let d;for(let p of[c.value,c.normalized].filter(Boolean))if(d=ze(this.currentProfile,p)??ze(this.currentProfile,p.toLowerCase()),d)break;return d?(e.advance(),ge(oe(d),l)):(e.reset(s),null)}isStructuralKeyword(e){return new Set(["into","in","to","from","at","by","with","without","before","after","of","as","on","then","end","else","if","repeat","while","for","toggle","add","remove","put","set","show","hide","increment","decrement","send","trigger","call"]).has(e.toLowerCase())}isRoleMarkerConcept(e){return new Set(["destination","source","patient","object","event","eventmarker","manner","instrument"]).has(e.toLowerCase())}static tokenLooksLikeEvent(e){if(e.kind==="selector"||e.kind==="url"||e.kind==="literal")return!1;let t=e.value;if(/[/#@*]/.test(t)||t.startsWith('"')||t.startsWith("'")||t.startsWith("`"))return!1;let r=e.normalized?.toLowerCase();return!(r&&ml.has(r))}tryMatchBraceRunLiteral(e){let t=e.peek();if(!t||t.kind!=="identifier"||t.value!=="{")return null;let r=e.mark();e.advance();let i=["{"],a=1,s=0;for(;!e.isAtEnd()&&s++<N.MAX_BRACE_RUN_TOKENS;){let o=e.advance();if(!o)break;if(o.value==="{")a++;else if(o.value==="}"&&(a--,a===0))return i.push("}"),U(i.join(" "));i.push(o.value)}return e.reset(r),null}tryMatchBareCallExpression(e){let t=e.peek();if(!t||t.kind!=="identifier"||!/^[A-Za-z_][\w$]*$/.test(t.value))return null;let r=e.peek(1);if(!r||r.value!=="(")return null;let i=e.mark();e.advance(),e.advance();let a=[],s=!1,o=0;for(;!e.isAtEnd()&&o++<N.MAX_METHOD_ARGS+2;){let l=e.peek();if(!l)break;if(l.value===")"){e.advance(),s=!0;break}if(l.value===","){e.advance();continue}a.push(l.value),e.advance()}return s?{type:"expression",raw:`${t.value}(${a.join(", ")})`}:(e.reset(i),null)}tryMatchMethodCallExpression(e){let t=e.peek();if(!t||t.kind!=="selector")return null;let r=e.mark();e.advance();let i=e.peek();if(!i||i.kind!=="operator"||i.value!==".")return e.reset(r),null;e.advance();let a=e.peek();if(!a||a.kind!=="identifier")return e.reset(r),null;e.advance();let s=e.peek();if(!s||s.kind!=="punctuation"||s.value!=="(")return e.reset(r),null;e.advance();let o=[];for(;!e.isAtEnd()&&o.length<N.MAX_METHOD_ARGS;){let c=e.peek();if(!c)break;if(c.kind==="punctuation"&&c.value===")"){e.advance();break}if(c.kind==="punctuation"&&c.value===","){e.advance();continue}o.push(c.value),e.advance()}return{type:"expression",raw:`${t.value}.${a.value}(${o.join(", ")})`}}tryMatchPropertyAccessExpression(e,t=!0){let r=e.peek();if(!r||r.kind!=="identifier"&&r.kind!=="keyword")return null;let i=e.mark();e.advance();let a=r.value.toLowerCase(),s=e.peek();if((r.kind==="identifier"||N.PROPERTY_ACCESS_BASES.has(a))&&s&&s.kind==="selector"&&/^\.[a-zA-Z_]/.test(s.value)){let m=r.value,f=[],y=0;for(;y<N.MAX_PROPERTY_DEPTH;){let b=e.peek();if(b&&b.kind==="selector"&&/^\.[a-zA-Z_]/.test(b.value))m+=`.${b.value.slice(1)}`,f.push(b.value.slice(1)),e.advance(),y++;else break}let g=e.peek(),h=!!g&&g.value.startsWith("(");if(t&&!h&&f.length>0&&Oe(a))return ge(oe(a),f.join("."));if(h){let b=e.mark(),z=[],E=0,x=!1;for(;!e.isAtEnd();){let k=e.peek();if(!k)break;if(k.value==="(")E++;else if(k.value===")"){if(z.push(k.value),e.advance(),E--,E===0&&(x=!0),x)break;continue}z.push(k.value),e.advance()}x?m+=z.join(""):e.reset(b)}return{type:"expression",raw:m}}let o=e.peek();if(!o||o.kind!=="operator"||o.value!==".")return e.reset(i),null;e.advance();let l=e.peek();if(!l||l.kind!=="identifier")return e.reset(i),null;e.advance();let c=`${r.value}.${l.value}`,d=1;for(;!e.isAtEnd()&&d<N.MAX_PROPERTY_DEPTH;){let m=e.peek();if(!m||m.kind!=="operator"||m.value!==".")break;e.advance();let f=e.peek();if(!f||f.kind!=="identifier")break;e.advance(),c+=`.${f.value}`,d++}let p=e.peek();if(p&&p.kind==="punctuation"&&p.value==="("){e.advance();let m=[],f=0;for(;!e.isAtEnd()&&m.length<N.MAX_METHOD_ARGS;){let g=e.peek();if(!g)break;if(g.kind==="punctuation"&&g.value===")"){if(f===0){e.advance();break}f--}if(g.kind==="punctuation"&&g.value==="("&&f++,g.kind==="punctuation"&&g.value===","){e.advance();continue}m.push(g.value),e.advance()}return{type:"expression",raw:`${c}(${m.join(", ")})`}}let u=r.value.toLowerCase();if(t&&Oe(u)){let m=c.split(".").slice(1).join(".");return ge(oe(u),m)}return{type:"expression",raw:c}}tryMatchPossessiveSelectorExpression(e){let t=e.peek();if(!t||t.kind!=="selector")return null;let r=e.mark();e.advance();let i=e.peek(),a=this.currentProfile?.possessive?.marker?.replace(/^-/,""),s=!!i&&i.kind==="punctuation"&&i.value==="'s",o=!!i&&i.value==="'"&&(e.peek(1)?.value??"").toLowerCase()==="s",l=(()=>{if(!this.currentPatternCommand||(i?.normalized??"").toLowerCase()!=="source")return!1;let u=je[this.currentPatternCommand];return!!u&&u.roles.some(m=>m.role==="source")})(),c=!!i&&!!a&&a!=="'s"&&i.value===a&&(i.kind==="particle"||i.kind==="punctuation")&&!l;if(!s&&!c&&!o)return e.reset(r),null;e.advance(),o&&e.advance();let d=e.peek();return!d||!(d.kind==="identifier"||(s||o)&&(d.kind==="selector"||d.kind==="keyword"))?(e.reset(r),null):(e.advance(),ge(ue(t.value),d.value))}tryMatchSelectorPropertyExpression(e){let t=e.peek();if(!t||t.kind!=="selector"||!t.value.startsWith("#"))return null;let r=e.mark();e.advance();let i=e.peek();if(!i||i.kind!=="selector"||!i.value.startsWith("."))return e.reset(r),null;let a=e.peek(1);a&&a.kind,e.advance();let s=i.value.slice(1);return ge(ue(t.value),s)}matchGroupToken(e,t,r,i){let a=e.mark(),s=new Set(r.keys());if(!this.matchTokenSequence(e,t.tokens,r,i)){e.reset(a);for(let l of r.keys())s.has(l)||r.delete(l);return t.optional||!1}return!0}getMatchType(e,t){return e.value===t?"exact":e.normalized===t?"normalized":e.stem===t&&e.stemConfidence!==void 0&&e.stemConfidence>=.7?"stem":e.kind==="keyword"&&e.value.toLowerCase()===t.toLowerCase()?"case-insensitive":"none"}tokenToSemanticValue(e){switch(e.kind){case"selector":return ue(e.value);case"literal":return this.parseLiteralValue(e.value);case"keyword":let t=(e.normalized||e.value).toLowerCase();return Oe(t)?oe(t):U(e.normalized||e.value);case"identifier":if(e.value.startsWith("@"))return ue(e.value);if(e.value.startsWith(":")||e.value.startsWith("$"))return oe(e.value);let r=e.value.toLowerCase();return Oe(r)?oe(r):{type:"expression",raw:e.value};case"url":return U(e.value,"string");default:return null}}parseLiteralValue(e){if(e.startsWith('"')||e.startsWith("'")||e.startsWith("`")||e.startsWith("\u300C")){let i=e.slice(1,-1);return U(i,"string")}if(e==="true")return U(!0,"boolean");if(e==="false")return U(!1,"boolean");let t=e.match(/^(\d+(?:\.\d+)?)(ms|s|m|h)?$/);if(t){let i=parseFloat(t[1]);return t[2]?U(e,"duration"):U(i,"number")}let r=parseFloat(e);return isNaN(r)?U(e,"string"):U(r,"number")}applyExtractionRules(e,t){for(let[r,i]of Object.entries(e.extraction))t.has(r)||(i.value!==void 0?t.set(r,{type:"literal",value:i.value}):i.default&&t.set(r,i.default))}isOptional(e){return e.type!=="literal"&&e.optional===!0}skipNoiseWords(e){let t=e.peek();if(!t)return;let r=t.value.toLowerCase();if(N.ENGLISH_NOISE_WORDS.has(r)){let i=e.mark();e.advance();let a=e.peek();if(a&&(a.kind==="selector"||a.kind==="identifier"))return;let s=e.peek(1);if(a&&a.kind==="keyword"&&s&&s.kind==="selector"&&/^\.[a-zA-Z_]/.test(s.value))return;let o=a?(a.normalized??a.value).toLowerCase():"";if(a&&N.POSITIONAL_OR_SCOPE_KEYWORDS.has(o))return;let l=e.peek(1),c=l?(l.normalized??l.value).toLowerCase():"",d=this.currentProfile?.wordOrder!=="SOV"&&N.COMMAND_ACTION_KEYWORDS.has(c),p=!l||l.kind==="particle"||N.CLAUSE_BOUNDARY_KEYWORDS.has(c)||d;if(a&&a.kind==="keyword"&&this.currentProfile?.code!=="en"&&Oe(o)&&p||a&&a.kind==="keyword"&&this.currentProfile?.code==="en"&&Oe(o))return;e.reset(i)}r==="class"&&e.advance()}extractEventModifiers(e){let t={},r=!1;for(;!e.isAtEnd();){let i=e.peek();if(!i||i.kind!=="event-modifier")break;let a=i.metadata;if(!a)break;switch(r=!0,a.modifierName){case"once":t.once=!0;break;case"debounce":typeof a.value=="number"&&(t.debounce=a.value);break;case"throttle":typeof a.value=="number"&&(t.throttle=a.value);break;case"queue":(a.value==="first"||a.value==="last"||a.value==="all"||a.value==="none")&&(t.queue=a.value);break}e.advance()}return r?t:void 0}};N.POSITIONAL_KEYWORDS=new Set(["first","last","next","previous","random","closest"]),N.POSITIONAL_OR_SCOPE_KEYWORDS=new Set(["first","last","next","previous","random","closest","parent"]),N.STRUCTURAL_NEVER_EVENT=new Set(["if","unless","else","end","then"]),N.PROPERTY_ACCESS_BASES=new Set(["it","me","you","my","its","your","event","result","target","detail","body","window","document","self","this"]),N.COMMAND_ACTION_KEYWORDS=new Set(Object.keys(je).map(e=>e.toLowerCase())),N.CLAUSE_BOUNDARY_KEYWORDS=new Set(["then","and","or","end","else"]),N.OF_POSSESSIVE_MARKERS={ms:new Set(["daripada"]),sw:new Set(["ya"]),vi:new Set(["c\u1EE7a"]),zh:new Set(["\u7684"]),it:new Set(["di"]),pl:new Set(["z"]),uk:new Set(["\u0437"]),th:new Set(["\u0E02\u0E2D\u0E07"]),ja:new Set(["\u306E"]),ko:new Set(["\uC758"]),bn:new Set(["\u09B0"]),hi:new Set(["\u0915\u093E"]),qu:new Set(["pa"]),tr:new Set(["nin"])},N.RUN_OPERATORS=new Set(["+","-","*","/"]),N.MAX_BRACE_RUN_TOKENS=64,N.MAX_PROPERTY_DEPTH=10,N.MAX_METHOD_ARGS=20,N.DECLARATION_COMMANDS=new Set(["behavior","def","install"]),N.ENGLISH_NOISE_WORDS=new Set(["the","a","an"]);var Nr=N,he=new Nr;var fl=["===","!==","->","==","!=","<=",">=","&&","||","**","+=","-=","*=","/=","+","-","*","/","=",">","<","!","&","|","%","^","~"],K=class{constructor(e=fl){this.name="operator";this.operators=[...e].sort((t,r)=>r.length-t.length)}canExtract(e,t){return this.operators.some(r=>e.startsWith(r,t))}extract(e,t){for(let r of this.operators)if(e.startsWith(r,t))return{value:r,length:r.length};return null}},yl="()[]{},:;",q=class{constructor(e=yl){this.punctuation=e;this.name="punctuation"}canExtract(e,t){return this.punctuation.includes(e[t])}extract(e,t){let r=e[t];return this.punctuation.includes(r)?{value:r,length:1}:null}};function Ar(n,e){let t=n[e];if(t==="#"){let r=n.slice(e).match(/^#[a-zA-Z_][\w-]*/);return r?r[0]:null}if(t==="."){let r=n.slice(e).match(/^\.\{[a-zA-Z_$][\w$]*\}/);if(r)return r[0];let i=n.slice(e).match(/^\.[a-zA-Z_][\w-]*/);return i?i[0]:null}if(t==="@"){let r=n.slice(e).match(/^@[a-zA-Z_][\w-]*/);return r?r[0]:null}if(t==="*"){let r=n.slice(e).match(/^\*(?:--)?[a-zA-Z_][\w-]*/);return r?r[0]:null}if(t==="["){let r=0,i=e;for(;i<n.length;){if(n[i]==="["&&r++,n[i]==="]"&&(r--,r===0))return n.slice(e,i+1);i++}return null}if(t==="<"){let r=n.slice(e).match(/^<(?=[\w.#[])[\w-]*(?:[#.][\w-]+|\[[^\]]+\])*\s*\/>/);return r?r[0]:null}return null}var ut=class{constructor(){this.name="css-selector"}canExtract(e,t){let r=e[t];return r==="#"||r==="."||r==="["||r==="<"?!0:r==="@"||r==="*"?Ar(e,t)!==null:!1}extract(e,t){let r=Ar(e,t);return r?{value:r,length:r.length,metadata:{type:"css-selector"}}:null}};var mt=class{constructor(){this.name="event-modifier"}canExtract(e,t){if(e[t]!==".")return!1;let r=e.slice(t);return/^\.(once|prevent|stop|debounce|throttle|queue)/.test(r)}extract(e,t){let r=e.slice(t).match(/^\.(?:once|prevent|stop|debounce|throttle|queue)(?:\(([^)]+)\))?/);if(!r)return null;let i=r[0],a=i.slice(1).split("(")[0],s=r[1];return{value:i,length:i.length,metadata:{modifierName:a,value:s?a==="queue"?s:parseInt(s,10):void 0}}}};function Jn(n,e){let t=n.slice(e);if(t.startsWith("http://")||t.startsWith("https://")){let r=t.match(/^https?:\/\/[^\s]*/);return r?r[0]:null}if(t.startsWith("//")){let r=t.match(/^\/\/[^\s]*/);return r?r[0]:null}if(t.startsWith("./")||t.startsWith("../")){let r=t.match(/^\.\.?\/[^\s]*/);return r?r[0]:null}if(t.startsWith("/")){let r=t.match(/^\/[^\s]*/);return r?r[0]:null}return null}var ft=class{constructor(){this.name="url"}canExtract(e,t){let r=e.slice(t);return r.startsWith("http://")||r.startsWith("https://")||r.startsWith("//")||r.startsWith("./")||r.startsWith("../")||r.startsWith("/")}extract(e,t){let r=Jn(e,t);return r?{value:r,length:r.length,metadata:{type:"url"}}:null}};var yt=class{constructor(){this.name="variable-ref"}canExtract(e,t){let r=e[t];return(r===":"||r==="$"||r==="^")&&t+1<e.length&&/[a-zA-Z_]/.test(e[t+1])}extract(e,t){if(!this.canExtract(e,t))return null;let r=1;for(;t+r<e.length&&/[a-zA-Z0-9_]/.test(e[t+r]);)r++;return{value:e.substring(t,t+r),length:r,metadata:{type:"variable-reference"}}}};function gl(n){let e=n.charCodeAt(0);return e>=12352&&e<=12447}function hl(n){let e=n.charCodeAt(0);return e>=12448&&e<=12543}function vl(n){let e=n.charCodeAt(0);return e>=19968&&e<=40879||e>=13312&&e<=19903}function Qn(n){return gl(n)||hl(n)||vl(n)}var $t=class{constructor(){this.name="japanese-keyword"}setContext(e){this.context=e}canExtract(e,t){return Qn(e[t])}extract(e,t){if(!this.context)throw new Error("JapaneseKeywordExtractor: context not set");let r=t;this.context.isKeywordStart(e,t);let i="",a=t;for(;a<e.length&&Qn(e[a]);)i+=e[a],a++;let s=i,o=i.length;for(let p=i.length;p>0;p--){let u=i.substring(0,p);if(this.context.lookupKeyword(u)){s=u,o=p;break}}if(i=s,a=t+o,!i)return null;let l=this.context.lookupKeyword(i),c=l&&l.normalized!==l.native?l.normalized:void 0,d;if(!l&&this.context.normalizer){let p=this.context.normalizer.normalize(i);if(p.stem!==i&&p.confidence>=.7){let u=this.context.lookupKeyword(p.stem);u&&(d=u.normalized)}}return{value:i,length:a-r,metadata:{normalized:c||d}}}};var ei=new Map([["\u3092",{role:"patient",confidence:.95}],["\u306B",{role:"destination",confidence:.85}],["\u304C",{role:"subject",confidence:.9}],["\u306E",{role:"possessive",confidence:.9}],["\u3068",{role:"conjunction",confidence:.8}],["\u3067",{role:"instrument",confidence:.85}],["\u3078",{role:"direction",confidence:.85}],["\u3084",{role:"listing",confidence:.8}],["\u304B",{role:"question",confidence:.85}],["\u3082",{role:"also",confidence:.85}],["\u306F",{role:"topic",confidence:.9}]]),ti=new Map([["\u304B\u3089",{role:"source",confidence:.95}],["\u307E\u3067",{role:"until",confidence:.95}],["\u3088\u308A",{role:"comparison",confidence:.9}],["\u3068\u3057\u3066",{role:"as",confidence:.9}],["\u306B\u3064\u3044\u3066",{role:"about",confidence:.9}],["\u306B\u3088\u3063\u3066",{role:"by-means",confidence:.9}],["\u306B\u3066",{role:"at-location",confidence:.85}]]),Kt=class{constructor(){this.name="japanese-particle"}setContext(e){this._context=e}longerKeywordStartsHere(e,t){if(!this._context)return!1;for(let r=4;r>=2;r--){let i=e.slice(t,t+r);if(i.length===r&&this._context.isKeyword(i))return!0}return!1}canExtract(e,t){let r=e[t];if(ei.has(r)&&!this.longerKeywordStartsHere(e,t))return!0;for(let[i]of ti)if(e.startsWith(i,t))return!0;return!1}extract(e,t){for(let[a,s]of ti)if(e.startsWith(a,t))return{value:a,length:a.length,metadata:{role:s.role,confidence:s.confidence,variant:a}};let r=e[t];if(this.longerKeywordStartsHere(e,t))return null;let i=ei.get(r);return i?{value:r,length:1,metadata:{role:i.role,confidence:i.confidence,variant:r}}:null}};function kl(n){let e=n.charCodeAt(0);return e>=44032&&e<=55203}function xl(n){let e=n.charCodeAt(0);return e>=4352&&e<=4607||e>=12592&&e<=12687}function Mr(n){return kl(n)||xl(n)}var bl=["\uD560\uB54C","\uD558\uBA74","\uD558\uB2C8\uAE4C","\uD560 \uB54C"],qt=class{constructor(){this.name="korean-keyword"}setContext(e){this.context=e}canExtract(e,t){return Mr(e[t])}extract(e,t){if(!this.context)throw new Error("KoreanKeywordExtractor: context not set");let r=t,i=6;for(let u=Math.min(i,e.length-r);u>=2;u--){let m=e.slice(r,r+u),f=!0;for(let g=0;g<m.length;g++)if(!Mr(m[g])){f=!1;break}if(!f)continue;let y=this.context.lookupKeyword(m);if(y)return{value:m,length:u,metadata:{normalized:y.normalized!==y.native?y.normalized:void 0}};if(this.context.normalizer){let g=this.context.normalizer.normalize(m);if(g.stem!==m&&g.confidence>=.7){let h=this.context.lookupKeyword(g.stem);if(h)return{value:m,length:u,metadata:{normalized:h.normalized,stem:g.stem,stemConfidence:g.confidence}}}}}let a="",s=t;for(;s<e.length&&Mr(e[s])&&!(a.length>0&&this.context.isKeywordStart(e,s));)a+=e[s],s++;if(!a)return null;for(let u of bl)if(a.endsWith(u)&&a.length>u.length){let m=a.slice(0,-u.length),f=this.context.lookupKeyword(m);if(f)return{value:m,length:m.length,metadata:{normalized:f.normalized,hasSuffix:!0,suffix:u,stem:m}}}let o=this.context.lookupKeyword(a),l=o&&o.normalized!==o.native?o.normalized:void 0;a.includes("\uD1A0\uAE00")&&(console.log(`[KO DEBUG] word="${a}"`),console.log(`[KO DEBUG] keywordEntry=${o?"FOUND":"NOT FOUND"}`),console.log(`[KO DEBUG] normalizer=${this.context.normalizer?"EXISTS":"MISSING"}`));let c,d,p;if(!o&&this.context.normalizer){let u=this.context.normalizer.normalize(a);if(u.stem!==a&&u.confidence>=.7){let m=this.context.lookupKeyword(u.stem);m&&(c=m.normalized,d=u.stem,p=u.confidence,a.includes("\uD1A0\uAE00")&&console.log(`[KO DEBUG] word="${a}", stem="${u.stem}", normalized="${c}"`))}}return{value:a,length:s-r,metadata:{normalized:l||c,stem:d,stemConfidence:p}}}};var ri=new Map([["\uC774",{role:"agent",confidence:.85,variant:"consonant",description:"subject marker (after consonant)"}],["\uAC00",{role:"agent",confidence:.85,variant:"vowel",description:"subject marker (after vowel)"}],["\uC744",{role:"patient",confidence:.95,variant:"consonant",description:"object marker (after consonant)"}],["\uB97C",{role:"patient",confidence:.95,variant:"vowel",description:"object marker (after vowel)"}],["\uC740",{role:"agent",confidence:.75,variant:"consonant",description:"topic marker (after consonant)"}],["\uB294",{role:"agent",confidence:.75,variant:"vowel",description:"topic marker (after vowel)"}],["\uC5D0",{role:"destination",confidence:.85,description:"at/to marker"}],["\uB85C",{role:"destination",confidence:.85,variant:"vowel",description:"to/by means (after vowel or \u3139)"}],["\uC640",{role:"style",confidence:.7,variant:"vowel",description:"and/with (after vowel)"}],["\uACFC",{role:"style",confidence:.7,variant:"consonant",description:"and/with (after consonant)"}],["\uC758",{role:"patient",confidence:.6,description:"possessive marker"}],["\uB3C4",{role:"patient",confidence:.65,description:"also/too marker"}],["\uB9CC",{role:"patient",confidence:.65,description:"only marker"}]]),ni=new Map([["\uC5D0\uC11C",{role:"source",confidence:.8,description:"at/from marker (action location)"}],["\uC73C\uB85C",{role:"destination",confidence:.85,variant:"consonant",description:"to/by means (after consonant)"}],["\uBD80\uD130",{role:"source",confidence:.9,description:"from/since marker"}],["\uAE4C\uC9C0",{role:"destination",confidence:.75,description:"until/to marker"}],["\uCC98\uB7FC",{role:"manner",confidence:.8,description:"like/as marker"}],["\uBCF4\uB2E4",{role:"source",confidence:.75,description:"than marker"}]]);function ii(n){if(!n)return!1;let e=n.codePointAt(0);return e>=44032&&e<=55203}var Bt=class{constructor(){this.name="korean-particle"}setContext(e){this._context=e,this._context}canExtract(e,t){let r=e[t];if(ri.has(r)&&!ii(e[t+1]))return!0;for(let[i]of ni)if(e.startsWith(i,t))return!0;return!1}extract(e,t){for(let[a,s]of ni)if(e.startsWith(a,t))return{value:a,length:a.length,metadata:{particleRole:s.role,particleConfidence:s.confidence,particleVariant:s.variant}};let r=e[t],i=ri.get(r);return i&&!ii(e[t+1])?{value:r,length:1,metadata:{particleRole:i.role,particleConfidence:i.confidence,particleVariant:i.variant}}:null}};function Or(n){let e=n.charCodeAt(0);return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=63744&&e<=64255||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=194560&&e<=195103}var Dt=class{constructor(){this.name="chinese-keyword"}setContext(e){this.context=e}canExtract(e,t){return Or(e[t])}extract(e,t){if(!this.context)throw new Error("ChineseKeywordExtractor: context not set");let r=t,i=null;if(this.context.isKeywordStart(e,t))for(let o=10;o>=1;o--){let l=e.slice(t,t+o);if([...l].every(c=>Or(c))){let c=this.context.lookupKeyword(l);if(c){i={word:l,entry:c};break}}}if(i)return{value:i.word,length:i.word.length,metadata:{normalized:i.entry.normalized}};let a="",s=t;for(;s<e.length&&Or(e[s])&&(a+=e[s],s++,!(s<e.length&&this.context.isKeywordStart(e,s))););return a?{value:a,length:s-r,metadata:{}}:null}};var ai=new Map([["\u628A",{role:"patient",confidence:.95,description:"ba-construction object marker"}],["\u5728",{role:"location",confidence:.85,description:"at/in/on location marker"}],["\u4ECE",{role:"source",confidence:.9,description:"from marker"}],["\u5230",{role:"destination",confidence:.9,description:"to/until marker"}],["\u5411",{role:"destination",confidence:.85,description:"towards marker"}],["\u7ED9",{role:"destination",confidence:.85,description:"to/for recipient marker"}],["\u5BF9",{role:"destination",confidence:.8,description:"to/towards marker"}],["\u7528",{role:"instrument",confidence:.85,description:"with/using marker"}],["\u88AB",{role:"agent",confidence:.8,description:"by (passive) marker"}],["\u8BA9",{role:"agent",confidence:.75,description:"let/make causative marker"}],["\u7684",{role:"possessive",confidence:.9,description:"possessive/attributive marker"}],["\u5730",{role:"manner",confidence:.85,description:"adverbial marker"}],["\u5F97",{role:"manner",confidence:.8,description:"complement marker"}],["\u4E86",{role:"aspect",confidence:.7,description:"completion aspect marker"}],["\u7740",{role:"aspect",confidence:.7,description:"progressive aspect marker"}],["\u8FC7",{role:"aspect",confidence:.7,description:"experiential aspect marker"}],["\u5417",{role:"mood",confidence:.75,description:"question particle"}],["\u5462",{role:"mood",confidence:.7,description:"question/emphasis particle"}],["\u5427",{role:"mood",confidence:.7,description:"suggestion particle"}]]),oi=new Map([["\u7136\u540E",{role:"sequence",confidence:.9,description:"then/afterwards"}],["\u63A5\u7740",{role:"sequence",confidence:.85,description:"next/following"}],["\u5E76\u4E14",{role:"conjunction",confidence:.85,description:"and/moreover"}],["\u6216\u8005",{role:"conjunction",confidence:.85,description:"or"}],["\u5982\u679C",{role:"condition",confidence:.9,description:"if"}],["\u90A3\u4E48",{role:"consequence",confidence:.85,description:"then"}],["\u5426\u5219",{role:"alternative",confidence:.85,description:"otherwise"}]]),Ht=class{constructor(){this.name="chinese-particle"}setContext(e){this._context=e}longerKeywordAt(e,t,r){let i=this._context;if(!i)return!1;let a=Math.min(10,e.length-t);for(let s=a;s>r;s--)if(i.lookupKeyword(e.slice(t,t+s)))return!0;return!1}canExtract(e,t){let r=e[t];if(ai.has(r)&&!this.longerKeywordAt(e,t,1))return!0;for(let[i]of oi)if(e.startsWith(i,t)&&!this.longerKeywordAt(e,t,i.length))return!0;return!1}extract(e,t){for(let[a,s]of oi)if(e.startsWith(a,t)&&!this.longerKeywordAt(e,t,a.length))return{value:a,length:a.length,metadata:{particleRole:s.role,particleConfidence:s.confidence,particleDescription:s.description}};let r=e[t],i=ai.get(r);return i&&!this.longerKeywordAt(e,t,1)?{value:r,length:1,metadata:{particleRole:i.role,particleConfidence:i.confidence,particleDescription:i.description}}:null}};var si=xe([[1536,1791],[1872,1919],[2208,2303],[64336,65023],[65136,65279]]),Sl=new Set(["\u0641\u064A","\u0639\u0644\u0649","\u0645\u0646","\u0625\u0644\u0649","\u0627\u0644\u0649","\u0645\u0639","\u0639\u0646","\u0642\u0628\u0644","\u0628\u0639\u062F","\u0628\u064A\u0646"]),Ft=class{constructor(){this.name="arabic-keyword"}setContext(e){this.context=e}canExtract(e,t){return si(e[t])}extract(e,t){if(!this.context)throw new Error("ArabicKeywordExtractor: context not set");let r=t;this.context.isKeywordStart(e,t);let i="",a=t;for(;a<e.length&&(si(e[a])||e[a]==="\u0640");)i+=e[a],a++;if(!i)return null;let s=this.context.lookupKeyword(i),o=s&&s.normalized!==s.native?s.normalized:void 0;if(Sl.has(i))return{value:i,length:a-r,metadata:{prepositionValue:i,normalized:o}};let l,c,d;if(!s&&this.context.normalizer){let p=this.context.normalizer.normalize(i);if(p.stem!==i&&p.confidence>=.7){let u=this.context.lookupKeyword(p.stem);u&&(l=u.normalized,c=p.stem,d=p.confidence)}}return{value:i,length:a-r,metadata:{normalized:o||l,stem:c,stemConfidence:d}}}};var gt=xe([[1536,1791],[1872,1919],[2208,2303],[64336,65023],[65136,65279]]),ht=new Map([["\u0648",{normalized:"and",type:"conjunction"}],["\u0641",{normalized:"then",type:"conjunction"}],["\u0628",{normalized:"with",type:"preposition"}],["\u0644",{normalized:"to",type:"preposition"}],["\u0643",{normalized:"like",type:"preposition"}],["\u0648\u0644",{normalized:"and-to",type:"conjunction"}],["\u0648\u0628",{normalized:"and-with",type:"conjunction"}],["\u0648\u0643",{normalized:"and-like",type:"conjunction"}],["\u0641\u0644",{normalized:"then-to",type:"conjunction"}],["\u0641\u0628",{normalized:"then-with",type:"conjunction"}],["\u0641\u0643",{normalized:"then-like",type:"conjunction"}]]),wl=new Set(["\u0648\u062B\u064A\u0642\u0629"]),Ut=class{constructor(){this.name="arabic-proclitic"}setContext(e){this.context=e}canExtract(e,t){let r=e[t];return ht.has(r)||t+1<e.length&&ht.has(e.slice(t,t+2))}extract(e,t){if(!this.context)throw new Error("ArabicProcliticExtractor: context not set");let r=t;for(;r<e.length&&(gt(e[r])||e[r]==="\u0640");)r++;let i=e.slice(t,r);if(this.context.isKeyword(i)||wl.has(i))return null;if(t+2<=e.length){let d=e.slice(t,t+2),p=ht.get(d);if(p){let u=t+2;if(u<e.length&&gt(e[u])){let m=0,f=u;for(;f<e.length&&gt(e[f]);)m++,f++;if(m>=2)if(ht.get(e[t])){let g=e.slice(t+1,r);if(!this.context.isKeyword(g))return{value:d,length:2,metadata:{procliticType:p.type,normalized:p.normalized}}}else return{value:d,length:2,metadata:{procliticType:p.type,normalized:p.normalized}}}}}let a=e[t],s=ht.get(a);if(!s)return null;let o=t+1;if(o>=e.length||!gt(e[o]))return null;let l=0,c=o;for(;c<e.length&&gt(e[c]);)l++,c++;return l<2?null:{value:a,length:1,metadata:{procliticType:s.type,normalized:s.normalized}}}};var zl=xe([[1536,1791],[1872,1919],[2208,2303],[64336,65023],[65136,65279]]),li=new Map([["\u0639\u0646\u062F\u0645\u0627",{normalized:"on",formality:"formal",confidence:.95,description:"when (formal MSA)"}],["\u062D\u064A\u0646\u0645\u0627",{normalized:"on",formality:"formal",confidence:.93,description:"when/whenever (formal)"}],["\u0639\u0646\u062F",{normalized:"on",formality:"neutral",confidence:.88,description:"at/when (neutral)"}],["\u062D\u064A\u0646",{normalized:"on",formality:"neutral",confidence:.85,description:"when/time (neutral)"}],["\u0644\u0645\u0651\u0627",{normalized:"on",formality:"dialectal",confidence:.7,description:"when (dialectal, with shadda)"}],["\u0644\u0645\u0627",{normalized:"on",formality:"dialectal",confidence:.68,description:"when (dialectal, no diacritic)"}],["\u0644\u062F\u0649",{normalized:"on",formality:"neutral",confidence:.82,description:"at/with (temporal)"}]]),Gt=class{constructor(){this.name="arabic-temporal"}setContext(e){this._context=e,this._context}canExtract(e,t){for(let[r]of li)if(e.startsWith(r,t))return!0;return!1}extract(e,t){let r=Array.from(li.entries()).sort(([i],[a])=>a.length-i.length);for(let[i,a]of r)if(e.startsWith(i,t)){let s=t+i.length;if(s>=e.length||/\s/.test(e[s])||!zl(e[s]))return{value:i,length:i.length,metadata:{temporalFormality:a.formality,temporalConfidence:a.confidence,normalized:a.normalized,description:a.description}}}return null}};var Tl=new Set(["di","ke","dari","pada","dengan","tanpa","untuk","oleh","antara","sebelum","sesudah","setelah","selama","sampai","hingga","sejak","menuju","tentang","terhadap","melalui","dalam","luar"]);function El(){let n=/[a-zA-Z]/;return{isLetter:r=>n.test(r),isIdentifierChar:r=>/[0-9]/.test(r)||n.test(r)}}var{isLetter:Pl,isIdentifierChar:Ll}=El(),jr=class{constructor(){this.name="indonesian-keyword"}setContext(e){this.context=e}canExtract(e,t){return Pl(e[t])}extract(e,t){if(!this.context)throw new Error("IndonesianKeywordExtractor: context not set");let r=t,i="";for(;r<e.length&&Ll(e[r]);)i+=e[r++];if(!i)return null;let a=i.toLowerCase(),s=Tl.has(a),o=this.context.lookupKeyword(a),l=o&&o.normalized!==o.native?o.normalized:void 0,c;if(!o&&this.context.normalizer){let d=this.context.normalizer.normalize(i);if(d.stem!==i&&d.confidence>=.7){let p=this.context.lookupKeyword(d.stem);p&&(c=p.normalized)}}return{value:i,length:r-t,metadata:{normalized:l||c,isPreposition:s}}}};function ci(){return[new jr]}function Yt(n){let e=n.charCodeAt(0);return e>=65&&e<=90||e>=97&&e<=122?!0:"\xE7\xC7\u011F\u011E\u0131\u0130\xF6\xD6\u015F\u015E\xFC\xDC".includes(n)}var Cl=new Set(["ile","i\xE7in","kadar","gibi","\xF6nce","\xFCzerinde","alt\u0131nda","i\xE7inde","d\u0131\u015F\u0131nda","aras\u0131nda","kar\u015F\u0131","g\xF6re","ra\u011Fmen","do\u011Fru","boyunca"]),Rl=new Set(["de","da","te","ta","den","dan","ten","tan","e","a","ye","ya","i","\u0131","u","\xFC","in","\u0131n","un","\xFCn","le","la","yle","yla"]),Ir=class{constructor(){this.name="turkish-keyword"}setContext(e){this.context=e}canExtract(e,t){return Yt(e[t])}extract(e,t){if(!this.context)throw new Error("TurkishKeywordExtractor: context not set");let r=t,i=12;for(let u=Math.min(i,e.length-r);u>=2;u--){let m=e.slice(r,r+u);if(r+u<e.length&&Yt(e[r+u]))continue;let f=!0;for(let g=0;g<m.length;g++)if(!Yt(m[g])){f=!1;break}if(!f)continue;let y=this.context.lookupKeyword(m);if(y)return{value:m,length:u,metadata:{normalized:y.normalized!==y.native?y.normalized:void 0}};if(this.context.normalizer){let g=this.context.normalizer.normalize(m);if(g.stem!==m&&g.confidence>=.7){let h=this.context.lookupKeyword(g.stem);if(h)return{value:m,length:u,metadata:{normalized:h.normalized,stem:g.stem,stemConfidence:g.confidence}}}}}let a="",s=t;for(;s<e.length&&Yt(e[s]);)a+=e[s],s++;for(let u=a.length;u>=2&&!(u<a.length);u--){let m=a.substring(0,u),f=this.context.lookupKeyword(m);if(f)return{value:m,length:u,metadata:{normalized:f.normalized!==f.native?f.normalized:void 0}}}if(!a||!a)return null;if(Cl.has(a.toLowerCase()))return{value:a,length:s-r,metadata:{postpositionValue:a.toLowerCase()}};if(Rl.has(a.toLowerCase()))return{value:a,length:s-r,metadata:{caseSuffixValue:a.toLowerCase()}};let o=this.context.lookupKeyword(a),l=o&&o.normalized!==o.native?o.normalized:void 0,c,d,p;if(!o&&this.context.normalizer){let u=this.context.normalizer.normalize(a);if(u.stem!==a&&u.confidence>=.7){let m=this.context.lookupKeyword(u.stem);m&&(c=m.normalized,d=u.stem,p=u.confidence)}}return{value:a,length:s-r,metadata:{normalized:l||c,stem:d,stemConfidence:p}}}};function pi(){return new Ir}function Nl(n){let e=n.charCodeAt(0);return e>=65&&e<=90||e>=97&&e<=122||e===95||e===36}function Al(n){let e=n.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95||e===36}var ve=class{constructor(){this.name="ascii-identifier"}setContext(e){this.context=e}canExtract(e,t){return Nl(e[t])}extract(e,t){if(!this.context)throw new Error("AsciiIdentifierExtractor: context not set");let r=t,i="",a=t;for(;a<e.length&&Al(e[a]);)i+=e[a],a++;if(!i)return null;let s=this.context.lookupKeyword(i),o=s&&s.normalized!==s.native?s.normalized:void 0;return{value:i,length:a-r,metadata:{normalized:o}}}};function G(){return[new ft,new mt,new yt,new ut]}function Wr(n){return/[a-zA-Z0-9_]/.test(n)}var Vr=class{constructor(){this.name="english-keyword"}setContext(e){this.context=e}canExtract(e,t){return/[a-zA-Z_]/.test(e[t])}extract(e,t){if(!this.context)throw new Error("EnglishKeywordExtractor: context not set");let r=t,i="";for(;r<e.length&&Wr(e[r]);)i+=e[r++];if(!i)return null;if(r<e.length&&e[r]===":"){let l=r;r++;let c="";for(;r<e.length&&Wr(e[r]);)c+=e[r++];c?i=i+":"+c:r=l}let a=this.context.lookupKeyword(i),s=a&&a.normalized!==a.native?a.normalized:void 0,o=null;return this.context.isKeyword(i)||(o=this.tryClassSyntaxConversion(e,r,i)),{value:o||i,length:r-t,metadata:{normalized:s,classConversion:o?!0:void 0}}}tryClassSyntaxConversion(e,t,r){let i=t;for(;i<e.length&&/\s/.test(e[i]);)i++;if(e.slice(i,i+5).toLowerCase()==="class"){let a=i+5;if(a>=e.length||!Wr(e[a]))return"."+r}return null}};function di(){return[new Vr]}var Ml=[{native:"true",normalized:"true"},{native:"false",normalized:"false"},{native:"null",normalized:"null"},{native:"undefined",normalized:"undefined"},{native:"first",normalized:"first"},{native:"last",normalized:"last"},{native:"next",normalized:"next"},{native:"previous",normalized:"previous"},{native:"closest",normalized:"closest"},{native:"click",normalized:"click"},{native:"dblclick",normalized:"dblclick"},{native:"mousedown",normalized:"mousedown"},{native:"mouseup",normalized:"mouseup"},{native:"mouseover",normalized:"mouseover"},{native:"mouseout",normalized:"mouseout"},{native:"mouseenter",normalized:"mouseenter"},{native:"mouseleave",normalized:"mouseleave"},{native:"mousemove",normalized:"mousemove"},{native:"keydown",normalized:"keydown"},{native:"keyup",normalized:"keyup"},{native:"keypress",normalized:"keypress"},{native:"input",normalized:"input"},{native:"change",normalized:"change"},{native:"submit",normalized:"submit"},{native:"reset",normalized:"reset"},{native:"load",normalized:"load"},{native:"unload",normalized:"unload"},{native:"scroll",normalized:"scroll"},{native:"resize",normalized:"resize"},{native:"dragstart",normalized:"dragstart"},{native:"drag",normalized:"drag"},{native:"dragend",normalized:"dragend"},{native:"dragenter",normalized:"dragenter"},{native:"dragleave",normalized:"dragleave"},{native:"dragover",normalized:"dragover"},{native:"drop",normalized:"drop"},{native:"touchstart",normalized:"touchstart"},{native:"touchmove",normalized:"touchmove"},{native:"touchend",normalized:"touchend"},{native:"touchcancel",normalized:"touchcancel"},{native:"in",normalized:"in"},{native:"to",normalized:"to"},{native:"at",normalized:"at"},{native:"by",normalized:"by"},{native:"with",normalized:"with"},{native:"without",normalized:"without"},{native:"of",normalized:"of"},{native:"as",normalized:"as"},{native:"every",normalized:"every"},{native:"upon",normalized:"upon"},{native:"unless",normalized:"unless"},{native:"forever",normalized:"forever"},{native:"times",normalized:"times"},{native:"and",normalized:"and"},{native:"or",normalized:"or"},{native:"not",normalized:"not"},{native:"is",normalized:"is"},{native:"exists",normalized:"exists"},{native:"empty",normalized:"empty"},{native:"my",normalized:"my"},{native:"your",normalized:"your"},{native:"its",normalized:"its"},{native:"the",normalized:"the"},{native:"a",normalized:"a"},{native:"an",normalized:"an"},{native:"delete",normalized:"delete"},{native:"innerHTML",normalized:"innerHTML"},{native:"outerHTML",normalized:"outerHTML"},{native:"beforebegin",normalized:"beforebegin"},{native:"afterend",normalized:"afterend"},{native:"beforeend",normalized:"beforeend"},{native:"afterbegin",normalized:"afterbegin"},{native:"flip",normalized:"toggle"},{native:"switch",normalized:"toggle"},{native:"increase",normalized:"increment"},{native:"decrease",normalized:"decrement"},{native:"display",normalized:"show"},{native:"reveal",normalized:"show"},{native:"conceal",normalized:"hide"},{native:"colour",normalized:"color"},{native:"grey",normalized:"gray"},{native:"centre",normalized:"center"},{native:"behaviour",normalized:"behavior"},{native:"initialise",normalized:"initialize"},{native:"favourite",normalized:"favorite"}],_r=class extends V{constructor(){super();this.language="en";this.direction="ltr";this.initializeKeywordsFromProfile(Ee,Ml),this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractors(di()),this.registerExtractor(new K),this.registerExtractor(new q)}classifyToken(t){return this.isKeyword(t)?"keyword":t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("http")?"url":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||/^\d/.test(t)?"literal":["==","!=","<=",">=","<",">","&&","||","!"].includes(t)?"operator":"identifier"}},Xt=new _r;var Ol=[{pattern:"\u3057\u305F\u3089",confidence:.88,conjugationType:"conditional-tara",minStemLength:2},{pattern:"\u3059\u308B\u3068",confidence:.88,conjugationType:"conditional-to",minStemLength:2},{pattern:"\u3059\u308C\u3070",confidence:.85,conjugationType:"conditional-ba",minStemLength:2},{pattern:"\u305F\u3089",confidence:.85,conjugationType:"conditional-tara",minStemLength:2},{pattern:"\u308C\u3070",confidence:.82,conjugationType:"conditional-ba",minStemLength:2},{pattern:"\u3066\u3044\u307E\u3057\u305F",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"\u3066\u3044\u307E\u3059",confidence:.85,conjugationType:"progressive",minStemLength:2},{pattern:"\u3066\u304F\u3060\u3055\u3044",confidence:.85,conjugationType:"request",minStemLength:2},{pattern:"\u3067\u304F\u3060\u3055\u3044",confidence:.85,conjugationType:"request",minStemLength:2},{pattern:"\u3066\u3044\u308B",confidence:.85,conjugationType:"progressive",minStemLength:2},{pattern:"\u3066\u304A\u304F",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\u3066\u307F\u308B",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\u3066\u3042\u308B",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\u3066\u304F\u308C",confidence:.8,conjugationType:"casual-request",minStemLength:2},{pattern:"\u3067\u304F\u308C",confidence:.8,conjugationType:"casual-request",minStemLength:2},{pattern:"\u3061\u3083\u3063\u305F",confidence:.82,conjugationType:"contracted-past",minStemLength:2},{pattern:"\u3058\u3083\u3063\u305F",confidence:.82,conjugationType:"contracted-past",minStemLength:2},{pattern:"\u3061\u3083\u3046",confidence:.82,conjugationType:"contracted",minStemLength:2},{pattern:"\u3058\u3083\u3046",confidence:.82,conjugationType:"contracted",minStemLength:2},{pattern:"\u307E\u3057\u305F",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"\u307E\u305B\u3093",confidence:.85,conjugationType:"negative",minStemLength:2},{pattern:"\u307E\u3059",confidence:.85,conjugationType:"polite",minStemLength:2},{pattern:"\u3066",confidence:.85,conjugationType:"te-form",minStemLength:2},{pattern:"\u305F",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"\u306A\u3044",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"\u306A\u304B\u3063\u305F",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"\u3089\u308C\u308B",confidence:.8,conjugationType:"potential",minStemLength:2},{pattern:"\u308C\u308B",confidence:.78,conjugationType:"potential",minStemLength:2},{pattern:"\u3089\u308C\u305F",confidence:.8,conjugationType:"passive",minStemLength:2},{pattern:"\u3055\u305B\u308B",confidence:.8,conjugationType:"causative",minStemLength:2},{pattern:"\u305B\u308B",confidence:.78,conjugationType:"causative",minStemLength:2},{pattern:"\u3088\u3046",confidence:.8,conjugationType:"volitional",minStemLength:2},{pattern:"\u308B",confidence:.75,conjugationType:"dictionary",minStemLength:3}],jl=[{pattern:"\u3057\u305F\u3089",confidence:.88,conjugationType:"conditional-tara"},{pattern:"\u3059\u308B\u3068",confidence:.88,conjugationType:"conditional-to"},{pattern:"\u3059\u308C\u3070",confidence:.85,conjugationType:"conditional-ba"},{pattern:"\u3057\u3066\u3044\u307E\u3059",confidence:.85,conjugationType:"progressive"},{pattern:"\u3057\u3066\u3044\u308B",confidence:.85,conjugationType:"progressive"},{pattern:"\u3057\u307E\u3057\u305F",confidence:.85,conjugationType:"past"},{pattern:"\u3057\u307E\u3059",confidence:.85,conjugationType:"polite"},{pattern:"\u3057\u306A\u3044",confidence:.82,conjugationType:"negative"},{pattern:"\u3057\u3066",confidence:.85,conjugationType:"te-form"},{pattern:"\u3057\u305F",confidence:.85,conjugationType:"past"},{pattern:"\u3059\u308B",confidence:.88,conjugationType:"dictionary"}];function ui(n){let e=n.charCodeAt(0);return e>=12352&&e<=12447}function Il(n){let e=n.charCodeAt(0);return e>=12448&&e<=12543}function Wl(n){let e=n.charCodeAt(0);return e>=19968&&e<=40959||e>=13312&&e<=19903}function Vl(n){for(let e of n)if(ui(e)||Il(e)||Wl(e))return!0;return!1}var vt=class{constructor(){this.language="ja"}isNormalizable(e){if(!Vl(e)||e.length<2)return!1;let t=e[e.length-1];return ui(t)}normalize(e){let t=this.normalizeCompound(e);if(t)return t;let r=this.trySuruNormalization(e);if(r)return r;for(let i of Ol)if(e.endsWith(i.pattern)){let a=e.slice(0,-i.pattern.length),s=i.minStemLength??2;if(a.length<s)continue;let o={removedSuffixes:[i.pattern]};return i.conjugationType&&(o.conjugationType=i.conjugationType),O(a,i.confidence,o)}return Y(e)}trySuruNormalization(e){for(let t of jl)if(e.endsWith(t.pattern)){let r=e.slice(0,-t.pattern.length);if(r.length<1)continue;return O(r,t.confidence,{removedSuffixes:[t.pattern],conjugationType:t.conjugationType,originalForm:"suru-verb"})}return null}normalizeCompound(e){let t=[{pattern:"\u3066\u3044\u306A\u304B\u3063\u305F",suffixes:["\u3066","\u3044","\u306A\u304B\u3063\u305F"],confidence:.8,minStemLength:2},{pattern:"\u3067\u3044\u306A\u304B\u3063\u305F",suffixes:["\u3067","\u3044","\u306A\u304B\u3063\u305F"],confidence:.8,minStemLength:2},{pattern:"\u3066\u3044\u306A\u3044",suffixes:["\u3066","\u3044","\u306A\u3044"],confidence:.82,minStemLength:2},{pattern:"\u3067\u3044\u306A\u3044",suffixes:["\u3067","\u3044","\u306A\u3044"],confidence:.82,minStemLength:2},{pattern:"\u3066\u3044\u305F",suffixes:["\u3066","\u3044","\u305F"],confidence:.85,minStemLength:2},{pattern:"\u3067\u3044\u305F",suffixes:["\u3067","\u3044","\u305F"],confidence:.85,minStemLength:2}];for(let{pattern:r,suffixes:i,confidence:a,minStemLength:s}of t)if(e.endsWith(r)){let o=e.slice(0,-r.length);if(o.length<s)continue;return O(o,a,{removedSuffixes:i,conjugationType:"compound"})}return null}},nf=new vt;var _l=new Set(["\u3092","\u306B","\u3067","\u304B\u3089","\u307E\u3067","\u3078","\u3068","\u306E","\u304C","\u306F","\u3082","\u3088\u308A"]),$l=[{native:"\u771F",normalized:"true"},{native:"\u507D",normalized:"false"},{native:"\u30CC\u30EB",normalized:"null"},{native:"\u672A\u5B9A\u7FA9",normalized:"undefined"},{native:"\u6700\u521D",normalized:"first"},{native:"\u6700\u5F8C",normalized:"last"},{native:"\u6B21",normalized:"next"},{native:"\u524D",normalized:"previous"},{native:"\u6700\u3082\u8FD1\u3044",normalized:"closest"},{native:"\u89AA",normalized:"parent"},{native:"\u30AF\u30EA\u30C3\u30AF",normalized:"click"},{native:"\u5909\u66F4",normalized:"change"},{native:"\u9001\u4FE1",normalized:"submit"},{native:"\u5165\u529B",normalized:"input"},{native:"\u30ED\u30FC\u30C9",normalized:"load"},{native:"\u8AAD\u307F\u8FBC\u307F",normalized:"load"},{native:"\u30B9\u30AF\u30ED\u30FC\u30EB",normalized:"scroll"},{native:"\u30AD\u30FC\u30C0\u30A6\u30F3",normalized:"keydown"},{native:"\u30AD\u30FC\u30A2\u30C3\u30D7",normalized:"keyup"},{native:"\u30DE\u30A6\u30B9\u30AA\u30FC\u30D0\u30FC",normalized:"mouseover"},{native:"\u30DE\u30A6\u30B9\u30A2\u30A6\u30C8",normalized:"mouseout"},{native:"\u30DE\u30A6\u30B9\u62BC\u4E0B",normalized:"mousedown"},{native:"\u30DE\u30A6\u30B9\u89E3\u653E",normalized:"mouseup"},{native:"\u307E\u305F\u306F",normalized:"or"},{native:"\u79C1",normalized:"me"},{native:"\u3057\u305F\u3089",normalized:"on"},{native:"\u3059\u308B\u3068",normalized:"on"},{native:"\u6642\u306B",normalized:"on"},{native:"\u79D2",normalized:"s"},{native:"\u30DF\u30EA\u79D2",normalized:"ms"},{native:"\u5206",normalized:"m"},{native:"\u6642\u9593",normalized:"h"}],$r=class extends V{constructor(){super();this.language="ja";this.direction="ltr";this.initializeKeywordsFromProfile(Fe,$l),this.normalizer=new vt,this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractor(new ve),this.registerExtractor(new Kt),this.registerExtractor(new $t),this.registerExtractor(new K),this.registerExtractor(new q)}classifyToken(t){return _l.has(t)?"particle":this.isKeyword(t)?"keyword":t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("http")?"url":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||t.startsWith("\u300C")||/^\d/.test(t)?"literal":"identifier"}},Zt=new $r;function Kl(n){let e=n.charCodeAt(0);return e>=44032&&e<=55203}function ql(n){for(let e of n)if(Kl(e))return!0;return!1}var Bl=[{pattern:"\uD558\uC2DC\uB2C8\uAE4C",confidence:.85,conjugationType:"honorific-causal",minStemLength:1},{pattern:"\uD558\uC2E4\uB54C",confidence:.88,conjugationType:"honorific-temporal",minStemLength:1},{pattern:"\uD558\uC2E4 \uB54C",confidence:.88,conjugationType:"honorific-temporal",minStemLength:1},{pattern:"\uD558\uC2DC\uBA74",confidence:.88,conjugationType:"honorific-conditional",minStemLength:1},{pattern:"\uC73C\uC2DC\uBA74",confidence:.85,conjugationType:"honorific-conditional",minStemLength:2},{pattern:"\uC2DC\uBA74",confidence:.82,conjugationType:"honorific-conditional",minStemLength:2},{pattern:"\uD558\uACE0\uB098\uC11C",confidence:.85,conjugationType:"sequential-after",minStemLength:1},{pattern:"\uD558\uACE0 \uB098\uC11C",confidence:.85,conjugationType:"sequential-after",minStemLength:1},{pattern:"\uD558\uACE0\uC11C",confidence:.85,conjugationType:"sequential-after",minStemLength:1},{pattern:"\uACE0\uB098\uC11C",confidence:.82,conjugationType:"sequential-after",minStemLength:2},{pattern:"\uACE0 \uB098\uC11C",confidence:.82,conjugationType:"sequential-after",minStemLength:2},{pattern:"\uACE0\uC11C",confidence:.82,conjugationType:"sequential-after",minStemLength:2},{pattern:"\uD558\uAE30\uC804\uC5D0",confidence:.85,conjugationType:"sequential-before",minStemLength:1},{pattern:"\uD558\uAE30 \uC804\uC5D0",confidence:.85,conjugationType:"sequential-before",minStemLength:1},{pattern:"\uAE30\uC804\uC5D0",confidence:.82,conjugationType:"sequential-before",minStemLength:2},{pattern:"\uAE30 \uC804\uC5D0",confidence:.82,conjugationType:"sequential-before",minStemLength:2},{pattern:"\uD558\uC790\uB9C8\uC790",confidence:.88,conjugationType:"immediate",minStemLength:1},{pattern:"\uC790\uB9C8\uC790",confidence:.85,conjugationType:"immediate",minStemLength:2},{pattern:"\uD574\uC57C\uD574\uC694",confidence:.85,conjugationType:"obligation",minStemLength:1},{pattern:"\uD574\uC57C\uD574",confidence:.85,conjugationType:"obligation",minStemLength:1},{pattern:"\uD574\uC57C\uD558\uB2E4",confidence:.85,conjugationType:"obligation",minStemLength:1},{pattern:"\uC5B4\uC57C\uD574\uC694",confidence:.82,conjugationType:"obligation",minStemLength:2},{pattern:"\uC5B4\uC57C\uD574",confidence:.82,conjugationType:"obligation",minStemLength:2},{pattern:"\uC544\uC57C\uD574\uC694",confidence:.82,conjugationType:"obligation",minStemLength:2},{pattern:"\uC544\uC57C\uD574",confidence:.82,conjugationType:"obligation",minStemLength:2},{pattern:"\uD558\uB2C8\uAE4C",confidence:.85,conjugationType:"causal-nikka",minStemLength:1},{pattern:"\uD560\uB54C",confidence:.88,conjugationType:"temporal-ttae",minStemLength:1},{pattern:"\uD560 \uB54C",confidence:.88,conjugationType:"temporal-ttae",minStemLength:1},{pattern:"\uC744\uB54C",confidence:.85,conjugationType:"temporal-ttae",minStemLength:2},{pattern:"\uC744 \uB54C",confidence:.85,conjugationType:"temporal-ttae",minStemLength:2},{pattern:"\uD558\uBA74",confidence:.88,conjugationType:"conditional-myeon",minStemLength:1},{pattern:"\uC73C\uBA74",confidence:.85,conjugationType:"conditional-myeon",minStemLength:2},{pattern:"\uB2C8\uAE4C",confidence:.82,conjugationType:"causal-nikka",minStemLength:2},{pattern:"\uBA74",confidence:.8,conjugationType:"conditional-myeon",minStemLength:2},{pattern:"\uD558\uC600\uC2B5\uB2C8\uB2E4",confidence:.85,conjugationType:"past",minStemLength:1},{pattern:"\uD588\uC2B5\uB2C8\uB2E4",confidence:.85,conjugationType:"past",minStemLength:1},{pattern:"\uD569\uB2C8\uB2E4",confidence:.85,conjugationType:"polite",minStemLength:1},{pattern:"\uC2B5\uB2C8\uB2E4",confidence:.82,conjugationType:"polite",minStemLength:2},{pattern:"\uB429\uB2C8\uB2E4",confidence:.82,conjugationType:"polite",minStemLength:1},{pattern:"\u3142\uB2C8\uB2E4",confidence:.82,conjugationType:"polite",minStemLength:2},{pattern:"\uD558\uC138\uC694",confidence:.85,conjugationType:"honorific",minStemLength:1},{pattern:"\uD558\uC2ED\uC2DC\uC624",confidence:.85,conjugationType:"honorific",minStemLength:1},{pattern:"\uC138\uC694",confidence:.82,conjugationType:"honorific",minStemLength:2},{pattern:"\uC2ED\uC2DC\uC624",confidence:.82,conjugationType:"honorific",minStemLength:2},{pattern:"\uD558\uACE0\uC788\uC5B4\uC694",confidence:.82,conjugationType:"progressive",minStemLength:1},{pattern:"\uD558\uACE0\uC788\uC5B4",confidence:.82,conjugationType:"progressive",minStemLength:1},{pattern:"\uD588\uC5B4\uC694",confidence:.85,conjugationType:"past",minStemLength:1},{pattern:"\uD574\uC694",confidence:.85,conjugationType:"polite",minStemLength:1},{pattern:"\uC5B4\uC694",confidence:.82,conjugationType:"polite",minStemLength:2},{pattern:"\uC544\uC694",confidence:.82,conjugationType:"polite",minStemLength:2},{pattern:"\uD588\uC5B4",confidence:.85,conjugationType:"past",minStemLength:1},{pattern:"\uD574",confidence:.8,conjugationType:"present",minStemLength:1},{pattern:"\uC5C8\uC5B4",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"\uC558\uC5B4",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"\uD558\uACE0\uC788\uB2E4",confidence:.82,conjugationType:"progressive",minStemLength:1},{pattern:"\uACE0\uC788\uB2E4",confidence:.8,conjugationType:"progressive",minStemLength:2},{pattern:"\uACE0\uC788\uC5B4",confidence:.8,conjugationType:"progressive",minStemLength:2},{pattern:"\uD558\uB2E4",confidence:.88,conjugationType:"dictionary",minStemLength:1},{pattern:"\uD558\uC9C0\uC54A\uB2E4",confidence:.82,conjugationType:"negative",minStemLength:1},{pattern:"\uC548\uD558\uB2E4",confidence:.82,conjugationType:"negative",minStemLength:1},{pattern:"\uC9C0\uC54A\uB2E4",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"\uD574\uB77C",confidence:.82,conjugationType:"imperative",minStemLength:1},{pattern:"\uD558\uB77C",confidence:.82,conjugationType:"imperative",minStemLength:1},{pattern:"\uB2E4",confidence:.75,conjugationType:"dictionary",minStemLength:2}],Dl=[{pattern:"\uD558\uC2DC\uB2C8\uAE4C",confidence:.88,conjugationType:"honorific-causal"},{pattern:"\uD558\uC2E4\uB54C",confidence:.88,conjugationType:"honorific-temporal"},{pattern:"\uD558\uC2E4 \uB54C",confidence:.88,conjugationType:"honorific-temporal"},{pattern:"\uD558\uC2DC\uBA74",confidence:.88,conjugationType:"honorific-conditional"},{pattern:"\uD558\uC168\uC5B4\uC694",confidence:.85,conjugationType:"honorific-past"},{pattern:"\uD558\uC168\uC5B4",confidence:.85,conjugationType:"honorific-past"},{pattern:"\uD558\uC2ED\uB2C8\uB2E4",confidence:.85,conjugationType:"honorific-polite"},{pattern:"\uD558\uACE0\uB098\uC11C",confidence:.88,conjugationType:"sequential-after"},{pattern:"\uD558\uACE0 \uB098\uC11C",confidence:.88,conjugationType:"sequential-after"},{pattern:"\uD558\uACE0\uC11C",confidence:.88,conjugationType:"sequential-after"},{pattern:"\uD558\uAE30\uC804\uC5D0",confidence:.88,conjugationType:"sequential-before"},{pattern:"\uD558\uAE30 \uC804\uC5D0",confidence:.88,conjugationType:"sequential-before"},{pattern:"\uD558\uC790\uB9C8\uC790",confidence:.88,conjugationType:"immediate"},{pattern:"\uD574\uC57C\uD574\uC694",confidence:.88,conjugationType:"obligation"},{pattern:"\uD574\uC57C\uD574",confidence:.88,conjugationType:"obligation"},{pattern:"\uD574\uC57C\uD558\uB2E4",confidence:.88,conjugationType:"obligation"},{pattern:"\uD558\uB2C8\uAE4C",confidence:.88,conjugationType:"causal-nikka"},{pattern:"\uD560\uB54C",confidence:.88,conjugationType:"temporal-ttae"},{pattern:"\uD560 \uB54C",confidence:.88,conjugationType:"temporal-ttae"},{pattern:"\uD558\uBA74",confidence:.88,conjugationType:"conditional-myeon"},{pattern:"\uD558\uC600\uC2B5\uB2C8\uB2E4",confidence:.85,conjugationType:"past"},{pattern:"\uD588\uC2B5\uB2C8\uB2E4",confidence:.85,conjugationType:"past"},{pattern:"\uD569\uB2C8\uB2E4",confidence:.85,conjugationType:"polite"},{pattern:"\uD558\uC2ED\uC2DC\uC624",confidence:.85,conjugationType:"honorific"},{pattern:"\uD558\uC138\uC694",confidence:.85,conjugationType:"honorific"},{pattern:"\uD588\uC5B4\uC694",confidence:.85,conjugationType:"past"},{pattern:"\uD574\uC694",confidence:.85,conjugationType:"polite"},{pattern:"\uD588\uC5B4",confidence:.85,conjugationType:"past"},{pattern:"\uD574",confidence:.8,conjugationType:"present"},{pattern:"\uD558\uACE0\uC788\uC5B4\uC694",confidence:.82,conjugationType:"progressive"},{pattern:"\uD558\uACE0\uC788\uC5B4",confidence:.82,conjugationType:"progressive"},{pattern:"\uD558\uACE0\uC788\uB2E4",confidence:.82,conjugationType:"progressive"},{pattern:"\uD574\uC11C",confidence:.82,conjugationType:"connective"},{pattern:"\uD558\uACE0",confidence:.8,conjugationType:"connective"},{pattern:"\uD558\uC9C0\uC54A\uC544\uC694",confidence:.82,conjugationType:"negative"},{pattern:"\uD558\uC9C0\uC54A\uB2E4",confidence:.82,conjugationType:"negative"},{pattern:"\uC548\uD574\uC694",confidence:.82,conjugationType:"negative"},{pattern:"\uC548\uD574",confidence:.82,conjugationType:"negative"},{pattern:"\uD574\uB77C",confidence:.82,conjugationType:"imperative"},{pattern:"\uD558\uB77C",confidence:.82,conjugationType:"imperative"},{pattern:"\uD558\uB2E4",confidence:.88,conjugationType:"dictionary"}],kt=class{constructor(){this.language="ko"}isNormalizable(e){return!(!ql(e)||e.length<2)}normalize(e){let t=this.normalizeCompound(e);if(t)return t;let r=this.tryHadaNormalization(e);if(r)return r;for(let i of Bl)if(e.endsWith(i.pattern)){let a=e.slice(0,-i.pattern.length),s=i.minStemLength??2;if(a.length<s)continue;let o={removedSuffixes:[i.pattern]};return i.conjugationType&&(o.conjugationType=i.conjugationType),O(a,i.confidence,o)}return Y(e)}tryHadaNormalization(e){for(let t of Dl)if(e.endsWith(t.pattern)){let r=e.slice(0,-t.pattern.length);if(r.length<1)continue;return O(r,t.confidence,{removedSuffixes:[t.pattern],conjugationType:t.conjugationType,originalForm:"hada-verb"})}return null}normalizeCompound(e){let t=[{pattern:"\uD558\uACE0\uB098\uC11C\uC600\uC5B4",suffixes:["\uD558\uACE0\uB098\uC11C","\uC600\uC5B4"],confidence:.78,conjugationType:"sequential-after",minStemLength:2},{pattern:"\uD558\uACE0\uB098\uC11C\uC600\uB2E4",suffixes:["\uD558\uACE0\uB098\uC11C","\uC600\uB2E4"],confidence:.78,conjugationType:"sequential-after",minStemLength:2},{pattern:"\uD558\uACE0\uB098\uC11C",suffixes:["\uD558\uACE0","\uB098\uC11C"],confidence:.85,conjugationType:"sequential-after",minStemLength:2},{pattern:"\uD574\uC57C\uD588\uC5B4",suffixes:["\uD574\uC57C","\uD588\uC5B4"],confidence:.8,conjugationType:"obligation",minStemLength:2},{pattern:"\uD574\uC57C\uD588\uB2E4",suffixes:["\uD574\uC57C","\uD588\uB2E4"],confidence:.8,conjugationType:"obligation",minStemLength:2},{pattern:"\uD574\uC57C\uD588\uC2B5\uB2C8\uB2E4",suffixes:["\uD574\uC57C","\uD588\uC2B5\uB2C8\uB2E4"],confidence:.8,conjugationType:"obligation",minStemLength:2},{pattern:"\uD558\uC2DC\uBA74\uC11C",suffixes:["\uD558\uC2DC","\uBA74\uC11C"],confidence:.82,conjugationType:"connective",minStemLength:2},{pattern:"\uD558\uC2DC\uBA70",suffixes:["\uD558\uC2DC","\uBA70"],confidence:.82,conjugationType:"connective",minStemLength:2},{pattern:"\uD558\uACE0\uC788\uC5C8\uC5B4",suffixes:["\uD558\uACE0","\uC788\uC5C8\uC5B4"],confidence:.8,conjugationType:"progressive",minStemLength:2},{pattern:"\uD558\uACE0\uC788\uC5C8\uB2E4",suffixes:["\uD558\uACE0","\uC788\uC5C8\uB2E4"],confidence:.8,conjugationType:"progressive",minStemLength:2}];for(let{pattern:r,suffixes:i,confidence:a,conjugationType:s,minStemLength:o}of t)if(e.endsWith(r)){let l=e.slice(0,-r.length);if(l.length<o)continue;return O(l,a,{removedSuffixes:i,conjugationType:s})}return null}},gf=new kt;var Hl=new Set(["\uC774","\uAC00","\uC744","\uB97C","\uC740","\uB294","\uC5D0","\uC5D0\uC11C","\uB85C","\uC73C\uB85C","\uC640","\uACFC","\uC758","\uB3C4","\uB9CC","\uBD80\uD130","\uAE4C\uC9C0","\uCC98\uB7FC","\uBCF4\uB2E4"]),Fl=[{native:"\uCC38",normalized:"true"},{native:"\uAC70\uC9D3",normalized:"false"},{native:"\uB110",normalized:"null"},{native:"\uBBF8\uC815\uC758",normalized:"undefined"},{native:"\uCCAB\uBC88\uC9F8",normalized:"first"},{native:"\uB9C8\uC9C0\uB9C9",normalized:"last"},{native:"\uB2E4\uC74C",normalized:"next"},{native:"\uC774\uC804",normalized:"previous"},{native:"\uAC00\uC7A5\uAC00\uAE4C\uC6B4",normalized:"closest"},{native:"\uBD80\uBAA8",normalized:"parent"},{native:"\uD074\uB9AD",normalized:"click"},{native:"\uB354\uBE14\uD074\uB9AD",normalized:"dblclick"},{native:"\uBCC0\uACBD",normalized:"change"},{native:"\uC81C\uCD9C",normalized:"submit"},{native:"\uC785\uB825",normalized:"input"},{native:"\uB85C\uB4DC",normalized:"load"},{native:"\uC2A4\uD06C\uB864",normalized:"scroll"},{native:"\uD0A4\uB2E4\uC6B4",normalized:"keydown"},{native:"\uD0A4\uC5C5",normalized:"keyup"},{native:"\uB9C8\uC6B0\uC2A4\uC624\uBC84",normalized:"mouseover"},{native:"\uB9C8\uC6B0\uC2A4\uC544\uC6C3",normalized:"mouseout"},{native:"\uB9C8\uC6B0\uC2A4\uB2E4\uC6B4",normalized:"mousedown"},{native:"\uB9C8\uC6B0\uC2A4\uC5C5",normalized:"mouseup"},{native:"\uB0B4",normalized:"my"},{native:"\uADF8\uAC83\uC758",normalized:"its"},{native:"\uADF8\uB2E4\uC74C",normalized:"then"},{native:"\uADF8\uB7F0\uD6C4",normalized:"then"},{native:"\uADF8\uB7EC\uBA74",normalized:"then"},{native:"\uADF8\uB9AC\uACE0",normalized:"and"},{native:"\uB610\uB294",normalized:"or"},{native:"\uC544\uB2C8",normalized:"not"},{native:"\uC774\uB2E4",normalized:"is"},{native:"\uCD08",normalized:"s"},{native:"\uBC00\uB9AC\uCD08",normalized:"ms"},{native:"\uBD84",normalized:"m"},{native:"\uC2DC\uAC04",normalized:"h"}],Kr=class extends V{constructor(){super();this.language="ko";this.direction="ltr";this.initializeKeywordsFromProfile(Ue,Fl),this.normalizer=new kt,this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractor(new ve),this.registerExtractor(new Bt),this.registerExtractor(new qt),this.registerExtractor(new K),this.registerExtractor(new q)}classifyToken(t){return Hl.has(t)?"particle":this.isKeyword(t)?"keyword":t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("http")?"url":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||/^\d/.test(t)?"literal":"identifier"}},Jt=new Kr;function Ul(n){let e=n.charCodeAt(0);return e>=1536&&e<=1791||e>=1872&&e<=1919||e>=2208&&e<=2303||e>=64336&&e<=65023||e>=65136&&e<=65279}function Gl(n){for(let e of n)if(Ul(e))return!0;return!1}function Yl(n){return n.replace(/[\u064B-\u0652\u0670]/g,"")}var Xl=[{pattern:"\u0648\u0627\u0644",confidencePenalty:.15,prefixType:"conjunction"},{pattern:"\u0641\u0627\u0644",confidencePenalty:.15,prefixType:"conjunction"},{pattern:"\u0628\u0627\u0644",confidencePenalty:.15,prefixType:"preposition"},{pattern:"\u0643\u0627\u0644",confidencePenalty:.15,prefixType:"preposition"},{pattern:"\u0644\u0644",confidencePenalty:.12,prefixType:"preposition"}],Zl=[{pattern:"\u0627\u0644",confidencePenalty:.08,prefixType:"article",minRemaining:2},{pattern:"\u0648",confidencePenalty:.08,prefixType:"conjunction",minRemaining:3},{pattern:"\u0641",confidencePenalty:.08,prefixType:"conjunction",minRemaining:3},{pattern:"\u0628",confidencePenalty:.1,prefixType:"preposition",minRemaining:3},{pattern:"\u0644",confidencePenalty:.1,prefixType:"preposition",minRemaining:3},{pattern:"\u0643",confidencePenalty:.1,prefixType:"preposition",minRemaining:3}],Jl=[{pattern:"\u064A",confidencePenalty:.12,prefixType:"verb-marker",minRemaining:3},{pattern:"\u062A",confidencePenalty:.12,prefixType:"verb-marker",minRemaining:3},{pattern:"\u0646",confidencePenalty:.12,prefixType:"verb-marker",minRemaining:3},{pattern:"\u0623",confidencePenalty:.12,prefixType:"verb-marker",minRemaining:3},{pattern:"\u0627",confidencePenalty:.12,prefixType:"verb-marker",minRemaining:3}],Ql=[{pattern:"\u0648\u0646",confidencePenalty:.1,type:"masculine-plural"},{pattern:"\u064A\u0646",confidencePenalty:.1,type:"masculine-plural-accusative"},{pattern:"\u0627\u062A",confidencePenalty:.1,type:"feminine-plural"},{pattern:"\u0627\u0646",confidencePenalty:.1,type:"dual-nominative"},{pattern:"\u064A\u0646",confidencePenalty:.1,type:"dual-accusative"},{pattern:"\u0647\u0627",confidencePenalty:.1,type:"pronoun-her"},{pattern:"\u0647\u0645",confidencePenalty:.1,type:"pronoun-them"},{pattern:"\u0647\u0646",confidencePenalty:.1,type:"pronoun-them-f"},{pattern:"\u0646\u0627",confidencePenalty:.1,type:"pronoun-us"},{pattern:"\u0643\u0645",confidencePenalty:.1,type:"pronoun-you-pl"},{pattern:"\u0643",confidencePenalty:.08,type:"pronoun-you"},{pattern:"\u0647",confidencePenalty:.08,type:"pronoun-him"},{pattern:"\u064A",confidencePenalty:.08,type:"pronoun-me"},{pattern:"\u0629",confidencePenalty:.08,type:"feminine"}],xt=class{constructor(){this.language="ar"}isNormalizable(e){return!(!Gl(e)||e.length<2)}normalize(e){let t=Yl(e),r=1,i=[],a=[];for(let o of Xl)if(t.startsWith(o.pattern)){let l=t.slice(o.pattern.length);if(l.length>=2){t=l,r-=o.confidencePenalty,i.push(o.pattern);break}}if(i.length===0){for(let o of Zl)if(t.startsWith(o.pattern)){let l=t.slice(o.pattern.length),c=o.minRemaining??2;if(l.length>=c){t=l,r-=o.confidencePenalty,i.push(o.pattern);break}}}if(!(t.endsWith("\u0627\u062A")||t.endsWith("\u0629")||t.endsWith("\u0648\u0646")||t.endsWith("\u064A\u0646")||t.endsWith("\u0647\u0627")||t.endsWith("\u0647\u0645")||t.endsWith("\u0647\u0646")||t.endsWith("\u0646\u0627")||t.endsWith("\u0643\u0645"))&&(i.length===0||i[0]==="\u0648"||i[0]==="\u0641")){for(let o of Jl)if(t.startsWith(o.pattern)){let l=t.slice(o.pattern.length),c=o.minRemaining??3;if(l.length>=c){t=l,r-=o.confidencePenalty,i.push(o.pattern);break}}}for(let o of Ql)if(t.endsWith(o.pattern)){let l=t.slice(0,-o.pattern.length);l.length>=2&&(t=l,r-=o.confidencePenalty,a.push(o.pattern))}return r=Math.max(.5,r),i.length===0&&a.length===0?Y(e):O(t,r,{removedPrefixes:i,removedSuffixes:a})}},Lf=new xt;var ec=new Set(["\u0648\u0644","\u0648\u0628","\u0648\u0643","\u0641\u0644","\u0641\u0628","\u0641\u0643"]),tc=new Set(["\u0641\u064A","\u0639\u0644\u0649","\u0645\u0646","\u0625\u0644\u0649","\u0627\u0644\u0649","\u0645\u0639","\u0639\u0646","\u0642\u0628\u0644","\u0628\u0639\u062F","\u0628\u064A\u0646","\u0628","\u0644","\u0643"]),rc=[{native:"\u0635\u062D\u064A\u062D",normalized:"true"},{native:"\u062E\u0637\u0623",normalized:"false"},{native:"null",normalized:"null"},{native:"\u0641\u0627\u0631\u063A",normalized:"null"},{native:"\u063A\u064A\u0631 \u0645\u0639\u0631\u0641",normalized:"undefined"},{native:"\u0627\u0644\u0623\u0648\u0644",normalized:"first"},{native:"\u0623\u0648\u0644",normalized:"first"},{native:"\u0627\u0644\u0623\u062E\u064A\u0631",normalized:"last"},{native:"\u0622\u062E\u0631",normalized:"last"},{native:"\u0627\u0644\u062A\u0627\u0644\u064A",normalized:"next"},{native:"\u0627\u0644\u0633\u0627\u0628\u0642",normalized:"previous"},{native:"\u0627\u0644\u0623\u0642\u0631\u0628",normalized:"closest"},{native:"\u0627\u0644\u0623\u0628",normalized:"parent"},{native:"\u0627\u0644\u0646\u0642\u0631",normalized:"click"},{native:"\u0646\u0642\u0631",normalized:"click"},{native:"\u0627\u0644\u0625\u062F\u062E\u0627\u0644",normalized:"input"},{native:"\u0625\u062F\u062E\u0627\u0644",normalized:"input"},{native:"\u0627\u0644\u062A\u063A\u064A\u064A\u0631",normalized:"change"},{native:"\u062A\u063A\u064A\u064A\u0631",normalized:"change"},{native:"\u0627\u0644\u0625\u0631\u0633\u0627\u0644",normalized:"submit"},{native:"\u0625\u0631\u0633\u0627\u0644",normalized:"submit"},{native:"\u0627\u0644\u062A\u0631\u0643\u064A\u0632",normalized:"focus"},{native:"\u0641\u0642\u062F\u0627\u0646 \u0627\u0644\u062A\u0631\u0643\u064A\u0632",normalized:"blur"},{native:"\u0636\u063A\u0637",normalized:"keydown"},{native:"\u0631\u0641\u0639",normalized:"keyup"},{native:"\u062A\u0645\u0631\u064A\u0631 \u0627\u0644\u0641\u0623\u0631\u0629",normalized:"mouseover"},{native:"\u0645\u063A\u0627\u062F\u0631\u0629 \u0627\u0644\u0641\u0623\u0631\u0629",normalized:"mouseout"},{native:"\u062A\u062D\u0645\u064A\u0644",normalized:"load"},{native:"\u062A\u0645\u0631\u064A\u0631",normalized:"scroll"},{native:"\u0641\u0623\u0631\u0629 \u0623\u0633\u0641\u0644",normalized:"mousedown"},{native:"\u0641\u0623\u0631\u0629 \u0623\u0639\u0644\u0649",normalized:"mouseup"},{native:"\u0641\u0623\u0631\u0629 \u062F\u062E\u0648\u0644",normalized:"mouseenter"},{native:"\u0641\u0623\u0631\u0629 \u062E\u0631\u0648\u062C",normalized:"mouseleave"},{native:"\u0641\u0623\u0631\u0629 \u0641\u0648\u0642",normalized:"mouseover"},{native:"\u0641\u0623\u0631\u0629 \u062E\u0627\u0631\u062C",normalized:"mouseout"},{native:"\u0641\u0623\u0631\u0629 \u062A\u062D\u0631\u0643",normalized:"mousemove"},{native:"\u0645\u0641\u062A\u0627\u062D \u0623\u0633\u0641\u0644",normalized:"keydown"},{native:"\u0645\u0641\u062A\u0627\u062D \u0623\u0639\u0644\u0649",normalized:"keyup"},{native:"\u0647\u064A",normalized:"it"},{native:"\u062B\u0627\u0646\u064A\u0629",normalized:"s"},{native:"\u062B\u0648\u0627\u0646\u064A",normalized:"s"},{native:"\u0645\u0644\u064A \u062B\u0627\u0646\u064A\u0629",normalized:"ms"},{native:"\u062F\u0642\u064A\u0642\u0629",normalized:"m"},{native:"\u062F\u0642\u0627\u0626\u0642",normalized:"m"},{native:"\u0633\u0627\u0639\u0629",normalized:"h"},{native:"\u0633\u0627\u0639\u0627\u062A",normalized:"h"},{native:"\u0639\u0646\u062F\u0645\u0627",normalized:"on"},{native:"\u062D\u064A\u0646\u0645\u0627",normalized:"on"},{native:"\u0639\u0646\u062F",normalized:"on"},{native:"\u062D\u064A\u0646",normalized:"on"},{native:"\u0644\u0645\u0651\u0627",normalized:"on"},{native:"\u0644\u0645\u0627",normalized:"on"},{native:"\u0644\u062F\u0649",normalized:"on"}],qr=class extends V{constructor(){super();this.language="ar";this.direction="rtl";this.initializeKeywordsFromProfile(Ke,rc),this.normalizer=new xt,this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractor(new ve),this.registerExtractor(new Gt),this.registerExtractor(new Ut),this.registerExtractor(new Ft),this.registerExtractor(new K),this.registerExtractor(new q)}tokenizeWithExtractors(t){let r=[],i=0;for(;i<t.length;){for(;i<t.length&&pe(t[i]);)i++;if(i>=t.length)break;let a=this.tryMultiWordKeyword(t,i);if(a){r.push(a),i=a.position.end;continue}let s=!1;for(let o of this.extractors)if(o.canExtract(t,i)){let l=o.extract(t,i);if(l){let c=l.metadata?.normalized,d=l.metadata?.stem,p=l.metadata?.stemConfidence,u={};if(l.metadata)for(let[y,g]of Object.entries(l.metadata))y!=="normalized"&&y!=="stem"&&y!=="stemConfidence"&&(u[y]=g);let m;u.procliticType==="conjunction"?m="conjunction":u.procliticType==="preposition"?m="particle":m=this.classifyToken(l.value);let f={};c&&(f.normalized=c),d&&(f.stem=d),p!==void 0&&(f.stemConfidence=p),Object.keys(u).length>0&&(f.metadata=u),r.push($(l.value,m,_(i,i+l.length),Object.keys(f).length>0?f:void 0)),i+=l.length,s=!0;break}}if(!s){let o=t[i],l=this.classifyUnknownChar(o);r.push($(o,l,_(i,i+1))),i++}}return new re(r,this.language)}classifyToken(t){return ec.has(t)?"conjunction":tc.has(t)?"particle":this.isKeyword(t)?"keyword":t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("http")?"url":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||/^\d/.test(t)?"literal":"identifier"}},Qt=new qr;function nc(n){return/[áéíóúüñÁÉÍÓÚÜÑ]/.test(n)}var ic=[{ending:"ando",stem:"ar",confidence:.88,type:"gerund"},{ending:"ado",stem:"ar",confidence:.88,type:"participle"},{ending:"ada",stem:"ar",confidence:.88,type:"participle"},{ending:"ados",stem:"ar",confidence:.88,type:"participle"},{ending:"adas",stem:"ar",confidence:.88,type:"participle"},{ending:"o",stem:"ar",confidence:.75,type:"present"},{ending:"as",stem:"ar",confidence:.82,type:"present"},{ending:"a",stem:"ar",confidence:.75,type:"present"},{ending:"amos",stem:"ar",confidence:.85,type:"present"},{ending:"\xE1is",stem:"ar",confidence:.85,type:"present"},{ending:"ais",stem:"ar",confidence:.82,type:"present"},{ending:"an",stem:"ar",confidence:.8,type:"present"},{ending:"\xE9",stem:"ar",confidence:.85,type:"past"},{ending:"aste",stem:"ar",confidence:.88,type:"past"},{ending:"\xF3",stem:"ar",confidence:.82,type:"past"},{ending:"amos",stem:"ar",confidence:.85,type:"past"},{ending:"asteis",stem:"ar",confidence:.88,type:"past"},{ending:"aron",stem:"ar",confidence:.88,type:"past"},{ending:"aba",stem:"ar",confidence:.88,type:"past"},{ending:"abas",stem:"ar",confidence:.88,type:"past"},{ending:"\xE1bamos",stem:"ar",confidence:.88,type:"past"},{ending:"abamos",stem:"ar",confidence:.85,type:"past"},{ending:"abais",stem:"ar",confidence:.88,type:"past"},{ending:"aban",stem:"ar",confidence:.88,type:"past"},{ending:"e",stem:"ar",confidence:.72,type:"subjunctive"},{ending:"es",stem:"ar",confidence:.78,type:"subjunctive"},{ending:"emos",stem:"ar",confidence:.82,type:"subjunctive"},{ending:"\xE9is",stem:"ar",confidence:.85,type:"subjunctive"},{ending:"eis",stem:"ar",confidence:.82,type:"subjunctive"},{ending:"en",stem:"ar",confidence:.78,type:"subjunctive"},{ending:"a",stem:"ar",confidence:.75,type:"imperative"},{ending:"ad",stem:"ar",confidence:.85,type:"imperative"},{ending:"ar",stem:"ar",confidence:.92,type:"dictionary"}],ac=[{ending:"iendo",stem:"er",confidence:.88,type:"gerund"},{ending:"ido",stem:"er",confidence:.85,type:"participle"},{ending:"ida",stem:"er",confidence:.85,type:"participle"},{ending:"idos",stem:"er",confidence:.85,type:"participle"},{ending:"idas",stem:"er",confidence:.85,type:"participle"},{ending:"o",stem:"er",confidence:.72,type:"present"},{ending:"es",stem:"er",confidence:.78,type:"present"},{ending:"e",stem:"er",confidence:.72,type:"present"},{ending:"emos",stem:"er",confidence:.85,type:"present"},{ending:"\xE9is",stem:"er",confidence:.85,type:"present"},{ending:"eis",stem:"er",confidence:.82,type:"present"},{ending:"en",stem:"er",confidence:.78,type:"present"},{ending:"\xED",stem:"er",confidence:.85,type:"past"},{ending:"iste",stem:"er",confidence:.88,type:"past"},{ending:"i\xF3",stem:"er",confidence:.85,type:"past"},{ending:"io",stem:"er",confidence:.82,type:"past"},{ending:"imos",stem:"er",confidence:.85,type:"past"},{ending:"isteis",stem:"er",confidence:.88,type:"past"},{ending:"ieron",stem:"er",confidence:.88,type:"past"},{ending:"\xEDa",stem:"er",confidence:.88,type:"past"},{ending:"ia",stem:"er",confidence:.85,type:"past"},{ending:"\xEDas",stem:"er",confidence:.88,type:"past"},{ending:"ias",stem:"er",confidence:.85,type:"past"},{ending:"\xEDamos",stem:"er",confidence:.88,type:"past"},{ending:"iamos",stem:"er",confidence:.85,type:"past"},{ending:"\xEDais",stem:"er",confidence:.88,type:"past"},{ending:"iais",stem:"er",confidence:.85,type:"past"},{ending:"\xEDan",stem:"er",confidence:.88,type:"past"},{ending:"ian",stem:"er",confidence:.85,type:"past"},{ending:"er",stem:"er",confidence:.92,type:"dictionary"}],oc=[{ending:"iendo",stem:"ir",confidence:.88,type:"gerund"},{ending:"ido",stem:"ir",confidence:.85,type:"participle"},{ending:"ida",stem:"ir",confidence:.85,type:"participle"},{ending:"idos",stem:"ir",confidence:.85,type:"participle"},{ending:"idas",stem:"ir",confidence:.85,type:"participle"},{ending:"o",stem:"ir",confidence:.72,type:"present"},{ending:"es",stem:"ir",confidence:.78,type:"present"},{ending:"e",stem:"ir",confidence:.72,type:"present"},{ending:"imos",stem:"ir",confidence:.85,type:"present"},{ending:"\xEDs",stem:"ir",confidence:.85,type:"present"},{ending:"is",stem:"ir",confidence:.82,type:"present"},{ending:"en",stem:"ir",confidence:.78,type:"present"},{ending:"\xED",stem:"ir",confidence:.85,type:"past"},{ending:"iste",stem:"ir",confidence:.88,type:"past"},{ending:"i\xF3",stem:"ir",confidence:.85,type:"past"},{ending:"io",stem:"ir",confidence:.82,type:"past"},{ending:"imos",stem:"ir",confidence:.85,type:"past"},{ending:"isteis",stem:"ir",confidence:.88,type:"past"},{ending:"ieron",stem:"ir",confidence:.88,type:"past"},{ending:"\xEDa",stem:"ir",confidence:.88,type:"past"},{ending:"ia",stem:"ir",confidence:.85,type:"past"},{ending:"\xEDas",stem:"ir",confidence:.88,type:"past"},{ending:"ias",stem:"ir",confidence:.85,type:"past"},{ending:"\xEDamos",stem:"ir",confidence:.88,type:"past"},{ending:"iamos",stem:"ir",confidence:.85,type:"past"},{ending:"\xEDais",stem:"ir",confidence:.88,type:"past"},{ending:"iais",stem:"ir",confidence:.85,type:"past"},{ending:"\xEDan",stem:"ir",confidence:.88,type:"past"},{ending:"ian",stem:"ir",confidence:.85,type:"past"},{ending:"ir",stem:"ir",confidence:.92,type:"dictionary"}],sc=[...ic,...ac,...oc].sort((n,e)=>e.ending.length-n.ending.length),bt=class extends Pr{constructor(){super({language:"es",minWordLength:3,minStemLength:2,endings:sc,reflexiveSuffixes:["se","me","te","nos","os"],infinitiveEndings:["ar","er","ir"]})}isNormalizable(e){if(e.length<3)return!1;let t=e.toLowerCase();if(t.endsWith("ar")||t.endsWith("er")||t.endsWith("ir")||t.endsWith("ando")||t.endsWith("iendo")||t.endsWith("ado")||t.endsWith("ido")||t.endsWith("arse")||t.endsWith("erse")||t.endsWith("irse"))return!0;for(let r of e)if(nc(r))return!0;return!1}},Kf=new bt;function lc(n){return{isLetter:r=>n.test(r),isIdentifierChar:r=>/[0-9]/.test(r)||n.test(r)}}var{isLetter:mi,isIdentifierChar:cc}=lc(/[a-zA-ZáéíóúüñÁÉÍÓÚÜÑ]/),pc=new Set(["en","a","de","desde","hasta","con","sin","por","para","sobre","entre","antes","despu\xE9s","despues","dentro","fuera","al","del"]),Br=class{constructor(){this.name="spanish-keyword"}setContext(e){this.context=e}canExtract(e,t){return mi(e[t])}extract(e,t){if(!this.context)throw new Error("SpanishKeywordExtractor: context not set");let r=this.tryMultiWordPhrase(e,t);return r||this.extractSpanishWord(e,t)}tryMultiWordPhrase(e,t){if(!this.context)return null;let r=["de lo contrario","de lo normal","por defecto","de nuevo","de otra manera"];for(let i of r)if(e.slice(t,t+i.length).toLowerCase()===i.toLowerCase()){let s=t+i.length;if(s>=e.length||pe(e[s])||!mi(e[s])){let o=this.context.lookupKeyword(i);return{value:e.slice(t,s),length:i.length,metadata:{normalized:o?.normalized,multiWord:!0}}}}return null}extractSpanishWord(e,t){if(!this.context)return null;let r=t,i="";for(;r<e.length&&cc(e[r]);)i+=e[r++];if(!i)return null;let a=i.toLowerCase(),s=pc.has(a),o=this.context.lookupKeyword(i),l=o&&o.normalized!==o.native?o.normalized:void 0,c;if(!o&&this.context.normalizer){let d=this.context.normalizer.normalize(i);if(d.stem!==i&&d.confidence>=.7){let p=this.context.lookupKeyword(d.stem);p&&(c=p.normalized)}}return{value:i,length:r-t,metadata:{normalized:l||c,isPreposition:s}}}};function fi(){return[new Br]}var dc=new Set(["en","a","de","desde","hasta","con","sin","por","para","sobre","entre","antes","despu\xE9s","despues","dentro","fuera","al","del"]),uc=[{native:"verdadero",normalized:"true"},{native:"falso",normalized:"false"},{native:"nulo",normalized:"null"},{native:"indefinido",normalized:"undefined"},{native:"segundo",normalized:"s"},{native:"segundos",normalized:"s"},{native:"milisegundo",normalized:"ms"},{native:"milisegundos",normalized:"ms"},{native:"minuto",normalized:"m"},{native:"minutos",normalized:"m"},{native:"hora",normalized:"h"},{native:"horas",normalized:"h"},{native:"m\xED",normalized:"me"},{native:"destino",normalized:"target"}],Dr=class extends V{constructor(){super();this.language="es";this.direction="ltr";this.initializeKeywordsFromProfile(Be,uc),this.setNormalizer(new bt),this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractors(fi()),this.registerExtractor(new K),this.registerExtractor(new q)}classifyToken(t){let r=t.toLowerCase();return dc.has(r)?"particle":this.isKeyword(r)?"keyword":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||/^\d/.test(t)?"literal":["==","!=","<=",">=","<",">","&&","||","!"].includes(t)?"operator":t.startsWith("/")||t.startsWith("./")||t.startsWith("http")?"url":"identifier"}},er=new Dr;function mc(n){let e=n.charCodeAt(0);return e>=65&&e<=90||e>=97&&e<=122?!0:"\xE7\xC7\u011F\u011E\u0131\u0130\xF6\xD6\u015F\u015E\xFC\xDC".includes(n)}function fc(n){for(let e of n)if(mc(e))return!0;return!1}function Hr(n){return"a\u0131ouAIOU".includes(n)}function yi(n){return"ei\xF6\xFCE\u0130\xD6\xDC".includes(n)}function gi(n){return Hr(n)||yi(n)}function yc(n){for(let e=n.length-1;e>=0;e--)if(gi(n[e]))return n[e];return null}function gc(n,e){let t=yc(n);if(!t)return!0;let r=e.split("").find(i=>gi(i));return r?Hr(t)?Hr(r):yi(r):!0}var hc=[{pattern:"iyorsunuz",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\u0131yorsunuz",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\xFCyorsunuz",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"uyorsunuz",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"iyorsun",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\u0131yorsun",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\xFCyorsun",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"uyorsun",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"iyoruz",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\u0131yoruz",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\xFCyoruz",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"uyoruz",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"iyorum",confidence:.85,conjugationType:"progressive",minStemLength:2},{pattern:"\u0131yorum",confidence:.85,conjugationType:"progressive",minStemLength:2},{pattern:"\xFCyorum",confidence:.85,conjugationType:"progressive",minStemLength:2},{pattern:"uyorum",confidence:.85,conjugationType:"progressive",minStemLength:2},{pattern:"iyorlar",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\u0131yorlar",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"\xFCyorlar",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"uyorlar",confidence:.82,conjugationType:"progressive",minStemLength:2},{pattern:"eceksiniz",confidence:.82,conjugationType:"future",minStemLength:2},{pattern:"acaks\u0131n\u0131z",confidence:.82,conjugationType:"future",minStemLength:2},{pattern:"eceksin",confidence:.82,conjugationType:"future",minStemLength:2},{pattern:"acaks\u0131n",confidence:.82,conjugationType:"future",minStemLength:2},{pattern:"ece\u011Fiz",confidence:.82,conjugationType:"future",minStemLength:2},{pattern:"aca\u011F\u0131z",confidence:.82,conjugationType:"future",minStemLength:2},{pattern:"ece\u011Fim",confidence:.85,conjugationType:"future",minStemLength:2},{pattern:"aca\u011F\u0131m",confidence:.85,conjugationType:"future",minStemLength:2},{pattern:"ecekler",confidence:.82,conjugationType:"future",minStemLength:2},{pattern:"acaklar",confidence:.82,conjugationType:"future",minStemLength:2},{pattern:"mi\u015Fsiniz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"m\u0131\u015Fs\u0131n\u0131z",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"m\xFC\u015Fs\xFCn\xFCz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"mu\u015Fsunuz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"mi\u015Fsin",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"m\u0131\u015Fs\u0131n",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"m\xFC\u015Fs\xFCn",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"mu\u015Fsun",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"mi\u015Fiz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"m\u0131\u015F\u0131z",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"m\xFC\u015F\xFCz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"mu\u015Fuz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"mi\u015Fim",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"m\u0131\u015F\u0131m",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"m\xFC\u015F\xFCm",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"mu\u015Fum",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"mi\u015Fler",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"m\u0131\u015Flar",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"m\xFC\u015Fler",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"mu\u015Flar",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"diniz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"d\u0131n\u0131z",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"d\xFCn\xFCz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"dunuz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"tiniz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"t\u0131n\u0131z",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"t\xFCn\xFCz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"tunuz",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"diler",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"d\u0131lar",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"d\xFCler",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"dular",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"tiler",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"t\u0131lar",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"t\xFCler",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"tular",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"din",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"d\u0131n",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"d\xFCn",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"dun",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"tin",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"t\u0131n",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"t\xFCn",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"tun",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"dik",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"d\u0131k",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"d\xFCk",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"duk",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"tik",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"t\u0131k",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"t\xFCk",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"tuk",confidence:.82,conjugationType:"past",minStemLength:2},{pattern:"dim",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"d\u0131m",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"d\xFCm",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"dum",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"tim",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"t\u0131m",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"t\xFCm",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"tum",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"iyor",confidence:.85,conjugationType:"progressive",minStemLength:2},{pattern:"\u0131yor",confidence:.85,conjugationType:"progressive",minStemLength:2},{pattern:"\xFCyor",confidence:.85,conjugationType:"progressive",minStemLength:2},{pattern:"uyor",confidence:.85,conjugationType:"progressive",minStemLength:2},{pattern:"ecek",confidence:.85,conjugationType:"future",minStemLength:2},{pattern:"acak",confidence:.85,conjugationType:"future",minStemLength:2},{pattern:"mi\u015F",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"m\u0131\u015F",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"m\xFC\u015F",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"mu\u015F",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"di",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"d\u0131",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"d\xFC",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"du",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"ti",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"t\u0131",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"t\xFC",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"tu",confidence:.85,conjugationType:"past",minStemLength:2},{pattern:"mek",confidence:.88,conjugationType:"dictionary",minStemLength:2},{pattern:"mak",confidence:.88,conjugationType:"dictionary",minStemLength:2},{pattern:"eyelim",confidence:.82,conjugationType:"optative",minStemLength:2},{pattern:"ayal\u0131m",confidence:.82,conjugationType:"optative",minStemLength:2},{pattern:"eyim",confidence:.82,conjugationType:"optative",minStemLength:2},{pattern:"ay\u0131m",confidence:.82,conjugationType:"optative",minStemLength:2},{pattern:"elim",confidence:.82,conjugationType:"optative",minStemLength:2},{pattern:"al\u0131m",confidence:.82,conjugationType:"optative",minStemLength:2},{pattern:"melisiniz",confidence:.82,conjugationType:"necessitative",minStemLength:2},{pattern:"mal\u0131s\u0131n\u0131z",confidence:.82,conjugationType:"necessitative",minStemLength:2},{pattern:"melisin",confidence:.82,conjugationType:"necessitative",minStemLength:2},{pattern:"mal\u0131s\u0131n",confidence:.82,conjugationType:"necessitative",minStemLength:2},{pattern:"meliyiz",confidence:.82,conjugationType:"necessitative",minStemLength:2},{pattern:"mal\u0131y\u0131z",confidence:.82,conjugationType:"necessitative",minStemLength:2},{pattern:"meliyim",confidence:.85,conjugationType:"necessitative",minStemLength:2},{pattern:"mal\u0131y\u0131m",confidence:.85,conjugationType:"necessitative",minStemLength:2},{pattern:"meliler",confidence:.82,conjugationType:"necessitative",minStemLength:2},{pattern:"mal\u0131lar",confidence:.82,conjugationType:"necessitative",minStemLength:2},{pattern:"meli",confidence:.85,conjugationType:"necessitative",minStemLength:2},{pattern:"mal\u0131",confidence:.85,conjugationType:"necessitative",minStemLength:2},{pattern:"ebiliyor",confidence:.82,conjugationType:"potential",minStemLength:2},{pattern:"abiliyor",confidence:.82,conjugationType:"potential",minStemLength:2},{pattern:"ebilir",confidence:.85,conjugationType:"potential",minStemLength:2},{pattern:"abilir",confidence:.85,conjugationType:"potential",minStemLength:2},{pattern:"ebildi",confidence:.82,conjugationType:"potential",minStemLength:2},{pattern:"abildi",confidence:.82,conjugationType:"potential",minStemLength:2},{pattern:"ebilmek",confidence:.85,conjugationType:"potential",minStemLength:2},{pattern:"abilmek",confidence:.85,conjugationType:"potential",minStemLength:2},{pattern:"iniz",confidence:.82,conjugationType:"imperative",minStemLength:2},{pattern:"\u0131n\u0131z",confidence:.82,conjugationType:"imperative",minStemLength:2},{pattern:"\xFCn\xFCz",confidence:.82,conjugationType:"imperative",minStemLength:2},{pattern:"unuz",confidence:.82,conjugationType:"imperative",minStemLength:2},{pattern:"in",confidence:.8,conjugationType:"imperative",minStemLength:2},{pattern:"\u0131n",confidence:.8,conjugationType:"imperative",minStemLength:2},{pattern:"\xFCn",confidence:.8,conjugationType:"imperative",minStemLength:2},{pattern:"un",confidence:.8,conjugationType:"imperative",minStemLength:2},{pattern:"ildi",confidence:.82,conjugationType:"passive",minStemLength:2},{pattern:"\u0131ld\u0131",confidence:.82,conjugationType:"passive",minStemLength:2},{pattern:"\xFCld\xFC",confidence:.82,conjugationType:"passive",minStemLength:2},{pattern:"uldu",confidence:.82,conjugationType:"passive",minStemLength:2},{pattern:"ilir",confidence:.82,conjugationType:"passive",minStemLength:2},{pattern:"\u0131l\u0131r",confidence:.82,conjugationType:"passive",minStemLength:2},{pattern:"\xFCl\xFCr",confidence:.82,conjugationType:"passive",minStemLength:2},{pattern:"ulur",confidence:.82,conjugationType:"passive",minStemLength:2},{pattern:"tirmek",confidence:.82,conjugationType:"causative",minStemLength:2},{pattern:"t\u0131rmak",confidence:.82,conjugationType:"causative",minStemLength:2},{pattern:"t\xFCrmek",confidence:.82,conjugationType:"causative",minStemLength:2},{pattern:"turmak",confidence:.82,conjugationType:"causative",minStemLength:2},{pattern:"dirmek",confidence:.82,conjugationType:"causative",minStemLength:2},{pattern:"d\u0131rmak",confidence:.82,conjugationType:"causative",minStemLength:2},{pattern:"d\xFCrmek",confidence:.82,conjugationType:"causative",minStemLength:2},{pattern:"durmak",confidence:.82,conjugationType:"causative",minStemLength:2},{pattern:"miyorsunuz",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"m\u0131yorsunuz",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"m\xFCyorsunuz",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"muyorsunuz",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"miyorsun",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"m\u0131yorsun",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"m\xFCyorsun",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"muyorsun",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"miyoruz",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"m\u0131yoruz",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"m\xFCyoruz",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"muyoruz",confidence:.8,conjugationType:"negative",minStemLength:2},{pattern:"miyorum",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"m\u0131yorum",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"m\xFCyorum",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"muyorum",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"miyor",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"m\u0131yor",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"m\xFCyor",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"muyor",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"medi",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"mad\u0131",confidence:.82,conjugationType:"negative",minStemLength:2},{pattern:"me",confidence:.75,conjugationType:"negative",minStemLength:3},{pattern:"ma",confidence:.75,conjugationType:"negative",minStemLength:3}],St=class{constructor(){this.language="tr"}isNormalizable(e){return!(!fc(e)||e.length<3)}normalize(e){let t=e.toLowerCase();for(let r of hc)if(t.endsWith(r.pattern)){let i=t.slice(0,-r.pattern.length),a=r.minStemLength??2;if(i.length<a)continue;if(!gc(i,r.pattern)){let o=r.confidence*.9,l={removedSuffixes:[r.pattern]};return r.conjugationType&&(l.conjugationType=r.conjugationType),O(i,o,l)}let s={removedSuffixes:[r.pattern]};return r.conjugationType&&(s.conjugationType=r.conjugationType),O(i,r.confidence,s)}return Y(e)}},Qf=new St;var vc=new Set(["ile","i\xE7in","kadar","gibi","\xF6nce","\xFCzerinde","alt\u0131nda","i\xE7inde","d\u0131\u015F\u0131nda","aras\u0131nda","kar\u015F\u0131","g\xF6re","ra\u011Fmen","boyunca"]),kc=new Set(["de","da","te","ta","den","dan","ten","tan","e","a","ye","ya","i","\u0131","u","\xFC","in","\u0131n","un","\xFCn","le","la","yle","yla"]),xc=[{native:"do\u011Fru",normalized:"true"},{native:"dogru",normalized:"true"},{native:"yanl\u0131\u015F",normalized:"false"},{native:"yanlis",normalized:"false"},{native:"null",normalized:"null"},{native:"bo\u015F",normalized:"null"},{native:"bos",normalized:"null"},{native:"tan\u0131ms\u0131z",normalized:"undefined"},{native:"tanimsiz",normalized:"undefined"},{native:"ilk",normalized:"first"},{native:"son",normalized:"last"},{native:"sonuncu",normalized:"last"},{native:"sonraki",normalized:"next"},{native:"\xF6nceki",normalized:"previous"},{native:"onceki",normalized:"previous"},{native:"enyak\u0131n",normalized:"closest"},{native:"enyakin",normalized:"closest"},{native:"ebeveyn",normalized:"parent"},{native:"fare \xFCzerinde",normalized:"mouseover"},{native:"fare uzerinde",normalized:"mouseover"},{native:"fare d\u0131\u015F\u0131nda",normalized:"mouseout"},{native:"fare disinda",normalized:"mouseout"},{native:"farebas",normalized:"mousedown"},{native:"fareb\u0131rak",normalized:"mouseup"},{native:"farebirak",normalized:"mouseup"},{native:"kayd\u0131r",normalized:"scroll"},{native:"kaydir",normalized:"scroll"},{native:"tu\u015F_bas",normalized:"keydown"},{native:"tus_bas",normalized:"keydown"},{native:"tu\u015F_b\u0131rak",normalized:"keyup"},{native:"tus_birak",normalized:"keyup"},{native:"saniye",normalized:"s"},{native:"milisaniye",normalized:"ms"},{native:"dakika",normalized:"m"},{native:"saat",normalized:"h"}],Fr=class extends V{constructor(){super();this.language="tr";this.direction="ltr";this.initializeKeywordsFromProfile(Ye,xc),this.setNormalizer(new St),this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractor(pi()),this.registerExtractor(new K),this.registerExtractor(new q)}classifyToken(t){let r=t.toLowerCase();return vc.has(r)||kc.has(r)?"particle":this.isKeyword(r)?"keyword":t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("http")?"url":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||/^\d/.test(t)?"literal":["==","!=","<=",">=","<",">","&&","||","!"].includes(t)?"operator":"identifier"}},tr=new Fr;var bc=new Set(["\u628A","\u5728","\u4ECE","\u5230","\u5411","\u7ED9","\u5BF9","\u7528","\u88AB","\u8BA9","\u7684","\u5730","\u5F97","\u4E86","\u7740","\u8FC7","\u5417","\u5462","\u5427"]),Sc=[{native:"\u771F",normalized:"true"},{native:"\u5047",normalized:"false"},{native:"\u7A7A",normalized:"null"},{native:"\u672A\u5B9A\u4E49",normalized:"undefined"},{native:"\u7B2C\u4E00\u4E2A",normalized:"first"},{native:"\u9996\u4E2A",normalized:"first"},{native:"\u6700\u540E\u4E00\u4E2A",normalized:"last"},{native:"\u672B\u4E2A",normalized:"last"},{native:"\u4E0B\u4E00\u4E2A",normalized:"next"},{native:"\u4E0A\u4E00\u4E2A",normalized:"previous"},{native:"\u6700\u8FD1\u7684",normalized:"closest"},{native:"\u7236\u7EA7",normalized:"parent"},{native:"\u70B9\u51FB",normalized:"click"},{native:"\u53CC\u51FB",normalized:"dblclick"},{native:"\u8F93\u5165",normalized:"input"},{native:"\u53D8\u66F4",normalized:"change"},{native:"\u6539\u53D8",normalized:"change"},{native:"\u63D0\u4EA4",normalized:"submit"},{native:"\u6309\u952E",normalized:"keydown"},{native:"\u91CA\u653E\u952E",normalized:"keyup"},{native:"\u9F20\u6807\u79FB\u5165",normalized:"mouseover"},{native:"\u9F20\u6807\u79FB\u51FA",normalized:"mouseout"},{native:"\u83B7\u5F97\u7126\u70B9",normalized:"focus"},{native:"\u5931\u53BB\u7126\u70B9",normalized:"blur"},{native:"\u52A0\u8F7D",normalized:"load"},{native:"\u6EDA\u52A8",normalized:"scroll"},{native:"\u6211\u7684",normalized:"my"},{native:"\u5B83\u7684",normalized:"its"},{native:"\u79D2",normalized:"s"},{native:"\u6BEB\u79D2",normalized:"ms"},{native:"\u5206\u949F",normalized:"m"},{native:"\u5C0F\u65F6",normalized:"h"},{native:"\u548C",normalized:"and"},{native:"\u6216\u8005",normalized:"or"},{native:"\u6216",normalized:"or"},{native:"\u4E0D",normalized:"not"},{native:"\u975E",normalized:"not"},{native:"\u662F",normalized:"is"},{native:"\u82E5",normalized:"if"},{native:"\u4E0D\u7136",normalized:"else"},{native:"\u5FAA\u73AF",normalized:"repeat"},{native:"\u904D\u5386",normalized:"for"},{native:"\u6BCF\u4E2A",normalized:"for"},{native:"\u4E3A\u6BCF",normalized:"for"},{native:"\u4E2D\u6B62",normalized:"halt"},{native:"\u629B",normalized:"throw"},{native:"\u547C\u53EB",normalized:"call"},{native:"\u56DE",normalized:"return"},{native:"\u811A\u672C",normalized:"js"},{native:"\u901A\u77E5",normalized:"tell"},{native:"\u7F3A\u7701",normalized:"default"},{native:"\u521D\u59CB",normalized:"init"},{native:"\u52A8\u4F5C",normalized:"behavior"},{native:"\u6FC0\u53D1",normalized:"trigger"},{native:"\u5BF9\u7126",normalized:"focus"},{native:"\u6A21\u7CCA",normalized:"blur"},{native:"\u8DF3\u8F6C",normalized:"go"},{native:"\u5BFC\u822A",normalized:"go"},{native:"\u6293\u53D6",normalized:"fetch"},{native:"\u83B7\u53D6\u6570\u636E",normalized:"fetch"},{native:"\u5B89\u5B9A",normalized:"settle"},{native:"\u62FF\u53D6",normalized:"take"},{native:"\u53D6",normalized:"take"},{native:"\u521B\u5EFA",normalized:"make"},{native:"\u514B\u9686",normalized:"clone"},{native:"\u8BB0\u5F55",normalized:"log"},{native:"\u6253\u5370",normalized:"log"},{native:"\u52A8\u753B",normalized:"transition"},{native:"\u5230\u91CC\u9762",normalized:"into"},{native:"\u91CC",normalized:"into"},{native:"\u524D",normalized:"before"},{native:"\u540E",normalized:"after"},{native:"\u90A3\u4E48",normalized:"then"},{native:"\u5B8C",normalized:"end"}],Ur=class extends V{constructor(){super();this.language="zh";this.direction="ltr";this.initializeKeywordsFromProfile(Xe,Sc),this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractor(new ve),this.registerExtractor(new Ht),this.registerExtractor(new Dt),this.registerExtractor(new K),this.registerExtractor(new q)}classifyToken(t){return bc.has(t)?"particle":this.isKeyword(t)?"keyword":t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("http")?"url":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||t.startsWith("\u201C")||t.startsWith("\u2018")||/^\d/.test(t)?"literal":"identifier"}},rr=new Ur;function wc(n){return/[áàâãéêíóôõúüçÁÀÂÃÉÊÍÓÔÕÚÜÇ]/.test(n)}function zc(n){let e=n.toLowerCase();if(e.endsWith("ar")||e.endsWith("er")||e.endsWith("ir")||e.endsWith("ando")||e.endsWith("endo")||e.endsWith("indo")||e.endsWith("ado")||e.endsWith("ido")||e.endsWith("ar-se")||e.endsWith("er-se")||e.endsWith("ir-se"))return!0;for(let t of n)if(wc(t))return!0;return!1}var hi=["-se","-me","-te","-nos","-vos"],Tc=[{ending:"ando",stem:"ar",confidence:.88,type:"gerund"},{ending:"ado",stem:"ar",confidence:.88,type:"participle"},{ending:"ada",stem:"ar",confidence:.88,type:"participle"},{ending:"ados",stem:"ar",confidence:.88,type:"participle"},{ending:"adas",stem:"ar",confidence:.88,type:"participle"},{ending:"o",stem:"ar",confidence:.75,type:"present"},{ending:"as",stem:"ar",confidence:.82,type:"present"},{ending:"a",stem:"ar",confidence:.75,type:"present"},{ending:"amos",stem:"ar",confidence:.85,type:"present"},{ending:"ais",stem:"ar",confidence:.85,type:"present"},{ending:"am",stem:"ar",confidence:.8,type:"present"},{ending:"ei",stem:"ar",confidence:.88,type:"past"},{ending:"aste",stem:"ar",confidence:.88,type:"past"},{ending:"ou",stem:"ar",confidence:.88,type:"past"},{ending:"\xE1mos",stem:"ar",confidence:.88,type:"past"},{ending:"amos",stem:"ar",confidence:.85,type:"past"},{ending:"astes",stem:"ar",confidence:.88,type:"past"},{ending:"aram",stem:"ar",confidence:.88,type:"past"},{ending:"ava",stem:"ar",confidence:.88,type:"past"},{ending:"avas",stem:"ar",confidence:.88,type:"past"},{ending:"\xE1vamos",stem:"ar",confidence:.88,type:"past"},{ending:"avamos",stem:"ar",confidence:.85,type:"past"},{ending:"\xE1veis",stem:"ar",confidence:.88,type:"past"},{ending:"aveis",stem:"ar",confidence:.85,type:"past"},{ending:"avam",stem:"ar",confidence:.88,type:"past"},{ending:"e",stem:"ar",confidence:.72,type:"subjunctive"},{ending:"es",stem:"ar",confidence:.78,type:"subjunctive"},{ending:"emos",stem:"ar",confidence:.82,type:"subjunctive"},{ending:"eis",stem:"ar",confidence:.82,type:"subjunctive"},{ending:"em",stem:"ar",confidence:.78,type:"subjunctive"},{ending:"a",stem:"ar",confidence:.75,type:"imperative"},{ending:"ai",stem:"ar",confidence:.85,type:"imperative"},{ending:"ar",stem:"ar",confidence:.92,type:"dictionary"}],Ec=[{ending:"endo",stem:"er",confidence:.88,type:"gerund"},{ending:"ido",stem:"er",confidence:.85,type:"participle"},{ending:"ida",stem:"er",confidence:.85,type:"participle"},{ending:"idos",stem:"er",confidence:.85,type:"participle"},{ending:"idas",stem:"er",confidence:.85,type:"participle"},{ending:"o",stem:"er",confidence:.72,type:"present"},{ending:"es",stem:"er",confidence:.78,type:"present"},{ending:"e",stem:"er",confidence:.72,type:"present"},{ending:"emos",stem:"er",confidence:.85,type:"present"},{ending:"eis",stem:"er",confidence:.82,type:"present"},{ending:"em",stem:"er",confidence:.78,type:"present"},{ending:"i",stem:"er",confidence:.85,type:"past"},{ending:"este",stem:"er",confidence:.88,type:"past"},{ending:"eu",stem:"er",confidence:.88,type:"past"},{ending:"emos",stem:"er",confidence:.85,type:"past"},{ending:"estes",stem:"er",confidence:.88,type:"past"},{ending:"eram",stem:"er",confidence:.88,type:"past"},{ending:"ia",stem:"er",confidence:.85,type:"past"},{ending:"ias",stem:"er",confidence:.85,type:"past"},{ending:"\xEDamos",stem:"er",confidence:.88,type:"past"},{ending:"iamos",stem:"er",confidence:.85,type:"past"},{ending:"\xEDeis",stem:"er",confidence:.88,type:"past"},{ending:"ieis",stem:"er",confidence:.85,type:"past"},{ending:"iam",stem:"er",confidence:.85,type:"past"},{ending:"er",stem:"er",confidence:.92,type:"dictionary"}],Pc=[{ending:"indo",stem:"ir",confidence:.88,type:"gerund"},{ending:"ido",stem:"ir",confidence:.85,type:"participle"},{ending:"ida",stem:"ir",confidence:.85,type:"participle"},{ending:"idos",stem:"ir",confidence:.85,type:"participle"},{ending:"idas",stem:"ir",confidence:.85,type:"participle"},{ending:"o",stem:"ir",confidence:.72,type:"present"},{ending:"es",stem:"ir",confidence:.78,type:"present"},{ending:"e",stem:"ir",confidence:.72,type:"present"},{ending:"imos",stem:"ir",confidence:.85,type:"present"},{ending:"is",stem:"ir",confidence:.82,type:"present"},{ending:"em",stem:"ir",confidence:.78,type:"present"},{ending:"i",stem:"ir",confidence:.85,type:"past"},{ending:"iste",stem:"ir",confidence:.88,type:"past"},{ending:"iu",stem:"ir",confidence:.88,type:"past"},{ending:"imos",stem:"ir",confidence:.85,type:"past"},{ending:"istes",stem:"ir",confidence:.88,type:"past"},{ending:"iram",stem:"ir",confidence:.88,type:"past"},{ending:"ia",stem:"ir",confidence:.85,type:"past"},{ending:"ias",stem:"ir",confidence:.85,type:"past"},{ending:"\xEDamos",stem:"ir",confidence:.88,type:"past"},{ending:"iamos",stem:"ir",confidence:.85,type:"past"},{ending:"\xEDeis",stem:"ir",confidence:.88,type:"past"},{ending:"ieis",stem:"ir",confidence:.85,type:"past"},{ending:"iam",stem:"ir",confidence:.85,type:"past"},{ending:"ir",stem:"ir",confidence:.92,type:"dictionary"}],Lc=[...Tc,...Ec,...Pc].sort((n,e)=>e.ending.length-n.ending.length),wt=class{constructor(){this.language="pt"}isNormalizable(e){return e.length<3?!1:zc(e)}normalize(e){let t=e.toLowerCase();if((t.endsWith("ar")||t.endsWith("er")||t.endsWith("ir"))&&!hi.some(a=>t.endsWith(a)))return Y(e);let r=this.tryReflexiveNormalization(t);if(r)return r;let i=this.tryConjugationNormalization(t);return i||Y(e)}tryReflexiveNormalization(e){for(let t of hi)if(e.endsWith(t)){let r=e.slice(0,-t.length);if(r.endsWith("ar")||r.endsWith("er")||r.endsWith("ir"))return O(r,.88,{removedSuffixes:[t],conjugationType:"reflexive"});let i=this.tryConjugationNormalization(r);if(i&&i.stem!==r)return O(i.stem,i.confidence*.95,{removedSuffixes:[t,...i.metadata?.removedSuffixes||[]],conjugationType:"reflexive"})}return null}tryConjugationNormalization(e){for(let t of Lc)if(e.endsWith(t.ending)){let r=e.slice(0,-t.ending.length);if(r.length<2)continue;let i=r+t.stem;return O(i,t.confidence,{removedSuffixes:[t.ending],conjugationType:t.type})}return null}},hy=new wt;function Cc(n){return{isLetter:r=>n.test(r),isIdentifierChar:r=>/[0-9]/.test(r)||n.test(r)}}var{isLetter:Rc,isIdentifierChar:Nc}=Cc(/[a-zA-ZáâãéêíóôõúçÁÂÃÉÊÍÓÔÕÚÇ]/),Ac=new Set(["em","a","de","para","com","sem","por","sobre","entre","antes","depois","dentro","fora","ao","do","da","no","na"]),Gr=class{constructor(){this.name="portuguese-keyword"}setContext(e){this.context=e}canExtract(e,t){return Rc(e[t])}extract(e,t){if(!this.context)throw new Error("PortugueseKeywordExtractor: context not set");let r=t,i="";for(;r<e.length&&Nc(e[r]);)i+=e[r++];if(!i)return null;let a=i.toLowerCase(),s=Ac.has(a),o=this.context.lookupKeyword(a),l=o&&o.normalized!==o.native?o.normalized:void 0,c;if(!o&&this.context.normalizer){let d=this.context.normalizer.normalize(i);if(d.stem!==i&&d.confidence>=.7){let p=this.context.lookupKeyword(d.stem);p&&(c=p.normalized)}}return{value:i,length:r-t,metadata:{normalized:l||c,isPreposition:s}}}};function vi(){return[new Gr]}var Mc=new Set(["em","a","de","desde","at\xE9","ate","com","sem","por","para","sobre","entre","antes","depois","dentro","fora","ao","do","no","na"]),Oc=[{native:"verdadeiro",normalized:"true"},{native:"falso",normalized:"false"},{native:"nulo",normalized:"null"},{native:"indefinido",normalized:"undefined"},{native:"primeiro",normalized:"first"},{native:"primeira",normalized:"first"},{native:"\xFAltimo",normalized:"last"},{native:"ultima",normalized:"last"},{native:"pr\xF3ximo",normalized:"next"},{native:"proximo",normalized:"next"},{native:"anterior",normalized:"previous"},{native:"maispr\xF3ximo",normalized:"closest"},{native:"maisproximo",normalized:"closest"},{native:"pai",normalized:"parent"},{native:"clique",normalized:"click"},{native:"click",normalized:"click"},{native:"entrada",normalized:"input"},{native:"mudan\xE7a",normalized:"change"},{native:"mudanca",normalized:"change"},{native:"envio",normalized:"submit"},{native:"tecla baixo",normalized:"keydown"},{native:"tecla cima",normalized:"keyup"},{native:"mouse sobre",normalized:"mouseover"},{native:"mouse fora",normalized:"mouseout"},{native:"foco",normalized:"focus"},{native:"desfoque",normalized:"blur"},{native:"carregar",normalized:"load"},{native:"rolagem",normalized:"scroll"},{native:"meu",normalized:"my"},{native:"minha",normalized:"my"},{native:"isso",normalized:"it"},{native:"segundo",normalized:"s"},{native:"segundos",normalized:"s"},{native:"milissegundo",normalized:"ms"},{native:"milissegundos",normalized:"ms"},{native:"minuto",normalized:"m"},{native:"minutos",normalized:"m"},{native:"hora",normalized:"h"},{native:"horas",normalized:"h"},{native:"senao",normalized:"else"},{native:"transicao",normalized:"transition"},{native:"ate",normalized:"until"},{native:"entao",normalized:"then"},{native:"lancar",normalized:"throw"},{native:"assincrono",normalized:"async"},{native:"padrao",normalized:"default"},{native:"at\xE9 que",normalized:"until"},{native:"dentro de",normalized:"into"}],Yr=class extends V{constructor(){super();this.language="pt";this.direction="ltr";this.initializeKeywordsFromProfile(Ge,Oc),this.setNormalizer(new wt),this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractors(vi()),this.registerExtractor(new K),this.registerExtractor(new q)}classifyToken(t){let r=t.toLowerCase();return Mc.has(r)?"particle":this.isKeyword(r)?"keyword":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||/^\d/.test(t)?"literal":t.startsWith("/")||t.startsWith("./")||t.startsWith("http")?"url":"identifier"}},nr=new Yr;function jc(n){let e=n.toLowerCase();return!!(e.endsWith("er")||e.endsWith("ir")||e.endsWith("re")||e.endsWith("ant")||e.endsWith("\xE9")||e.endsWith("i")||e.endsWith("u")||/[àâäéèêëïîôùûüÿçœæ]/i.test(n))}var Ic=["toi","vous","nous"],Wc=[{ending:"ant",stem:"er",confidence:.88,type:"gerund"},{ending:"\xE9",stem:"er",confidence:.88,type:"participle"},{ending:"\xE9e",stem:"er",confidence:.88,type:"participle"},{ending:"\xE9s",stem:"er",confidence:.88,type:"participle"},{ending:"\xE9es",stem:"er",confidence:.88,type:"participle"},{ending:"e",stem:"er",confidence:.75,type:"present"},{ending:"es",stem:"er",confidence:.78,type:"present"},{ending:"ons",stem:"er",confidence:.85,type:"present"},{ending:"ez",stem:"er",confidence:.85,type:"present"},{ending:"ent",stem:"er",confidence:.82,type:"present"},{ending:"ais",stem:"er",confidence:.82,type:"past"},{ending:"ait",stem:"er",confidence:.82,type:"past"},{ending:"ions",stem:"er",confidence:.85,type:"past"},{ending:"iez",stem:"er",confidence:.85,type:"past"},{ending:"aient",stem:"er",confidence:.85,type:"past"},{ending:"ai",stem:"er",confidence:.8,type:"past"},{ending:"as",stem:"er",confidence:.78,type:"past"},{ending:"a",stem:"er",confidence:.75,type:"past"},{ending:"\xE2mes",stem:"er",confidence:.88,type:"past"},{ending:"\xE2tes",stem:"er",confidence:.88,type:"past"},{ending:"\xE8rent",stem:"er",confidence:.88,type:"past"},{ending:"erai",stem:"er",confidence:.85,type:"future"},{ending:"eras",stem:"er",confidence:.85,type:"future"},{ending:"era",stem:"er",confidence:.82,type:"future"},{ending:"erons",stem:"er",confidence:.88,type:"future"},{ending:"erez",stem:"er",confidence:.88,type:"future"},{ending:"eront",stem:"er",confidence:.88,type:"future"},{ending:"erais",stem:"er",confidence:.85,type:"conditional"},{ending:"erait",stem:"er",confidence:.85,type:"conditional"},{ending:"erions",stem:"er",confidence:.88,type:"conditional"},{ending:"eriez",stem:"er",confidence:.88,type:"conditional"},{ending:"eraient",stem:"er",confidence:.88,type:"conditional"},{ending:"ions",stem:"er",confidence:.8,type:"subjunctive"},{ending:"iez",stem:"er",confidence:.8,type:"subjunctive"},{ending:"ons",stem:"er",confidence:.82,type:"imperative"},{ending:"ez",stem:"er",confidence:.82,type:"imperative"},{ending:"er",stem:"er",confidence:.92,type:"dictionary"}],Vc=[{ending:"issant",stem:"ir",confidence:.88,type:"gerund"},{ending:"i",stem:"ir",confidence:.8,type:"participle"},{ending:"ie",stem:"ir",confidence:.82,type:"participle"},{ending:"is",stem:"ir",confidence:.78,type:"participle"},{ending:"ies",stem:"ir",confidence:.82,type:"participle"},{ending:"is",stem:"ir",confidence:.78,type:"present"},{ending:"it",stem:"ir",confidence:.78,type:"present"},{ending:"issons",stem:"ir",confidence:.88,type:"present"},{ending:"issez",stem:"ir",confidence:.88,type:"present"},{ending:"issent",stem:"ir",confidence:.88,type:"present"},{ending:"issais",stem:"ir",confidence:.85,type:"past"},{ending:"issait",stem:"ir",confidence:.85,type:"past"},{ending:"issions",stem:"ir",confidence:.88,type:"past"},{ending:"issiez",stem:"ir",confidence:.88,type:"past"},{ending:"issaient",stem:"ir",confidence:.88,type:"past"},{ending:"irai",stem:"ir",confidence:.85,type:"future"},{ending:"iras",stem:"ir",confidence:.85,type:"future"},{ending:"ira",stem:"ir",confidence:.82,type:"future"},{ending:"irons",stem:"ir",confidence:.88,type:"future"},{ending:"irez",stem:"ir",confidence:.88,type:"future"},{ending:"iront",stem:"ir",confidence:.88,type:"future"},{ending:"ir",stem:"ir",confidence:.9,type:"dictionary"}],_c=[{ending:"ant",stem:"re",confidence:.82,type:"gerund"},{ending:"u",stem:"re",confidence:.8,type:"participle"},{ending:"ue",stem:"re",confidence:.82,type:"participle"},{ending:"us",stem:"re",confidence:.82,type:"participle"},{ending:"ues",stem:"re",confidence:.82,type:"participle"},{ending:"s",stem:"re",confidence:.72,type:"present"},{ending:"d",stem:"re",confidence:.75,type:"present"},{ending:"ons",stem:"re",confidence:.82,type:"present"},{ending:"ez",stem:"re",confidence:.82,type:"present"},{ending:"ent",stem:"re",confidence:.8,type:"present"},{ending:"re",stem:"re",confidence:.9,type:"dictionary"}],$c=[...Wc,...Vc,..._c].sort((n,e)=>e.ending.length-n.ending.length),zt=class{constructor(){this.language="fr"}isNormalizable(e){return e.length<3?!1:jc(e)}normalize(e){let t=e.toLowerCase();if((t.endsWith("er")||t.endsWith("ir")||t.endsWith("re"))&&t.length>=4)return Y(e);let r=this.tryReflexiveNormalization(t);if(r)return r;let i=this.tryConjugationNormalization(t);return i||Y(e)}tryReflexiveNormalization(e){for(let t of Ic){let r="-"+t;if(e.endsWith(r)){let i=e.slice(0,-r.length),a=this.tryConjugationNormalization(i);if(a&&a.stem!==i)return O(a.stem,a.confidence*.95,{removedSuffixes:[r,...a.metadata?.removedSuffixes||[]],conjugationType:"reflexive"})}}return null}tryConjugationNormalization(e){for(let t of $c)if(e.endsWith(t.ending)){let r=e.slice(0,-t.ending.length);if(r.length<2)continue;let i=r+t.stem;return O(i,t.confidence,{removedSuffixes:[t.ending],conjugationType:t.type})}return null}},Ly=new zt;function Kc(n){return{isLetter:r=>n.test(r),isIdentifierChar:r=>/[0-9]/.test(r)||n.test(r)}}var{isLetter:qc,isIdentifierChar:Bc}=Kc(/[a-zA-ZàâæçéèêëïîôùûüÿœÀÂÆÇÉÈÊËÏÎÔÙÛÜŸŒ]/),Dc=new Set(["\xE0","a","de","du","des","dans","sur","sous","avec","sans","par","pour","entre","avant","apr\xE8s","apres","depuis","vers","chez","contre","au","aux"]),Xr=class{constructor(){this.name="french-keyword"}setContext(e){this.context=e}canExtract(e,t){return qc(e[t])}extract(e,t){if(!this.context)throw new Error("FrenchKeywordExtractor: context not set");let r=t,i="";for(;r<e.length&&Bc(e[r]);)i+=e[r++];if(!i)return null;let a=i.toLowerCase(),s=Dc.has(a),o=this.context.lookupKeyword(a),l=o&&o.normalized!==o.native?o.normalized:void 0,c;if(!o&&this.context.normalizer){let d=this.context.normalizer.normalize(i);if(d.stem!==i&&d.confidence>=.7){let p=this.context.lookupKeyword(d.stem);p&&(c=p.normalized)}}return{value:i,length:r-t,metadata:{normalized:l||c,isPreposition:s}}}};function ki(){return[new Xr]}var Hc=[{native:"vrai",normalized:"true"},{native:"faux",normalized:"false"},{native:"nul",normalized:"null"},{native:"ind\xE9fini",normalized:"undefined"},{native:"indefini",normalized:"undefined"},{native:"premier",normalized:"first"},{native:"premi\xE8re",normalized:"first"},{native:"premiere",normalized:"first"},{native:"dernier",normalized:"last"},{native:"derni\xE8re",normalized:"last"},{native:"derniere",normalized:"last"},{native:"suivant",normalized:"next"},{native:"pr\xE9c\xE9dent",normalized:"previous"},{native:"precedent",normalized:"previous"},{native:"proche",normalized:"closest"},{native:"parent",normalized:"parent"},{native:"clic",normalized:"click"},{native:"click",normalized:"click"},{native:"entr\xE9e",normalized:"input"},{native:"entree",normalized:"input"},{native:"changement",normalized:"change"},{native:"soumission",normalized:"submit"},{native:"touche bas",normalized:"keydown"},{native:"touche haut",normalized:"keyup"},{native:"souris dessus",normalized:"mouseover"},{native:"souris dehors",normalized:"mouseout"},{native:"focus",normalized:"focus"},{native:"flou",normalized:"blur"},{native:"chargement",normalized:"load"},{native:"d\xE9filement",normalized:"scroll"},{native:"defilement",normalized:"scroll"},{native:"je",normalized:"me"},{native:"mon",normalized:"my"},{native:"ma",normalized:"my"},{native:"mes",normalized:"my"},{native:"\xE7a",normalized:"it"},{native:"ca",normalized:"it"},{native:"resultat",normalized:"result"},{native:"evenement",normalized:"event"},{native:"seconde",normalized:"s"},{native:"secondes",normalized:"s"},{native:"milliseconde",normalized:"ms"},{native:"millisecondes",normalized:"ms"},{native:"minute",normalized:"m"},{native:"minutes",normalized:"m"},{native:"heure",normalized:"h"},{native:"heures",normalized:"h"},{native:"prefixer",normalized:"prepend"},{native:"creer",normalized:"make"},{native:"definir",normalized:"set"},{native:"etablir",normalized:"set"},{native:"incrementer",normalized:"increment"},{native:"decrementer",normalized:"decrement"},{native:"declencher",normalized:"trigger"},{native:"defocaliser",normalized:"blur"},{native:"recuperer",normalized:"fetch"},{native:"repeter",normalized:"repeat"},{native:"arreter",normalized:"halt"},{native:"defaut",normalized:"default"},{native:"jusqua",normalized:"until"},{native:"apres",normalized:"after"},{native:"journaliser",normalized:"log"},{native:"transmuter",normalized:"morph"},{native:"tant que",normalized:"while"}],Zr=class extends V{constructor(){super();this.language="fr";this.direction="ltr";this.initializeKeywordsFromProfile(De,Hc),this.normalizer=new zt,this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractors(ki()),this.registerExtractor(new K),this.registerExtractor(new q)}classifyToken(t){return this.isKeyword(t)?"keyword":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||/^\d/.test(t)?"literal":["==","!=","<=",">=","<",">","&&","||","!"].includes(t)?"operator":t.startsWith("/")||t.startsWith("./")||t.startsWith("http")?"url":"identifier"}},ir=new Zr;var Fc=["an","auf","aus","ein","mit","vor","zu","ab","bei","nach","weg","um","her","hin"];function Uc(n){let e=n.toLowerCase();return!!(e.endsWith("en")||e.endsWith("eln")||e.endsWith("ern")||e.startsWith("ge")&&e.endsWith("t")||e.startsWith("ge")&&e.endsWith("en")||/[äöüß]/i.test(n))}var Gc=[{ending:"end",stem:"en",confidence:.88,type:"gerund"},{ending:"e",stem:"en",confidence:.75,type:"present"},{ending:"st",stem:"en",confidence:.8,type:"present"},{ending:"t",stem:"en",confidence:.78,type:"present"},{ending:"en",stem:"en",confidence:.85,type:"dictionary"},{ending:"test",stem:"en",confidence:.85,type:"past"},{ending:"ten",stem:"en",confidence:.82,type:"past"},{ending:"tet",stem:"en",confidence:.85,type:"past"},{ending:"te",stem:"en",confidence:.82,type:"past"},{ending:"test",stem:"en",confidence:.8,type:"subjunctive"},{ending:"ten",stem:"en",confidence:.78,type:"subjunctive"},{ending:"tet",stem:"en",confidence:.8,type:"subjunctive"},{ending:"te",stem:"en",confidence:.78,type:"subjunctive"},{ending:"e",stem:"en",confidence:.72,type:"imperative"},{ending:"t",stem:"en",confidence:.72,type:"imperative"},{ending:"en",stem:"en",confidence:.75,type:"imperative"}],Yc=[{ending:"le",stem:"eln",confidence:.82,type:"present"},{ending:"elst",stem:"eln",confidence:.85,type:"present"},{ending:"elt",stem:"eln",confidence:.85,type:"present"},{ending:"eln",stem:"eln",confidence:.88,type:"dictionary"},{ending:"re",stem:"ern",confidence:.82,type:"present"},{ending:"erst",stem:"ern",confidence:.85,type:"present"},{ending:"ert",stem:"ern",confidence:.85,type:"present"},{ending:"ern",stem:"ern",confidence:.88,type:"dictionary"}],Xc=[...Gc,...Yc].sort((n,e)=>e.ending.length-n.ending.length),Tt=class{constructor(){this.language="de"}isNormalizable(e){return e.length<3?!1:Uc(e)}normalize(e){let t=e.toLowerCase();if(t.endsWith("en")&&t.length>=4)return Y(e);if((t.endsWith("eln")||t.endsWith("ern"))&&t.length>=5)return Y(e);let r=this.tryParticipleNormalization(t);if(r)return r;let i=this.tryConjugationNormalization(t);return i||Y(e)}tryParticipleNormalization(e){for(let t of Fc)if(e.startsWith(t+"ge")){let r=e.slice(t.length),i=this.trySimpleParticipleNormalization(r);if(i){let a={removedPrefixes:["ge"],conjugationType:"participle"};return i.metadata?.removedSuffixes&&(a.removedSuffixes=i.metadata.removedSuffixes),O(t+i.stem,i.confidence*.95,a)}}return this.trySimpleParticipleNormalization(e)}trySimpleParticipleNormalization(e){if(!e.startsWith("ge"))return null;let t=e.slice(2);if(t.endsWith("t")&&t.length>=3){let r=t.slice(0,-1);return O(r+"en",.85,{removedPrefixes:["ge"],removedSuffixes:["t"],conjugationType:"participle"})}return t.endsWith("en")&&t.length>=4?O(t,.82,{removedPrefixes:["ge"],conjugationType:"participle"}):null}tryConjugationNormalization(e){for(let t of Xc)if(e.endsWith(t.ending)){let r=e.slice(0,-t.ending.length);if(r.length<2)continue;let i=r+t.stem;return O(i,t.confidence,{removedSuffixes:[t.ending],conjugationType:t.type})}return null}},_y=new Tt;function Zc(n){return{isLetter:r=>n.test(r),isIdentifierChar:r=>/[0-9]/.test(r)||n.test(r)}}var{isLetter:Jc,isIdentifierChar:Qc}=Zc(/[a-zA-ZäöüÄÖÜß]/),ep=new Set(["an","auf","aus","bei","durch","f\xFCr","fur","gegen","in","mit","nach","ohne","seit","\xFCber","uber","um","unter","von","vor","zu","zwischen","bis","gegen\xFCber","gegenuber","w\xE4hrend","wahrend","wegen","trotz","statt","innerhalb","au\xDFerhalb","ausserhalb"]),Jr=class{constructor(){this.name="german-keyword"}setContext(e){this.context=e}canExtract(e,t){return Jc(e[t])}extract(e,t){if(!this.context)throw new Error("GermanKeywordExtractor: context not set");return this.extractGermanWord(e,t)}extractGermanWord(e,t){if(!this.context)return null;let r=t,i="";for(;r<e.length&&Qc(e[r]);)i+=e[r++];if(!i)return null;let a=i.toLowerCase(),s=ep.has(a),o=this.context.lookupKeyword(i),l=o&&o.normalized!==o.native?o.normalized:void 0,c;if(!o&&this.context.normalizer){let d=this.context.normalizer.normalize(i);if(d.stem!==i&&d.confidence>=.7){let p=this.context.lookupKeyword(d.stem);p&&(c=p.normalized)}}return{value:i,length:r-t,metadata:{normalized:l||c,isPreposition:s}}}};function xi(){return[new Jr]}var tp=[{native:"wahr",normalized:"true"},{native:"falsch",normalized:"false"},{native:"null",normalized:"null"},{native:"undefiniert",normalized:"undefined"},{native:"erste",normalized:"first"},{native:"erster",normalized:"first"},{native:"erstes",normalized:"first"},{native:"letzte",normalized:"last"},{native:"letzter",normalized:"last"},{native:"letztes",normalized:"last"},{native:"n\xE4chste",normalized:"next"},{native:"nachste",normalized:"next"},{native:"n\xE4chstgelegene",normalized:"closest"},{native:"nachstgelegene",normalized:"closest"},{native:"vorherige",normalized:"previous"},{native:"eltern",normalized:"parent"},{native:"klick",normalized:"click"},{native:"click",normalized:"click"},{native:"eingabe",normalized:"input"},{native:"\xE4nderung",normalized:"change"},{native:"anderung",normalized:"change"},{native:"absenden",normalized:"submit"},{native:"taste unten",normalized:"keydown"},{native:"taste oben",normalized:"keyup"},{native:"maus dr\xFCber",normalized:"mouseover"},{native:"maus druber",normalized:"mouseover"},{native:"maus weg",normalized:"mouseout"},{native:"fokus",normalized:"focus"},{native:"unsch\xE4rfe",normalized:"blur"},{native:"unscharfe",normalized:"blur"},{native:"scrollen",normalized:"scroll"},{native:"meine",normalized:"my"},{native:"meinen",normalized:"my"},{native:"ergebnis",normalized:"result"},{native:"ziel",normalized:"target"},{native:"sekunde",normalized:"s"},{native:"sekunden",normalized:"s"},{native:"millisekunde",normalized:"ms"},{native:"millisekunden",normalized:"ms"},{native:"minute",normalized:"m"},{native:"minuten",normalized:"m"},{native:"stunde",normalized:"h"},{native:"stunden",normalized:"h"},{native:"hinzufugen",normalized:"add"},{native:"hinzufgen",normalized:"add"},{native:"loschen",normalized:"remove"},{native:"anhangen",normalized:"append"},{native:"erhohen",normalized:"increment"},{native:"ubergang",normalized:"transition"},{native:"auslosen",normalized:"trigger"},{native:"zuruckgeben",normalized:"return"},{native:"anschliessend",normalized:"then"},{native:"erh\xF6he",normalized:"increment"},{native:"erhohe",normalized:"increment"},{native:"verringere",normalized:"decrement"}],Qr=class extends V{constructor(){super();this.language="de";this.direction="ltr";this.initializeKeywordsFromProfile(qe,tp),this.normalizer=new Tt,this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractors(xi()),this.registerExtractor(new K),this.registerExtractor(new q)}classifyToken(t){return this.isKeyword(t)?"keyword":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||/^\d/.test(t)?"literal":t.startsWith("/")||t.startsWith("./")||t.startsWith("http")?"url":"identifier"}},ar=new Qr;var rp=new Set(["di","ke","dari","pada","dengan","tanpa","untuk","oleh","antara","sebelum","sesudah","setelah","selama","sampai","hingga","sejak","menuju","tentang","terhadap","melalui","dalam","luar"]),np=[{native:"benar",normalized:"true"},{native:"salah",normalized:"false"},{native:"null",normalized:"null"},{native:"kosong",normalized:"null"},{native:"tidakdidefinisikan",normalized:"undefined"},{native:"pertama",normalized:"first"},{native:"terakhir",normalized:"last"},{native:"berikutnya",normalized:"next"},{native:"sebelumnya",normalized:"previous"},{native:"terdekat",normalized:"closest"},{native:"induk",normalized:"parent"},{native:"klik",normalized:"click"},{native:"click",normalized:"click"},{native:"ubah",normalized:"change"},{native:"kirim",normalized:"submit"},{native:"tekan",normalized:"keydown"},{native:"arahkan",normalized:"mouseover"},{native:"tinggalkan",normalized:"mouseout"},{native:"kabur",normalized:"blur"},{native:"muat",normalized:"load"},{native:"gulir",normalized:"scroll"},{native:"input",normalized:"input"},{native:"milik",normalized:"my"},{native:"detik",normalized:"s"},{native:"milidetik",normalized:"ms"},{native:"menit",normalized:"m"},{native:"jam",normalized:"h"},{native:"atau",normalized:"or"},{native:"tidak",normalized:"not"},{native:"adalah",normalized:"is"},{native:"ada",normalized:"exists"}],en=class extends V{constructor(){super();this.language="id";this.direction="ltr";this.initializeKeywordsFromProfile(He,np),this.registerExtractors(G()),this.registerExtractor(new H),this.registerExtractor(new F),this.registerExtractors(ci()),this.registerExtractor(new K),this.registerExtractor(new q)}classifyToken(t){let r=t.toLowerCase();return rp.has(r)?"particle":this.isKeyword(r)?"keyword":/^\.(once|prevent|stop|debounce|throttle|queue)(\(.*\))?$/.test(t)?"event-modifier":t.startsWith("#")||t.startsWith(".")||t.startsWith("[")||t.startsWith("*")||t.startsWith("<")?"selector":t.startsWith('"')||t.startsWith("'")||/^\d/.test(t)?"literal":["==","!=","<=",">=","<",">","&&","||","!"].includes(t)?"operator":t.startsWith("/")||t.startsWith("./")||t.startsWith("http")?"url":"identifier"}},or=new en;function ie(n,e){return En(n,e)}function sr(){return br()}var cr=["if","unless","repeat","for","while"];function ke(n,e){let t=new Set([e]),i=I(n)?.keywords?.[e];if(i){i.primary&&t.add(i.primary.toLowerCase());for(let a of i.alternatives??[])t.add(a.toLowerCase())}return t}function de(n,e){return e.has(n.value.toLowerCase())?!0:n.normalized?e.has(n.normalized.toLowerCase()):!1}var ap=new Set(cr);function rn(n,e){let t=n.normalized?.toLowerCase();return t?ap.has(t):e.some(r=>de(n,r))}var bi=new Set(["me","it","you","the","body","window","document","its","event","result","target","self","this","them","parent","next","previous","closest","first","last"]),op=new Set(["destination","source","style","patient","on","from","to"]);function sp(n){if(!n||n.kind==="selector")return!1;let e=(n.normalized??n.value).toLowerCase(),t=n.value.toLowerCase();return!(bi.has(e)||bi.has(t)||op.has(e))}var Si=new Set(["ja","ko"]);function tn(n){let e=new Set;n?.primary&&e.add(n.primary.toLowerCase());for(let t of n?.alternatives??[])e.add(t.toLowerCase());return e}function zi(n,e){let t=[],r=e.position.end,i=n.slice(e.position.end).match(/^\s*\(([^)]*)\)/);if(i){r=e.position.end+i[0].length;for(let a of i[1].split(/[,،、]/)){let s=a.trim();s&&t.push(s)}}return{parameters:t,headerEnd:r}}function Ti(n,e,t){let r=e+1;if(r>=n.length)return-1;let i=tn(I(t)?.roleMarkers?.patient);return i.size>0&&de(n[r],i)&&r++,r<n.length?r:-1}function Ei(n,e,t){if(!I(e))return null;let r=ke(e,"behavior"),i=ke(e,"def"),a=n.toLowerCase(),s=[...r].some(d=>a.includes(d)),o=/\bdef\b/.test(a)||[...i].some(d=>d!=="def"&&a.includes(d));if(!s&&!o)return null;let l=ie(n,e).tokens;if(l.length<2)return null;if(de(l[0],r))return wi(n,e,l,t,0);let c=l.findIndex((d,p)=>p>0&&de(d,r));return c>0&&/^[A-Z][A-Za-z0-9_]*$/.test(l[0].value)?wi(n,e,l,t,c):de(l[0],i)?lp(n,e,l,t):null}function Pi(n,e,t){let r=I(e);if(!r)return null;let i=r.wordOrder!=="SOV",a=Si.has(e)?tn(r.roleMarkers?.event):new Set,s=Si.has(e)?tn(r.keywords?.on):new Set,o=a.size>0&&s.size>0,l=ke(e,"end"),c=ke(e,"on"),d=n.toLowerCase(),p=[...l].some(k=>d.includes(k)),u=(i||o)&&(()=>{let k=0;for(let T of c)if(T){for(let v=d.indexOf(T);v>=0;v=d.indexOf(T,v+T.length))if(++k>=2)return!0}return!1})();if(!p&&!u)return null;let m=ie(n,e).tokens;if(m.length<2)return null;let f=cr.map(k=>ke(e,k)),y=k=>rn(k,f),g=k=>de(k,l),h=[],b=0,z=0;for(let k=0;k<m.length;k++){let T=m[k];if(g(T)){if(b>0){b--;continue}let v=n.slice(m[z].position.start,T.position.start).trim();v&&h.push(v),z=k+1}else if(y(T))b++;else if(i&&b===0&&k>z&&de(T,c)&&sp(m[k+1])){let v=n.slice(m[z].position.start,T.position.start).trim();v&&h.push(v),z=k}else if(o&&b===0&&k-1>z&&de(T,a)&&m[k+1]!==void 0&&de(m[k+1],s)){let v=m[k-1],S=n.slice(m[z].position.start,v.position.start).trim();S&&h.push(S),z=k-1}}if(z<m.length){let k=n.slice(m[z].position.start).trim();k&&h.push(k)}if(h.length<2)return null;let E=[],x=[];for(let k of h){let T;try{T=t.statement(k,e)}catch{return null}if(!T||T.kind!=="event-handler")return null;let v=T;E.push(v);let S=!v.body||v.body.length===0;x.push(S?.2:v.metadata?.confidence??.75)}return pt(E,"then",{sourceLanguage:e,confidence:lr(x),sourceText:n})}function lr(n){return n.length>0?n.reduce((e,t)=>e+t,0)/n.length:0}function Li(n){let e=[];for(let t of n){let r=t.statements;t.kind==="compound"&&Array.isArray(r)?e.push(...r):e.push(t)}return e}function wi(n,e,t,r,i){let a=i>0,s=a?0:Ti(t,i,e);if(s<0)return null;let o=t[s],l=o.value;if(!/^[A-Z][A-Za-z0-9_]*$/.test(l))return null;let{parameters:c,headerEnd:d}=zi(n,o),p=a?i+1:t.findIndex(v=>v.position.start>=d);p<=s&&(p=s+1);let u=ke(e,"init"),m=ke(e,"end"),f=cr.map(v=>ke(e,v)),y=v=>rn(v,f),g=v=>de(v,m),h=[],b=[],z=[],E=!1,x=0,k=p;for(let v=p;v<t.length;v++){let S=t[v];if(g(S)){if(x>0){x--;continue}if(v===k){E=!0;break}if(de(t[k],u)){let L=n.slice(t[k].position.end,S.position.start).trim();if(L)try{let P=Li(r.body(L,e));b.push(...P),z.push(lr(P.map(j=>j.metadata?.confidence??.75)))}catch{z.push(0)}}else{let L=n.slice(t[k].position.start,S.position.start).trim();try{let P=r.statement(L,e);if(P&&P.kind==="event-handler"){let j=P;h.push(j);let A=!j.body||j.body.length===0;z.push(A?.2:j.metadata?.confidence??.75)}else z.push(0)}catch{z.push(0)}}k=v+1}else y(S)&&x++}if(h.length===0&&b.length===0)return null;let T=(E?1:.8)*lr(z);return $n(l,c,h,b.length>0?b:void 0,{sourceLanguage:e,confidence:T,sourceText:n})}function lp(n,e,t,r){let i=Ti(t,0,e);if(i<0)return null;let a=t[i],s=a.value;if(!/^[a-zA-Z_$][\w$]*(?:\.[a-zA-Z_$][\w$]*)*$/.test(s))return null;let{parameters:o,headerEnd:l}=zi(n,a),c=t.findIndex(x=>x.position.start>=l);c<=i&&(c=i+1);let d=ke(e,"end"),p=cr.map(x=>ke(e,x)),u=x=>rn(x,p),m=x=>de(x,d),f=0,y=-1;for(let x=c;x<t.length;x++)if(m(t[x])){if(f===0){y=x;break}f--}else u(t[x])&&f++;let g=t[c]?.position.start??l,h=y>=0?t[y].position.start:n.length,b=n.slice(g,h).trim();if(!b)return null;let z;try{z=Li(r.body(b,e))}catch{return null}if(z.length===0)return null;let E=lr(z.map(x=>x.metadata?.confidence??.75));return y<0&&(E*=.8),Kn(s,o,z,{sourceLanguage:e,confidence:E,sourceText:n})}var Ie={ko:{\uD074\uB9AD:"click",\uC785\uB825:"input",\uBCC0\uACBD:"change",\uC81C\uCD9C:"submit",\uD0A4\uB2E4\uC6B4:"keydown",\uD0A4\uC5C5:"keyup",\uB9C8\uC6B0\uC2A4\uC624\uBC84:"mouseover",\uB9C8\uC6B0\uC2A4\uC544\uC6C3:"mouseout",\uB9C8\uC6B0\uC2A4\uB2E4\uC6B4:"mousedown",\uB9C8\uC6B0\uC2A4\uC5C5:"mouseup",\uD3EC\uCEE4\uC2A4:"focus",\uBE14\uB7EC:"blur",\uB85C\uB4DC:"load",\uB9AC\uC0AC\uC774\uC988:"resize",\uC2A4\uD06C\uB864:"scroll"},ja:{\u30AF\u30EA\u30C3\u30AF:"click",\u5165\u529B:"input",\u5909\u66F4:"change",\u9001\u4FE1:"submit",\u30AD\u30FC\u30C0\u30A6\u30F3:"keydown",\u30AD\u30FC\u30A2\u30C3\u30D7:"keyup",\u30AD\u30FC\u30D7\u30EC\u30B9:"keypress",\u30DE\u30A6\u30B9\u30AA\u30FC\u30D0\u30FC:"mouseover",\u30DE\u30A6\u30B9\u30A2\u30A6\u30C8:"mouseout",\u30DE\u30A6\u30B9\u62BC\u4E0B:"mousedown",\u30DE\u30A6\u30B9\u89E3\u653E:"mouseup",\u30D5\u30A9\u30FC\u30AB\u30B9:"focus",\u30D6\u30E9\u30FC:"blur",\u30ED\u30FC\u30C9:"load",\u8AAD\u307F\u8FBC\u307F:"load",\u30B5\u30A4\u30BA\u5909\u66F4:"resize",\u30B9\u30AF\u30ED\u30FC\u30EB:"scroll"},ar:{\u0627\u0644\u0646\u0642\u0631:"click",\u0646\u0642\u0631:"click",\u0627\u0644\u0625\u062F\u062E\u0627\u0644:"input",\u0625\u062F\u062E\u0627\u0644:"input",\u0627\u0644\u062A\u063A\u064A\u064A\u0631:"change",\u062A\u063A\u064A\u064A\u0631:"change",\u0627\u0644\u0625\u0631\u0633\u0627\u0644:"submit",\u0625\u0631\u0633\u0627\u0644:"submit","\u0636\u063A\u0637 \u0627\u0644\u0645\u0641\u062A\u0627\u062D":"keydown","\u0631\u0641\u0639 \u0627\u0644\u0645\u0641\u062A\u0627\u062D":"keyup","\u062A\u0645\u0631\u064A\u0631 \u0627\u0644\u0645\u0627\u0648\u0633":"mouseover",\u0627\u0644\u062A\u0631\u0643\u064A\u0632:"focus",\u062A\u062D\u0645\u064A\u0644:"load",\u062A\u0645\u0631\u064A\u0631:"scroll"},es:{clic:"click",click:"click",entrada:"input",cambio:"change",env\u00EDo:"submit",enviar:"submit","tecla abajo":"keydown","tecla arriba":"keyup","rat\xF3n encima":"mouseover","rat\xF3n fuera":"mouseout",enfoque:"focus",desenfoque:"blur",carga:"load",desplazamiento:"scroll"},tr:{t\u0131klama:"click",t\u0131kla:"click",t\u0131k:"click",giri\u015F:"input",girdi:"input",de\u011Fi\u015Fiklik:"change",de\u011Fi\u015Fim:"change",g\u00F6nderme:"submit",g\u00F6nder:"submit",tu\u015Fbasma:"keydown",tu\u015Fb\u0131rakma:"keyup",fare_bas:"mousedown",fare_b\u0131rak:"mouseup",farei\u00E7inde:"mouseover",fared\u0131\u015F\u0131nda:"mouseout",odaklanma:"focus",odak:"focus",bulan\u0131kl\u0131k:"blur",y\u00FCkleme:"load",y\u00FCkle:"load",boyutland\u0131rma:"resize",boyutland\u0131r:"resize",kayd\u0131rma:"scroll"},pt:{clique:"click",clicar:"click",click:"click",entrada:"input",inserir:"input",mudan\u00E7a:"change",mudanca:"change",alterar:"change",envio:"submit",enviar:"submit","tecla baixo":"keydown","tecla cima":"keyup","pressionar tecla":"keydown","soltar tecla":"keyup","mouse sobre":"mouseover","mouse fora":"mouseout",foco:"focus",focar:"focus",desfoque:"blur",desfocar:"blur",carregar:"load",carregamento:"load",rolagem:"scroll",rolar:"scroll"},zh:{\u70B9\u51FB:"click",\u5355\u51FB:"click",\u53CC\u51FB:"dblclick",\u8F93\u5165:"input",\u6539\u53D8:"change",\u53D8\u5316:"change",\u53D8\u66F4:"change",\u63D0\u4EA4:"submit",\u53D1\u9001:"submit",\u6309\u952E:"keydown",\u952E\u5165:"keydown",\u677E\u952E:"keyup",\u9F20\u6807\u8FDB\u5165:"mouseover",\u9F20\u6807\u79FB\u5165:"mouseover",\u9F20\u6807\u79BB\u5F00:"mouseout",\u9F20\u6807\u79FB\u51FA:"mouseout",\u7126\u70B9:"focus",\u805A\u7126:"focus",\u5931\u7126:"blur",\u6A21\u7CCA:"blur",\u52A0\u8F7D:"load",\u8F7D\u5165:"load",\u6EDA\u52A8:"scroll"},fr:{clic:"click",cliquer:"click",click:"click",saisie:"input",entr\u00E9e:"input",changement:"change",changer:"change",soumettre:"submit",soumission:"submit",envoi:"submit","touche bas":"keydown","touche haut":"keyup","souris dessus":"mouseover","souris dehors":"mouseout",focus:"focus",focaliser:"focus",d\u00E9focus:"blur",d\u00E9focaliser:"blur",chargement:"load",charger:"load",d\u00E9filement:"scroll",d\u00E9filer:"scroll"},de:{klick:"click",klicken:"click",click:"click",eingabe:"input",eingeben:"input",\u00E4nderung:"change",\u00E4ndern:"change",absenden:"submit",einreichen:"submit","taste runter":"keydown","taste hoch":"keyup","maus \xFCber":"mouseover","maus raus":"mouseout",fokus:"focus",fokussieren:"focus",defokussieren:"blur",unsch\u00E4rfe:"blur",laden:"load",ladung:"load",scrollen:"scroll",bl\u00E4ttern:"scroll"},id:{klik:"click",click:"click",masukan:"input",input:"input",ubah:"change",perubahan:"change",kirim:"submit","tekan tombol":"keydown","lepas tombol":"keyup","mouse masuk":"mouseover","mouse keluar":"mouseout",fokus:"focus",blur:"blur",muat:"load",memuat:"load",gulir:"scroll",menggulir:"scroll"},bn:{\u0995\u09CD\u09B2\u09BF\u0995:"click",\u0987\u09A8\u09AA\u09C1\u099F:"input",\u099C\u09AE\u09BE:"submit",\u09B2\u09CB\u09A1:"load",\u09B8\u09CD\u0995\u09CD\u09B0\u09CB\u09B2:"scroll",\u09B0\u09BF\u09B8\u09BE\u0987\u099C:"resize",\u099D\u09BE\u09AA\u09B8\u09BE:"blur",\u09AB\u09CB\u0995\u09BE\u09B8:"focus",\u09AA\u09B0\u09BF\u09AC\u09B0\u09CD\u09A4\u09A8:"change"},qu:{click:"click","\xF1it'iy":"click",\u00F1itiy:"click",yaykuchiy:"input",yaykuy:"input",tikray:"change","t'ikray":"change",apachiy:"submit",kachay:"submit","llave uray":"keydown","llave hawa":"keyup","q'away":"focus",qhaway:"focus",paqariy:"blur","mana q'away":"blur",cargay:"load",apakuy:"load",apamuy:"load",kunray:"scroll",muyuy:"scroll",hatun_kay:"resize"},sw:{bofya:"click",click:"click",kubofya:"click",ingiza:"input",kubadilisha:"change",mabadiliko:"change",tuma:"submit",kutuma:"submit","bonyeza chini":"keydown","bonyeza juu":"keyup","panya juu":"mouseover","panya nje":"mouseout",lenga:"focus",kulenga:"focus",blur:"blur",pakia:"load",kupakia:"load",sogeza:"scroll",kusogeza:"scroll"}};var cp=Object.fromEntries(Object.entries(Ie).map(([n,e])=>{let t={};for(let[r,i]of Object.entries(e))i in t||(t[i]=r);return[n,t]})),pp={ar:new Set(["mouseover"]),bn:new Set(["resize"]),de:new Set(["keydown","keyup","load","mouseout","mouseover"]),fr:new Set(["blur"]),id:new Set(["input","keyup","mouseout","mouseover"]),ja:new Set(["keypress","mousedown","mouseup","resize"]),qu:new Set(["change","focus","load","resize","submit"]),sw:new Set(["change","click","input","keydown","keyup","mouseout","mouseover","submit"]),tr:new Set(["keydown","keyup","load","mousedown","mouseout","mouseover","mouseup","resize","scroll"]),zh:new Set(["focus","keyup","mouseout","mouseover"])};function Ci(n,e){return pp[e]?.has(n)?n:cp[e]?.[n]??n}function dp(){return[{id:"event-handler-bn-sov",language:"bn",command:"on",priority:100,template:{format:"{event} \u09A4\u09C7 {action}",tokens:[{type:"role",role:"event"},{type:"literal",value:"\u09A4\u09C7",alternatives:["\u098F"]},{type:"role",role:"action"}]},extraction:{event:{position:0},action:{position:2}}},{id:"event-handler-bn-with-source",language:"bn",command:"on",priority:95,template:{format:"{source} \u09A5\u09C7\u0995\u09C7 {event} \u09A4\u09C7 {action}",tokens:[{type:"role",role:"source"},{type:"literal",value:"\u09A5\u09C7\u0995\u09C7"},{type:"role",role:"event"},{type:"literal",value:"\u09A4\u09C7",alternatives:["\u098F"]},{type:"role",role:"action"}]},extraction:{source:{position:0},event:{marker:"\u09A4\u09C7",position:2},action:{position:4}}},{id:"event-handler-bn-when",language:"bn",command:"on",priority:90,template:{format:"\u09AF\u0996\u09A8 {event} {action}",tokens:[{type:"literal",value:"\u09AF\u0996\u09A8"},{type:"role",role:"event"},{type:"role",role:"action"}]},extraction:{event:{position:1},action:{position:2}}}]}function up(){return[{id:"event-de-wenn-source",language:"de",command:"on",priority:115,template:{format:"wenn {event} von {source} {body}",tokens:[{type:"literal",value:"wenn",alternatives:["falls","sobald"]},{type:"role",role:"event"},{type:"literal",value:"von",alternatives:["aus"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"von",markerAlternatives:["aus"]}}},{id:"event-de-wenn",language:"de",command:"on",priority:105,template:{format:"wenn {event} {body}",tokens:[{type:"literal",value:"wenn",alternatives:["falls","sobald"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-de-bei-source",language:"de",command:"on",priority:110,template:{format:"bei {event} von {source} {body}",tokens:[{type:"literal",value:"bei",alternatives:["beim"]},{type:"role",role:"event"},{type:"literal",value:"von",alternatives:["aus"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"von",markerAlternatives:["aus"]}}},{id:"event-de-bei",language:"de",command:"on",priority:100,template:{format:"bei {event} {body}",tokens:[{type:"literal",value:"bei",alternatives:["beim"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-de-auf",language:"de",command:"on",priority:95,template:{format:"auf {event} {body}",tokens:[{type:"literal",value:"auf"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-de-im-falle",language:"de",command:"on",priority:90,template:{format:"im Falle von {event} {body}",tokens:[{type:"literal",value:"im Falle von",alternatives:["im Fall von"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function mp(){return[{id:"event-en-when-source",language:"en",command:"on",priority:115,template:{format:"when {event} from {source} {body}",tokens:[{type:"literal",value:"when"},{type:"role",role:"event"},{type:"literal",value:"from"},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"from"}}},{id:"event-en-when",language:"en",command:"on",priority:105,template:{format:"when {event} {body}",tokens:[{type:"literal",value:"when"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-en-source",language:"en",command:"on",priority:110,template:{format:"on {event} from {source} {body}",tokens:[{type:"literal",value:"on"},{type:"role",role:"event"},{type:"literal",value:"from"},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"from"}}},{id:"event-en-standard",language:"en",command:"on",priority:100,template:{format:"on {event} {body}",tokens:[{type:"literal",value:"on"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-en-upon",language:"en",command:"on",priority:98,template:{format:"upon {event} {body}",tokens:[{type:"literal",value:"upon"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-en-if",language:"en",command:"on",priority:95,template:{format:"if {event} {body}",tokens:[{type:"literal",value:"if"},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function fp(){return[{id:"event-es-native-al-source",language:"es",command:"on",priority:115,template:{format:"al {event} en {source} {body}",tokens:[{type:"literal",value:"al"},{type:"role",role:"event"},{type:"literal",value:"en",alternatives:["de"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"en",markerAlternatives:["de"]}}},{id:"event-es-cuando-source",language:"es",command:"on",priority:112,template:{format:"cuando {event} en {source} {body}",tokens:[{type:"literal",value:"cuando"},{type:"role",role:"event"},{type:"literal",value:"en",alternatives:["de"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"en",markerAlternatives:["de"]}}},{id:"event-es-native-al",language:"es",command:"on",priority:108,template:{format:"al {event} {body}",tokens:[{type:"literal",value:"al"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-es-standard",language:"es",command:"on",priority:100,template:{format:"en {event} {body}",tokens:[{type:"literal",value:"en",alternatives:["al","cuando"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-es-source",language:"es",command:"on",priority:110,template:{format:"en {event} desde {source} {body}",tokens:[{type:"literal",value:"en",alternatives:["al"]},{type:"role",role:"event"},{type:"literal",value:"desde",alternatives:["de"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"desde",markerAlternatives:["de"]}}},{id:"event-es-when",language:"es",command:"on",priority:95,template:{format:"cuando {event} {body}",tokens:[{type:"literal",value:"cuando"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-es-conditional-si",language:"es",command:"on",priority:85,template:{format:"si {event} {body}",tokens:[{type:"literal",value:"si"},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function yp(){return[{id:"event-fr-quand-source",language:"fr",command:"on",priority:115,template:{format:"quand {event} de {source} {body}",tokens:[{type:"literal",value:"quand",alternatives:["lorsque"]},{type:"role",role:"event"},{type:"literal",value:"de",alternatives:["depuis"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"de",markerAlternatives:["depuis"]}}},{id:"event-fr-quand",language:"fr",command:"on",priority:105,template:{format:"quand {event} {body}",tokens:[{type:"literal",value:"quand",alternatives:["lorsque"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-fr-sur-source",language:"fr",command:"on",priority:110,template:{format:"sur {event} de {source} {body}",tokens:[{type:"literal",value:"sur",alternatives:["lors de"]},{type:"role",role:"event"},{type:"literal",value:"de",alternatives:["depuis"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"de",markerAlternatives:["depuis"]}}},{id:"event-fr-sur",language:"fr",command:"on",priority:100,template:{format:"sur {event} {body}",tokens:[{type:"literal",value:"sur",alternatives:["lors de"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-fr-si",language:"fr",command:"on",priority:95,template:{format:"si {event} {body}",tokens:[{type:"literal",value:"si"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-fr-a",language:"fr",command:"on",priority:90,template:{format:"\xE0 {event} {body}",tokens:[{type:"literal",value:"\xE0",alternatives:["au"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function gp(){return[{id:"event-hi-standard",language:"hi",command:"on",priority:100,template:{format:"{event} \u092A\u0930",tokens:[{type:"role",role:"event"},{type:"literal",value:"\u092A\u0930",alternatives:["\u092E\u0947\u0902","\u091C\u092C"]}]},extraction:{event:{position:0}}},{id:"event-hi-with-source",language:"hi",command:"on",priority:95,template:{format:"{source} \u0938\u0947 {event} \u092A\u0930",tokens:[{type:"role",role:"source"},{type:"literal",value:"\u0938\u0947"},{type:"role",role:"event"},{type:"literal",value:"\u092A\u0930",alternatives:["\u092E\u0947\u0902","\u091C\u092C"]}]},extraction:{source:{position:0},event:{marker:"\u0938\u0947",position:2}}},{id:"event-hi-bare",language:"hi",command:"on",priority:80,template:{format:"{event}",tokens:[{type:"role",role:"event"}]},extraction:{event:{position:0}}}]}function hp(){return[{id:"event-id-ketika-source",language:"id",command:"on",priority:115,template:{format:"ketika {event} dari {source} {body}",tokens:[{type:"literal",value:"ketika",alternatives:["saat","waktu"]},{type:"role",role:"event"},{type:"literal",value:"dari"},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"dari"}}},{id:"event-id-ketika",language:"id",command:"on",priority:105,template:{format:"ketika {event} {body}",tokens:[{type:"literal",value:"ketika",alternatives:["saat","waktu"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-id-pada-source",language:"id",command:"on",priority:110,template:{format:"pada {event} dari {source} {body}",tokens:[{type:"literal",value:"pada"},{type:"role",role:"event"},{type:"literal",value:"dari"},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"dari"}}},{id:"event-id-pada",language:"id",command:"on",priority:100,template:{format:"pada {event} {body}",tokens:[{type:"literal",value:"pada"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-id-jika",language:"id",command:"on",priority:95,template:{format:"jika {event} {body}",tokens:[{type:"literal",value:"jika",alternatives:["kalau","apabila"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-id-bila",language:"id",command:"on",priority:90,template:{format:"bila {event} {body}",tokens:[{type:"literal",value:"bila"},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function vp(){return[{id:"event-handler-it-full",language:"it",command:"on",priority:100,template:{format:"su {event} {action}",tokens:[{type:"literal",value:"su",alternatives:["quando","al","on"]},{type:"role",role:"event"},{type:"role",role:"action"}]},extraction:{event:{position:1},action:{position:2}}},{id:"event-handler-it-from",language:"it",command:"on",priority:95,template:{format:"su {event} da {source} {action}",tokens:[{type:"literal",value:"su",alternatives:["quando","al","on"]},{type:"role",role:"event"},{type:"literal",value:"da",alternatives:["di"]},{type:"role",role:"source"},{type:"role",role:"action"}]},extraction:{event:{position:1},source:{marker:"da",markerAlternatives:["di"]},action:{position:-1}}}]}function kp(){return[{id:"event-ms-apabila",language:"ms",command:"on",priority:100,template:{format:"apabila {event} {body}",tokens:[{type:"literal",value:"apabila",alternatives:["bila","ketika"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-ms-apabila-source",language:"ms",command:"on",priority:110,template:{format:"apabila {event} dari {source} {body}",tokens:[{type:"literal",value:"apabila",alternatives:["bila","ketika"]},{type:"role",role:"event"},{type:"literal",value:"dari"},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"dari"}}}]}function xp(){return[{id:"event-handler-pl-full",language:"pl",command:"on",priority:100,template:{format:"gdy {event} na {source}",tokens:[{type:"literal",value:"gdy",alternatives:["kiedy","przy","na"]},{type:"role",role:"event"},{type:"group",optional:!0,tokens:[{type:"literal",value:"na",alternatives:["w","przy","z"]},{type:"role",role:"source"}]}]},extraction:{event:{position:1},source:{marker:"na",markerAlternatives:["w","przy","z"],default:{type:"reference",value:"me"}}}},{id:"event-handler-pl-simple",language:"pl",command:"on",priority:90,template:{format:"gdy {event}",tokens:[{type:"literal",value:"gdy",alternatives:["kiedy","przy","na"]},{type:"role",role:"event"}]},extraction:{event:{position:1},source:{default:{type:"reference",value:"me"}}}}]}function bp(){return[{id:"event-pt-ao-source",language:"pt",command:"on",priority:115,template:{format:"ao {event} em {source} {body}",tokens:[{type:"literal",value:"ao",alternatives:["\xE0"]},{type:"role",role:"event"},{type:"literal",value:"em",alternatives:["de","no","na"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"em",markerAlternatives:["de","no","na"]}}},{id:"event-pt-quando-source",language:"pt",command:"on",priority:110,template:{format:"quando {event} de {source} {body}",tokens:[{type:"literal",value:"quando"},{type:"role",role:"event"},{type:"literal",value:"de",alternatives:["em","no","na"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"de",markerAlternatives:["em","no","na"]}}},{id:"event-pt-ao",language:"pt",command:"on",priority:105,template:{format:"ao {event} {body}",tokens:[{type:"literal",value:"ao",alternatives:["\xE0"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-pt-quando",language:"pt",command:"on",priority:100,template:{format:"quando {event} {body}",tokens:[{type:"literal",value:"quando"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-pt-em",language:"pt",command:"on",priority:95,template:{format:"em {event} {body}",tokens:[{type:"literal",value:"em",alternatives:["no","na"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-pt-se",language:"pt",command:"on",priority:90,template:{format:"se {event} {body}",tokens:[{type:"literal",value:"se"},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function Sp(){return[{id:"event-qu-maykama",language:"qu",command:"on",priority:115,template:{format:"maykama {event} {body}",tokens:[{type:"literal",value:"maykama"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-qu-kaqtin",language:"qu",command:"on",priority:105,template:{format:"{event} kaqtin {body}",tokens:[{type:"role",role:"event"},{type:"literal",value:"kaqtin",alternatives:["qtin","ptin"]}]},extraction:{event:{position:0}}},{id:"event-qu-standard",language:"qu",command:"on",priority:100,template:{format:"{event} pi {body}",tokens:[{type:"role",role:"event"},{type:"literal",value:"pi",alternatives:["kaqpi","kaqpim"]}]},extraction:{event:{position:0}}}]}function wp(){return[{id:"event-handler-ru-full",language:"ru",command:"on",priority:100,template:{format:"\u043F\u0440\u0438 {event} \u043D\u0430 {source}",tokens:[{type:"literal",value:"\u043F\u0440\u0438",alternatives:["\u043A\u043E\u0433\u0434\u0430"]},{type:"role",role:"event"},{type:"group",optional:!0,tokens:[{type:"literal",value:"\u043D\u0430",alternatives:["\u0432","\u043E\u0442"]},{type:"role",role:"source"}]}]},extraction:{event:{position:1},source:{marker:"\u043D\u0430",markerAlternatives:["\u0432","\u043E\u0442"],default:{type:"reference",value:"me"}}}},{id:"event-handler-ru-simple",language:"ru",command:"on",priority:90,template:{format:"\u043F\u0440\u0438 {event}",tokens:[{type:"literal",value:"\u043F\u0440\u0438",alternatives:["\u043A\u043E\u0433\u0434\u0430"]},{type:"role",role:"event"}]},extraction:{event:{position:1},source:{default:{type:"reference",value:"me"}}}}]}function zp(){return[{id:"event-sw-unapo-source",language:"sw",command:"on",priority:115,template:{format:"unapo {event} kutoka {source} {body}",tokens:[{type:"literal",value:"unapo",alternatives:["wakati wa","wakati"]},{type:"role",role:"event"},{type:"literal",value:"kutoka"},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"kutoka"}}},{id:"event-sw-unapo",language:"sw",command:"on",priority:105,template:{format:"unapo {event} {body}",tokens:[{type:"literal",value:"unapo",alternatives:["wakati wa","wakati"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-sw-kwa-source",language:"sw",command:"on",priority:110,template:{format:"kwa {event} kutoka {source} {body}",tokens:[{type:"literal",value:"kwa"},{type:"role",role:"event"},{type:"literal",value:"kutoka"},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"kutoka"}}},{id:"event-sw-kwa",language:"sw",command:"on",priority:100,template:{format:"kwa {event} {body}",tokens:[{type:"literal",value:"kwa"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-sw-ikiwa",language:"sw",command:"on",priority:95,template:{format:"ikiwa {event} {body}",tokens:[{type:"literal",value:"ikiwa",alternatives:["kama"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-sw-baada-ya",language:"sw",command:"on",priority:90,template:{format:"baada ya {event} {body}",tokens:[{type:"literal",value:"baada ya"},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function Tp(){return[{id:"event-handler-th-svo",language:"th",command:"on",priority:100,template:{format:"\u0E40\u0E21\u0E37\u0E48\u0E2D {event} {action}",tokens:[{type:"literal",value:"\u0E40\u0E21\u0E37\u0E48\u0E2D",alternatives:["\u0E15\u0E2D\u0E19"]},{type:"role",role:"event"},{type:"role",role:"action"}]},extraction:{event:{position:1},action:{position:2}}},{id:"event-handler-th-with-source",language:"th",command:"on",priority:95,template:{format:"\u0E40\u0E21\u0E37\u0E48\u0E2D {event} \u0E08\u0E32\u0E01 {source} {action}",tokens:[{type:"literal",value:"\u0E40\u0E21\u0E37\u0E48\u0E2D",alternatives:["\u0E15\u0E2D\u0E19"]},{type:"role",role:"event"},{type:"literal",value:"\u0E08\u0E32\u0E01"},{type:"role",role:"source"},{type:"role",role:"action"}]},extraction:{event:{position:1},source:{marker:"\u0E08\u0E32\u0E01",position:3},action:{position:4}}}]}function nn(n){let e=n.verbAlts?{type:"literal",value:n.verb,alternatives:n.verbAlts}:{type:"literal",value:n.verb},t=n.eventMarkerAlts?{type:"literal",value:n.eventMarker,alternatives:n.eventMarkerAlts}:{type:"literal",value:n.eventMarker};return["before","after"].map(r=>{let i={type:"literal",value:r==="before"?n.before:n.after},a={type:"role",role:"patient"},s={type:"role",role:"destination"},o={type:"role",role:"event"},l=n.order==="verb-first"?[e,a,i,s,t,o]:[t,o,e,a,i,s],c=n.order==="verb-first"?{action:{value:"put"},patient:{position:1},destination:{position:3},event:{position:5},manner:{default:{type:"literal",value:r}}}:{action:{value:"put"},event:{position:1},patient:{position:3},destination:{position:5},manner:{default:{type:"literal",value:r}}};return{id:`put-event-${n.lang}-vso-${r}`,language:n.lang,command:"on",priority:160,template:{format:`${n.lang} put ${r}`,tokens:l},extraction:c}})}function Ep(){return[...nn({lang:"tl",verb:"ilagay",verbAlts:["maglagay"],eventMarker:"kapag",eventMarkerAlts:["sa"],before:"bago",after:"matapos",order:"verb-first"}),{id:"event-tl-kapag-source",language:"tl",command:"on",priority:115,template:{format:"kapag {event} mula_sa {source} {body}",tokens:[{type:"literal",value:"kapag",alternatives:["sa"]},{type:"role",role:"event"},{type:"literal",value:"mula_sa",alternatives:["galing_sa"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"mula_sa"}}},{id:"event-tl-kapag",language:"tl",command:"on",priority:105,template:{format:"kapag {event} {body}",tokens:[{type:"literal",value:"kapag",alternatives:["sa"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function Pp(){return[...nn({lang:"uk",verb:"\u043F\u043E\u043A\u043B\u0430\u0441\u0442\u0438",verbAlts:["\u043F\u043E\u043A\u043B\u0430\u0434\u0438","\u043F\u043E\u043C\u0456\u0441\u0442\u0438\u0442\u0438","\u043F\u043E\u043C\u0456\u0441\u0442\u0438","\u0432\u0441\u0442\u0430\u0432\u0438\u0442\u0438","\u0432\u0441\u0442\u0430\u0432"],eventMarker:"\u043F\u0440\u0438",eventMarkerAlts:["\u043A\u043E\u043B\u0438"],before:"\u0434\u043E",after:"\u043F\u0456\u0441\u043B\u044F",order:"event-first"}),{id:"event-handler-uk-full",language:"uk",command:"on",priority:100,template:{format:"\u043F\u0440\u0438 {event} \u043D\u0430 {source}",tokens:[{type:"literal",value:"\u043F\u0440\u0438",alternatives:["\u043A\u043E\u043B\u0438"]},{type:"role",role:"event"},{type:"group",optional:!0,tokens:[{type:"literal",value:"\u043D\u0430",alternatives:["\u0432","\u0432\u0456\u0434"]},{type:"role",role:"source"}]}]},extraction:{event:{position:1},source:{marker:"\u043D\u0430",markerAlternatives:["\u0432","\u0432\u0456\u0434"],default:{type:"reference",value:"me"}}}},{id:"event-handler-uk-simple",language:"uk",command:"on",priority:90,template:{format:"\u043F\u0440\u0438 {event}",tokens:[{type:"literal",value:"\u043F\u0440\u0438",alternatives:["\u043A\u043E\u043B\u0438"]},{type:"role",role:"event"}]},extraction:{event:{position:1},source:{default:{type:"reference",value:"me"}}}}]}function Lp(){return[{id:"event-handler-vi-full",language:"vi",command:"on",priority:100,template:{format:"khi {event} tr\xEAn {source}",tokens:[{type:"literal",value:"khi",alternatives:["l\xFAc","tr\xEAn"]},{type:"role",role:"event"},{type:"group",optional:!0,tokens:[{type:"literal",value:"tr\xEAn",alternatives:["t\u1EA1i"]},{type:"role",role:"source"}]}]},extraction:{event:{position:1},source:{marker:"tr\xEAn",markerAlternatives:["t\u1EA1i"],default:{type:"reference",value:"me"}}}},{id:"event-handler-vi-simple",language:"vi",command:"on",priority:90,template:{format:"khi {event}",tokens:[{type:"literal",value:"khi",alternatives:["l\xFAc","tr\xEAn"]},{type:"role",role:"event"}]},extraction:{event:{position:1},source:{default:{type:"reference",value:"me"}}}}]}function Cp(){return[{id:"event-zh-temporal-source",language:"zh",command:"on",priority:115,template:{format:"{event} \u7684\u65F6\u5019 \u4ECE {source} {body}",tokens:[{type:"role",role:"event"},{type:"literal",value:"\u7684\u65F6\u5019",alternatives:["\u65F6\u5019","\u65F6"]},{type:"literal",value:"\u4ECE",alternatives:["\u5728"]},{type:"role",role:"source"}]},extraction:{event:{position:0},source:{marker:"\u4ECE",markerAlternatives:["\u5728"]}}},{id:"event-zh-source",language:"zh",command:"on",priority:110,template:{format:"\u5F53 {event} \u4ECE {source} {body}",tokens:[{type:"literal",value:"\u5F53"},{type:"role",role:"event"},{type:"literal",value:"\u4ECE",alternatives:["\u5728"]},{type:"role",role:"source"}]},extraction:{event:{position:1},source:{marker:"\u4ECE",markerAlternatives:["\u5728"]}}},{id:"event-zh-immediate",language:"zh",command:"on",priority:108,template:{format:"\u4E00 {event} \u5C31 {body}",tokens:[{type:"literal",value:"\u4E00"},{type:"role",role:"event"},{type:"literal",value:"\u5C31"}]},extraction:{event:{position:1}}},{id:"event-zh-temporal",language:"zh",command:"on",priority:105,template:{format:"{event} \u7684\u65F6\u5019 {body}",tokens:[{type:"role",role:"event"},{type:"literal",value:"\u7684\u65F6\u5019",alternatives:["\u65F6\u5019","\u65F6"]}]},extraction:{event:{position:0}}},{id:"event-zh-whenever",language:"zh",command:"on",priority:103,template:{format:"\u6BCF\u5F53 {event} {body}",tokens:[{type:"literal",value:"\u6BCF\u5F53",alternatives:["\u6BCF\u6B21"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-zh-circumfix",language:"zh",command:"on",priority:106,template:{format:"\u5F53 {event} \u65F6 {body}",tokens:[{type:"literal",value:"\u5F53"},{type:"role",role:"event"},{type:"literal",value:"\u65F6",alternatives:["\u7684\u65F6\u5019","\u65F6\u5019"]}]},extraction:{event:{position:1}}},{id:"event-zh-standard",language:"zh",command:"on",priority:100,template:{format:"\u5F53 {event} {body}",tokens:[{type:"literal",value:"\u5F53"},{type:"role",role:"event"}]},extraction:{event:{position:1}}},{id:"event-zh-completion",language:"zh",command:"on",priority:95,template:{format:"{event} \u4E86 {body}",tokens:[{type:"role",role:"event"},{type:"literal",value:"\u4E86"}]},extraction:{event:{position:0}}},{id:"event-zh-conditional",language:"zh",command:"on",priority:90,template:{format:"\u5982\u679C {event} {body}",tokens:[{type:"literal",value:"\u5982\u679C",alternatives:["\u82E5","\u5047\u5982"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function Rp(){return[{id:"event-ja-when",language:"ja",command:"on",priority:95,template:{format:"\u3068\u304D {event} {body}",tokens:[{type:"literal",value:"\u3068\u304D",alternatives:["\u6642","\u3068\u304D\u306B"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function Np(){return[{id:"event-tr-when",language:"tr",command:"on",priority:95,template:{format:"iken {event} {body}",tokens:[{type:"literal",value:"iken",alternatives:["durumunda","oldu\u011Funda"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function Ap(){return[...nn({lang:"ar",verb:"\u0636\u0639",verbAlts:["\u0627\u062C\u0639\u0644"],eventMarker:"\u0639\u0646\u062F",eventMarkerAlts:["\u0641\u064A","\u0644\u062F\u0649","\u0639\u0646\u062F\u0645\u0627","\u062D\u064A\u0646","\u062D\u064A\u0646\u0645\u0627","\u0644\u0645\u0651\u0627","\u0644\u0645\u0627"],before:"\u0642\u0628\u0644",after:"\u0628\u0639\u062F",order:"verb-first"}),{id:"event-ar-when",language:"ar",command:"on",priority:95,template:{format:"\u0639\u0646\u062F\u0645\u0627 {event} {body}",tokens:[{type:"literal",value:"\u0639\u0646\u062F\u0645\u0627",alternatives:["\u062D\u064A\u0646","\u0644\u0645\u0651\u0627"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function Mp(){return[{id:"event-he-when",language:"he",command:"on",priority:95,template:{format:"\u05DB\u05D0\u05E9\u05E8 {event} {body}",tokens:[{type:"literal",value:"\u05DB\u05D0\u05E9\u05E8",alternatives:["\u05DB\u05E9"]},{type:"role",role:"event"}]},extraction:{event:{position:1}}}]}function Ri(n){switch(n){case"bn":return dp();case"de":return up();case"en":return mp();case"es":return fp();case"fr":return yp();case"hi":return gp();case"id":return hp();case"it":return vp();case"ms":return kp();case"pl":return xp();case"pt":return bp();case"qu":return Sp();case"ru":return wp();case"sw":return zp();case"th":return Tp();case"tl":return Ep();case"uk":return Pp();case"vi":return Lp();case"zh":return Cp();case"ja":return Rp();case"tr":return Np();case"ar":return Ap();case"he":return Mp();default:return[]}}var pr=class{render(e,t){if(e.kind==="compound")return this.renderCompound(e,t);if(e.kind==="behavior")return this.renderBehavior(e,t);if(e.kind==="def")return this.renderDef(e,t);let r=wr(t,e.action);if(r.length===0)return this.renderExplicit(e);let i=this.findBestPattern(e,r);return i?this.renderWithPattern(e,i):this.renderExplicit(e)}renderCompound(e,t){if(e.statements.length>1&&e.statements.every(a=>a.kind==="event-handler")){let a=this.keyword(t,"end"),s=[];for(let o of e.statements)s.push(this.render(o,t),a);return s.join(`
3
3
  `)}let r=e.statements.map(a=>this.render(a,t)),i=this.getChainWord(e.chainType,t);return r.join(` ${i} `)}keyword(e,t){return I(e)?.keywords?.[t]?.primary??t}renderBlockHeader(e,t,r){return r.length>0?`${e} ${t}(${r.join(", ")})`:`${e} ${t}`}renderBehavior(e,t){let r=this.keyword(t,"end"),i=[this.renderBlockHeader(this.keyword(t,"behavior"),e.name,e.parameters)];for(let a of e.eventHandlers)i.push(` ${this.render(a,t)}`,` ${r}`);if(e.initBlock&&e.initBlock.length>0){i.push(` ${this.keyword(t,"init")}`);for(let a of e.initBlock)i.push(` ${this.render(a,t)}`);i.push(` ${r}`)}return i.push(r),i.join(`
4
4
  `)}renderDef(e,t){let r=[this.renderBlockHeader(this.keyword(t,"def"),e.name,e.parameters)];for(let i of e.body)r.push(` ${this.render(i,t)}`);return r.push(this.keyword(t,"end")),r.join(`
5
5
  `)}getChainWord(e,t){let r=I(t);return r?.keywords?r.keywords[e]?.primary??e:e}renderExplicit(e){return ce(e)}supportedLanguages(){return sr()}findBestPattern(e,t){let r=t;if(e.kind==="event-handler"){let a=t.filter(s=>!/-event-/i.test(s.id));a.length>0&&(r=a)}let i=r.map(a=>{let s=a.priority;for(let o of a.template.tokens)o.type==="role"&&(e.roles.has(o.role)?s+=10:o.optional||(s-=50));return/-at-end|-at-start|-before$|-after$/i.test(a.id)&&(s-=30),a.language==="en"&&((a.id.includes("standard")||a.id.includes("en-source"))&&(s+=20),(a.id.includes("-when")||a.id.includes("-if")||a.id.includes("-upon"))&&(s-=15)),{pattern:a,score:s}});return i.sort((a,s)=>s.score-a.score),i.length>0?i[0].pattern:null}renderWithPattern(e,t){let r=[],i=t.language;for(let a of t.template.tokens){let s=this.renderPatternToken(a,e,i);s!==null&&r.push(s)}if(e.kind==="event-handler"){let a=e;if(a.body&&a.body.length>0){let s=a.body.map(o=>this.render(o,i));r.push(s.join(" "))}}return r.join(" ")}renderPatternToken(e,t,r){switch(e.type){case"literal":return e.value;case"role":{let i=t.roles.get(e.role);return i?e.role==="event"&&t.kind==="event-handler"?this.renderEventName(i,r):this.valueToNaturalString(i,r):(e.optional,null)}case"group":{if(!e.tokens.filter(o=>o.type==="role"&&!o.optional).every(o=>t.roles.has(o.role))&&e.optional)return null;if(e.optional&&e.tokens.find(l=>l.type==="role"&&l.role==="destination")){let l=t.roles.get("destination");if(l?.type==="reference"&&l.value==="me")return null}if(e.optional&&e.tokens.find(l=>l.type==="role"&&l.role==="quantity")){let l=t.roles.get("quantity");if(l?.type==="literal"&&Number(l.value)===1)return null}let a=[],s=!1;for(let o of e.tokens){let l=this.renderPatternToken(o,t,r);l!==null&&(a.push(l),o.type==="role"&&(s=!0))}return e.optional&&!s?null:a.length>0?a.join(" "):null}default:return null}}renderEventName(e,t){if(e.type!=="literal"||typeof e.value!="string")return this.valueToNaturalString(e,t);let r=e.value,i=a=>a.includes(":")?a:Ci(a,t);return r.includes(" or ")?r.split(" or ").map(a=>i(a.trim())).join(" or "):i(r)}valueToNaturalString(e,t="en"){switch(e.type){case"literal":return typeof e.value=="string"&&e.dataType==="string"?`"${e.value}"`:String(e.value);case"selector":return e.value;case"reference":return this.renderReference(e,t);case"property-path":return this.renderPropertyPath(e,t);case"expression":return e.raw;case"flag":return e.name}}renderReference(e,t){let r=I(t);return r?.references?r.references[e.value]??e.value:e.value}renderPropertyPath(e,t){let r=I(t),i=e.property,a=e.object.type==="reference"?e.object.value:null;if(r?.possessive?.specialForms&&a){let o=r.possessive.specialForms[a];if(o){let{markerPosition:l,usePossessiveAdjectives:c}=r.possessive;return c&&l==="after-object"?`${i} ${o}`:`${o} ${i}`}}let s=this.valueToNaturalString(e.object,t);if(r?.possessive){let{marker:o,markerPosition:l,usePossessiveAdjectives:c}=r.possessive;if(c&&a&&l==="after-object")return`${i} ${s}`;if(o)switch(l){case"between":return r.usesSpaces?`${s}${o} ${i}`:`${s}${o}${i}`;case"after-object":return`${s}${o} ${i}`;case"before-property":return`${s} ${o} ${i}`}}return t==="en"||!r?.possessive?s==="me"?`my ${i}`:s==="it"?`its ${i}`:`${s}'s ${i}`:`${s} ${i}`}},an=new pr;function Et(n,e){return an.render(n,e)}function Pt(n){return an.renderExplicit(n)}var Op={getSchema:me};function et(n){return jt(n,{schemaLookup:Op})}var tt=new Set(["if","unless","while","repeat","for"]),jp=new Set(["then","end","else","if","unless","while","for","repeat","and"]),Ip=new Set(["first","last","next","previous","random","closest"]),rt=new Set(["click","dblclick","input","change","submit","keydown","keyup","keypress","mouseover","mouseout","mousedown","mouseup","focus","blur","load","scroll","resize","contextmenu","transitionend","transitionstart","transitionrun","transitioncancel","animationend","animationstart","animationiteration","animationcancel","pointerdown","pointerup","pointermove","pointerenter","pointerleave","pointercancel","pointerover","pointerout","touchstart","touchend","touchmove","touchcancel","mousemove","mouseenter","mouseleave","wheel","dragstart","dragend","dragover","dragenter","dragleave","drop","drag","loadend","loadstart","error","abort","close","open","message","popstate","hashchange","storage","online","offline","visibilitychange"]),Lt=class extends Error{constructor(e,t,r,i){super(e),this.name="SemanticParseError",this.language=t,this.input=r,this.diagnostics=i}};function X(n,e,t){return{message:n,severity:e,source:"semantic-parser",...t&&{code:t}}}function se(n,e){return e.length===0?n:{...n,diagnostics:e}}function Ni(n){if(n.length>=2){let e=n[0];if((e==='"'||e==="'")&&n.endsWith(e))return n.slice(1,-1)}return n}var Wp=["body","statements","thenBranch","elseBranch","eventHandlers","initBlock"];function Ai(n,e){if(!n||typeof n!="object")return n;if(n.action&&n.roles instanceof Map){let r=me(n.action),i=r?.primaryRole;if(r&&i&&i!=="patient"&&!r.roles.some(a=>a.role==="patient")&&n.roles.has("patient")&&!n.roles.has(i)){let a=n.roles,s=a.get("patient");s!==void 0&&(a.delete("patient"),a.set(i,s))}if(n.action==="tell"){let a=n.roles,s=a.get("patient"),o=a.get("destination");s&&(s.type==="selector"||s.type==="reference")&&(!o||o.type==="literal")&&(a.delete("patient"),a.set("destination",s))}if(n.action==="transition"){let a=n.roles,s=a.get("destination");s&&s.type==="literal"&&!a.has("goal")&&(a.delete("destination"),a.set("goal",s));let o=a.get("patient");o&&o.type==="literal"&&typeof o.value=="string"&&/^[A-Za-z_][A-Za-z0-9_-]*$/.test(o.value)&&a.set("patient",{type:"expression",raw:o.value})}if(n.action==="morph"){let a=n.roles,s=a.get("patient");s&&s.type==="literal"&&typeof s.value=="string"&&/<[a-zA-Z][^>]*\/?>/.test(s.value)&&a.set("patient",{type:"expression",raw:s.value})}if(n.action==="wait"){let a=n.roles;if(!a.has("event")){let s=a.get("duration"),o=s?.type==="expression"?s.raw:s?.type==="literal"?s.value:void 0;typeof o=="string"&&rt.has(o.toLowerCase())&&(a.delete("duration"),a.set("event",{type:"literal",value:o,dataType:"string"}))}}if(n.kind==="command"&&n.action!=="on"){let a=n.roles,s=a.get("event");if(s&&s.type==="expression"){let o=s.raw;typeof o=="string"&&/^[A-Za-z_][A-Za-z0-9_-]*(:[A-Za-z0-9_-]+)?$/.test(o)&&a.set("event",{type:"literal",value:o,dataType:"string"})}}if(e?.size){let a=n.roles;for(let s of["destination","source"]){let o=a.get(s);o&&o.type==="literal"&&typeof o.value=="string"&&e.has(o.value)&&a.set(s,{type:"expression",raw:o.value})}}}let t=n;for(let r of Wp){let i=t[r];if(Array.isArray(i))for(let a of i)Ai(a,e)}return n}var R=class R{constructor(){this.parseDepth=0;this.boundIdentifiers=new Set}parse(e,t){this.parseDepth===0&&this.boundIdentifiers.clear(),this.parseDepth++;try{return Ai(this.parseInternal(e,t),this.boundIdentifiers)}finally{this.parseDepth--}}registerBoundIdentifiers(e){let t=e.action==="repeat"||e.action==="for"?"patient":e.action==="set"?"destination":null;if(!t)return;let r=e.roles.get(t);r?.type==="expression"&&typeof r.raw=="string"&&/^[A-Za-z_]\w*$/.test(r.raw)&&this.boundIdentifiers.add(r.raw)}parseInternal(e,t){let r=Ei(e,t,{statement:(v,S)=>this.parse(v,S),body:(v,S)=>this.parseStatements(v,S)});if(r)return r;let i=Pi(e,t,{statement:(v,S)=>this.parse(v,S),body:(v,S)=>this.parseStatements(v,S)});if(i)return i;let{modifiers:a,remainingInput:s}=this.extractStandaloneModifiers(e,t),o=s||e,c=this.stripAsyncModifier(o,t).remainingInput??o,p=this.stripDoNotThrowModifier(c,t).remainingInput??c,u=[],m=ie(p,t),f=le(t);if(f.length===0)throw new Lt(`No patterns available for language: ${t}`,t,p,[X(`No patterns registered for language '${t}'`,"error","no-patterns")]);let y=[...f].sort((v,S)=>S.priority-v.priority);{let v=m.tokens;if(I(t)?.wordOrder==="VSO"&&v.length>=4&&v[0]?.normalized==="source"){let S=v.findIndex(L=>L.normalized==="on");if(S>=2&&S+1<v.length){let L=p.slice(v[0].position.start,v[S].position.start).trim(),P=v[S+1].position.end,j=p.slice(v[S].position.start,P)+" "+L+p.slice(P);if(j!==p)try{let A=this.parse(j,t);if(A&&A.kind==="event-handler"){let M=a?this.applyModifiers(A,a):A;return se(M,u)}}catch{}}}}{let v=m.tokens;for(let S=1;S<v.length-1;S++){let L=v[S],P=L.value,j=(L.normalized??L.value).toLowerCase();if(!(j==="or"||R.OR_KEYWORDS.has(P)||R.OR_KEYWORDS.has(j)))continue;let M=v[S+1],B=(M.normalized??M.value).toLowerCase();if(!R.KNOWN_EVENTS.has(B))break;let W=S+1,Q=v[S+2];Q&&Q.kind==="selector"&&Q.value.startsWith("[")&&(W=S+2);let te=v[S].position.start,Re=v[W].position.end,fe=(p.slice(0,te).trimEnd()+" "+p.slice(Re).trimStart()).trim();if(fe&&fe!==p)try{let Ne=this.parse(fe,t);if(Ne&&Ne.kind==="event-handler"){Ne.additionalEvents=[{type:"literal",value:B}];let mr=a?this.applyModifiers(Ne,a):Ne;return se(mr,u)}}catch{}break}}let g=y.filter(v=>v.command==="on"),h=m.mark(),b=he.matchBest(m,g);if(b){u.push(X(`event pattern matched: ${b.pattern.id} (confidence: ${b.confidence.toFixed(2)})`,"info","pattern-match"));let v=!1;if(/^event-[a-z]+-bare$/.test(b.pattern.id)){let S=b.captured.get("event"),L=(S?.raw??S?.value??"").toString().toLowerCase(),P=Ie[t],j=R.KNOWN_EVENTS.has(L)||!!P&&Object.keys(P).some(A=>A.toLowerCase()===L);if(L&&!j){let A=this.trySOVEventExtraction(p,t,y);if(A){u.push(X(`bare-event mis-anchor on "${L}" rejected; SOV extraction preferred`,"info","stage-bare-event-guard"));let M=a?this.applyModifiers(A,a):A;return se(M,u)}if(S?.type==="reference"||S?.type==="expression"){m.reset(h);let M=y.filter(W=>W.command!=="on"),B=he.matchBest(m,M);m.reset(h),B&&B.pattern.command!=="on"?(v=!0,u.push(X(`bare-event mis-anchor on reference "${L}" rejected; command ${B.pattern.command} preferred`,"info","stage-bare-event-guard"))):he.matchBest(m,g)}}}if(!v){let S=this.buildEventHandler(b,m,t),L=a?this.applyModifiers(S,a):S;return se(L,u)}}u.push(X(`event patterns: ${g.length} tried, no match`,"info","stage-event"));let z=this.tryTrailingEventExtraction(p,t,y);if(z){u.push(X("trailing event extraction succeeded","info","stage-trailing-event"));let v=a?this.applyModifiers(z,a):z;return se(v,u)}let E=y.filter(v=>v.command!=="on"),x=he.matchBest(m,E);if(x){if(tt.has(x.pattern.command)){let v=this.trySOVEventExtraction(p,t,y);if(v){u.push(X(`SOV event extraction preferred over bare ${x.pattern.command} command`,"info","stage-sov-loop"));let L=a?this.applyModifiers(v,a):v;return se(L,u)}let S=this.tryMidStreamEventExtraction(p,t,y);if(S){u.push(X(`mid-stream event extraction preferred over bare ${x.pattern.command} command`,"info","stage-midstream-loop"));let L=a?this.applyModifiers(S,a):S;return se(L,u)}}else if(R.KNOWN_EVENTS.has(x.pattern.command)&&this.hasSOVEventMarkerHead(p,t)){let v=this.trySOVEventExtraction(p,t,y);if(v){u.push(X(`SOV event extraction preferred over command-homonym event ${x.pattern.command}`,"info","stage-sov-homonym"));let S=a?this.applyModifiers(v,a):v;return se(S,u)}}else if(I(t)?.wordOrder==="VSO"){let v=this.tryMidStreamEventExtraction(p,t,y);if(v){u.push(X(`mid-stream event extraction preferred over bare ${x.pattern.command} command`,"info","stage-midstream-cmd"));let S=a?this.applyModifiers(v,a):v;return se(S,u)}}if(x.consumedTokens<m.tokens.length&&I(t)?.wordOrder==="SOV"){let v=this.trySOVEventExtraction(p,t,y);if(v){u.push(X(`SOV event extraction preferred over partial ${x.pattern.command} command (trailing remainder)`,"info","stage-sov-trailing"));let S=a?this.applyModifiers(v,a):v;return se(S,u)}}return u.push(X(`command pattern matched: ${x.pattern.id} (confidence: ${x.confidence.toFixed(2)})`,"info","pattern-match")),se(this.buildCommand(x,t),u)}if(u.push(X(`command patterns: ${E.length} tried, no match`,"info","stage-command")),!p.includes(`