opencami 1.5.0 → 1.6.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 (118) hide show
  1. package/README.md +4 -1
  2. package/dist/client/assets/{CSPContext-EgWK8bIJ.js → CSPContext-Bq8j4nl9.js} +1 -1
  3. package/dist/client/assets/DirectionContext-BdX86BHP.js +1 -0
  4. package/dist/client/assets/_sessionKey-DsjnpErt.js +14 -0
  5. package/dist/client/assets/agents-DwxKcpP6.js +2 -0
  6. package/dist/client/assets/agents-screen-DwIY8hze.js +1 -0
  7. package/dist/client/assets/bots-CRlm-3-d.js +2 -0
  8. package/dist/client/assets/bots-screen-c78I920d.js +1 -0
  9. package/dist/client/assets/button-Dg7VFQQn.js +1 -0
  10. package/dist/client/assets/c-BIGW1oBm.js +1 -0
  11. package/dist/client/assets/composite-DBl8R3ae.js +1 -0
  12. package/dist/client/assets/{connect-w4lLOqiJ.js → connect-NYvOqiBJ.js} +1 -1
  13. package/dist/client/assets/core-BrHBc0Zp.js +12 -0
  14. package/dist/client/assets/cpp-B-lmv-kZ.js +1 -0
  15. package/dist/client/assets/csharp-K5feNrxe.js +1 -0
  16. package/dist/client/assets/css-DPfMkruS.js +1 -0
  17. package/dist/client/assets/diff-D97Zzqfu.js +1 -0
  18. package/dist/client/assets/dockerfile-BcOcwvcX.js +1 -0
  19. package/dist/client/assets/engine-javascript-PwbX1GN8.js +141 -0
  20. package/dist/client/assets/file-explorer-screen-BSMbs0vi.js +1 -0
  21. package/dist/client/assets/files-BJbMx0_w.js +2 -0
  22. package/dist/client/assets/go-Dn2_MT6a.js +1 -0
  23. package/dist/client/assets/graphql-ChdNCCLP.js +1 -0
  24. package/dist/client/assets/html-GMplVEZG.js +1 -0
  25. package/dist/client/assets/index-CMATW8VA.js +3 -0
  26. package/dist/client/assets/index-T4TOjvD0.js +1 -0
  27. package/dist/client/assets/{index-36G0WCxU.js → index-rOIRO-8E.js} +1 -1
  28. package/dist/client/assets/java-CylS5w8V.js +1 -0
  29. package/dist/client/assets/javascript-wDzz0qaB.js +1 -0
  30. package/dist/client/assets/json-Cp-IABpG.js +1 -0
  31. package/dist/client/assets/jsx-g9-lgVsj.js +1 -0
  32. package/dist/client/assets/keyboard-shortcuts-dialog-BTGWdJMl.js +1 -0
  33. package/dist/client/assets/kotlin-BdnUsdx6.js +1 -0
  34. package/dist/client/assets/{main-B3N0eQFg.js → main-B_dlfHME.js} +9 -9
  35. package/dist/client/assets/markdown-BVzT7z4x.js +87 -0
  36. package/dist/client/assets/markdown-Cvjx9yec.js +1 -0
  37. package/dist/client/assets/memory-S3Yws6a5.js +2 -0
  38. package/dist/client/assets/memory-screen-C-Z9o31m.js +1 -0
  39. package/dist/client/assets/menu-DHNgWk_8.js +1 -0
  40. package/dist/client/assets/{opencami-logo-DD0DPFRQ.js → opencami-logo-BQQETnJG.js} +1 -1
  41. package/dist/client/assets/owner-CpRnf1fI.js +1 -0
  42. package/dist/client/assets/php-CDn_0X-4.js +1 -0
  43. package/dist/client/assets/popupStateMapping-BRPDXnjv.js +1 -0
  44. package/dist/client/assets/proxy-BcUh9kMA.js +9 -0
  45. package/dist/client/assets/python-B6aJPvgy.js +1 -0
  46. package/dist/client/assets/react-irH8OzhB.js +1 -0
  47. package/dist/client/assets/regexp-CDVJQ6XC.js +1 -0
  48. package/dist/client/assets/ruby-FDmvQDUv.js +1 -0
  49. package/dist/client/assets/rust-B1yitclQ.js +1 -0
  50. package/dist/client/assets/search-dialog-B96zx_ng.js +1 -0
  51. package/dist/client/assets/session-export-dialog-DPuHnhgv.js +1 -0
  52. package/dist/client/assets/settings-dialog-DZcRCaPj.js +1 -0
  53. package/dist/client/assets/shell-DfDnw5Jg.js +1 -0
  54. package/dist/client/assets/skills-YZe3I63y.js +2 -0
  55. package/dist/client/assets/{skills-panel-BLUjzfjJ.js → skills-panel-WDUfIwnI.js} +2 -2
  56. package/dist/client/assets/sql-BLtJtn59.js +1 -0
  57. package/dist/client/assets/styles-Bwo-K6Y4.css +1 -0
  58. package/dist/client/assets/swift-Dg5xB15N.js +1 -0
  59. package/dist/client/assets/switch-DPocNFRG.js +1 -0
  60. package/dist/client/assets/tabs-B0cro1hL.js +1 -0
  61. package/dist/client/assets/toml-vGWfd6FD.js +1 -0
  62. package/dist/client/assets/tooltip-Dg9fy-vT.js +1 -0
  63. package/dist/client/assets/tsx-COt5Ahok.js +1 -0
  64. package/dist/client/assets/typescript-BPQ3VLAy.js +1 -0
  65. package/dist/client/assets/use-file-explorer-state-DzT0bksg.js +12 -0
  66. package/dist/client/assets/useButton-Cbl_9oFG.js +1 -0
  67. package/dist/client/assets/useCompositeItem-BDAzTxVe.js +1 -0
  68. package/dist/client/assets/{useControlled-BhUuiHAm.js → useControlled-Dscz_s4f.js} +1 -1
  69. package/dist/client/assets/{useMutation-CFmVaBag.js → useMutation-B1FlDsNN.js} +1 -1
  70. package/dist/client/assets/visuallyHidden-ONmQ-0U2.js +1 -0
  71. package/dist/client/assets/vitesse-dark-D0r3Knsf.js +1 -0
  72. package/dist/client/assets/vitesse-light-CVO1_9PV.js +1 -0
  73. package/dist/client/assets/xml-sdJ4AIDG.js +1 -0
  74. package/dist/client/assets/yaml-Buea-lGh.js +1 -0
  75. package/dist/server/assets/{_sessionKey-tRze5NLR.js → _sessionKey-B0ZlLAjH.js} +184 -575
  76. package/dist/server/assets/_tanstack-start-manifest_v-D5UVTs1o.js +4 -0
  77. package/dist/server/assets/{connect-d3AqjAqe.js → connect-CbgijWz4.js} +1 -34
  78. package/dist/server/assets/{file-explorer-screen-CVlFiAFu.js → file-explorer-screen-DH4UFK03.js} +3 -2
  79. package/dist/server/assets/{files-BIEcSPGp.js → files-DYdXlQDr.js} +1 -1
  80. package/dist/server/assets/{index-CRfLKh30.js → index-CiUjUD0t.js} +1 -1
  81. package/dist/server/assets/{index-CNIATlJ9.js → index-Dl2BOKP7.js} +94 -79
  82. package/dist/server/assets/{keyboard-shortcuts-dialog-CsNP85q8.js → keyboard-shortcuts-dialog-Cr6fOqHz.js} +1 -2
  83. package/dist/server/assets/markdown-BFE5y9YH.js +565 -0
  84. package/dist/server/assets/memory-BqZOoD7Q.js +11 -0
  85. package/dist/server/assets/memory-screen-BK5phS8K.js +235 -0
  86. package/dist/server/assets/menu-D90CDTi2.js +45 -0
  87. package/dist/server/assets/{router-rn7pJO_D.js → router-Uuagl6O7.js} +56 -46
  88. package/dist/server/assets/{search-dialog-Bz4Cu0KW.js → search-dialog-DZTS5SEi.js} +49 -83
  89. package/dist/server/assets/{session-export-dialog-CwclV0Aj.js → session-export-dialog-C53RRAah.js} +1 -2
  90. package/dist/server/assets/{settings-dialog-BBM7jCjE.js → settings-dialog-CSYDj2qm.js} +82 -56
  91. package/dist/server/assets/{use-file-explorer-state-Il1LlBAe.js → use-file-explorer-state-s7CS50ho.js} +0 -41
  92. package/dist/server/server.js +2 -2
  93. package/package.json +2 -1
  94. package/dist/client/assets/DirectionContext-DXtY05YF.js +0 -1
  95. package/dist/client/assets/_sessionKey-B89e7G3y.js +0 -100
  96. package/dist/client/assets/agents-screen-1BiEZ9od.js +0 -1
  97. package/dist/client/assets/agents-x54ocA9z.js +0 -2
  98. package/dist/client/assets/bots-screen-BNQciUeJ.js +0 -1
  99. package/dist/client/assets/bots-x86ZHG4b.js +0 -2
  100. package/dist/client/assets/button-nDcsaNPl.js +0 -1
  101. package/dist/client/assets/file-explorer-screen-CAsjd3w8.js +0 -1
  102. package/dist/client/assets/files-Bype5Mnb.js +0 -2
  103. package/dist/client/assets/index-BXkRE220.js +0 -153
  104. package/dist/client/assets/keyboard-shortcuts-dialog-BdCeXRjD.js +0 -1
  105. package/dist/client/assets/react-B16OrBeM.js +0 -1
  106. package/dist/client/assets/search-dialog-BjTPceEl.js +0 -1
  107. package/dist/client/assets/session-export-dialog-DtHKG2zW.js +0 -1
  108. package/dist/client/assets/settings-dialog-hiqdk_UD.js +0 -1
  109. package/dist/client/assets/skills-DhwyFq3y.js +0 -2
  110. package/dist/client/assets/styles-CHP4l6vZ.css +0 -1
  111. package/dist/client/assets/switch-J6wLIVu2.js +0 -1
  112. package/dist/client/assets/tabs-DvPgTz5I.js +0 -1
  113. package/dist/client/assets/tooltip-C14vdXHK.js +0 -1
  114. package/dist/client/assets/use-file-explorer-state-BnaJEqRP.js +0 -12
  115. package/dist/client/assets/useButton-Bnnac1eR.js +0 -1
  116. package/dist/client/assets/useCompositeItem-BgiEMKAt.js +0 -1
  117. package/dist/client/assets/visuallyHidden-DCCICp6T.js +0 -9
  118. package/dist/server/assets/_tanstack-start-manifest_v-CyfoMvUa.js +0 -4
@@ -0,0 +1 @@
1
+ const e=Object.freeze(JSON.parse('{"displayName":"Swift","fileTypes":["swift"],"firstLineMatch":"^#!/.*\\\\bswift","name":"swift","patterns":[{"include":"#root"}],"repository":{"async-throws":{"captures":{"1":{"name":"invalid.illegal.await-must-precede-throws.swift"},"2":{"name":"storage.modifier.exception.swift"},"3":{"name":"storage.modifier.async.swift"}},"match":"\\\\b(?:((?:throws\\\\s+|rethrows\\\\s+)async)|((?:|re)throws)|(async))\\\\b"},"attributes":{"patterns":[{"begin":"((@)available)(\\\\()","beginCaptures":{"1":{"name":"storage.modifier.attribute.swift"},"2":{"name":"punctuation.definition.attribute.swift"},"3":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"name":"meta.attribute.available.swift","patterns":[{"captures":{"1":{"name":"keyword.other.platform.os.swift"},"2":{"name":"constant.numeric.swift"}},"match":"\\\\b(swift|(?:iOS|macOS|OSX|watchOS|tvOS|visionOS|UIKitForMac)(?:ApplicationExtension)?)\\\\b(?:\\\\s+([0-9]+(?:\\\\.[0-9]+)*)\\\\b)?"},{"begin":"\\\\b((?:introduc|deprecat|obsolet)ed)\\\\s*(:)\\\\s*","beginCaptures":{"1":{"name":"keyword.other.swift"},"2":{"name":"punctuation.separator.key-value.swift"}},"end":"(?!\\\\G)","patterns":[{"match":"\\\\b[0-9]+(?:\\\\.[0-9]+)*\\\\b","name":"constant.numeric.swift"}]},{"begin":"\\\\b(message|renamed)\\\\s*(:)\\\\s*(?=\\")","beginCaptures":{"1":{"name":"keyword.other.swift"},"2":{"name":"punctuation.separator.key-value.swift"}},"end":"(?!\\\\G)","patterns":[{"include":"#literals"}]},{"captures":{"1":{"name":"keyword.other.platform.all.swift"},"2":{"name":"keyword.other.swift"},"3":{"name":"invalid.illegal.character-not-allowed-here.swift"}},"match":"(?:(\\\\*)|\\\\b(deprecated|unavailable|noasync)\\\\b)\\\\s*(.*?)(?=[),])"}]},{"begin":"((@)objc)(\\\\()","beginCaptures":{"1":{"name":"storage.modifier.attribute.swift"},"2":{"name":"punctuation.definition.attribute.swift"},"3":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"name":"meta.attribute.objc.swift","patterns":[{"captures":{"1":{"name":"invalid.illegal.missing-colon-after-selector-piece.swift"}},"match":"\\\\w*(?::(?:\\\\w*:)*(\\\\w*))?","name":"entity.name.function.swift"}]},{"begin":"(@)(?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>)","beginCaptures":{"0":{"name":"storage.modifier.attribute.swift"},"1":{"name":"punctuation.definition.attribute.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"}},"end":"(?!\\\\G\\\\()","name":"meta.attribute.swift","patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"name":"meta.arguments.attribute.swift","patterns":[{"include":"#expressions"}]}]}]},"builtin-functions":{"patterns":[{"match":"(?<=\\\\.)(?:s(?:ort(?:ed)?|plit)|contains|index|partition|f(?:i(?:lter|rst)|orEach|latMap)|with(?:MutableCharacters|CString|U(?:nsafe(?:Mutable(?:BufferPointer|Pointer(?:s|To(?:Header|Elements)))|BufferPointer)|TF8Buffer))|m(?:in|a[px]))(?=\\\\s*[({])\\\\b","name":"support.function.swift"},{"match":"(?<=\\\\.)(?:s(?:ymmetricDifference|t(?:oreBytes|arts|ride)|ortInPlace|u(?:ccessor|ffix|btract(?:ing|InPlace|WithOverflow)?)|quareRoot|amePosition)|h(?:oldsUnique(?:|OrPinned)Reference|as(?:Suf|Pre)fix)|ne(?:gated?|xt)|c(?:o(?:untByEnumerating|py(?:Bytes)?)|lamp(?:ed)?|reate)|t(?:o(?:IntMax|Opaque|UIntMax)|ake(?:R|Unr)etainedValue|r(?:uncatingRemainder|a(?:nscodedLength|ilSurrogate)))|i(?:s(?:MutableAndUniquelyReferenced(?:OrPinned)?|S(?:trictSu(?:perset(?:Of)?|bset(?:Of)?)|u(?:perset(?:Of)?|bset(?:Of)?))|Continuation|T(?:otallyOrdered|railSurrogate)|Disjoint(?:With)?|Unique(?:Reference|lyReferenced(?:OrPinned)?)|Equal|Le(?:ss(?:ThanOrEqualTo)?|adSurrogate))|n(?:sert(?:ContentsOf)?|tersect(?:ion|InPlace)?|itialize(?:Memory|From)?|dex(?:Of|ForKey)))|o(?:verlaps|bjectAt)|d(?:i(?:stance(?:To)?|vide(?:d|WithOverflow)?)|e(?:s(?:cendant|troy)|code(?:CString)?|initialize|alloc(?:ate(?:Capacity)?)?)|rop(?:First|Last))|u(?:n(?:ion(?:InPlace)?|derestimateCount|wrappedOrError)|p(?:date(?:Value)?|percased))|join(?:ed|WithSeparator)|p(?:op(?:First|Last)|ass(?:R|Unr)etained|re(?:decessor|fix))|e(?:scaped?|n(?:code|umerated?)|lementsEqual|xclusiveOr(?:InPlace)?)|f(?:orm(?:Remainder|S(?:ymmetricDifference|quareRoot)|TruncatingRemainder|In(?:tersection|dex)|Union)|latten|rom(?:CString(?:RepairingIllFormedUTF8)?|Opaque))|w(?:i(?:thMemoryRebound|dth)|rite(?:To)?)|l(?:o(?:wercased|ad)|e(?:adSurrogate|xicographical(?:Compare|lyPrecedes)))|a(?:ss(?:ign(?:(?:Backward|)From)?|umingMemoryBound)|d(?:d(?:ing(?:Product)?|Product|WithOverflow)?|vanced(?:By)?)|utorelease|ppend(?:ContentsOf)?|lloc(?:ate)?|bs)|r(?:ound(?:ed)?|e(?:serveCapacity|tain|duce|place(?:(?:R|Subr)ange)?|versed?|quest(?:Native|UniqueMutableBacking)Buffer|lease|m(?:ove(?:Range|Subrange|Value(?:ForKey)?|First|Last|A(?:tIndex|ll))?|ainder(?:WithOverflow)?)))|ge(?:nerate|t(?:Objects|Element))|m(?:in(?:imum(?:Magnitude)?|Element)|ove(?:Initialize(?:Memory|BackwardFrom|From)?|Assign(?:From)?)?|ultipl(?:y(?:WithOverflow)?|ied)|easure|a(?:ke(?:Iterator|Description)|x(?:imum(?:Magnitude)?|Element)))|bindMemory)(?=\\\\s*\\\\()","name":"support.function.swift"},{"match":"(?<=\\\\.)(?:s(?:uperclassMirror|amePositionIn|tartsWith)|nextObject|c(?:haracterAtIndex|o(?:untByEnumeratingWithState|pyWithZone)|ustom(?:Mirror|PlaygroundQuickLook))|is(?:EmptyInput|ASCII)|object(?:Enumerator|ForKey|AtIndex)|join|put|keyEnumerator|withUnsafeMutablePointerToValue|length|getMirror|m(?:oveInitializeAssignFrom|ember))(?=\\\\s*\\\\()","name":"support.function.swift"}]},"builtin-global-functions":{"patterns":[{"begin":"\\\\b(type)(\\\\()\\\\s*(of)(:)","beginCaptures":{"1":{"name":"support.function.dynamic-type.swift"},"2":{"name":"punctuation.definition.arguments.begin.swift"},"3":{"name":"support.variable.parameter.swift"},"4":{"name":"punctuation.separator.argument-label.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"patterns":[{"include":"#expressions"}]},{"match":"\\\\ba(?:nyGenerator|utoreleasepool)(?=\\\\s*[({])\\\\b","name":"support.function.swift"},{"match":"\\\\b(?:s(?:tride(?:of(?:Value)?)?|izeof(?:Value)?|equence|wap)|numericCast|transcode|is(?:UniquelyReferenced(?:NonObjC)?|KnownUniquelyReferenced)|zip|d(?:ump|ebugPrint)|unsafe(?:BitCast|Downcast|Unwrap|Address(?:Of)?)|pr(?:int|econdition(?:Failure)?)|fatalError|with(?:Unsafe(?:Mutable|)Pointer|ExtendedLifetime|VaList)|a(?:ssert(?:ionFailure)?|lignof(?:Value)?|bs)|re(?:peatElement|adLine)|getVaList|m(?:in|ax))(?=\\\\s*\\\\()","name":"support.function.swift"},{"match":"\\\\b(?:s(?:ort|uffix|pli(?:ce|t))|insert|overlaps|d(?:istance|rop(?:First|Last))|join|prefix|extend|withUnsafe(?:Mutable|)Pointers|lazy|advance|re(?:flect|move(?:Range|Last|A(?:tIndex|ll))))(?=\\\\s*\\\\()","name":"support.function.swift"}]},"builtin-properties":{"patterns":[{"match":"(?<=(?:^|\\\\W)(?:Process\\\\.|CommandLine\\\\.))(arguments|argc|unsafeArgv)","name":"support.variable.swift"},{"match":"(?<=\\\\.)(?:s(?:t(?:artIndex|ri(?:ngValue|de))|i(?:ze|gn(?:BitIndex|ificand(?:Bit(?:Count|Pattern)|Width)?|alingNaN)?)|u(?:perclassMirror|mmary|bscriptBaseAddress))|h(?:eader|as(?:hValue|PointerRepresentation))|n(?:ulTerminatedUTF8|ext(?:Down|Up)|a(?:n|tiveOwner))|c(?:haracters|ount(?:TrailingZeros)?|ustom(?:Mirror|PlaygroundQuickLook)|apacity)|i(?:s(?:S(?:ign(?:Minus|aling(?:NaN)?)|ubnormal)|N(?:ormal|aN)|Canonical|Infinite|Zero|Empty|Finite|ASCII)|n(?:dices|finity)|dentity)|owner|de(?:|bugDe)scription|u(?:n(?:safelyUnwrapped|icodeScalars?|derestimatedCount)|tf(?:16|8(?:Start|C(?:String|odeUnitCount))?)|intValue|ppercaseString|lp(?:OfOne)?)|p(?:i|ointee)|e(?:ndIndex|lements|xponent(?:Bit(?:Count|Pattern))?)|values?|keys|quietNaN|f(?:irst(?:ElementAddress(?:IfContiguous)?)?|loatingPointClass)|l(?:ittleEndian|owercaseString|eastNo(?:nzero|rmal)Magnitude|a(?:st|zy))|a(?:l(?:ignment|l(?:ocatedElementCount|Zeros))|rray(?:PropertyIsNativeTypeChecked)?)|ra(?:dix|wValue)|greatestFiniteMagnitude|m(?:in|emory|ax)|b(?:yteS(?:ize|wapped)|i(?:nade|tPattern|gEndian)|uffer|ase(?:Address)?))\\\\b","name":"support.variable.swift"},{"match":"(?<=\\\\.)(?:boolValue|disposition|end|objectIdentifier|quickLookObject|start|valueType)\\\\b","name":"support.variable.swift"},{"match":"(?<=\\\\.)(?:s(?:calarValue|i(?:ze|gnalingNaN)|o(?:und|me)|uppressed|prite|et)|n(?:one|egative(?:Subnormal|Normal|Infinity|Zero))|c(?:ol(?:or|lection)|ustomized)|t(?:o(?:NearestOr(?:Even|AwayFromZero)|wardZero)|uple|ext)|i(?:nt|mage)|optional|d(?:ictionary|o(?:uble|wn))|u(?:Int|p|rl)|p(?:o(?:sitive(?:Subnormal|Normal|Infinity|Zero)|int)|lus)|e(?:rror|mptyInput)|view|quietNaN|float|a(?:ttributedString|wayFromZero)|r(?:ectangle|ange)|generated|minus|b(?:ool|ezierPath))\\\\b","name":"support.variable.swift"}]},"builtin-types":{"patterns":[{"include":"#builtin-types-builtin-class-type"},{"include":"#builtin-types-builtin-enum-type"},{"include":"#builtin-types-builtin-protocol-type"},{"include":"#builtin-types-builtin-struct-type"},{"include":"#builtin-types-builtin-typealias"},{"match":"\\\\bAny\\\\b","name":"support.type.any.swift"}]},"builtin-types-builtin-class-type":{"match":"\\\\b(Managed((?:|Proto)Buffer)|NonObjectiveCBase|AnyGenerator)\\\\b","name":"support.class.swift"},"builtin-types-builtin-enum-type":{"patterns":[{"match":"\\\\b(?:CommandLine|Process(?=\\\\.))\\\\b","name":"support.constant.swift"},{"match":"\\\\bNever\\\\b","name":"support.constant.never.swift"},{"match":"\\\\b(?:ImplicitlyUnwrappedOptional|Representation|MemoryLayout|FloatingPointClassification|SetIndexRepresentation|SetIteratorRepresentation|FloatingPointRoundingRule|UnicodeDecodingResult|Optional|DictionaryIndexRepresentation|AncestorRepresentation|DisplayStyle|PlaygroundQuickLook|Never|FloatingPointSign|Bit|DictionaryIteratorRepresentation)\\\\b","name":"support.type.swift"},{"match":"\\\\b(?:MirrorDisposition|QuickLookObject)\\\\b","name":"support.type.swift"}]},"builtin-types-builtin-protocol-type":{"patterns":[{"match":"\\\\b(?:Ra(?:n(?:domAccess(?:Collection|Indexable)|geReplaceable(?:Collection|Indexable))|wRepresentable)|M(?:irrorPath|utable(?:Collection|Indexable))|Bi(?:naryFloatingPoint|twiseOperations|directional(?:Collection|Indexable))|S(?:tr(?:ide|eam)able|igned(?:Number|Integer)|e(?:tAlgebra|quence))|Hashable|C(?:o(?:llection|mparable)|ustom(?:Reflecta|StringConverti|DebugStringConverti|PlaygroundQuickLooka|LeafReflecta)ble|VarArg)|TextOutputStream|I(?:n(?:teger(?:Arithmetic)?|dexable(?:Base)?)|teratorProtocol)|OptionSet|Un(?:signedInteger|icodeCodec)|E(?:quatable|rror|xpressibleBy(?:BooleanLiteral|String(?:Interpolation|Literal)|NilLiteral|IntegerLiteral|DictionaryLiteral|UnicodeScalarLiteral|ExtendedGraphemeClusterLiteral|FloatLiteral|ArrayLiteral))|FloatingPoint|L(?:osslessStringConvertible|azy(?:Sequence|Collection)Protocol)|A(?:nyObject|bsoluteValuable))\\\\b","name":"support.type.swift"},{"match":"\\\\b(?:Ran(?:domAccessIndex|geReplaceableCollection)Type|GeneratorType|M(?:irror(?:|Path)Type|utable(?:Sliceable|CollectionType))|B(?:i(?:twiseOperations|directionalIndex)Type|oolean(?:Type|LiteralConvertible))|S(?:tring(?:Interpolation|Literal)Convertible|i(?:nk|gned(?:Numb|Integ)er)Type|e(?:tAlgebra|quence)Type|liceable)|NilLiteralConvertible|C(?:ollection|VarArg)Type|Inte(?:rvalType|ger(?:Type|LiteralConvertible|ArithmeticType))|O(?:utputStream|ptionSet)Type|DictionaryLiteralConvertible|Un(?:signedIntegerType|icode(?:ScalarLiteralConvertible|CodecType))|E(?:rrorType|xten(?:sibleCollectionType|dedGraphemeClusterLiteralConvertible))|F(?:orwardIndexType|loat(?:ingPointType|LiteralConvertible))|A(?:nyCollectionType|rrayLiteralConvertible))\\\\b","name":"support.type.swift"}]},"builtin-types-builtin-struct-type":{"patterns":[{"match":"\\\\b(?:R(?:e(?:peat(?:ed)?|versed(?:RandomAccess(?:Collection|Index)|Collection|Index))|an(?:domAccessSlice|ge(?:Replaceable(?:RandomAccess|Bidirectional|)Slice|Generator)?))|Generator(?:Sequence|OfOne)|M(?:irror|utable(?:Ran(?:domAccess|geReplaceable(?:RandomAccess|Bidirectional|))|Bidirectional|)Slice|anagedBufferPointer)|B(?:idirectionalSlice|ool)|S(?:t(?:aticString|ri(?:ng|deT(?:hrough(?:(?:Gen|It)erator)?|o(?:(?:Gen|It)erator)?)))|et(?:I(?:ndex|terator))?|lice)|HalfOpenInterval|C(?:haracter(?:View)?|o(?:ntiguousArray|untable(?:|Closed)Range|llectionOfOne)|OpaquePointer|losed(?:Range(?:I(?:ndex|terator))?|Interval)|VaListPointer)|I(?:n(?:t(?:16|8|32|64)?|d(?:ices|ex(?:ing(?:Gen|It)erator)?))|terator(?:Sequence|OverOne)?)|Zip2(?:Sequence|Iterator)|O(?:paquePointer|bjectIdentifier)|D(?:ictionary(?:I(?:ndex|terator)|Literal)?|ouble|efault(?:RandomAccess|Bidirectional|)Indices)|U(?:n(?:safe(?:RawPointer|Mutable(?:Raw|Buffer|)Pointer|BufferPointer(?:(?:Gen|It)erator)?|Pointer)|icodeScalar(?:View)?|foldSequence|managed)|TF(?:16(?:View)?|8(?:View)?|32)|Int(?:16|8|32|64)?)|Join(?:Generator|ed(?:Sequence|Iterator))|PermutationGenerator|E(?:numerate(?:Generator|Sequence|d(?:Sequence|Iterator))|mpty(?:Generator|Collection|Iterator))|Fl(?:oat(?:80)?|atten(?:Generator|BidirectionalCollection(?:Index)?|Sequence|Collection(?:Index)?|Iterator))|L(?:egacyChildren|azy(?:RandomAccessCollection|Map(?:RandomAccessCollection|Generator|BidirectionalCollection|Sequence|Collection|Iterator)|BidirectionalCollection|Sequence|Collection|Filter(?:Generator|BidirectionalCollection|Sequence|Collection|I(?:ndex|terator))))|A(?:ny(?:RandomAccessCollection|Generator|BidirectionalCollection|Sequence|Hashable|Collection|I(?:ndex|terator))|utoreleasingUnsafeMutablePointer|rray(?:Slice)?))\\\\b","name":"support.type.swift"},{"match":"\\\\b(?:R(?:everse(?:RandomAccess(?:Collection|Index)|Collection|Index)|awByte)|Map(?:Generator|Sequence|Collection)|S(?:inkOf|etGenerator)|Zip2Generator|DictionaryGenerator|Filter(?:Generator|Sequence|Collection(?:Index)?)|LazyForwardCollection|Any(?:RandomAccessIndex|BidirectionalIndex|Forward(?:Collection|Index)))\\\\b","name":"support.type.swift"}]},"builtin-types-builtin-typealias":{"patterns":[{"match":"\\\\b(?:Raw(?:Significand|Exponent|Value)|B(?:ooleanLiteralType|uffer|ase)|S(?:t(?:orage|r(?:i(?:ngLiteralType|de)|eam[12]))|ubSequence)|NativeBuffer|C(?:hild(?:ren)?|Bool|S(?:hort|ignedChar)|odeUnit|Char(?:16|32)?|Int|Double|Unsigned(?:Short|Char|Int|Long(?:Long)?)|Float|WideChar|Long(?:Long)?)|I(?:n(?:t(?:Max|egerLiteralType)|d(?:ices|ex(?:Distance)?))|terator)|Distance|U(?:n(?:icodeScalar(?:Type|Index|View|LiteralType)|foldFirstSequence)|TF(?:16(?:Index|View)|8Index)|IntMax)|E(?:lements?|x(?:tendedGraphemeCluster(?:|Literal)Type|ponent))|V(?:oid|alue)|Key|Float(?:32|LiteralType|64)|AnyClass)\\\\b","name":"support.type.swift"},{"match":"\\\\b(?:Generator|PlaygroundQuickLook|UWord|Word)\\\\b","name":"support.type.swift"}]},"code-block":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.scope.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.scope.end.swift"}},"patterns":[{"include":"$self"}]},"comments":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.comment.swift"}},"match":"\\\\A^(#!).*$\\\\n?","name":"comment.line.number-sign.swift"},{"begin":"/\\\\*\\\\*(?!/)","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.swift"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.swift"}},"name":"comment.block.documentation.swift","patterns":[{"include":"#comments-nested"}]},{"begin":"/\\\\*:","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.swift"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.swift"}},"name":"comment.block.documentation.playground.swift","patterns":[{"include":"#comments-nested"}]},{"begin":"/\\\\*","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.swift"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.swift"}},"name":"comment.block.swift","patterns":[{"include":"#comments-nested"}]},{"match":"\\\\*/","name":"invalid.illegal.unexpected-end-of-block-comment.swift"},{"begin":"(^[\\\\t ]+)?(?=//)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.swift"}},"end":"(?!\\\\G)","patterns":[{"begin":"///","beginCaptures":{"0":{"name":"punctuation.definition.comment.swift"}},"end":"$","name":"comment.line.triple-slash.documentation.swift"},{"begin":"//:","beginCaptures":{"0":{"name":"punctuation.definition.comment.swift"}},"end":"$","name":"comment.line.double-slash.documentation.swift"},{"begin":"//","beginCaptures":{"0":{"name":"punctuation.definition.comment.swift"}},"end":"$","name":"comment.line.double-slash.swift"}]}]},"comments-nested":{"begin":"/\\\\*","end":"\\\\*/","patterns":[{"include":"#comments-nested"}]},"compiler-control":{"patterns":[{"begin":"^\\\\s*(#)(if|elseif)\\\\s+(false)\\\\b.*?(?=$|//|/\\\\*)","beginCaptures":{"0":{"name":"meta.preprocessor.conditional.swift"},"1":{"name":"punctuation.definition.preprocessor.swift"},"2":{"name":"keyword.control.import.preprocessor.conditional.swift"},"3":{"name":"constant.language.boolean.swift"}},"contentName":"comment.block.preprocessor.swift","end":"(?=^\\\\s*(#(e(?:lseif|lse|ndif)))\\\\b)"},{"begin":"^\\\\s*(#)(if|elseif)\\\\s+","captures":{"1":{"name":"punctuation.definition.preprocessor.swift"},"2":{"name":"keyword.control.import.preprocessor.conditional.swift"}},"end":"(?=\\\\s*/[*/])|$","name":"meta.preprocessor.conditional.swift","patterns":[{"match":"(&&|\\\\|\\\\|)","name":"keyword.operator.logical.swift"},{"match":"\\\\b(true|false)\\\\b","name":"constant.language.boolean.swift"},{"captures":{"1":{"name":"keyword.other.condition.swift"},"2":{"name":"punctuation.definition.parameters.begin.swift"},"3":{"name":"support.constant.platform.architecture.swift"},"4":{"name":"punctuation.definition.parameters.end.swift"}},"match":"\\\\b(arch)\\\\s*(\\\\()\\\\s*(?:(arm|arm64|powerpc64|powerpc64le|i386|x86_64|s390x)|\\\\w+)\\\\s*(\\\\))"},{"captures":{"1":{"name":"keyword.other.condition.swift"},"2":{"name":"punctuation.definition.parameters.begin.swift"},"3":{"name":"support.constant.platform.os.swift"},"4":{"name":"punctuation.definition.parameters.end.swift"}},"match":"\\\\b(os)\\\\s*(\\\\()\\\\s*(?:(macOS|OSX|iOS|tvOS|watchOS|visionOS|Android|Linux|FreeBSD|Windows|PS4)|\\\\w+)\\\\s*(\\\\))"},{"captures":{"1":{"name":"keyword.other.condition.swift"},"2":{"name":"punctuation.definition.parameters.begin.swift"},"3":{"name":"entity.name.type.module.swift"},"4":{"name":"punctuation.definition.parameters.end.swift"}},"match":"\\\\b(canImport)\\\\s*(\\\\()([_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*)(\\\\))"},{"begin":"\\\\b(targetEnvironment)\\\\s*(\\\\()","beginCaptures":{"1":{"name":"keyword.other.condition.swift"},"2":{"name":"punctuation.definition.parameters.begin.swift"}},"end":"(\\\\))|$","endCaptures":{"1":{"name":"punctuation.definition.parameters.end.swift"}},"patterns":[{"match":"\\\\b(simulator|UIKitForMac)\\\\b","name":"support.constant.platform.environment.swift"}]},{"begin":"\\\\b(swift|compiler)\\\\s*(\\\\()","beginCaptures":{"1":{"name":"keyword.other.condition.swift"},"2":{"name":"punctuation.definition.parameters.begin.swift"}},"end":"(\\\\))|$","endCaptures":{"1":{"name":"punctuation.definition.parameters.end.swift"}},"patterns":[{"match":">=|<","name":"keyword.operator.comparison.swift"},{"match":"\\\\b[0-9]+(?:\\\\.[0-9]+)*\\\\b","name":"constant.numeric.swift"}]}]},{"captures":{"1":{"name":"punctuation.definition.preprocessor.swift"},"2":{"name":"keyword.control.import.preprocessor.conditional.swift"},"3":{"patterns":[{"match":"\\\\S+","name":"invalid.illegal.character-not-allowed-here.swift"}]}},"match":"^\\\\s*(#)(e(?:lse|ndif))(.*?)(?=$|//|/\\\\*)","name":"meta.preprocessor.conditional.swift"},{"captures":{"1":{"name":"punctuation.definition.preprocessor.swift"},"2":{"name":"keyword.control.import.preprocessor.sourcelocation.swift"},"4":{"name":"punctuation.definition.parameters.begin.swift"},"5":{"patterns":[{"begin":"(file)\\\\s*(:)\\\\s*(?=\\")","beginCaptures":{"1":{"name":"support.variable.parameter.swift"},"2":{"name":"punctuation.separator.key-value.swift"}},"end":"(?!\\\\G)","patterns":[{"include":"#literals"}]},{"captures":{"1":{"name":"support.variable.parameter.swift"},"2":{"name":"punctuation.separator.key-value.swift"},"3":{"name":"constant.numeric.integer.swift"}},"match":"(line)\\\\s*(:)\\\\s*([0-9]+)"},{"match":",","name":"punctuation.separator.parameters.swift"},{"match":"\\\\S+","name":"invalid.illegal.character-not-allowed-here.swift"}]},"6":{"name":"punctuation.definition.parameters.begin.swift"},"7":{"patterns":[{"match":"\\\\S+","name":"invalid.illegal.character-not-allowed-here.swift"}]}},"match":"^\\\\s*(#)(sourceLocation)((\\\\()([^)]*)(\\\\)))(.*?)(?=$|//|/\\\\*)","name":"meta.preprocessor.sourcelocation.swift"}]},"conditionals":{"patterns":[{"begin":"(?<!\\\\.)\\\\b(if|guard|switch|for)\\\\b","beginCaptures":{"1":{"patterns":[{"include":"#keywords"}]}},"end":"(?=\\\\{)","patterns":[{"include":"#expressions-without-trailing-closures"}]},{"begin":"(?<!\\\\.)\\\\b(while)\\\\b","beginCaptures":{"1":{"patterns":[{"include":"#keywords"}]}},"end":"(?=\\\\{)|$","patterns":[{"include":"#expressions-without-trailing-closures"}]}]},"declarations":{"patterns":[{"include":"#declarations-function"},{"include":"#declarations-function-initializer"},{"include":"#declarations-function-subscript"},{"include":"#declarations-typed-variable-declaration"},{"include":"#declarations-import"},{"include":"#declarations-operator"},{"include":"#declarations-precedencegroup"},{"include":"#declarations-protocol"},{"include":"#declarations-type"},{"include":"#declarations-extension"},{"include":"#declarations-typealias"},{"include":"#declarations-macro"}]},"declarations-available-types":{"patterns":[{"include":"#comments"},{"include":"#builtin-types"},{"include":"#attributes"},{"match":"\\\\basync\\\\b","name":"storage.modifier.async.swift"},{"match":"\\\\b(?:|re)throws\\\\b","name":"storage.modifier.exception.swift"},{"match":"\\\\bsome\\\\b","name":"keyword.other.operator.type.opaque.swift"},{"match":"\\\\bany\\\\b","name":"keyword.other.operator.type.existential.swift"},{"match":"\\\\b(?:repeat|each)\\\\b","name":"keyword.control.loop.swift"},{"match":"\\\\b(?:inout|isolated|borrowing|consuming)\\\\b","name":"storage.modifier.swift"},{"match":"\\\\bSelf\\\\b","name":"variable.language.swift"},{"captures":{"1":{"name":"keyword.operator.type.function.swift"}},"match":"(?<![-!%\\\\&*+./<=>^|~])(->)(?![-!%\\\\&*+./<=>^|~])"},{"captures":{"1":{"name":"keyword.operator.type.composition.swift"}},"match":"(?<![-!%\\\\&*+./<=>^|~])(&)(?![-!%\\\\&*+./<=>^|~])"},{"match":"[!?]","name":"keyword.operator.type.optional.swift"},{"match":"\\\\.\\\\.\\\\.","name":"keyword.operator.function.variadic-parameter.swift"},{"match":"\\\\bprotocol\\\\b","name":"keyword.other.type.composition.swift"},{"match":"(?<=\\\\.)(?:Protocol|Type)\\\\b","name":"keyword.other.type.metatype.swift"},{"include":"#declarations-available-types-tuple-type"},{"include":"#declarations-available-types-collection-type"},{"include":"#declarations-generic-argument-clause"}]},"declarations-available-types-collection-type":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.section.collection-type.begin.swift"}},"end":"]|(?=[)>{}])","endCaptures":{"0":{"name":"punctuation.section.collection-type.end.swift"}},"patterns":[{"include":"#declarations-available-types"},{"include":"#literals-numeric"},{"match":"\\\\b_\\\\b","name":"support.variable.inferred.swift"},{"match":"(?<=\\\\s)\\\\bof\\\\b(?=\\\\s+[(\\\\[_\\\\p{L}\\\\d\\\\p{N}\\\\p{M}])","name":"keyword.other.inline-array.swift"},{"begin":":","beginCaptures":{"0":{"name":"punctuation.separator.key-value.swift"}},"end":"(?=[])>{}])","patterns":[{"match":":","name":"invalid.illegal.extra-colon-in-dictionary-type.swift"},{"include":"#declarations-available-types"}]}]},"declarations-available-types-tuple-type":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.tuple-type.begin.swift"}},"end":"\\\\)|(?=[]>{}])","endCaptures":{"0":{"name":"punctuation.section.tuple-type.end.swift"}},"patterns":[{"include":"#declarations-available-types"}]},"declarations-extension":{"begin":"\\\\b(extension)\\\\s+","beginCaptures":{"1":{"name":"storage.type.$1.swift"}},"end":"(?<=})","name":"meta.definition.type.$1.swift","patterns":[{"begin":"\\\\G(?!\\\\s*[\\\\n:{])","end":"(?=\\\\s*[\\\\n:{])|(?!\\\\G)(?=\\\\s*where\\\\b)","name":"entity.name.type.swift","patterns":[{"include":"#declarations-available-types"}]},{"include":"#comments"},{"include":"#declarations-generic-where-clause"},{"include":"#declarations-inheritance-clause"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.type.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.type.end.swift"}},"name":"meta.definition.type.body.swift","patterns":[{"include":"$self"}]}]},"declarations-function":{"begin":"\\\\b(func)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>)|(?:((?<oph>[-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷‖‗†-‧‰-‾⁁-⁓⁕-⁞←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰])(\\\\g<oph>|(?<opc>[̀-ͯ᷀-᷿⃐-⃿︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))*)|(\\\\.(\\\\g<oph>|\\\\g<opc>|\\\\.)+)))\\\\s*(?=[(<])","beginCaptures":{"1":{"name":"storage.type.function.swift"},"2":{"name":"entity.name.function.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"(?<=})|$","name":"meta.definition.function.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-parameter-clause"},{"include":"#declarations-function-result"},{"include":"#async-throws"},{"include":"#declarations-generic-where-clause"},{"begin":"(\\\\{)","beginCaptures":{"1":{"name":"punctuation.section.function.begin.swift"}},"end":"(})","endCaptures":{"1":{"name":"punctuation.section.function.end.swift"}},"name":"meta.definition.function.body.swift","patterns":[{"include":"$self"}]}]},"declarations-function-initializer":{"begin":"(?<!\\\\.)\\\\b(init[!?]*)\\\\s*(?=[(<])","beginCaptures":{"1":{"name":"storage.type.function.swift","patterns":[{"match":"(?<=[!?])[!?]+","name":"invalid.illegal.character-not-allowed-here.swift"}]}},"end":"(?<=})|$","name":"meta.definition.function.initializer.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-parameter-clause"},{"include":"#async-throws"},{"include":"#declarations-generic-where-clause"},{"begin":"(\\\\{)","beginCaptures":{"1":{"name":"punctuation.section.function.begin.swift"}},"end":"(})","endCaptures":{"1":{"name":"punctuation.section.function.end.swift"}},"name":"meta.definition.function.body.swift","patterns":[{"include":"$self"}]}]},"declarations-function-result":{"begin":"(?<![-!%\\\\&*+./<=>^|~])(->)(?![-!%\\\\&*+./<=>^|~])\\\\s*","beginCaptures":{"1":{"name":"keyword.operator.function-result.swift"}},"end":"(?!\\\\G)(?=\\\\{|\\\\bwhere\\\\b|[;=])|$","name":"meta.function-result.swift","patterns":[{"match":"\\\\bsending\\\\b","name":"storage.modifier.swift"},{"include":"#declarations-available-types"}]},"declarations-function-subscript":{"begin":"(?<!\\\\.)\\\\b(subscript)\\\\s*(?=[(<])","beginCaptures":{"1":{"name":"storage.type.function.swift"}},"end":"(?<=})|$","name":"meta.definition.function.subscript.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-parameter-clause"},{"include":"#declarations-function-result"},{"include":"#async-throws"},{"include":"#declarations-generic-where-clause"},{"begin":"(\\\\{)","beginCaptures":{"1":{"name":"punctuation.section.function.begin.swift"}},"end":"(})","endCaptures":{"1":{"name":"punctuation.section.function.end.swift"}},"name":"meta.definition.function.body.swift","patterns":[{"include":"$self"}]}]},"declarations-generic-argument-clause":{"begin":"<","beginCaptures":{"0":{"name":"punctuation.separator.generic-argument-clause.begin.swift"}},"end":">|(?=[]){}])","endCaptures":{"0":{"name":"punctuation.separator.generic-argument-clause.end.swift"}},"name":"meta.generic-argument-clause.swift","patterns":[{"include":"#literals-numeric"},{"include":"#declarations-available-types"}]},"declarations-generic-parameter-clause":{"begin":"<","beginCaptures":{"0":{"name":"punctuation.separator.generic-parameter-clause.begin.swift"}},"end":">|(?=[^\\\\&,:<=>`\\\\w\\\\d\\\\s])","endCaptures":{"0":{"name":"punctuation.separator.generic-parameter-clause.end.swift"}},"name":"meta.generic-parameter-clause.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-where-clause"},{"match":"\\\\blet\\\\b","name":"keyword.other.declaration-specifier.swift"},{"match":"\\\\beach\\\\b","name":"keyword.control.loop.swift"},{"captures":{"1":{"name":"variable.language.generic-parameter.swift"}},"match":"\\\\b((?!\\\\d)\\\\w[\\\\w\\\\d]*)\\\\b"},{"match":",","name":"punctuation.separator.generic-parameters.swift"},{"begin":"(:)\\\\s*","beginCaptures":{"1":{"name":"punctuation.separator.generic-parameter-constraint.swift"}},"end":"(?=[,>]|(?!\\\\G)\\\\bwhere\\\\b)","name":"meta.generic-parameter-constraint.swift","patterns":[{"begin":"\\\\G","end":"(?=[,>]|(?!\\\\G)\\\\bwhere\\\\b)","name":"entity.other.inherited-class.swift","patterns":[{"include":"#declarations-type-identifier"},{"include":"#declarations-type-operators"}]}]}]},"declarations-generic-where-clause":{"begin":"\\\\b(where)\\\\b\\\\s*","beginCaptures":{"1":{"name":"keyword.other.generic-constraint-introducer.swift"}},"end":"(?!\\\\G)$|(?=[\\\\n;>{}]|//|/\\\\*)","name":"meta.generic-where-clause.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-where-clause-requirement-list"}]},"declarations-generic-where-clause-requirement-list":{"begin":"\\\\G|,\\\\s*","end":"(?=[\\\\n,;>{}]|//|/\\\\*)","patterns":[{"include":"#comments"},{"include":"#constraint"},{"include":"#declarations-available-types"},{"begin":"(?<![-!%\\\\&*+./<=>^|~])(==)(?![-!%\\\\&*+./<=>^|~])","beginCaptures":{"1":{"name":"keyword.operator.generic-constraint.same-type.swift"}},"end":"(?=\\\\s*[\\\\n,;>{}]|//|/\\\\*)","name":"meta.generic-where-clause.same-type-requirement.swift","patterns":[{"include":"#declarations-available-types"}]},{"begin":"(?<![-!%\\\\&*+./<=>^|~])(:)(?![-!%\\\\&*+./<=>^|~])","beginCaptures":{"1":{"name":"keyword.operator.generic-constraint.conforms-to.swift"}},"end":"(?=\\\\s*[\\\\n,;>{}]|//|/\\\\*)","name":"meta.generic-where-clause.conformance-requirement.swift","patterns":[{"begin":"\\\\G\\\\s*","contentName":"entity.other.inherited-class.swift","end":"(?=\\\\s*[\\\\n,;>{}]|//|/\\\\*)","patterns":[{"include":"#declarations-available-types"}]}]}]},"declarations-import":{"begin":"(?<!\\\\.)\\\\b(import)\\\\s+","beginCaptures":{"1":{"name":"keyword.control.import.swift"}},"end":"(;)|$\\\\n?|(?=/[*/])","endCaptures":{"1":{"name":"punctuation.terminator.statement.swift"}},"name":"meta.import.swift","patterns":[{"begin":"\\\\G(?!;|$|//|/\\\\*)(?:(typealias|struct|class|actor|enum|protocol|var|func)\\\\s+)?","beginCaptures":{"1":{"name":"storage.modifier.swift"}},"end":"(?=;|$|//|/\\\\*)","patterns":[{"captures":{"1":{"name":"punctuation.definition.identifier.swift"},"2":{"name":"punctuation.definition.identifier.swift"}},"match":"(?<=\\\\G|\\\\.)(?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>)","name":"entity.name.type.swift"},{"match":"(?<=\\\\G|\\\\.)\\\\$[0-9]+","name":"entity.name.type.swift"},{"captures":{"1":{"patterns":[{"match":"\\\\.","name":"invalid.illegal.dot-not-allowed-here.swift"}]}},"match":"(?<=\\\\G|\\\\.)(?:((?<oph>[-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷‖‗†-‧‰-‾⁁-⁓⁕-⁞←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰])(\\\\g<oph>|(?<opc>[̀-ͯ᷀-᷿⃐-⃿︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))*)|(\\\\.(\\\\g<oph>|\\\\g<opc>|\\\\.)+))(?=[.;]|$|//|/\\\\*|\\\\s)","name":"entity.name.type.swift"},{"match":"\\\\.","name":"punctuation.separator.import.swift"},{"begin":"(?!\\\\s*(;|$|//|/\\\\*))","end":"(?=\\\\s*(;|$|//|/\\\\*))","name":"invalid.illegal.character-not-allowed-here.swift"}]}]},"declarations-inheritance-clause":{"begin":"(:)(?=\\\\s*\\\\{)|(:)\\\\s*","beginCaptures":{"1":{"name":"invalid.illegal.empty-inheritance-clause.swift"},"2":{"name":"punctuation.separator.inheritance-clause.swift"}},"end":"(?!\\\\G)$|(?=[={}]|(?!\\\\G)\\\\bwhere\\\\b)","name":"meta.inheritance-clause.swift","patterns":[{"begin":"\\\\bclass\\\\b","beginCaptures":{"0":{"name":"storage.type.class.swift"}},"end":"(?=[={}]|(?!\\\\G)\\\\bwhere\\\\b)","patterns":[{"include":"#comments"},{"include":"#declarations-inheritance-clause-more-types"}]},{"begin":"\\\\G","end":"(?!\\\\G)$|(?=[={}]|(?!\\\\G)\\\\bwhere\\\\b)","patterns":[{"include":"#attributes"},{"include":"#comments"},{"include":"#declarations-inheritance-clause-inherited-type"},{"include":"#declarations-inheritance-clause-more-types"},{"include":"#declarations-type-operators"}]}]},"declarations-inheritance-clause-inherited-type":{"begin":"(?=[_`\\\\p{L}])","end":"(?!\\\\G)","name":"entity.other.inherited-class.swift","patterns":[{"include":"#declarations-type-identifier"}]},"declarations-inheritance-clause-more-types":{"begin":",\\\\s*","end":"(?!\\\\G)(?!/[*/])|(?=[,={}]|(?!\\\\G)\\\\bwhere\\\\b)","name":"meta.inheritance-list.more-types","patterns":[{"include":"#attributes"},{"include":"#comments"},{"include":"#declarations-inheritance-clause-inherited-type"},{"include":"#declarations-inheritance-clause-more-types"},{"include":"#declarations-type-operators"}]},"declarations-macro":{"begin":"\\\\b(macro)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*(?=[(<=])","beginCaptures":{"1":{"name":"storage.type.function.swift"},"2":{"name":"entity.name.function.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"$|(?=;|//|/\\\\*|[=}])","name":"meta.definition.macro.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-parameter-clause"},{"include":"#declarations-function-result"},{"include":"#async-throws"},{"include":"#declarations-generic-where-clause"}]},"declarations-operator":{"begin":"(?:\\\\b((?:pre|in|post)fix)\\\\s+)?\\\\b(operator)\\\\s+(((?<oph>[-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷‖‗†-‧‰-‾⁁-⁓⁕-⁞←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰])(\\\\g<oph>|\\\\.|(?<opc>[̀-ͯ᷀-᷿⃐-⃿︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))*+)|(\\\\.(\\\\g<oph>|\\\\g<opc>|\\\\.)++))\\\\s*","beginCaptures":{"1":{"name":"storage.modifier.swift"},"2":{"name":"storage.type.function.operator.swift"},"3":{"name":"entity.name.function.operator.swift"},"4":{"name":"entity.name.function.operator.swift","patterns":[{"match":"\\\\.","name":"invalid.illegal.dot-not-allowed-here.swift"}]}},"end":"(;)|$\\\\n?|(?=/[*/])","endCaptures":{"1":{"name":"punctuation.terminator.statement.swift"}},"name":"meta.definition.operator.swift","patterns":[{"include":"#declarations-operator-swift2"},{"include":"#declarations-operator-swift3"},{"match":"((?!$|;|//|/\\\\*)\\\\S)+","name":"invalid.illegal.character-not-allowed-here.swift"}]},"declarations-operator-swift2":{"begin":"\\\\G(\\\\{)","beginCaptures":{"1":{"name":"punctuation.definition.operator.begin.swift"}},"end":"(})","endCaptures":{"1":{"name":"punctuation.definition.operator.end.swift"}},"patterns":[{"include":"#comments"},{"captures":{"1":{"name":"storage.modifier.swift"},"2":{"name":"keyword.other.operator.associativity.swift"}},"match":"\\\\b(associativity)\\\\s+(left|right)\\\\b"},{"captures":{"1":{"name":"storage.modifier.swift"},"2":{"name":"constant.numeric.integer.swift"}},"match":"\\\\b(precedence)\\\\s+([0-9]+)\\\\b"},{"captures":{"1":{"name":"storage.modifier.swift"}},"match":"\\\\b(assignment)\\\\b"}]},"declarations-operator-swift3":{"captures":{"2":{"name":"entity.other.inherited-class.swift","patterns":[{"include":"#declarations-types-precedencegroup"}]},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"match":"\\\\G(:)\\\\s*((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))"},"declarations-parameter-clause":{"begin":"(\\\\()","beginCaptures":{"1":{"name":"punctuation.definition.parameters.begin.swift"}},"end":"(\\\\))(?:\\\\s*(async)\\\\b)?","endCaptures":{"1":{"name":"punctuation.definition.parameters.end.swift"},"2":{"name":"storage.modifier.async.swift"}},"name":"meta.parameter-clause.swift","patterns":[{"include":"#declarations-parameter-list"}]},"declarations-parameter-list":{"patterns":[{"captures":{"1":{"name":"entity.name.function.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"variable.parameter.function.swift"},"5":{"name":"punctuation.definition.identifier.swift"},"6":{"name":"punctuation.definition.identifier.swift"}},"match":"((?<q1>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q1>))\\\\s+((?<q2>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q2>))(?=\\\\s*:)"},{"captures":{"1":{"name":"variable.parameter.function.swift"},"2":{"name":"entity.name.function.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"match":"(((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>)))(?=\\\\s*:)"},{"begin":":\\\\s*(?!\\\\s)","end":"(?=[),])","patterns":[{"match":"\\\\bsending\\\\b","name":"storage.modifier.swift"},{"include":"#declarations-available-types"},{"match":":","name":"invalid.illegal.extra-colon-in-parameter-list.swift"},{"begin":"=","beginCaptures":{"0":{"name":"keyword.operator.assignment.swift"}},"end":"(?=[),])","patterns":[{"include":"#expressions"}]}]}]},"declarations-precedencegroup":{"begin":"\\\\b(precedencegroup)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*(?=\\\\{)","beginCaptures":{"1":{"name":"storage.type.precedencegroup.swift"},"2":{"name":"entity.name.type.precedencegroup.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"(?!\\\\G)","name":"meta.definition.precedencegroup.swift","patterns":[{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.precedencegroup.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.precedencegroup.end.swift"}},"patterns":[{"include":"#comments"},{"captures":{"1":{"name":"storage.modifier.swift"},"2":{"name":"entity.other.inherited-class.swift","patterns":[{"include":"#declarations-types-precedencegroup"}]},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"match":"\\\\b((?:high|low)erThan)\\\\s*:\\\\s*((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))"},{"captures":{"1":{"name":"storage.modifier.swift"},"2":{"name":"keyword.other.operator.associativity.swift"}},"match":"\\\\b(associativity)\\\\b(?:\\\\s*:\\\\s*(right|left|none)\\\\b)?"},{"captures":{"1":{"name":"storage.modifier.swift"},"2":{"name":"constant.language.boolean.swift"}},"match":"\\\\b(assignment)\\\\b(?:\\\\s*:\\\\s*(true|false)\\\\b)?"}]}]},"declarations-protocol":{"begin":"\\\\b(protocol)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))","beginCaptures":{"1":{"name":"storage.type.$1.swift"},"2":{"name":"entity.name.type.$1.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"(?<=})","name":"meta.definition.type.protocol.swift","patterns":[{"include":"#comments"},{"include":"#declarations-inheritance-clause"},{"include":"#declarations-generic-where-clause"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.type.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.type.end.swift"}},"name":"meta.definition.type.body.swift","patterns":[{"include":"#declarations-protocol-protocol-method"},{"include":"#declarations-protocol-protocol-initializer"},{"include":"#declarations-protocol-associated-type"},{"include":"$self"}]}]},"declarations-protocol-associated-type":{"begin":"\\\\b(associatedtype)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*","beginCaptures":{"1":{"name":"keyword.other.declaration-specifier.swift"},"2":{"name":"variable.language.associatedtype.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"(?!\\\\G)$|(?=[;}]|$)","name":"meta.definition.associatedtype.swift","patterns":[{"include":"#declarations-inheritance-clause"},{"include":"#declarations-generic-where-clause"},{"include":"#declarations-typealias-assignment"}]},"declarations-protocol-protocol-initializer":{"begin":"(?<!\\\\.)\\\\b(init[!?]*)\\\\s*(?=[(<])","beginCaptures":{"1":{"name":"storage.type.function.swift","patterns":[{"match":"(?<=[!?])[!?]+","name":"invalid.illegal.character-not-allowed-here.swift"}]}},"end":"$|(?=;|//|/\\\\*|})","name":"meta.definition.function.initializer.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-parameter-clause"},{"include":"#async-throws"},{"include":"#declarations-generic-where-clause"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.function.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.function.end.swift"}},"name":"invalid.illegal.function-body-not-allowed-in-protocol.swift","patterns":[{"include":"$self"}]}]},"declarations-protocol-protocol-method":{"begin":"\\\\b(func)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>)|(?:((?<oph>[-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷‖‗†-‧‰-‾⁁-⁓⁕-⁞←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰])(\\\\g<oph>|(?<opc>[̀-ͯ᷀-᷿⃐-⃿︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))*)|(\\\\.(\\\\g<oph>|\\\\g<opc>|\\\\.)+)))\\\\s*(?=[(<])","beginCaptures":{"1":{"name":"storage.type.function.swift"},"2":{"name":"entity.name.function.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"$|(?=;|//|/\\\\*|})","name":"meta.definition.function.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-parameter-clause"},{"include":"#declarations-function-result"},{"include":"#async-throws"},{"include":"#declarations-generic-where-clause"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.function.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.function.end.swift"}},"name":"invalid.illegal.function-body-not-allowed-in-protocol.swift","patterns":[{"include":"$self"}]}]},"declarations-type":{"patterns":[{"begin":"\\\\b(class(?!\\\\s+(?:func|var|let)\\\\b)|struct|actor)\\\\b\\\\s*((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))","beginCaptures":{"1":{"name":"storage.type.$1.swift"},"2":{"name":"entity.name.type.$1.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"(?<=})","name":"meta.definition.type.$1.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-generic-where-clause"},{"include":"#declarations-inheritance-clause"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.type.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.type.end.swift"}},"name":"meta.definition.type.body.swift","patterns":[{"include":"$self"}]}]},{"include":"#declarations-type-enum"}]},"declarations-type-enum":{"begin":"\\\\b(enum)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))","beginCaptures":{"1":{"name":"storage.type.$1.swift"},"2":{"name":"entity.name.type.$1.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"(?<=})","name":"meta.definition.type.$1.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-generic-where-clause"},{"include":"#declarations-inheritance-clause"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.type.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.type.end.swift"}},"name":"meta.definition.type.body.swift","patterns":[{"include":"#declarations-type-enum-enum-case-clause"},{"include":"$self"}]}]},"declarations-type-enum-associated-values":{"begin":"\\\\G\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.parameters.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.swift"}},"patterns":[{"include":"#comments"},{"begin":"(?:(_)|((?<q1>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*\\\\k<q1>))\\\\s+(((?<q2>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*\\\\k<q2>))\\\\s*(:)","beginCaptures":{"1":{"name":"entity.name.function.swift"},"2":{"name":"invalid.illegal.distinct-labels-not-allowed.swift"},"5":{"name":"variable.parameter.function.swift"},"7":{"name":"punctuation.separator.argument-label.swift"}},"end":"(?=[]),])","patterns":[{"include":"#declarations-available-types"}]},{"begin":"(((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*\\\\k<q>))\\\\s*(:)","beginCaptures":{"1":{"name":"entity.name.function.swift"},"2":{"name":"variable.parameter.function.swift"},"4":{"name":"punctuation.separator.argument-label.swift"}},"end":"(?=[]),])","patterns":[{"include":"#declarations-available-types"}]},{"begin":"(?![]),])(?=\\\\S)","end":"(?=[]),])","patterns":[{"include":"#declarations-available-types"},{"match":":","name":"invalid.illegal.extra-colon-in-parameter-list.swift"}]}]},"declarations-type-enum-enum-case":{"begin":"((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*","beginCaptures":{"1":{"name":"variable.other.enummember.swift"}},"end":"(?<=\\\\))|(?![(=])","patterns":[{"include":"#comments"},{"include":"#declarations-type-enum-associated-values"},{"include":"#declarations-type-enum-raw-value-assignment"}]},"declarations-type-enum-enum-case-clause":{"begin":"\\\\b(case)\\\\b\\\\s*","beginCaptures":{"1":{"name":"storage.type.enum.case.swift"}},"end":"(?=[;}])|(?!\\\\G)(?!/[*/])(?=[^,\\\\s])","patterns":[{"include":"#comments"},{"include":"#declarations-type-enum-enum-case"},{"include":"#declarations-type-enum-more-cases"}]},"declarations-type-enum-more-cases":{"begin":",\\\\s*","end":"(?!\\\\G)(?!/[*/])(?=[;}[^,\\\\s]])","name":"meta.enum-case.more-cases","patterns":[{"include":"#comments"},{"include":"#declarations-type-enum-enum-case"},{"include":"#declarations-type-enum-more-cases"}]},"declarations-type-enum-raw-value-assignment":{"begin":"(=)\\\\s*","beginCaptures":{"1":{"name":"keyword.operator.assignment.swift"}},"end":"(?!\\\\G)","patterns":[{"include":"#comments"},{"include":"#literals"}]},"declarations-type-identifier":{"begin":"((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*","beginCaptures":{"1":{"name":"meta.type-name.swift","patterns":[{"include":"#builtin-types"}]},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"}},"end":"(?!<)","patterns":[{"begin":"(?=<)","end":"(?!\\\\G)","patterns":[{"include":"#declarations-generic-argument-clause"}]}]},"declarations-type-operators":{"patterns":[{"captures":{"1":{"name":"keyword.operator.type.composition.swift"}},"match":"(?<![-!%\\\\&*+./<=>^|~])(&)(?![-!%\\\\&*+./<=>^|~])"},{"captures":{"1":{"name":"keyword.operator.type.requirement-suppression.swift"}},"match":"(?<![-!%\\\\&*+./<=>^|~])(~)(?![-!%\\\\&*+./<=>^|~])"}]},"declarations-typealias":{"begin":"\\\\b(typealias)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*","beginCaptures":{"1":{"name":"keyword.other.declaration-specifier.swift"},"2":{"name":"entity.name.type.typealias.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"(?!\\\\G)$|(?=;|//|/\\\\*|$)","name":"meta.definition.typealias.swift","patterns":[{"begin":"\\\\G(?=<)","end":"(?!\\\\G)","patterns":[{"include":"#declarations-generic-parameter-clause"}]},{"include":"#declarations-typealias-assignment"}]},"declarations-typealias-assignment":{"begin":"(=)\\\\s*","beginCaptures":{"1":{"name":"keyword.operator.assignment.swift"}},"end":"(?!\\\\G)$|(?=;|//|/\\\\*|$)","patterns":[{"include":"#declarations-available-types"}]},"declarations-typed-variable-declaration":{"begin":"\\\\b(?:(async)\\\\s+)?(let|var)\\\\b\\\\s+(?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>)\\\\s*:","beginCaptures":{"1":{"name":"storage.modifier.async.swift"},"2":{"name":"keyword.other.declaration-specifier.swift"}},"end":"(?=$|[={])","patterns":[{"include":"#declarations-available-types"}]},"declarations-types-precedencegroup":{"patterns":[{"match":"\\\\b(?:BitwiseShift|Assignment|RangeFormation|Casting|Addition|NilCoalescing|Comparison|LogicalConjunction|LogicalDisjunction|Default|Ternary|Multiplication|FunctionArrow)Precedence\\\\b","name":"support.type.swift"}]},"expressions":{"patterns":[{"include":"#expressions-without-trailing-closures-or-member-references"},{"include":"#expressions-trailing-closure"},{"include":"#member-reference"}]},"expressions-trailing-closure":{"patterns":[{"captures":{"1":{"name":"support.function.any-method.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"}},"match":"(#?(?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))(?=\\\\s*\\\\{)","name":"meta.function-call.trailing-closure-only.swift"},{"captures":{"1":{"name":"support.function.any-method.trailing-closure-label.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.separator.argument-label.swift"}},"match":"((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*(:)(?=\\\\s*\\\\{)"}]},"expressions-without-trailing-closures":{"patterns":[{"include":"#expressions-without-trailing-closures-or-member-references"},{"include":"#member-references"}]},"expressions-without-trailing-closures-or-member-references":{"patterns":[{"include":"#comments"},{"include":"#code-block"},{"include":"#attributes"},{"include":"#expressions-without-trailing-closures-or-member-references-closure-parameter"},{"include":"#literals"},{"include":"#operators"},{"include":"#builtin-types"},{"include":"#builtin-functions"},{"include":"#builtin-global-functions"},{"include":"#builtin-properties"},{"include":"#expressions-without-trailing-closures-or-member-references-compound-name"},{"include":"#conditionals"},{"include":"#keywords"},{"include":"#expressions-without-trailing-closures-or-member-references-availability-condition"},{"include":"#expressions-without-trailing-closures-or-member-references-function-or-macro-call-expression"},{"include":"#expressions-without-trailing-closures-or-member-references-macro-expansion"},{"include":"#expressions-without-trailing-closures-or-member-references-subscript-expression"},{"include":"#expressions-without-trailing-closures-or-member-references-parenthesized-expression"},{"match":"\\\\b_\\\\b","name":"support.variable.discard-value.swift"}]},"expressions-without-trailing-closures-or-member-references-availability-condition":{"begin":"\\\\B(#(?:un)?available)(\\\\()","beginCaptures":{"1":{"name":"support.function.availability-condition.swift"},"2":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"patterns":[{"captures":{"1":{"name":"keyword.other.platform.os.swift"},"2":{"name":"constant.numeric.swift"}},"match":"\\\\s*\\\\b((?:iOS|macOS|OSX|watchOS|tvOS|visionOS|UIKitForMac)(?:ApplicationExtension)?)\\\\b\\\\s+([0-9]+(?:\\\\.[0-9]+)*)\\\\b"},{"captures":{"1":{"name":"keyword.other.platform.all.swift"},"2":{"name":"invalid.illegal.character-not-allowed-here.swift"}},"match":"(\\\\*)\\\\s*(.*?)(?=[),])"},{"match":"[^),\\\\s]+","name":"invalid.illegal.character-not-allowed-here.swift"}]},"expressions-without-trailing-closures-or-member-references-closure-parameter":{"match":"\\\\$[0-9]+","name":"variable.language.closure-parameter.swift"},"expressions-without-trailing-closures-or-member-references-compound-name":{"captures":{"1":{"name":"entity.name.function.compound-name.swift"},"2":{"name":"punctuation.definition.entity.swift"},"3":{"name":"punctuation.definition.entity.swift"},"4":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.entity.swift"},"2":{"name":"punctuation.definition.entity.swift"}},"match":"(?<q>`?)(?!_:)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>):","name":"entity.name.function.compound-name.swift"}]}},"match":"((?<q1>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q1>))\\\\(((((?<q2>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q2>)):)+)\\\\)"},"expressions-without-trailing-closures-or-member-references-expression-element-list":{"patterns":[{"include":"#comments"},{"begin":"((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*(:)","beginCaptures":{"1":{"name":"support.function.any-method.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.separator.argument-label.swift"}},"end":"(?=[]),])","patterns":[{"include":"#expressions"}]},{"begin":"(?![]),])(?=\\\\S)","end":"(?=[]),])","patterns":[{"include":"#expressions"}]}]},"expressions-without-trailing-closures-or-member-references-function-or-macro-call-expression":{"patterns":[{"begin":"(#?(?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*(\\\\()","beginCaptures":{"1":{"name":"support.function.any-method.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"name":"meta.function-call.swift","patterns":[{"include":"#expressions-without-trailing-closures-or-member-references-expression-element-list"}]},{"begin":"(?<=[])>_`}\\\\p{L}\\\\p{N}\\\\p{M}])\\\\s*(\\\\()","beginCaptures":{"1":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"name":"meta.function-call.swift","patterns":[{"include":"#expressions-without-trailing-closures-or-member-references-expression-element-list"}]}]},"expressions-without-trailing-closures-or-member-references-macro-expansion":{"match":"(#(?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))","name":"support.function.any-method.swift"},"expressions-without-trailing-closures-or-member-references-parenthesized-expression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.tuple.begin.swift"}},"end":"(\\\\))\\\\s*((?:\\\\b(?:async|throws|rethrows)\\\\s)*)","endCaptures":{"1":{"name":"punctuation.section.tuple.end.swift"},"2":{"patterns":[{"match":"\\\\brethrows\\\\b","name":"invalid.illegal.rethrows-only-allowed-on-function-declarations.swift"},{"include":"#async-throws"}]}},"patterns":[{"include":"#expressions-without-trailing-closures-or-member-references-expression-element-list"}]},"expressions-without-trailing-closures-or-member-references-subscript-expression":{"begin":"(?<=[_`\\\\p{L}\\\\p{N}\\\\p{M}])\\\\s*(\\\\[)","beginCaptures":{"1":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"name":"meta.subscript-expression.swift","patterns":[{"include":"#expressions-without-trailing-closures-or-member-references-expression-element-list"}]},"keywords":{"patterns":[{"match":"(?<!\\\\.)\\\\b(?:if|else|guard|where|switch|case|default|fallthrough)\\\\b","name":"keyword.control.branch.swift"},{"match":"(?<!\\\\.)\\\\b(?:continue|break|fallthrough|return|yield)\\\\b","name":"keyword.control.transfer.swift"},{"match":"(?<!\\\\.)\\\\b(?:while|for|in|each)\\\\b","name":"keyword.control.loop.swift"},{"match":"(?<=\\\\s)\\\\bof\\\\b(?=\\\\s+[(\\\\[_\\\\p{L}\\\\d\\\\p{N}\\\\p{M}])","name":"keyword.other.inline-array.swift"},{"match":"\\\\bany\\\\b(?=\\\\s*`?[_\\\\p{L}])","name":"keyword.other.operator.type.existential.swift"},{"captures":{"1":{"name":"keyword.control.loop.swift"},"2":{"name":"punctuation.whitespace.trailing.repeat.swift"}},"match":"(?<!\\\\.)\\\\b(repeat)\\\\b(\\\\s*)"},{"match":"(?<!\\\\.)\\\\bdefer\\\\b","name":"keyword.control.defer.swift"},{"captures":{"1":{"name":"invalid.illegal.try-must-precede-await.swift"},"2":{"name":"keyword.control.await.swift"}},"match":"(?<!\\\\.)\\\\b(?:(await\\\\s+try)|(await))\\\\b"},{"match":"(?<!\\\\.)\\\\b(?:catch|throw|try)\\\\b|\\\\btry[!?]\\\\B","name":"keyword.control.exception.swift"},{"match":"(?<!\\\\.)\\\\b(?:|re)throws\\\\b","name":"storage.modifier.exception.swift"},{"captures":{"1":{"name":"keyword.control.exception.swift"},"2":{"name":"punctuation.whitespace.trailing.do.swift"}},"match":"(?<!\\\\.)\\\\b(do)\\\\b(\\\\s*)"},{"captures":{"1":{"name":"storage.modifier.async.swift"},"2":{"name":"keyword.other.declaration-specifier.swift"}},"match":"(?<!\\\\.)\\\\b(?:(async)\\\\s+)?(let|var)\\\\b"},{"match":"(?<!\\\\.)\\\\b(?:associatedtype|operator|typealias)\\\\b","name":"keyword.other.declaration-specifier.swift"},{"match":"(?<!\\\\.)\\\\b(class|enum|extension|precedencegroup|protocol|struct|actor)\\\\b(?=\\\\s*`?[_\\\\p{L}])","name":"storage.type.$1.swift"},{"match":"(?<!\\\\.)\\\\b(?:inout|static|final|lazy|mutating|nonmutating|optional|indirect|required|override|dynamic|convenience|infix|prefix|postfix|distributed|nonisolated|borrowing|consuming)\\\\b","name":"storage.modifier.swift"},{"match":"\\\\binit[!?]|\\\\binit\\\\b|(?<!\\\\.)\\\\b(?:func|deinit|subscript|didSet|get|set|willSet|yielding\\\\s+borrow|yielding\\\\s+mutate)\\\\b","name":"storage.type.function.swift"},{"match":"(?<!\\\\.)\\\\b(?:fileprivate|private|internal|public|open|package)\\\\b","name":"keyword.other.declaration-specifier.accessibility.swift"},{"match":"(?<!\\\\.)\\\\bunowned\\\\((?:|un)safe\\\\)|(?<!\\\\.)\\\\b(?:weak|unowned)\\\\b","name":"keyword.other.capture-specifier.swift"},{"captures":{"1":{"name":"keyword.other.type.swift"},"2":{"name":"keyword.other.type.metatype.swift"}},"match":"(?<=\\\\.)(?:(dynamicType|self)|(Protocol|Type))\\\\b"},{"match":"(?<!\\\\.)\\\\b(?:super|self|Self)\\\\b","name":"variable.language.swift"},{"match":"(?:\\\\B#(?:file|filePath|fileID|line|column|function|dsohandle)|\\\\b__(?:FILE|LINE|COLUMN|FUNCTION|DSO_HANDLE)__)\\\\b","name":"support.variable.swift"},{"match":"(?<!\\\\.)\\\\bimport\\\\b","name":"keyword.control.import.swift"},{"match":"(?<!\\\\.)\\\\bconsume(?=\\\\s+`?[_\\\\p{L}])","name":"keyword.control.consume.swift"},{"match":"(?<!\\\\.)\\\\bcopy(?=\\\\s+`?[_\\\\p{L}])","name":"keyword.control.copy.swift"}]},"literals":{"patterns":[{"include":"#literals-boolean"},{"include":"#literals-numeric"},{"include":"#literals-string"},{"match":"\\\\bnil\\\\b","name":"constant.language.nil.swift"},{"match":"\\\\B#((?:color|image|file)Literal)\\\\b","name":"support.function.object-literal.swift"},{"match":"\\\\B#externalMacro\\\\b","name":"support.function.builtin-macro.swift"},{"match":"\\\\B#keyPath\\\\b","name":"support.function.key-path.swift"},{"begin":"\\\\B(#selector)(\\\\()(?:\\\\s*([gs]etter)\\\\s*(:))?","beginCaptures":{"1":{"name":"support.function.selector-reference.swift"},"2":{"name":"punctuation.definition.arguments.begin.swift"},"3":{"name":"support.variable.parameter.swift"},"4":{"name":"punctuation.separator.argument-label.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"patterns":[{"include":"#expressions"}]},{"include":"#literals-regular-expression-literal"}]},"literals-boolean":{"match":"\\\\b(true|false)\\\\b","name":"constant.language.boolean.swift"},"literals-numeric":{"patterns":[{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)[0-9][0-9_]*(?=\\\\.[0-9]|[Ee])(?:\\\\.[0-9][0-9_]*)?(?:[Ee][-+]?[0-9][0-9_]*)?\\\\b(?!\\\\.[0-9])","name":"constant.numeric.float.decimal.swift"},{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)(0x\\\\h[_\\\\h]*)(?:\\\\.\\\\h[_\\\\h]*)?[Pp][-+]?[0-9][0-9_]*\\\\b(?!\\\\.[0-9])","name":"constant.numeric.float.hexadecimal.swift"},{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)(0x\\\\h[_\\\\h]*)(?:\\\\.\\\\h[_\\\\h]*)?[Pp][-+]?\\\\w*\\\\b(?!\\\\.[0-9])","name":"invalid.illegal.numeric.float.invalid-exponent.swift"},{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)(0x\\\\h[_\\\\h]*)\\\\.[0-9][.\\\\w]*","name":"invalid.illegal.numeric.float.missing-exponent.swift"},{"match":"(?<=\\\\s|^)-?\\\\.[0-9][.\\\\w]*","name":"invalid.illegal.numeric.float.missing-leading-zero.swift"},{"match":"(\\\\B-|\\\\b)0[box]_[_\\\\h]*(?:[EPep][-+]?\\\\w+)?[.\\\\w]+","name":"invalid.illegal.numeric.leading-underscore.swift"},{"match":"(?<=[]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)[0-9]+\\\\b"},{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)0b[01][01_]*\\\\b(?!\\\\.[0-9])","name":"constant.numeric.integer.binary.swift"},{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)0o[0-7][0-7_]*\\\\b(?!\\\\.[0-9])","name":"constant.numeric.integer.octal.swift"},{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)[0-9][0-9_]*\\\\b(?!\\\\.[0-9])","name":"constant.numeric.integer.decimal.swift"},{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)0x\\\\h[_\\\\h]*\\\\b(?!\\\\.[0-9])","name":"constant.numeric.integer.hexadecimal.swift"},{"match":"(\\\\B-|\\\\b)[0-9][.\\\\w]*","name":"invalid.illegal.numeric.other.swift"}]},"literals-regular-expression-literal":{"patterns":[{"begin":"(#+)/\\\\n","end":"/\\\\1","name":"string.regexp.block.swift","patterns":[{"include":"#literals-regular-expression-literal-regex-guts"},{"include":"#literals-regular-expression-literal-line-comment"}]},{"captures":{"0":{"patterns":[{"include":"#literals-regular-expression-literal-regex-guts"}]},"1":{"name":"punctuation.definition.string.begin.regexp.swift"},"3":{"name":"punctuation.definition.string.end.regexp.swift"}},"match":"(/)(?!\\\\s)(?!/)(?:\\\\\\\\\\\\s(?=/)|(?<guts>(?>(?:\\\\\\\\Q(?:(?!\\\\\\\\E)(?!/).)*+(?:\\\\\\\\E|(?=/))|\\\\\\\\.|\\\\(\\\\?#[^)]*\\\\)|\\\\(\\\\?(?>\\\\{(?:[^{].*?|\\\\{[^{].*?}|\\\\{\\\\{[^{].*?}}|\\\\{\\\\{\\\\{[^{].*?}}}|\\\\{\\\\{\\\\{\\\\{[^{].*?}}}}|\\\\{\\\\{\\\\{\\\\{\\\\{.+?}}}}})})(?:\\\\[(?!\\\\d)\\\\w+])?[<>X]?\\\\)|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\]|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\]|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\]|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\])+])+])+])+]|\\\\(\\\\g<guts>?+\\\\)|(?:(?!/)[^()\\\\[\\\\\\\\])+)+))?+(?<!\\\\s))(/)","name":"string.regexp.line.swift"},{"captures":{"0":{"patterns":[{"include":"#literals-regular-expression-literal-regex-guts"}]},"1":{"name":"punctuation.definition.string.begin.regexp.swift"},"4":{"name":"punctuation.definition.string.end.regexp.swift"},"5":{"name":"invalid.illegal.returns-not-allowed.regexp"}},"match":"((#+)/)(?<guts>(?>(?:\\\\\\\\Q(?:(?!\\\\\\\\E)(?!/\\\\2).)*+(?:\\\\\\\\E|(?=/\\\\2))|\\\\\\\\.|\\\\(\\\\?#[^)]*\\\\)|\\\\(\\\\?(?>\\\\{(?:[^{].*?|\\\\{[^{].*?}|\\\\{\\\\{[^{].*?}}|\\\\{\\\\{\\\\{[^{].*?}}}|\\\\{\\\\{\\\\{\\\\{[^{].*?}}}}|\\\\{\\\\{\\\\{\\\\{\\\\{.+?}}}}})})(?:\\\\[(?!\\\\d)\\\\w+])?[<>X]?\\\\)|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\]|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\]|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\]|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\])+])+])+])+]|\\\\(\\\\g<guts>?+\\\\)|(?:(?!/\\\\2)[^()\\\\[\\\\\\\\])+)+))?+(/\\\\2)|#+/.+(\\\\n)","name":"string.regexp.line.extended.swift"}]},"literals-regular-expression-literal-backreference-or-subpattern":{"patterns":[{"captures":{"1":{"name":"constant.character.escape.backslash.regexp"},"2":{"name":"variable.other.group-name.regexp"},"3":{"name":"keyword.operator.recursion-level.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"},"5":{"name":"constant.numeric.integer.decimal.regexp"},"6":{"name":"keyword.operator.recursion-level.regexp"},"7":{"name":"constant.numeric.integer.decimal.regexp"},"8":{"name":"constant.character.escape.backslash.regexp"}},"match":"(\\\\\\\\g\\\\{)(?:((?!\\\\d)\\\\w+)(?:([-+])(\\\\d+))?|([-+]?\\\\d+)(?:([-+])(\\\\d+))?)(})"},{"captures":{"1":{"name":"constant.character.escape.backslash.regexp"},"2":{"name":"constant.numeric.integer.decimal.regexp"},"3":{"name":"keyword.operator.recursion-level.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"}},"match":"(\\\\\\\\g)([-+]?\\\\d+)(?:([-+])(\\\\d+))?"},{"captures":{"1":{"name":"constant.character.escape.backslash.regexp"},"2":{"name":"variable.other.group-name.regexp"},"3":{"name":"keyword.operator.recursion-level.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"},"5":{"name":"constant.numeric.integer.decimal.regexp"},"6":{"name":"keyword.operator.recursion-level.regexp"},"7":{"name":"constant.numeric.integer.decimal.regexp"},"8":{"name":"constant.character.escape.backslash.regexp"}},"match":"(\\\\\\\\[gk]<)(?:((?!\\\\d)\\\\w+)(?:([-+])(\\\\d+))?|([-+]?\\\\d+)(?:([-+])(\\\\d+))?)(>)"},{"captures":{"1":{"name":"constant.character.escape.backslash.regexp"},"2":{"name":"variable.other.group-name.regexp"},"3":{"name":"keyword.operator.recursion-level.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"},"5":{"name":"constant.numeric.integer.decimal.regexp"},"6":{"name":"keyword.operator.recursion-level.regexp"},"7":{"name":"constant.numeric.integer.decimal.regexp"},"8":{"name":"constant.character.escape.backslash.regexp"}},"match":"(\\\\\\\\[gk]\')(?:((?!\\\\d)\\\\w+)(?:([-+])(\\\\d+))?|([-+]?\\\\d+)(?:([-+])(\\\\d+))?)(\')"},{"captures":{"1":{"name":"constant.character.escape.backslash.regexp"},"2":{"name":"variable.other.group-name.regexp"},"3":{"name":"keyword.operator.recursion-level.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"},"5":{"name":"constant.character.escape.backslash.regexp"}},"match":"(\\\\\\\\k\\\\{)((?!\\\\d)\\\\w+)(?:([-+])(\\\\d+))?(})"},{"match":"\\\\\\\\[1-9][0-9]+","name":"keyword.other.back-reference.regexp"},{"captures":{"1":{"name":"keyword.other.back-reference.regexp"},"2":{"name":"variable.other.group-name.regexp"},"3":{"name":"keyword.operator.recursion-level.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"},"5":{"name":"keyword.other.back-reference.regexp"}},"match":"(\\\\(\\\\?(?:P[=>]|&))((?!\\\\d)\\\\w+)(?:([-+])(\\\\d+))?(\\\\))"},{"match":"\\\\(\\\\?R\\\\)","name":"keyword.other.back-reference.regexp"},{"captures":{"1":{"name":"keyword.other.back-reference.regexp"},"2":{"name":"constant.numeric.integer.decimal.regexp"},"3":{"name":"keyword.operator.recursion-level.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"},"5":{"name":"keyword.other.back-reference.regexp"}},"match":"(\\\\(\\\\?)([-+]?\\\\d+)(?:([-+])(\\\\d+))?(\\\\))"}]},"literals-regular-expression-literal-backtracking-directive-or-global-matching-option":{"captures":{"1":{"name":"keyword.control.directive.regexp"},"2":{"name":"keyword.control.directive.regexp"},"3":{"name":"keyword.control.directive.regexp"},"4":{"name":"variable.language.tag.regexp"},"5":{"name":"keyword.control.directive.regexp"},"6":{"name":"keyword.operator.assignment.regexp"},"7":{"name":"constant.numeric.integer.decimal.regexp"},"8":{"name":"keyword.control.directive.regexp"},"9":{"name":"keyword.control.directive.regexp"}},"match":"(\\\\(\\\\*)(?:(ACCEPT|FAIL|F|MARK(?=:)|(?=:)|COMMIT|PRUNE|SKIP|THEN)(?:(:)([^)]+))?|(LIMIT_(?:DEPTH|HEAP|MATCH))(=)(\\\\d+)|(CRLF|CR|ANYCRLF|ANY|LF|NUL|BSR_ANYCRLF|BSR_UNICODE|NOTEMPTY_ATSTART|NOTEMPTY|NO_AUTO_POSSESS|NO_DOTSTAR_ANCHOR|NO_JIT|NO_START_OPT|UTF|UCP))(\\\\))"},"literals-regular-expression-literal-callout":{"captures":{"1":{"name":"punctuation.definition.group.regexp"},"2":{"name":"keyword.control.callout.regexp"},"3":{"name":"constant.numeric.integer.decimal.regexp"},"4":{"name":"entity.name.function.callout.regexp"},"5":{"name":"entity.name.function.callout.regexp"},"6":{"name":"entity.name.function.callout.regexp"},"7":{"name":"entity.name.function.callout.regexp"},"8":{"name":"entity.name.function.callout.regexp"},"9":{"name":"entity.name.function.callout.regexp"},"10":{"name":"entity.name.function.callout.regexp"},"11":{"name":"entity.name.function.callout.regexp"},"12":{"name":"punctuation.definition.group.regexp"},"13":{"name":"punctuation.definition.group.regexp"},"14":{"name":"keyword.control.callout.regexp"},"15":{"name":"entity.name.function.callout.regexp"},"16":{"name":"variable.language.tag-name.regexp"},"17":{"name":"punctuation.definition.group.regexp"},"18":{"name":"punctuation.definition.group.regexp"},"19":{"name":"keyword.control.callout.regexp"},"21":{"name":"variable.language.tag-name.regexp"},"22":{"name":"keyword.control.callout.regexp"},"23":{"name":"punctuation.definition.group.regexp"}},"match":"(\\\\()(?<keyw>\\\\?C)(?:(?<num>\\\\d+)|`(?<name>(?:[^`]|``)*)`|\'(?<name>(?:[^\']|\'\')*)\'|\\"(?<name>(?:[^\\"]|\\"\\")*)\\"|\\\\^(?<name>(?:[^^]|\\\\^\\\\^)*)\\\\^|%(?<name>(?:[^%]|%%)*)%|#(?<name>(?:[^#]|##)*)#|\\\\$(?<name>(?:[^$]|\\\\$\\\\$)*)\\\\$|\\\\{(?<name>(?:[^}]|}})*)})?(\\\\))|(\\\\()(?<keyw>\\\\*)(?<name>(?!\\\\d)\\\\w+)(?:\\\\[(?<tag>(?!\\\\d)\\\\w+)])?(?:\\\\{[^,}]+(?:,[^,}]+)*})?(\\\\))|(\\\\()(?<keyw>\\\\?)(?>(\\\\{(?:\\\\g<20>|(?!\\\\{).*?)}))(?:\\\\[(?<tag>(?!\\\\d)\\\\w+)])?(?<keyw>[<>X]?)(\\\\))","name":"meta.callout.regexp"},"literals-regular-expression-literal-character-properties":{"captures":{"1":{"name":"support.variable.character-property.regexp"},"2":{"name":"punctuation.definition.character-class.regexp"},"3":{"name":"support.variable.character-property.regexp"},"4":{"name":"punctuation.definition.character-class.regexp"}},"match":"\\\\\\\\[Pp]\\\\{([-\\\\s\\\\w]+(?:=[-\\\\s\\\\w]+)?)}|(\\\\[:)([-\\\\s\\\\w]+(?:=[-\\\\s\\\\w]+)?)(:])","name":"constant.other.character-class.set.regexp"},"literals-regular-expression-literal-custom-char-class":{"patterns":[{"begin":"(\\\\[)(\\\\^)?","beginCaptures":{"1":{"name":"punctuation.definition.character-class.regexp"},"2":{"name":"keyword.operator.negation.regexp"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.character-class.regexp"}},"name":"constant.other.character-class.set.regexp","patterns":[{"include":"#literals-regular-expression-literal-custom-char-class-members"}]}]},"literals-regular-expression-literal-custom-char-class-members":{"patterns":[{"match":"\\\\\\\\b","name":"constant.character.escape.backslash.regexp"},{"include":"#literals-regular-expression-literal-custom-char-class"},{"include":"#literals-regular-expression-literal-quote"},{"include":"#literals-regular-expression-literal-set-operators"},{"include":"#literals-regular-expression-literal-unicode-scalars"},{"include":"#literals-regular-expression-literal-character-properties"}]},"literals-regular-expression-literal-group-option-toggle":{"match":"\\\\(\\\\?(?:\\\\^(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})*|(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})+|(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})*-(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})*)\\\\)","name":"keyword.other.option-toggle.regexp"},"literals-regular-expression-literal-group-or-conditional":{"patterns":[{"begin":"(\\\\()(\\\\?~)","beginCaptures":{"1":{"name":"punctuation.definition.group.regexp"},"2":{"name":"keyword.control.conditional.absent.regexp"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.regexp"}},"name":"meta.group.absent.regexp","patterns":[{"include":"#literals-regular-expression-literal-regex-guts"}]},{"begin":"(\\\\()(?<cond>\\\\?\\\\()(?:(?<NumberRef>(?<num>[-+]?\\\\d+)(?:(?<op>[-+])(?<num>\\\\d+))?)|(?<cond>R)\\\\g<NumberRef>?|(?<cond>R&)(?<NamedRef>(?<name>(?!\\\\d)\\\\w+)(?:(?<op>[-+])(?<num>\\\\d+))?)|(?<cond><)(?:\\\\g<NamedRef>|\\\\g<NumberRef>)(?<cond>>)|(?<cond>\')(?:\\\\g<NamedRef>|\\\\g<NumberRef>)(?<cond>\')|(?<cond>DEFINE)|(?<cond>VERSION)(?<compar>>?=)(?<num>\\\\d+\\\\.\\\\d+))(?<cond>\\\\))|(\\\\()(?<cond>\\\\?)(?=\\\\()","beginCaptures":{"1":{"name":"punctuation.definition.group.regexp"},"2":{"name":"keyword.control.conditional.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"},"5":{"name":"keyword.operator.recursion-level.regexp"},"6":{"name":"constant.numeric.integer.decimal.regexp"},"7":{"name":"keyword.control.conditional.regexp"},"8":{"name":"keyword.control.conditional.regexp"},"10":{"name":"variable.other.group-name.regexp"},"11":{"name":"keyword.operator.recursion-level.regexp"},"12":{"name":"constant.numeric.integer.decimal.regexp"},"13":{"name":"keyword.control.conditional.regexp"},"14":{"name":"keyword.control.conditional.regexp"},"15":{"name":"keyword.control.conditional.regexp"},"16":{"name":"keyword.control.conditional.regexp"},"17":{"name":"keyword.control.conditional.regexp"},"18":{"name":"keyword.control.conditional.regexp"},"19":{"name":"keyword.operator.comparison.regexp"},"20":{"name":"constant.numeric.integer.decimal.regexp"},"21":{"name":"keyword.control.conditional.regexp"},"22":{"name":"punctuation.definition.group.regexp"},"23":{"name":"keyword.control.conditional.regexp"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.regexp"}},"name":"meta.group.conditional.regexp","patterns":[{"include":"#literals-regular-expression-literal-regex-guts"}]},{"begin":"(\\\\()((\\\\?)(?:([!*:=>|]|<[!*=])|P?<(?:((?!\\\\d)\\\\w+)(-))?((?!\\\\d)\\\\w+)>|\'(?:((?!\\\\d)\\\\w+)(-))?((?!\\\\d)\\\\w+)\'|(?:\\\\^(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})*|(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})+|(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})*-(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})*):)|\\\\*(atomic|pla|positive_lookahead|nla|negative_lookahead|plb|positive_lookbehind|nlb|negative_lookbehind|napla|non_atomic_positive_lookahead|naplb|non_atomic_positive_lookbehind|sr|script_run|asr|atomic_script_run):)?+","beginCaptures":{"1":{"name":"punctuation.definition.group.regexp"},"2":{"name":"keyword.other.group-options.regexp"},"3":{"name":"punctuation.definition.group.regexp"},"4":{"name":"punctuation.definition.group.regexp"},"5":{"name":"variable.other.group-name.regexp"},"6":{"name":"keyword.operator.balancing-group.regexp"},"7":{"name":"variable.other.group-name.regexp"},"8":{"name":"variable.other.group-name.regexp"},"9":{"name":"keyword.operator.balancing-group.regexp"},"10":{"name":"variable.other.group-name.regexp"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.regexp"}},"name":"meta.group.regexp","patterns":[{"include":"#literals-regular-expression-literal-regex-guts"}]}]},"literals-regular-expression-literal-line-comment":{"captures":{"1":{"name":"punctuation.definition.comment.regexp"}},"match":"(#).*$","name":"comment.line.regexp"},"literals-regular-expression-literal-quote":{"begin":"\\\\\\\\Q","beginCaptures":{"0":{"name":"constant.character.escape.backslash.regexp"}},"end":"\\\\\\\\E|(\\\\n)","endCaptures":{"0":{"name":"constant.character.escape.backslash.regexp"},"1":{"name":"invalid.illegal.returns-not-allowed.regexp"}},"name":"string.quoted.other.regexp.swift"},"literals-regular-expression-literal-regex-guts":{"patterns":[{"include":"#literals-regular-expression-literal-quote"},{"begin":"\\\\(\\\\?#","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.regexp"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.comment.end.regexp"}},"name":"comment.block.regexp"},{"begin":"<\\\\{","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.regexp"}},"end":"}>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.regexp"}},"name":"meta.embedded.expression.regexp"},{"include":"#literals-regular-expression-literal-unicode-scalars"},{"include":"#literals-regular-expression-literal-character-properties"},{"match":"[$^]|\\\\\\\\[ABGYZbyz]|\\\\\\\\K","name":"keyword.control.anchor.regexp"},{"include":"#literals-regular-expression-literal-backtracking-directive-or-global-matching-option"},{"include":"#literals-regular-expression-literal-callout"},{"include":"#literals-regular-expression-literal-backreference-or-subpattern"},{"match":"\\\\.|\\\\\\\\[CDHNORSVWXdhsvw]","name":"constant.character.character-class.regexp"},{"match":"\\\\\\\\c.","name":"constant.character.entity.control-character.regexp"},{"match":"\\\\\\\\[^c]","name":"constant.character.escape.backslash.regexp"},{"match":"\\\\|","name":"keyword.operator.or.regexp"},{"match":"[*+?]","name":"keyword.operator.quantifier.regexp"},{"match":"\\\\{(?:\\\\s*\\\\d+\\\\s*(?:,\\\\s*\\\\d*\\\\s*)?}|\\\\s*,\\\\s*\\\\d+\\\\s*})","name":"keyword.operator.quantifier.regexp"},{"include":"#literals-regular-expression-literal-custom-char-class"},{"include":"#literals-regular-expression-literal-group-option-toggle"},{"include":"#literals-regular-expression-literal-group-or-conditional"}]},"literals-regular-expression-literal-set-operators":{"patterns":[{"match":"&&","name":"keyword.operator.intersection.regexp.swift"},{"match":"--","name":"keyword.operator.subtraction.regexp.swift"},{"match":"~~","name":"keyword.operator.symmetric-difference.regexp.swift"}]},"literals-regular-expression-literal-unicode-scalars":{"match":"\\\\\\\\(?:u\\\\{\\\\s*(?:\\\\h+\\\\s*)+}|u\\\\h{4}|x\\\\{\\\\h+}|x\\\\h{0,2}|U\\\\h{8}|o\\\\{[0-7]+}|0[0-7]{0,3}|N\\\\{(?:U\\\\+\\\\h{1,8}|[-\\\\s\\\\w]+)})","name":"constant.character.numeric.regexp"},"literals-string":{"patterns":[{"begin":"\\"\\"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.swift"}},"end":"\\"\\"\\"(#*)","endCaptures":{"0":{"name":"punctuation.definition.string.end.swift"},"1":{"name":"invalid.illegal.extra-closing-delimiter.swift"}},"name":"string.quoted.double.block.swift","patterns":[{"match":"\\\\G(?:.+(?=\\"\\"\\")|.+)","name":"invalid.illegal.content-after-opening-delimiter.swift"},{"match":"\\\\\\\\\\\\s*\\\\n","name":"constant.character.escape.newline.swift"},{"include":"#literals-string-string-guts"},{"match":"\\\\S((?!\\\\\\\\\\\\().)*(?=\\"\\"\\")","name":"invalid.illegal.content-before-closing-delimiter.swift"}]},{"begin":"#\\"\\"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.swift"}},"end":"\\"\\"\\"#(#*)","endCaptures":{"0":{"name":"punctuation.definition.string.end.swift"},"1":{"name":"invalid.illegal.extra-closing-delimiter.swift"}},"name":"string.quoted.double.block.raw.swift","patterns":[{"match":"\\\\G(?:.+(?=\\"\\"\\")|.+)","name":"invalid.illegal.content-after-opening-delimiter.swift"},{"match":"\\\\\\\\#\\\\s*\\\\n","name":"constant.character.escape.newline.swift"},{"include":"#literals-string-raw-string-guts"},{"match":"\\\\S((?!\\\\\\\\#\\\\().)*(?=\\"\\"\\")","name":"invalid.illegal.content-before-closing-delimiter.swift"}]},{"begin":"(##+)\\"\\"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.swift"}},"end":"\\"\\"\\"\\\\1(#*)","endCaptures":{"0":{"name":"punctuation.definition.string.end.swift"},"1":{"name":"invalid.illegal.extra-closing-delimiter.swift"}},"name":"string.quoted.double.block.raw.swift","patterns":[{"match":"\\\\G(?:.+(?=\\"\\"\\")|.+)","name":"invalid.illegal.content-after-opening-delimiter.swift"}]},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.swift"}},"end":"\\"(#*)","endCaptures":{"0":{"name":"punctuation.definition.string.end.swift"},"1":{"name":"invalid.illegal.extra-closing-delimiter.swift"}},"name":"string.quoted.double.single-line.swift","patterns":[{"match":"[\\\\n\\\\r]","name":"invalid.illegal.returns-not-allowed.swift"},{"include":"#literals-string-string-guts"}]},{"begin":"(##+)\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.raw.swift"}},"end":"\\"\\\\1(#*)","endCaptures":{"0":{"name":"punctuation.definition.string.end.raw.swift"},"1":{"name":"invalid.illegal.extra-closing-delimiter.swift"}},"name":"string.quoted.double.single-line.raw.swift","patterns":[{"match":"[\\\\n\\\\r]","name":"invalid.illegal.returns-not-allowed.swift"}]},{"begin":"#\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.raw.swift"}},"end":"\\"#(#*)","endCaptures":{"0":{"name":"punctuation.definition.string.end.raw.swift"},"1":{"name":"invalid.illegal.extra-closing-delimiter.swift"}},"name":"string.quoted.double.single-line.raw.swift","patterns":[{"match":"[\\\\n\\\\r]","name":"invalid.illegal.returns-not-allowed.swift"},{"include":"#literals-string-raw-string-guts"}]}]},"literals-string-raw-string-guts":{"patterns":[{"match":"\\\\\\\\#[\\"\'0\\\\\\\\nrt]","name":"constant.character.escape.swift"},{"match":"\\\\\\\\#u\\\\{\\\\h{1,8}}","name":"constant.character.escape.unicode.swift"},{"begin":"\\\\\\\\#\\\\(","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.swift"}},"contentName":"source.swift","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.embedded.end.swift"}},"name":"meta.embedded.line.swift","patterns":[{"include":"$self"},{"begin":"\\\\(","end":"\\\\)"}]},{"match":"\\\\\\\\#.","name":"invalid.illegal.escape-not-recognized"}]},"literals-string-string-guts":{"patterns":[{"match":"\\\\\\\\[\\"\'0\\\\\\\\nrt]","name":"constant.character.escape.swift"},{"match":"\\\\\\\\u\\\\{\\\\h{1,8}}","name":"constant.character.escape.unicode.swift"},{"begin":"\\\\\\\\\\\\(","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.swift"}},"contentName":"source.swift","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.embedded.end.swift"}},"name":"meta.embedded.line.swift","patterns":[{"include":"$self"},{"begin":"\\\\(","end":"\\\\)"}]},{"match":"\\\\\\\\.","name":"invalid.illegal.escape-not-recognized"}]},"member-reference":{"patterns":[{"captures":{"1":{"name":"variable.other.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"}},"match":"(?<=\\\\.)((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))"}]},"operators":{"patterns":[{"match":"\\\\b(is\\\\b|as([!?]\\\\B|\\\\b))","name":"keyword.operator.type-casting.swift"},{"begin":"(?=(?<oph>[-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷‖‗†-‧‰-‾⁁-⁓⁕-⁞←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰])|\\\\.(\\\\g<oph>|[.̀-ͯ᷀-᷿⃐-⃿︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))","end":"(?!\\\\G)","patterns":[{"captures":{"0":{"patterns":[{"match":"\\\\G(\\\\+\\\\+|--)$","name":"keyword.operator.increment-or-decrement.swift"},{"match":"\\\\G([-+])$","name":"keyword.operator.arithmetic.unary.swift"},{"match":"\\\\G!$","name":"keyword.operator.logical.not.swift"},{"match":"\\\\G~$","name":"keyword.operator.bitwise.not.swift"},{"match":".+","name":"keyword.operator.custom.prefix.swift"}]}},"match":"\\\\G(?<=^|[(,:;\\\\[{\\\\s])((?!(//|/\\\\*|\\\\*/))([-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷̀-ͯ᷀-᷿‖‗†-‧‰-‾⁁-⁓⁕-⁞⃐-⃿←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))++(?![]),:;}\\\\s]|\\\\z)"},{"captures":{"0":{"patterns":[{"match":"\\\\G(\\\\+\\\\+|--)$","name":"keyword.operator.increment-or-decrement.swift"},{"match":"\\\\G!$","name":"keyword.operator.increment-or-decrement.swift"},{"match":".+","name":"keyword.operator.custom.postfix.swift"}]}},"match":"\\\\G(?<!^|[(,:;\\\\[{\\\\s])((?!(//|/\\\\*|\\\\*/))([-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷̀-ͯ᷀-᷿‖‗†-‧‰-‾⁁-⁓⁕-⁞⃐-⃿←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))++(?=[]),:;}\\\\s]|\\\\z)"},{"captures":{"0":{"patterns":[{"match":"\\\\G=$","name":"keyword.operator.assignment.swift"},{"match":"\\\\G([-%*+/]|<<|>>|[\\\\&^|]|&&|\\\\|\\\\|)=$","name":"keyword.operator.assignment.compound.swift"},{"match":"\\\\G([-*+/])$","name":"keyword.operator.arithmetic.swift"},{"match":"\\\\G&([-*+])$","name":"keyword.operator.arithmetic.overflow.swift"},{"match":"\\\\G%$","name":"keyword.operator.arithmetic.remainder.swift"},{"match":"\\\\G(==|!=|[<>]|>=|<=|~=)$","name":"keyword.operator.comparison.swift"},{"match":"\\\\G\\\\?\\\\?$","name":"keyword.operator.coalescing.swift"},{"match":"\\\\G(&&|\\\\|\\\\|)$","name":"keyword.operator.logical.swift"},{"match":"\\\\G([\\\\&^|]|<<|>>)$","name":"keyword.operator.bitwise.swift"},{"match":"\\\\G([!=]==)$","name":"keyword.operator.bitwise.swift"},{"match":"\\\\G\\\\?$","name":"keyword.operator.ternary.swift"},{"match":".+","name":"keyword.operator.custom.infix.swift"}]}},"match":"\\\\G((?!(//|/\\\\*|\\\\*/))([-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷̀-ͯ᷀-᷿‖‗†-‧‰-‾⁁-⁓⁕-⁞⃐-⃿←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))++"},{"captures":{"0":{"patterns":[{"match":".+","name":"keyword.operator.custom.prefix.dot.swift"}]}},"match":"\\\\G(?<=^|[(,:;\\\\[{\\\\s])\\\\.((?!(//|/\\\\*|\\\\*/))([-!%\\\\&*+./<-?^|~¡-§©«¬®°±¶»¿×÷̀-ͯ᷀-᷿‖‗†-‧‰-‾⁁-⁓⁕-⁞⃐-⃿←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))++(?![]),:;}\\\\s]|\\\\z)"},{"captures":{"0":{"patterns":[{"match":".+","name":"keyword.operator.custom.postfix.dot.swift"}]}},"match":"\\\\G(?<!^|[(,:;\\\\[{\\\\s])\\\\.((?!(//|/\\\\*|\\\\*/))([-!%\\\\&*+./<-?^|~¡-§©«¬®°±¶»¿×÷̀-ͯ᷀-᷿‖‗†-‧‰-‾⁁-⁓⁕-⁞⃐-⃿←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))++(?=[]),:;}\\\\s]|\\\\z)"},{"captures":{"0":{"patterns":[{"match":"\\\\G\\\\.\\\\.[.<]$","name":"keyword.operator.range.swift"},{"match":".+","name":"keyword.operator.custom.infix.dot.swift"}]}},"match":"\\\\G\\\\.((?!(//|/\\\\*|\\\\*/))([-!%\\\\&*+./<-?^|~¡-§©«¬®°±¶»¿×÷̀-ͯ᷀-᷿‖‗†-‧‰-‾⁁-⁓⁕-⁞⃐-⃿←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))++"}]},{"match":":","name":"keyword.operator.ternary.swift"}]},"root":{"patterns":[{"include":"#compiler-control"},{"include":"#declarations"},{"include":"#expressions"}]}},"scopeName":"source.swift"}')),t=[e];export{t as default};
@@ -0,0 +1 @@
1
+ import{r as i,w as he,j as V}from"./main-B_dlfHME.js";import{ac as G,af as c,ab as P,t as ve,ad as pe,ag as K,c as H}from"./button-Dg7VFQQn.js";import{u as be}from"./useControlled-Dscz_s4f.js";import{a as M,u as x,d as Q,e as ge,f as xe,g as ke,n as ye}from"./useButton-Cbl_9oFG.js";import{v as Ce,a as Ie}from"./visuallyHidden-ONmQ-0U2.js";const W=i.createContext(void 0);function Ve(){const e=i.useContext(W);if(e===void 0)throw new Error(G(63));return e}let Y=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const Re={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Ee={valid(e){return e===null?null:e?{[Y.valid]:""}:{[Y.invalid]:""}}};let J=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const X={...Ee,checked(e){return e?{[J.checked]:""}:{[J.unchecked]:""}}};function we(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Pe=i.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:c,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function Z(){return i.useContext(Pe)}const Me=i.createContext({invalid:void 0,name:void 0,validityData:{state:Re,errors:[],error:"",value:"",initialValue:null},setValidityData:c,disabled:void 0,touched:!1,setTouched:c,dirty:!1,setDirty:c,filled:!1,setFilled:c,focused:!1,setFocused:c,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=P)=>e,getInputValidationProps:(e=P)=>e,inputRef:{current:null},commit:async()=>{}}});function T(e=!0){const t=i.useContext(Me);if(t.setValidityData===c&&!e)throw new Error(G(28));return t}function Te(e){const{enabled:t=!0,value:a,id:n,name:f,controlRef:s,commit:d}=e,{formRef:r}=Z(),{invalid:k,markedDirtyRef:y,validityData:C,setValidityData:p}=T(),o=M(e.getValue);x(()=>{if(!t)return;let u=a;u===void 0&&(u=o()),C.initialValue===null&&u!==null&&p(b=>({...b,initialValue:u}))},[t,p,a,C.initialValue,o]),x(()=>{!t||!n||r.current.fields.set(n,{getValue:o,name:f,controlRef:s,validityData:we(C,k),validate(u=!0){let b=a;b===void 0&&(b=o()),y.current=!0,u?he.flushSync(()=>d(b)):d(b)}})},[d,s,t,r,o,n,k,y,f,C,a]),x(()=>{const u=r.current.fields;return()=>{n&&u.delete(n)}},[r,n])}const ze=i.createContext({controlId:void 0,setControlId:c,labelId:void 0,setLabelId:c,messageIds:[],setMessageIds:c,getDescriptionProps:e=>e});function $(){return i.useContext(ze)}function Se(e={}){const{id:t,implicit:a=!1,controlRef:n}=e,{controlId:f,setControlId:s}=$(),d=Q(t);return x(()=>{if(!(!a&&!t||s===c)){if(a){const r=n?.current;ge(r)&&r.closest("label")!=null?s(t??null):s(f??d)}else t&&s(t);return()=>{t&&s(void 0)}}},[t,n,f,s,a,d]),f??d}function _e(e,t){const a=i.useRef(e),n=M(t);x(()=>{a.current!==e&&n(a.current)},[e,n]),x(()=>{a.current=e},[e])}const Be=i.forwardRef(function(t,a){const{checked:n,className:f,defaultChecked:s,id:d,inputRef:r,name:k,nativeButton:y=!1,onCheckedChange:C,readOnly:p=!1,required:o=!1,disabled:u=!1,render:b,uncheckedValue:z,value:E,...A}=t,{clearErrors:ee}=Z(),{state:S,setTouched:te,setDirty:ae,validityData:ne,setFilled:w,setFocused:_,shouldValidateOnChange:ie,validationMode:se,disabled:le,name:de,validation:m}=T(),{labelId:re}=$(),h=le||u,g=de??k,B=M(C),I=i.useRef(null),L=ve(I,r,m.inputRef),R=i.useRef(null),j=Q(),F=Se({id:d,implicit:!1,controlRef:R}),O=y?void 0:F,[l,N]=be({controlled:n,default:!!s,name:"Switch",state:"checked"});Te({id:j,commit:m.commit,value:l,controlRef:R,name:g,getValue:()=>l}),x(()=>{I.current&&w(I.current.checked)},[I,w]),_e(l,()=>{ee(g),ae(l!==ne.initialValue),w(l),ie()?m.commit(l):m.commit(l,!0)});const{getButtonProps:oe,buttonRef:ce}=xe({disabled:h,native:y}),ue={id:y?F:j,role:"switch","aria-checked":l,"aria-readonly":p||void 0,"aria-required":o||void 0,"aria-labelledby":re,onFocus(){h||_(!0)},onBlur(){const v=I.current;!v||h||(te(!0),_(!1),se==="onBlur"&&m.commit(v.checked))},onClick(v){p||h||(v.preventDefault(),I?.current?.click())}},fe=i.useMemo(()=>pe({checked:l,disabled:h,id:O,name:g,required:o,style:g?Ce:Ie,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:L,onChange(v){if(v.nativeEvent.defaultPrevented)return;const D=v.target.checked,U=ke(ye,v.nativeEvent);B?.(D,U),!U.isCanceled&&N(D)},onFocus(){R.current?.focus()}},m.getInputValidationProps,E!==void 0?{value:E}:P),[l,h,L,O,g,B,o,N,m,E]),q=i.useMemo(()=>({...S,checked:l,disabled:h,readOnly:p,required:o}),[S,l,h,p,o]),me=K("span",t,{state:q,ref:[a,R,ce],props:[ue,m.getValidationProps,A,oe],stateAttributesMapping:X});return V.jsxs(W.Provider,{value:q,children:[me,!l&&g&&z!==void 0&&V.jsx("input",{type:"hidden",name:g,value:z}),V.jsx("input",{...fe})]})}),Le=i.forwardRef(function(t,a){const{render:n,className:f,...s}=t,{state:d}=T(),r=Ve(),k={...d,...r};return K("span",t,{state:k,ref:a,stateAttributesMapping:X,props:s})});function De({className:e,...t}){return V.jsx(Be,{className:H("inline-flex h-[calc(var(--thumb-size)+2px)] w-[calc(var(--thumb-size)*2-2px)] shrink-0 items-center rounded-full p-px outline-none transition-[background-color,box-shadow] duration-200 [--thumb-size:--spacing(5)] focus-visible:ring-2 focus-visible:ring-primary-950 focus-visible:ring-offset-1 focus-visible:ring-offset-background data-checked:bg-primary-900 data-unchecked:bg-primary-200 data-disabled:opacity-64 sm:[--thumb-size:--spacing(4)]",e),"data-slot":"switch",...t,children:V.jsx(Le,{className:H("pointer-events-none block aspect-square h-full origin-left in-[[role=switch]:active,[data-slot=label]:active]:not-data-disabled:scale-x-110 in-[[role=switch]:active,[data-slot=label]:active]:rounded-[var(--thumb-size)/calc(var(--thumb-size)*1.1)] rounded-(--thumb-size) bg-primary-50 shadow-sm/5 will-change-transform [transition:translate_.15s,border-radius_.15s,scale_.1s_.1s,transform-origin_.15s] data-checked:origin-[var(--thumb-size)_50%] data-checked:translate-x-[calc(var(--thumb-size)-4px)]"),"data-slot":"switch-thumb"})})}export{De as S};
@@ -0,0 +1 @@
1
+ import{r as o,j as z}from"./main-B_dlfHME.js";import{ac as ht,ag as q,t as Rt,ah as et,ab as Mt,c as Z}from"./button-Dg7VFQQn.js";import{u as yt}from"./useControlled-Dscz_s4f.js";import{h as Et,i as Ct,a as Y,u as nt,d as St,f as wt,g as it,n as at,C as Pt}from"./useButton-Cbl_9oFG.js";import{C as gt,u as At,g as Ht,a as Lt,c as Dt,i as J,b as Ot,d as kt,e as zt,f as _t,h as Kt}from"./useCompositeItem-BDAzTxVe.js";import{r as st,u as bt}from"./DirectionContext-BdX86BHP.js";import{s as rt,A as Nt,a as Bt,i as lt,b as U,c as Q,H as Wt,E as jt,d as ct,e as tt,V as Ft,f as Yt,g as $t,h as Vt,M as Gt}from"./composite-DBl8R3ae.js";import{d as Ut,o as ut,e as Zt,u as Xt}from"./owner-CpRnf1fI.js";import{u as qt}from"./CSPContext-Bq8j4nl9.js";function Jt(){const[,t]=o.useState({});return o.useCallback(()=>{t({})},[])}function dt(t){const s=Et(t);let l=parseFloat(s.width)||0,b=parseFloat(s.height)||0;const i=Ct(t),a=i?t.offsetWidth:l,r=i?t.offsetHeight:b;return(st(l)!==a||st(b)!==r)&&(l=a,b=r),{width:l,height:b}}const pt=o.createContext(void 0);function X(){const t=o.useContext(pt);if(t===void 0)throw new Error(ht(64));return t}let Qt=(function(t){return t.activationDirection="data-activation-direction",t.orientation="data-orientation",t})({});const ot={tabActivationDirection:t=>({[Qt.activationDirection]:t})},te=o.forwardRef(function(s,l){const{className:b,defaultValue:i=0,onValueChange:a,orientation:r="horizontal",render:w,value:R,...P}=s,x=bt(),y=Object.hasOwn(s,"defaultValue"),d=o.useRef([]),[k,D]=o.useState(()=>new Map),[T,M]=yt({controlled:R,default:i,name:"Tabs",state:"value"}),v=R!==void 0,[h,c]=o.useState(()=>new Map),[E,p]=o.useState("none"),g=Y((e,m)=>{a?.(e,m),!m.isCanceled&&(M(e),p(m.activationDirection))}),f=Y((e,m)=>{D(u=>{if(u.get(e)===m)return u;const I=new Map(u);return I.set(e,m),I})}),A=Y((e,m)=>{D(u=>{if(!u.has(e)||u.get(e)!==m)return u;const I=new Map(u);return I.delete(e),I})}),n=o.useCallback(e=>k.get(e),[k]),C=o.useCallback(e=>{for(const m of h.values())if(e===m?.value)return m?.id},[h]),O=o.useCallback(e=>{if(e===void 0)return null;for(const[m,u]of h.entries())if(u!=null&&e===(u.value??u.index))return m;return null},[h]),H=o.useMemo(()=>({direction:x,getTabElementBySelectedValue:O,getTabIdByPanelValue:C,getTabPanelIdByValue:n,onValueChange:g,orientation:r,registerMountedTabPanel:f,setTabMap:c,unregisterMountedTabPanel:A,tabActivationDirection:E,value:T}),[x,O,C,n,g,r,f,c,A,E,T]),S=o.useMemo(()=>{for(const e of h.values())if(e!=null&&e.value===T)return e},[h,T]),L=o.useMemo(()=>{for(const e of h.values())if(e!=null&&!e.disabled)return e.value},[h]);nt(()=>{if(v||h.size===0)return;const e=S?.disabled,m=S==null&&T!==null;if(y&&e&&T===i||!e&&!m)return;const I=L??null;T!==I&&(M(I),p("none"))},[i,L,y,v,S,p,M,h,T]);const K=q("div",s,{state:{orientation:r,tabActivationDirection:E},ref:l,props:P,stateAttributesMapping:ot});return z.jsx(pt.Provider,{value:H,children:z.jsx(gt,{elementsRef:d,children:K})})}),mt="data-composite-item-active",vt=o.createContext(void 0);function xt(){const t=o.useContext(vt);if(t===void 0)throw new Error(ht(65));return t}const ee=o.forwardRef(function(s,l){const{className:b,disabled:i=!1,render:a,value:r,id:w,nativeButton:R=!0,...P}=s,{value:x,getTabPanelIdByValue:y,orientation:d}=X(),{activateOnFocus:k,highlightedTabIndex:D,onTabActivation:T,setHighlightedTabIndex:M,tabsListElement:v}=xt(),h=St(w),c=o.useMemo(()=>({disabled:i,id:h,value:r}),[i,h,r]),{compositeProps:E,compositeRef:p,index:g}=At({metadata:c}),f=r===x,A=o.useRef(!1);nt(()=>{if(A.current){A.current=!1;return}if(!(f&&g>-1&&D!==g))return;const u=v;if(u!=null){const I=Ut(ut(u));if(I&&Zt(u,I))return}i||M(g)},[f,g,D,M,i,v]);const{getButtonProps:n,buttonRef:C}=wt({disabled:i,native:R,focusableWhenDisabled:!0}),O=y(r),H=o.useRef(!1),S=o.useRef(!1);function L(u){f||i||T(r,it(at,u.nativeEvent,void 0,{activationDirection:"none"}))}function _(u){f||(g>-1&&!i&&M(g),!i&&k&&(!H.current||H.current&&S.current)&&T(r,it(at,u.nativeEvent,void 0,{activationDirection:"none"})))}function K(u){if(f||i)return;H.current=!0;function I(){H.current=!1,S.current=!1}(!u.button||u.button===0)&&(S.current=!0,ut(u.currentTarget).addEventListener("pointerup",I,{once:!0}))}const e=o.useMemo(()=>({disabled:i,active:f,orientation:d}),[i,f,d]);return q("button",s,{state:e,ref:[l,C,p],props:[E,{role:"tab","aria-controls":O,"aria-selected":f,id:h,onClick:L,onFocus:_,onPointerDown:K,[mt]:f?"":void 0,onKeyDownCapture(){A.current=!0}},P,n]})}),ne='!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();';let F=(function(t){return t.activeTabLeft="--active-tab-left",t.activeTabRight="--active-tab-right",t.activeTabTop="--active-tab-top",t.activeTabBottom="--active-tab-bottom",t.activeTabWidth="--active-tab-width",t.activeTabHeight="--active-tab-height",t})({});const oe={...ot,activeTabPosition:()=>null,activeTabSize:()=>null},ie=o.forwardRef(function(s,l){const{className:b,render:i,renderBeforeHydration:a=!1,...r}=s,{nonce:w}=qt(),{getTabElementBySelectedValue:R,orientation:P,tabActivationDirection:x,value:y}=X(),{tabsListElement:d}=xt(),[k,D]=o.useState(!1),{value:T}=X();Xt(()=>D(!0));const M=Jt();o.useEffect(()=>{if(y!=null&&d!=null&&typeof ResizeObserver<"u"){const L=new ResizeObserver(M);return L.observe(d),()=>{L.disconnect()}}},[y,d,M]);let v=0,h=0,c=0,E=0,p=0,g=0,f=!1;if(y!=null&&d!=null){const L=R(y);if(f=!0,L!=null){const{width:_,height:K}=dt(L),{width:e,height:m}=dt(d),u=L.getBoundingClientRect(),I=d.getBoundingClientRect(),j=e>0?I.width/e:1,G=m>0?I.height/m:1;if(Math.abs(j)>Number.EPSILON&&Math.abs(G)>Number.EPSILON){const N=u.left-I.left,$=u.top-I.top;v=N/j+d.scrollLeft-d.clientLeft,c=$/G+d.scrollTop-d.clientTop}else v=L.offsetLeft,c=L.offsetTop;p=_,g=K,h=d.scrollWidth-v-p,E=d.scrollHeight-c-g}}const A=o.useMemo(()=>f?{left:v,right:h,top:c,bottom:E}:null,[v,h,c,E,f]),n=o.useMemo(()=>f?{width:p,height:g}:null,[p,g,f]),C=o.useMemo(()=>{if(f)return{[F.activeTabLeft]:`${v}px`,[F.activeTabRight]:`${h}px`,[F.activeTabTop]:`${c}px`,[F.activeTabBottom]:`${E}px`,[F.activeTabWidth]:`${p}px`,[F.activeTabHeight]:`${g}px`}},[v,h,c,E,p,g,f]),O=f&&p>0&&g>0,H=o.useMemo(()=>({orientation:P,activeTabPosition:A,activeTabSize:n,tabActivationDirection:x}),[P,A,n,x]),S=q("span",s,{state:H,ref:l,props:[{role:"presentation",style:C,hidden:!O},r,{suppressHydrationWarning:!0}],stateAttributesMapping:oe});return T==null?null:z.jsxs(o.Fragment,{children:[S,!k&&a&&z.jsx("script",{nonce:w,dangerouslySetInnerHTML:{__html:ne},suppressHydrationWarning:!0})]})});function ae(t){return t==null||t.hasAttribute("disabled")||t.getAttribute("aria-disabled")==="true"}const se=[];function re(t){const{itemSizes:s,cols:l=1,loopFocus:b=!0,dense:i=!1,orientation:a="both",direction:r,highlightedIndex:w,onHighlightedIndexChange:R,rootRef:P,enableHomeAndEndKeys:x=!1,stopEventPropagation:y=!1,disabledIndices:d,modifierKeys:k=se}=t,[D,T]=o.useState(0),M=l>1,v=o.useRef(null),h=Rt(v,P),c=o.useRef([]),E=o.useRef(!1),p=w??D,g=Y((n,C=!1)=>{if((R??T)(n),C){const O=c.current[n];rt(v.current,O,r,a)}}),f=Y(n=>{if(n.size===0||E.current)return;E.current=!0;const C=Array.from(n.keys()),O=C.find(S=>S?.hasAttribute(mt))??null,H=O?C.indexOf(O):-1;H!==-1&&g(H),rt(v.current,O,r,a)}),A=o.useMemo(()=>({"aria-orientation":a==="both"?void 0:a,ref:h,onFocus(n){!v.current||!lt(n.target)||n.target.setSelectionRange(0,n.target.value.length??0)},onKeyDown(n){const C=x?Nt:Bt;if(!C.has(n.key)||le(n,k)||!v.current)return;const H=r==="rtl",S=H?ct:Q,L={horizontal:S,vertical:U,both:S}[a],_=H?Q:ct,K={horizontal:_,vertical:tt,both:_}[a];if(lt(n.target)&&!ae(n.target)){const B=n.target.selectionStart,N=n.target.selectionEnd,$=n.target.value??"";if(B==null||n.shiftKey||B!==N||n.key!==K&&B<$.length||n.key!==L&&B>0)return}let e=p;const m=Ht(c,d),u=Lt(c,d);if(M){const B=s||Array.from({length:c.current.length},()=>({width:1,height:1})),N=Dt(B,l,i),$=N.findIndex(W=>W!=null&&!J(c,W,d)),Tt=N.reduce((W,V,It)=>V!=null&&!J(c,V,d)?It:W,-1);e=N[Ot({current:N.map(W=>W?c.current[W]:null)},{event:n,orientation:a,loopFocus:b,cols:l,disabledIndices:zt([...d||c.current.map((W,V)=>J(c,V)?V:void 0),void 0],N),minIndex:$,maxIndex:Tt,prevIndex:kt(p>u?m:p,B,N,l,n.key===U?"bl":n.key===Q?"tr":"tl"),rtl:H})]}const I={horizontal:[S],vertical:[U],both:[S,U]}[a],j={horizontal:[_],vertical:[tt],both:[_,tt]}[a],G=M?C:{horizontal:x?$t:Vt,vertical:x?Ft:Yt,both:C}[a];x&&(n.key===Wt?e=m:n.key===jt&&(e=u)),e===p&&(I.includes(n.key)||j.includes(n.key))&&(b&&e===u&&I.includes(n.key)?e=m:b&&e===m&&j.includes(n.key)?e=u:e=_t(c,{startingIndex:e,decrement:j.includes(n.key),disabledIndices:d})),e!==p&&!Kt(c,e)&&(y&&n.stopPropagation(),G.has(n.key)&&n.preventDefault(),g(e,!0),queueMicrotask(()=>{c.current[e]?.focus()}))}}),[l,i,r,d,c,x,p,M,s,b,h,k,g,a,y]);return o.useMemo(()=>({props:A,highlightedIndex:p,onHighlightedIndexChange:g,elementsRef:c,disabledIndices:d,onMapChange:f,relayKeyboardEvent:A.onKeyDown}),[A,p,g,c,d,f])}function le(t,s){for(const l of Gt.values())if(!s.includes(l)&&t.getModifierState(l))return!0;return!1}function ce(t){const{render:s,className:l,refs:b=et,props:i=et,state:a=Mt,stateAttributesMapping:r,highlightedIndex:w,onHighlightedIndexChange:R,orientation:P,dense:x,itemSizes:y,loopFocus:d,cols:k,enableHomeAndEndKeys:D,onMapChange:T,stopEventPropagation:M=!0,rootRef:v,disabledIndices:h,modifierKeys:c,highlightItemOnHover:E=!1,tag:p="div",...g}=t,f=bt(),{props:A,highlightedIndex:n,onHighlightedIndexChange:C,elementsRef:O,onMapChange:H,relayKeyboardEvent:S}=re({itemSizes:y,cols:k,loopFocus:d,dense:x,orientation:P,highlightedIndex:w,onHighlightedIndexChange:R,rootRef:v,stopEventPropagation:M,enableHomeAndEndKeys:D,direction:f,disabledIndices:h,modifierKeys:c}),L=q(p,t,{state:a,ref:b,props:[A,...i,g],stateAttributesMapping:r}),_=o.useMemo(()=>({highlightedIndex:n,onHighlightedIndexChange:C,highlightItemOnHover:E,relayKeyboardEvent:S}),[n,C,E,S]);return z.jsx(Pt.Provider,{value:_,children:z.jsx(gt,{elementsRef:O,onMapChange:K=>{T?.(K),H(K)},children:L})})}const ue=o.forwardRef(function(s,l){const{activateOnFocus:b=!1,className:i,loopFocus:a=!0,render:r,...w}=s,{getTabElementBySelectedValue:R,onValueChange:P,orientation:x,value:y,setTabMap:d,tabActivationDirection:k}=X(),[D,T]=o.useState(0),[M,v]=o.useState(null),h=de(y,x,M,R),c=Y((f,A)=>{if(f!==y){const n=h(f);A.activationDirection=n,P(f,A)}}),E=o.useMemo(()=>({orientation:x,tabActivationDirection:k}),[x,k]),p={"aria-orientation":x==="vertical"?"vertical":void 0,role:"tablist"},g=o.useMemo(()=>({activateOnFocus:b,highlightedTabIndex:D,onTabActivation:c,setHighlightedTabIndex:T,tabsListElement:M,value:y}),[b,D,c,T,M,y]);return z.jsx(vt.Provider,{value:g,children:z.jsx(ce,{render:r,className:i,state:E,refs:[l,v],props:[p,w],stateAttributesMapping:ot,highlightedIndex:D,enableHomeAndEndKeys:!0,loopFocus:a,orientation:x,onHighlightedIndexChange:T,onMapChange:d,disabledIndices:et})})});function ft(t,s){const{left:l,top:b}=t.getBoundingClientRect(),{left:i,top:a}=s.getBoundingClientRect(),r=l-i,w=b-a;return{left:r,top:w}}function de(t,s,l,b){const[i,a]=o.useState(null);return nt(()=>{if(t==null||l==null){a(null);return}const r=b(t);if(r==null){a(null);return}const{left:w,top:R}=ft(r,l);a(s==="horizontal"?w:R)},[s,b,l,t]),o.useCallback(r=>{if(r===t)return"none";if(r==null)return a(null),"none";if(r!=null&&l!=null){const w=b(r);if(w!=null){const{left:R,top:P}=ft(w,l);if(i==null)return a(s==="horizontal"?R:P),"none";if(s==="horizontal"){if(R<i)return a(R),"left";if(R>i)return a(R),"right"}else{if(P<i)return a(P),"up";if(P>i)return a(P),"down"}}}return"none"},[b,s,i,l,t])}function Ie({className:t,...s}){return z.jsx(te,{className:Z("flex flex-col gap-2 data-[orientation=vertical]:flex-row",t),"data-slot":"tabs",...s})}function Re({variant:t="default",className:s,children:l,...b}){return z.jsxs(ue,{className:Z("relative z-0 flex w-fit items-center justify-center gap-x-0.5 text-primary-600","data-[orientation=vertical]:flex-col",t==="default"?"p-0.5 text-primary-600/80":"data-[orientation=vertical]:px-1 data-[orientation=horizontal]:py-1",s),"data-slot":"tabs-list",...b,children:[l,z.jsx(ie,{className:Z("-translate-y-(--active-tab-bottom) absolute bottom-0 left-0 h-(--active-tab-height) w-(--active-tab-width) translate-x-(--active-tab-left) transition-[width,translate] duration-200 ease-in-out",t==="underline"?"data-[orientation=vertical]:-translate-x-px z-10 bg-[var(--opencami-accent)] data-[orientation=horizontal]:h-0.5 data-[orientation=vertical]:w-0.5 data-[orientation=horizontal]:translate-y-px":"z-0 rounded-md bg-[var(--opencami-accent-light)]"),"data-slot":"tab-indicator"})]})}function Me({className:t,...s}){return z.jsx(ee,{className:Z('[&_svg]:-mx-0.5 relative z-10 flex h-8 shrink-0 grow cursor-pointer items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-3 text-sm font-medium outline-none transition-[color,background-color,box-shadow] hover:text-primary-900 focus-visible:ring-2 focus-visible:ring-[var(--opencami-accent)] data-disabled:pointer-events-none data-[orientation=vertical]:w-full data-[orientation=vertical]:justify-start data-active:text-primary-900 data-disabled:opacity-64 [&_svg:not([class*="size-"])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0',t),"data-slot":"tabs-tab",...s})}export{Ie as T,Re as a,Me as b};
@@ -0,0 +1 @@
1
+ const n=Object.freeze(JSON.parse(`{"displayName":"TOML","fileTypes":["toml"],"name":"toml","patterns":[{"include":"#comments"},{"include":"#groups"},{"include":"#key_pair"},{"include":"#invalid"}],"repository":{"comments":{"begin":"(^[\\\\t ]+)?(?=#)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.toml"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.toml"}},"end":"\\\\n","name":"comment.line.number-sign.toml"}]},"groups":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.section.begin.toml"},"2":{"patterns":[{"match":"[^.\\\\s]+","name":"entity.name.section.toml"}]},"3":{"name":"punctuation.definition.section.begin.toml"}},"match":"^\\\\s*(\\\\[)([^]\\\\[]*)(])","name":"meta.group.toml"},{"captures":{"1":{"name":"punctuation.definition.section.begin.toml"},"2":{"patterns":[{"match":"[^.\\\\s]+","name":"entity.name.section.toml"}]},"3":{"name":"punctuation.definition.section.begin.toml"}},"match":"^\\\\s*(\\\\[\\\\[)([^]\\\\[]*)(]])","name":"meta.group.double.toml"}]},"invalid":{"match":"\\\\S+(\\\\s*(?=\\\\S))?","name":"invalid.illegal.not-allowed-here.toml"},"key_pair":{"patterns":[{"begin":"([-0-9A-Z_a-z]+)\\\\s*(=)\\\\s*","captures":{"1":{"name":"variable.other.key.toml"},"2":{"name":"punctuation.separator.key-value.toml"}},"end":"(?<=\\\\S)(?<!=)|$","patterns":[{"include":"#primatives"}]},{"begin":"((\\")(.*?)(\\"))\\\\s*(=)\\\\s*","captures":{"1":{"name":"variable.other.key.toml"},"2":{"name":"punctuation.definition.variable.begin.toml"},"3":{"patterns":[{"match":"\\\\\\\\([\\"\\\\\\\\bfnrt]|u\\\\h{4}|U\\\\h{8})","name":"constant.character.escape.toml"},{"match":"\\\\\\\\[^\\"\\\\\\\\bfnrt]","name":"invalid.illegal.escape.toml"},{"match":"\\"","name":"invalid.illegal.not-allowed-here.toml"}]},"4":{"name":"punctuation.definition.variable.end.toml"},"5":{"name":"punctuation.separator.key-value.toml"}},"end":"(?<=\\\\S)(?<!=)|$","patterns":[{"include":"#primatives"}]},{"begin":"((')([^']*)('))\\\\s*(=)\\\\s*","captures":{"1":{"name":"variable.other.key.toml"},"2":{"name":"punctuation.definition.variable.begin.toml"},"4":{"name":"punctuation.definition.variable.end.toml"},"5":{"name":"punctuation.separator.key-value.toml"}},"end":"(?<=\\\\S)(?<!=)|$","patterns":[{"include":"#primatives"}]},{"begin":"(((?:[-0-9A-Z_a-z]+|\\"(?:[^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'[^']*')(?:\\\\s*\\\\.\\\\s*|(?=\\\\s*=))){2,})\\\\s*(=)\\\\s*","captures":{"1":{"name":"variable.other.key.toml","patterns":[{"match":"\\\\.","name":"punctuation.separator.variable.toml"},{"captures":{"1":{"name":"punctuation.definition.variable.begin.toml"},"2":{"patterns":[{"match":"\\\\\\\\([\\"\\\\\\\\bfnrt]|u\\\\h{4}|U\\\\h{8})","name":"constant.character.escape.toml"},{"match":"\\\\\\\\[^\\"\\\\\\\\bfnrt]","name":"invalid.illegal.escape.toml"}]},"3":{"name":"punctuation.definition.variable.end.toml"}},"match":"(\\")((?:[^\\"\\\\\\\\]|\\\\\\\\.)*)(\\")"},{"captures":{"1":{"name":"punctuation.definition.variable.begin.toml"},"2":{"name":"punctuation.definition.variable.end.toml"}},"match":"(')[^']*(')"}]},"3":{"name":"punctuation.separator.key-value.toml"}},"end":"(?<=\\\\S)(?<!=)|$","patterns":[{"include":"#primatives"}]}]},"primatives":{"patterns":[{"begin":"\\\\G\\"\\"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.toml"}},"end":"\\"{3,5}","endCaptures":{"0":{"name":"punctuation.definition.string.end.toml"}},"name":"string.quoted.triple.double.toml","patterns":[{"match":"\\\\\\\\([\\"\\\\\\\\bfnrt]|u\\\\h{4}|U\\\\h{8})","name":"constant.character.escape.toml"},{"match":"\\\\\\\\[^\\\\n\\"\\\\\\\\bfnrt]","name":"invalid.illegal.escape.toml"}]},{"begin":"\\\\G\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.toml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.toml"}},"name":"string.quoted.double.toml","patterns":[{"match":"\\\\\\\\([\\"\\\\\\\\bfnrt]|u\\\\h{4}|U\\\\h{8})","name":"constant.character.escape.toml"},{"match":"\\\\\\\\[^\\"\\\\\\\\bfnrt]","name":"invalid.illegal.escape.toml"}]},{"begin":"\\\\G'''","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.toml"}},"end":"'{3,5}","endCaptures":{"0":{"name":"punctuation.definition.string.end.toml"}},"name":"string.quoted.triple.single.toml"},{"begin":"\\\\G'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.toml"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.toml"}},"name":"string.quoted.single.toml"},{"match":"\\\\G[0-9]{4}-(0[1-9]|1[012])-(?!00|3[2-9])[0-3][0-9]([ Tt](?!2[5-9])[012][0-9]:[0-5][0-9]:(?!6[1-9])[0-6][0-9](\\\\.[0-9]+)?(Z|[-+](?!2[5-9])[012][0-9]:[0-5][0-9])?)?","name":"constant.other.date.toml"},{"match":"\\\\G(?!2[5-9])[012][0-9]:[0-5][0-9]:(?!6[1-9])[0-6][0-9](\\\\.[0-9]+)?","name":"constant.other.time.toml"},{"match":"\\\\G(true|false)","name":"constant.language.boolean.toml"},{"match":"\\\\G0x\\\\h(_??\\\\h)*","name":"constant.numeric.hex.toml"},{"match":"\\\\G0o[0-7]([0-7]|_[0-7])*","name":"constant.numeric.octal.toml"},{"match":"\\\\G0b[01]([01]|_[01])*","name":"constant.numeric.binary.toml"},{"match":"\\\\G[-+]?(inf|nan)","name":"constant.numeric.toml"},{"match":"\\\\G([-+]?(0|([1-9](([0-9]|_[0-9])+)?)))(?=[.Ee])(\\\\.([0-9](([0-9]|_[0-9])+)?))?([Ee]([-+]?[0-9](([0-9]|_[0-9])+)?))?","name":"constant.numeric.float.toml"},{"match":"\\\\G([-+]?(0|([1-9](([0-9]|_[0-9])+)?)))","name":"constant.numeric.integer.toml"},{"begin":"\\\\G\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.array.begin.toml"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.array.end.toml"}},"name":"meta.array.toml","patterns":[{"begin":"(?=[\\"']|[-+]?[0-9]|[-+]?(inf|nan)|true|false|[\\\\[{])","end":",|(?=])","endCaptures":{"0":{"name":"punctuation.separator.array.toml"}},"patterns":[{"include":"#primatives"},{"include":"#comments"},{"include":"#invalid"}]},{"include":"#comments"},{"include":"#invalid"}]},{"begin":"\\\\G\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.inline-table.begin.toml"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.inline-table.end.toml"}},"name":"meta.inline-table.toml","patterns":[{"begin":"(?=\\\\S)","end":",|(?=})","endCaptures":{"0":{"name":"punctuation.separator.inline-table.toml"}},"patterns":[{"include":"#key_pair"}]},{"include":"#comments"}]}]}},"scopeName":"source.toml"}`)),e=[n];export{e as default};
@@ -0,0 +1 @@
1
+ import{r as p,j as K,w as _e}from"./main-B_dlfHME.js";import{ac as Ue,u as qt,ag as lt,ab as Bn,c as Gt}from"./button-Dg7VFQQn.js";import{a as $e,U as Kt,c as Qt,W as $n,g as Jt,d as at,I as Zt,b as Re,L as Wn,R as jn,h as Yn,o as Nn,k as Xn,i as me,m as _n,n as Un,q as zn,r as qn,v as Gn,X as Kn,Y as Qn,Z as Jn,P as Zn,p as en,e as eo,t as to}from"./popupStateMapping-BRPDXnjv.js";import{u as z,g as G,n as tn,a as Z,A as le,E as st,e as j,F as ge,G as kt,h as ue,i as fe,H as nn,I as ut,x as Pe,w as We,J as no,K as on,L as oo,z as ft,D as dt,M as ze,p as ro,q as Fe,t as rn,r as sn,m as ce,N as so,v as io,d as co}from"./useButton-Cbl_9oFG.js";import{i as Oe,l as qe,e as ee,d as Ft,g as lo,r as ao,k as Ae,t as uo,v as fo,T as go,o as cn}from"./owner-CpRnf1fI.js";import{e as de,g as te,a as re,b as mo,c as po,d as ho,h as yo,i as be,m as Me,j as J,s as xo,k as ln,l as an,n as je,o as un,p as it,q as fn,t as ae,f as ke,r as Ye,u as vo}from"./DirectionContext-BdX86BHP.js";const Ne={isSidebarCollapsed:!1},dn=["chat","ui"];function Gr(t){const e=t.getQueryData(dn);return e&&typeof e=="object"?{...Ne,...e}:Ne}function Kr(t,e){t.setQueryData(dn,function(o){const r=o&&typeof o=="object"?{...Ne,...o}:Ne;return e(r)})}const gn=p.createContext(void 0);function Ge(t){const e=p.useContext(gn);if(e===void 0&&!t)throw new Error(Ue(72));return e}function He(t,e,n){if(n&&!Oe(n))return 0;if(typeof t=="number")return t;if(typeof t=="function"){const o=t();return typeof o=="number"?o:o?.[e]}return t?.[e]}const mn=p.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Kt,currentIdRef:{current:null},currentContextRef:{current:null}});function Ro(t){const{children:e,delay:n,timeoutMs:o=0}=t,r=p.useRef(n),s=p.useRef(n),i=p.useRef(null),c=p.useRef(null),a=$e();return K.jsx(mn.Provider,{value:p.useMemo(()=>({hasProvider:!0,delayRef:r,initialDelayRef:s,currentIdRef:i,timeoutMs:o,currentContextRef:c,timeout:a}),[o,a]),children:e})}function wo(t,e={open:!1}){const n="rootStore"in t?t.rootStore:t,o=n.useState("floatingId"),{enabled:r=!0,open:s}=e,i=p.useContext(mn),{currentIdRef:c,delayRef:a,timeoutMs:d,initialDelayRef:u,currentContextRef:f,hasProvider:m,timeout:l}=i,[g,h]=p.useState(!1);return z(()=>{function R(){h(!1),f.current?.setIsInstantPhase(!1),c.current=null,f.current=null,a.current=u.current}if(r&&c.current&&!s&&c.current===o){if(h(!1),d){const x=o;return l.start(d,()=>{n.select("open")||c.current&&c.current!==x||R()}),()=>{l.clear()}}R()}},[r,s,o,c,a,d,u,f,l,n]),z(()=>{if(!r||!s)return;const R=f.current,x=c.current;l.clear(),f.current={onOpenChange:n.setOpen,setIsInstantPhase:h},c.current=o,a.current={open:0,close:He(u.current,"close")},x!==null&&x!==o?(h(!0),R?.setIsInstantPhase(!0),R?.onOpenChange(!1,G(tn))):(h(!1),R?.setIsInstantPhase(!1))},[r,s,o,n,c,a,d,u,f,l]),z(()=>()=>{f.current=null},[f]),p.useMemo(()=>({hasProvider:m,delayRef:a,isInstantPhase:g}),[m,a,g])}function bo(t,e){let n=null,o=null,r=!1;return{contextElement:t||void 0,getBoundingClientRect(){const s=t?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},i=e.axis==="x"||e.axis==="both",c=e.axis==="y"||e.axis==="both",a=["mouseenter","mousemove"].includes(e.dataRef.current.openEvent?.type||"")&&e.pointerType!=="touch";let d=s.width,u=s.height,f=s.x,m=s.y;return n==null&&e.x&&i&&(n=s.x-e.x),o==null&&e.y&&c&&(o=s.y-e.y),f-=n||0,m-=o||0,d=0,u=0,!r||a?(d=e.axis==="y"?s.width:0,u=e.axis==="x"?s.height:0,f=i&&e.x!=null?e.x:f,m=c&&e.y!=null?e.y:m):r&&!a&&(u=e.axis==="x"?s.height:u,d=e.axis==="y"?s.width:d),r=!0,{width:d,height:u,x:f,y:m,top:m,right:f+d,bottom:m+u,left:f}}}}function Ht(t){return t!=null&&t.clientX!=null}function Eo(t,e={}){const n="rootStore"in t?t.rootStore:t,o=n.useState("open"),r=n.useState("floatingElement"),s=n.useState("domReferenceElement"),i=n.context.dataRef,{enabled:c=!0,axis:a="both",x:d=null,y:u=null}=e,f=p.useRef(!1),m=p.useRef(null),[l,g]=p.useState(),[h,R]=p.useState([]),x=Z((S,b,O)=>{f.current||i.current.openEvent&&!Ht(i.current.openEvent)||n.set("positionReference",bo(O??s,{x:S,y:b,axis:a,dataRef:i,pointerType:l}))}),v=Z(S=>{d!=null||u!=null||(o?m.current||R([]):x(S.clientX,S.clientY,S.currentTarget))}),E=Oe(l)?r:o,C=p.useCallback(()=>{if(!E||!c||d!=null||u!=null)return;const S=le(r);function b(O){const F=qe(O);ee(r,F)?(S.removeEventListener("mousemove",b),m.current=null):x(O.clientX,O.clientY)}if(!i.current.openEvent||Ht(i.current.openEvent)){S.addEventListener("mousemove",b);const O=()=>{S.removeEventListener("mousemove",b),m.current=null};return m.current=O,O}n.set("positionReference",s)},[E,c,d,u,r,i,s,n,x]);p.useEffect(()=>C(),[C,h]),p.useEffect(()=>{c&&!r&&(f.current=!1)},[c,r]),p.useEffect(()=>{!c&&o&&(f.current=!0)},[c,o]),z(()=>{c&&(d!=null||u!=null)&&(f.current=!1,x(d,u))},[c,d,u,x]);const P=p.useMemo(()=>{function S(b){g(b.pointerType)}return{onPointerDown:S,onPointerEnter:S,onMouseMove:v,onMouseEnter:v}},[v]);return p.useMemo(()=>c?{reference:P,trigger:P}:{},[c,P])}function Vt(t,e,n){let{reference:o,floating:r}=t;const s=re(e),i=ln(e),c=un(i),a=te(e),d=s==="y",u=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let l;switch(a){case"top":l={x:u,y:o.y-r.height};break;case"bottom":l={x:u,y:o.y+o.height};break;case"right":l={x:o.x+o.width,y:f};break;case"left":l={x:o.x-r.width,y:f};break;default:l={x:o.x,y:o.y}}switch(be(e)){case"start":l[i]-=m*(n&&d?-1:1);break;case"end":l[i]+=m*(n&&d?-1:1);break}return l}async function Co(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:s,rects:i,elements:c,strategy:a}=t,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:m=!1,padding:l=0}=de(e,t),g=an(l),R=c[m?f==="floating"?"reference":"floating":f],x=je(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(R)))==null||n?R:R.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:d,rootBoundary:u,strategy:a})),v=f==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),C=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},P=je(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:v,offsetParent:E,strategy:a}):v);return{top:(x.top-P.top+g.top)/C.y,bottom:(P.bottom-x.bottom+g.bottom)/C.y,left:(x.left-P.left+g.left)/C.x,right:(P.right-x.right+g.right)/C.x}}const So=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,c=s.filter(Boolean),a=await(i.isRTL==null?void 0:i.isRTL(e));let d=await i.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:f}=Vt(d,o,a),m=o,l={},g=0;for(let R=0;R<c.length;R++){var h;const{name:x,fn:v}=c[R],{x:E,y:C,data:P,reset:S}=await v({x:u,y:f,initialPlacement:o,placement:m,strategy:r,middlewareData:l,rects:d,platform:{...i,detectOverflow:(h=i.detectOverflow)!=null?h:Co},elements:{reference:t,floating:e}});u=E??u,f=C??f,l={...l,[x]:{...l[x],...P}},S&&g<=50&&(g++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(d=S.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:r}):S.rects),{x:u,y:f}=Vt(d,m,a)),R=-1)}return{x:u,y:f,placement:m,strategy:r,middlewareData:l}},To=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:s,rects:i,initialPlacement:c,platform:a,elements:d}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:l="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...R}=de(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=te(r),v=re(c),E=te(c)===c,C=await(a.isRTL==null?void 0:a.isRTL(d.floating)),P=m||(E||!h?[mo(c)]:po(c)),S=g!=="none";!m&&S&&P.push(...ho(c,h,g,C));const b=[c,...P],O=await a.detectOverflow(e,R),F=[];let M=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&F.push(O[x]),f){const D=yo(r,i,C);F.push(O[D[0]],O[D[1]])}if(M=[...M,{placement:r,overflows:F}],!F.every(D=>D<=0)){var k,T;const D=(((k=s.flip)==null?void 0:k.index)||0)+1,I=b[D];if(I&&(!(f==="alignment"?v!==re(I):!1)||M.every(w=>re(w.placement)===v?w.overflows[0]>0:!0)))return{data:{index:D,overflows:M},reset:{placement:I}};let H=(T=M.filter(A=>A.overflows[0]<=0).sort((A,w)=>A.overflows[1]-w.overflows[1])[0])==null?void 0:T.placement;if(!H)switch(l){case"bestFit":{var y;const A=(y=M.filter(w=>{if(S){const L=re(w.placement);return L===v||L==="y"}return!0}).map(w=>[w.placement,w.overflows.filter(L=>L>0).reduce((L,W)=>L+W,0)]).sort((w,L)=>w[1]-L[1])[0])==null?void 0:y[0];A&&(H=A);break}case"initialPlacement":H=c;break}if(r!==H)return{reset:{placement:H}}}return{}}}};function Bt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function $t(t){return xo.some(e=>t[e]>=0)}const Po=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:o}=e,{strategy:r="referenceHidden",...s}=de(t,e);switch(r){case"referenceHidden":{const i=await o.detectOverflow(e,{...s,elementContext:"reference"}),c=Bt(i,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:$t(c)}}}case"escaped":{const i=await o.detectOverflow(e,{...s,altBoundary:!0}),c=Bt(i,n.floating);return{data:{escapedOffsets:c,escaped:$t(c)}}}default:return{}}}}},pn=new Set(["left","top"]);async function Oo(t,e){const{placement:n,platform:o,elements:r}=t,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=te(n),c=be(n),a=re(n)==="y",d=pn.has(i)?-1:1,u=s&&a?-1:1,f=de(e,t);let{mainAxis:m,crossAxis:l,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof g=="number"&&(l=c==="end"?g*-1:g),a?{x:l*u,y:m*d}:{x:m*d,y:l*u}}const Ao=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:s,placement:i,middlewareData:c}=e,a=await Oo(e,t);return i===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+a.x,y:s+a.y,data:{...a,placement:i}}}}},Mo=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r,platform:s}=e,{mainAxis:i=!0,crossAxis:c=!1,limiter:a={fn:x=>{let{x:v,y:E}=x;return{x:v,y:E}}},...d}=de(t,e),u={x:n,y:o},f=await s.detectOverflow(e,d),m=re(te(r)),l=fn(m);let g=u[l],h=u[m];if(i){const x=l==="y"?"top":"left",v=l==="y"?"bottom":"right",E=g+f[x],C=g-f[v];g=it(E,g,C)}if(c){const x=m==="y"?"top":"left",v=m==="y"?"bottom":"right",E=h+f[x],C=h-f[v];h=it(E,h,C)}const R=a.fn({...e,[l]:g,[m]:h});return{...R,data:{x:R.x-n,y:R.y-o,enabled:{[l]:i,[m]:c}}}}}},Lo=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:r,rects:s,middlewareData:i}=e,{offset:c=0,mainAxis:a=!0,crossAxis:d=!0}=de(t,e),u={x:n,y:o},f=re(r),m=fn(f);let l=u[m],g=u[f];const h=de(c,e),R=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(a){const E=m==="y"?"height":"width",C=s.reference[m]-s.floating[E]+R.mainAxis,P=s.reference[m]+s.reference[E]-R.mainAxis;l<C?l=C:l>P&&(l=P)}if(d){var x,v;const E=m==="y"?"width":"height",C=pn.has(te(r)),P=s.reference[f]-s.floating[E]+(C&&((x=i.offset)==null?void 0:x[f])||0)+(C?0:R.crossAxis),S=s.reference[f]+s.reference[E]+(C?0:((v=i.offset)==null?void 0:v[f])||0)-(C?R.crossAxis:0);g<P?g=P:g>S&&(g=S)}return{[m]:l,[f]:g}}}},Do=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:r,rects:s,platform:i,elements:c}=e,{apply:a=()=>{},...d}=de(t,e),u=await i.detectOverflow(e,d),f=te(r),m=be(r),l=re(r)==="y",{width:g,height:h}=s.floating;let R,x;f==="top"||f==="bottom"?(R=f,x=m===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(x=f,R=m==="end"?"top":"bottom");const v=h-u.top-u.bottom,E=g-u.left-u.right,C=Me(h-u[R],v),P=Me(g-u[x],E),S=!e.middlewareData.shift;let b=C,O=P;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(O=E),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(b=v),S&&!m){const M=J(u.left,0),k=J(u.right,0),T=J(u.top,0),y=J(u.bottom,0);l?O=g-2*(M!==0||k!==0?M+k:J(u.left,u.right)):b=h-2*(T!==0||y!==0?T+y:J(u.top,u.bottom))}await a({...e,availableWidth:O,availableHeight:b});const F=await i.getDimensions(c.floating);return g!==F.width||h!==F.height?{reset:{rects:!0}}:{}}}};function hn(t){const e=ue(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=fe(t),s=r?t.offsetWidth:n,i=r?t.offsetHeight:o,c=Ye(n)!==s||Ye(o)!==i;return c&&(n=s,o=i),{width:n,height:o,$:c}}function gt(t){return j(t)?t:t.contextElement}function we(t){const e=gt(t);if(!fe(e))return ae(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:s}=hn(e);let i=(s?Ye(n.width):n.width)/o,c=(s?Ye(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const Io=ae(0);function yn(t){const e=le(t);return!nn()||!e.visualViewport?Io:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ko(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==le(t)?!1:e}function pe(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=gt(t);let i=ae(1);e&&(o?j(o)&&(i=we(o)):i=we(t));const c=ko(s,n,o)?yn(s):ae(0);let a=(r.left+c.x)/i.x,d=(r.top+c.y)/i.y,u=r.width/i.x,f=r.height/i.y;if(s){const m=le(s),l=o&&j(o)?le(o):o;let g=m,h=kt(g);for(;h&&o&&l!==g;){const R=we(h),x=h.getBoundingClientRect(),v=ue(h),E=x.left+(h.clientLeft+parseFloat(v.paddingLeft))*R.x,C=x.top+(h.clientTop+parseFloat(v.paddingTop))*R.y;a*=R.x,d*=R.y,u*=R.x,f*=R.y,a+=E,d+=C,g=le(h),h=kt(g)}}return je({width:u,height:f,x:a,y:d})}function Ke(t,e){const n=ze(t).scrollLeft;return e?e.left+n:pe(ge(t)).left+n}function xn(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-Ke(t,n),r=n.top+e.scrollTop;return{x:o,y:r}}function Fo(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const s=r==="fixed",i=ge(o),c=e?ut(e.floating):!1;if(o===i||c&&s)return n;let a={scrollLeft:0,scrollTop:0},d=ae(1);const u=ae(0),f=fe(o);if((f||!f&&!s)&&((ft(o)!=="body"||dt(i))&&(a=ze(o)),fe(o))){const l=pe(o);d=we(o),u.x=l.x+o.clientLeft,u.y=l.y+o.clientTop}const m=i&&!f&&!s?xn(i,a):ae(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-a.scrollLeft*d.x+u.x+m.x,y:n.y*d.y-a.scrollTop*d.y+u.y+m.y}}function Ho(t){return Array.from(t.getClientRects())}function Vo(t){const e=ge(t),n=ze(t),o=t.ownerDocument.body,r=J(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=J(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+Ke(t);const c=-n.scrollTop;return ue(o).direction==="rtl"&&(i+=J(e.clientWidth,o.clientWidth)-r),{width:r,height:s,x:i,y:c}}const Wt=25;function Bo(t,e){const n=le(t),o=ge(t),r=n.visualViewport;let s=o.clientWidth,i=o.clientHeight,c=0,a=0;if(r){s=r.width,i=r.height;const u=nn();(!u||u&&e==="fixed")&&(c=r.offsetLeft,a=r.offsetTop)}const d=Ke(o);if(d<=0){const u=o.ownerDocument,f=u.body,m=getComputedStyle(f),l=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(o.clientWidth-f.clientWidth-l);g<=Wt&&(s-=g)}else d<=Wt&&(s+=d);return{width:s,height:i,x:c,y:a}}const $o=new Set(["absolute","fixed"]);function Wo(t,e){const n=pe(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,s=fe(t)?we(t):ae(1),i=t.clientWidth*s.x,c=t.clientHeight*s.y,a=r*s.x,d=o*s.y;return{width:i,height:c,x:a,y:d}}function jt(t,e,n){let o;if(e==="viewport")o=Bo(t,n);else if(e==="document")o=Vo(ge(t));else if(j(e))o=Wo(e,n);else{const r=yn(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return je(o)}function vn(t,e){const n=Pe(t);return n===e||!j(n)||We(n)?!1:ue(n).position==="fixed"||vn(n,e)}function jo(t,e){const n=e.get(t);if(n)return n;let o=st(t,[],!1).filter(c=>j(c)&&ft(c)!=="body"),r=null;const s=ue(t).position==="fixed";let i=s?Pe(t):t;for(;j(i)&&!We(i);){const c=ue(i),a=on(i);!a&&c.position==="fixed"&&(r=null),(s?!a&&!r:!a&&c.position==="static"&&!!r&&$o.has(r.position)||dt(i)&&!a&&vn(t,i))?o=o.filter(u=>u!==i):r=c,i=Pe(i)}return e.set(t,o),o}function Yo(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[...n==="clippingAncestors"?ut(e)?[]:jo(e,this._c):[].concat(n),o],c=i[0],a=i.reduce((d,u)=>{const f=jt(e,u,r);return d.top=J(f.top,d.top),d.right=Me(f.right,d.right),d.bottom=Me(f.bottom,d.bottom),d.left=J(f.left,d.left),d},jt(e,c,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function No(t){const{width:e,height:n}=hn(t);return{width:e,height:n}}function Xo(t,e,n){const o=fe(e),r=ge(e),s=n==="fixed",i=pe(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const a=ae(0);function d(){a.x=Ke(r)}if(o||!o&&!s)if((ft(e)!=="body"||dt(r))&&(c=ze(e)),o){const l=pe(e,!0,s,e);a.x=l.x+e.clientLeft,a.y=l.y+e.clientTop}else r&&d();s&&!o&&r&&d();const u=r&&!o&&!s?xn(r,c):ae(0),f=i.left+c.scrollLeft-a.x-u.x,m=i.top+c.scrollTop-a.y-u.y;return{x:f,y:m,width:i.width,height:i.height}}function tt(t){return ue(t).position==="static"}function Yt(t,e){if(!fe(t)||ue(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return ge(t)===n&&(n=n.ownerDocument.body),n}function Rn(t,e){const n=le(t);if(ut(t))return n;if(!fe(t)){let r=Pe(t);for(;r&&!We(r);){if(j(r)&&!tt(r))return r;r=Pe(r)}return n}let o=Yt(t,e);for(;o&&no(o)&&tt(o);)o=Yt(o,e);return o&&We(o)&&tt(o)&&!on(o)?n:o||oo(t)||n}const _o=async function(t){const e=this.getOffsetParent||Rn,n=this.getDimensions,o=await n(t.floating);return{reference:Xo(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Uo(t){return ue(t).direction==="rtl"}const zo={convertOffsetParentRelativeRectToViewportRelativeRect:Fo,getDocumentElement:ge,getClippingRect:Yo,getOffsetParent:Rn,getElementRects:_o,getClientRects:Ho,getDimensions:No,getScale:we,isElement:j,isRTL:Uo};function wn(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function qo(t,e){let n=null,o;const r=ge(t);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function i(c,a){c===void 0&&(c=!1),a===void 0&&(a=1),s();const d=t.getBoundingClientRect(),{left:u,top:f,width:m,height:l}=d;if(c||e(),!m||!l)return;const g=ke(f),h=ke(r.clientWidth-(u+m)),R=ke(r.clientHeight-(f+l)),x=ke(u),E={rootMargin:-g+"px "+-h+"px "+-R+"px "+-x+"px",threshold:J(0,Me(1,a))||1};let C=!0;function P(S){const b=S[0].intersectionRatio;if(b!==a){if(!C)return i();b?i(!1,b):o=setTimeout(()=>{i(!1,1e-7)},1e3)}b===1&&!wn(d,t.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(P,{...E,root:r.ownerDocument})}catch{n=new IntersectionObserver(P,E)}n.observe(t)}return i(!0),s}function Nt(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,d=gt(t),u=r||s?[...d?st(d):[],...st(e)]:[];u.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=d&&c?qo(d,n):null;let m=-1,l=null;i&&(l=new ResizeObserver(x=>{let[v]=x;v&&v.target===d&&l&&(l.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var E;(E=l)==null||E.observe(e)})),n()}),d&&!a&&l.observe(d),l.observe(e));let g,h=a?pe(t):null;a&&R();function R(){const x=pe(t);h&&!wn(h,x)&&n(),h=x,g=requestAnimationFrame(R)}return n(),()=>{var x;u.forEach(v=>{r&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),f?.(),(x=l)==null||x.disconnect(),l=null,a&&cancelAnimationFrame(g)}}const Go=Ao,Ko=Mo,Qo=To,Jo=Do,Zo=Po,er=Lo,tr=(t,e,n)=>{const o=new Map,r={platform:zo,...n},s={...r.platform,_c:o};return So(t,e,{...r,platform:s})};var nr=typeof document<"u",or=function(){},Ve=nr?p.useLayoutEffect:or;function Xe(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!Xe(t[o],e[o]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&t.$$typeof)&&!Xe(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function bn(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Xt(t,e){const n=bn(t);return Math.round(e*n)/n}function nt(t){const e=p.useRef(t);return Ve(()=>{e.current=t}),e}function rr(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:a,open:d}=t,[u,f]=p.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,l]=p.useState(o);Xe(m,o)||l(o);const[g,h]=p.useState(null),[R,x]=p.useState(null),v=p.useCallback(w=>{w!==S.current&&(S.current=w,h(w))},[]),E=p.useCallback(w=>{w!==b.current&&(b.current=w,x(w))},[]),C=s||g,P=i||R,S=p.useRef(null),b=p.useRef(null),O=p.useRef(u),F=a!=null,M=nt(a),k=nt(r),T=nt(d),y=p.useCallback(()=>{if(!S.current||!b.current)return;const w={placement:e,strategy:n,middleware:m};k.current&&(w.platform=k.current),tr(S.current,b.current,w).then(L=>{const W={...L,isPositioned:T.current!==!1};D.current&&!Xe(O.current,W)&&(O.current=W,_e.flushSync(()=>{f(W)}))})},[m,e,n,k,T]);Ve(()=>{d===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f(w=>({...w,isPositioned:!1})))},[d]);const D=p.useRef(!1);Ve(()=>(D.current=!0,()=>{D.current=!1}),[]),Ve(()=>{if(C&&(S.current=C),P&&(b.current=P),C&&P){if(M.current)return M.current(C,P,y);y()}},[C,P,y,M,F]);const I=p.useMemo(()=>({reference:S,floating:b,setReference:v,setFloating:E}),[v,E]),H=p.useMemo(()=>({reference:C,floating:P}),[C,P]),A=p.useMemo(()=>{const w={position:n,left:0,top:0};if(!H.floating)return w;const L=Xt(H.floating,u.x),W=Xt(H.floating,u.y);return c?{...w,transform:"translate("+L+"px, "+W+"px)",...bn(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:W}},[n,c,H.floating,u.x,u.y]);return p.useMemo(()=>({...u,update:y,refs:I,elements:H,floatingStyles:A}),[u,y,I,H,A])}const sr=(t,e)=>({...Go(t),options:[t,e]}),ir=(t,e)=>({...Ko(t),options:[t,e]}),cr=(t,e)=>({...er(t),options:[t,e]}),lr=(t,e)=>({...Qo(t),options:[t,e]}),ar=(t,e)=>({...Jo(t),options:[t,e]}),ur=(t,e)=>({...Zo(t),options:[t,e]});function fr(t){const{open:e=!1,onOpenChange:n,elements:o={}}=t,r=ro(),s=Qt()!=null,i=qt(()=>new $n({open:e,onOpenChange:n,referenceElement:o.reference??null,floatingElement:o.floating??null,triggerElements:o.triggers??new Jt,floatingId:r,nested:s,noEmit:t.noEmit||!1})).current;return z(()=>{const c={open:e,floatingId:r};o.reference!==void 0&&(c.referenceElement=o.reference,c.domReferenceElement=j(o.reference)?o.reference:null),o.floating!==void 0&&(c.floatingElement=o.floating),i.update(c)},[e,r,o.reference,o.floating,i]),i.context.onOpenChange=n,i.context.nested=s,i.context.noEmit=t.noEmit||!1,i}function dr(t={}){const{nodeId:e,externalTree:n}=t,o=fr(t),r=t.rootContext||o,s={reference:r.useState("referenceElement"),floating:r.useState("floatingElement"),domReference:r.useState("domReferenceElement")},[i,c]=p.useState(null),a=p.useRef(null),d=at(n);z(()=>{s.domReference&&(a.current=s.domReference)},[s.domReference]);const u=rr({...t,elements:{...s,...i&&{reference:i}}}),f=p.useCallback(b=>{const O=j(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),getClientRects:()=>b.getClientRects(),contextElement:b}:b;c(O),u.refs.setReference(O)},[u.refs]),[m,l]=p.useState(null),[g,h]=p.useState(null);r.useSyncedValue("referenceElement",m),r.useSyncedValue("domReferenceElement",j(m)?m:null),r.useSyncedValue("floatingElement",g);const R=p.useCallback(b=>{(j(b)||b===null)&&(a.current=b,l(b)),(j(u.refs.reference.current)||u.refs.reference.current===null||b!==null&&!j(b))&&u.refs.setReference(b)},[u.refs,l]),x=p.useCallback(b=>{h(b),u.refs.setFloating(b)},[u.refs]),v=p.useMemo(()=>({...u.refs,setReference:R,setFloating:x,setPositionReference:f,domReference:a}),[u.refs,R,x,f]),E=p.useMemo(()=>({...u.elements,domReference:s.domReference}),[u.elements,s.domReference]),C=r.useState("open"),P=r.useState("floatingId"),S=p.useMemo(()=>({...u,dataRef:r.context.dataRef,open:C,onOpenChange:r.setOpen,events:r.context.events,floatingId:P,refs:v,elements:E,nodeId:e,rootStore:r}),[u,v,E,e,r,C,P]);return z(()=>{r.context.dataRef.current.floatingContext=S;const b=d?.nodesRef.current.find(O=>O.id===e);b&&(b.context=S)}),p.useMemo(()=>({...u,context:S,refs:v,elements:E,rootStore:r}),[u,v,E,S,r])}const ot=uo&&fo;function gr(t,e={}){const n="rootStore"in t?t.rootStore:t,{events:o,dataRef:r}=n.context,{enabled:s=!0,visibleOnly:i=!0,delay:c}=e,a=p.useRef(!1),d=p.useRef(null),u=$e(),f=p.useRef(!0);p.useEffect(()=>{const l=n.select("domReferenceElement");if(!s)return;const g=le(l);function h(){const v=n.select("domReferenceElement");!n.select("open")&&fe(v)&&v===Ft(Ae(v))&&(a.current=!0)}function R(){f.current=!0}function x(){f.current=!1}return g.addEventListener("blur",h),ot&&(g.addEventListener("keydown",R,!0),g.addEventListener("pointerdown",x,!0)),()=>{g.removeEventListener("blur",h),ot&&(g.removeEventListener("keydown",R,!0),g.removeEventListener("pointerdown",x,!0))}},[n,s]),p.useEffect(()=>{if(!s)return;function l(g){if(g.reason===rn||g.reason===sn){const h=n.select("domReferenceElement");j(h)&&(d.current=h,a.current=!0)}}return o.on("openchange",l),()=>{o.off("openchange",l)}},[o,s,n]);const m=p.useMemo(()=>({onMouseLeave(){a.current=!1,d.current=null},onFocus(l){const g=l.currentTarget;if(a.current){if(d.current===g)return;a.current=!1,d.current=null}const h=qe(l.nativeEvent);if(i&&j(h)){if(ot&&!l.relatedTarget){if(!f.current&&!lo(h))return}else if(!ao(h))return}const R=l.relatedTarget&&n.context.triggerElements.hasElement(l.relatedTarget),{nativeEvent:x,currentTarget:v}=l,E=typeof c=="function"?c():c;if(n.select("open")&&R||E===0||E===void 0){n.setOpen(!0,G(Fe,x,v));return}u.start(E,()=>{a.current||n.setOpen(!0,G(Fe,x,v))})},onBlur(l){a.current=!1,d.current=null;const g=l.relatedTarget,h=l.nativeEvent,R=j(g)&&g.hasAttribute(Zt("focus-guard"))&&g.getAttribute("data-type")==="outside";u.start(0,()=>{const x=n.select("domReferenceElement"),v=Ft(x?x.ownerDocument:document);if(!g&&v===x||ee(r.current.floatingContext?.refs.floating.current,v)||ee(x,v)||R)return;const E=g??v;if(j(E)){const C=n.context.triggerElements;if(C.hasElement(E)||C.hasMatchingElement(P=>ee(P,E)))return}n.setOpen(!1,G(Fe,h))})}}),[r,n,i,u,c]);return p.useMemo(()=>s?{reference:m,trigger:m}:{},[s,m])}const ct=Zt("safe-polygon"),mr=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${go}`;function pr(t){return t?!!t.closest(mr):!1}function En(t){const e=p.useRef(void 0),n=p.useRef(!1),o=p.useRef(void 0),r=p.useRef(!0),s=p.useRef(!1),i=p.useRef(()=>{}),c=p.useRef(!1),a=$e(),d=$e(),u=p.useRef(void 0);return p.useMemo(()=>{const f=t.context.dataRef.current;return f.hoverInteractionState||(f.hoverInteractionState={pointerTypeRef:e,interactedInsideRef:n,handlerRef:o,blockMouseMoveRef:r,performedPointerEventsMutationRef:s,unbindMouseMoveRef:i,restTimeoutPendingRef:c,openChangeTimeout:a,restTimeout:d,handleCloseOptionsRef:u}),f.hoverInteractionState},[t,e,n,o,r,s,i,c,a,d,u])}const hr=new Set(["click","mousedown"]);function yr(t,e={}){const n="rootStore"in t?t.rootStore:t,o=n.useState("open"),r=n.useState("floatingElement"),s=n.useState("domReferenceElement"),{dataRef:i}=n.context,{enabled:c=!0,closeDelay:a=0,externalTree:d}=e,{pointerTypeRef:u,interactedInsideRef:f,handlerRef:m,performedPointerEventsMutationRef:l,unbindMouseMoveRef:g,restTimeoutPendingRef:h,openChangeTimeout:R,handleCloseOptionsRef:x}=En(n),v=at(d),E=Qt(),C=Z(()=>f.current?!0:i.current.openEvent?hr.has(i.current.openEvent.type):!1),P=Z(()=>{const M=i.current.openEvent?.type;return M?.includes("mouse")&&M!=="mousedown"}),S=p.useCallback((M,k=!0)=>{const T=xr(a,u.current);T&&!m.current?R.start(T,()=>n.setOpen(!1,G(ce,M))):k&&(R.clear(),n.setOpen(!1,G(ce,M)))},[a,m,n,u,R]),b=Z(()=>{g.current(),m.current=void 0}),O=Z(()=>{if(l.current){const M=Ae(r).body;M.style.pointerEvents="",M.removeAttribute(ct),l.current=!1}}),F=Z(M=>{const k=qe(M);if(!pr(k)){f.current=!1;return}f.current=!0});z(()=>{o||(u.current=void 0,h.current=!1,f.current=!1,b(),O())},[o,u,h,f,b,O]),p.useEffect(()=>()=>{b()},[b]),p.useEffect(()=>O,[O]),z(()=>{if(c&&o&&x.current?.blockPointerEvents&&P()&&j(s)&&r){l.current=!0;const M=Ae(r).body;M.setAttribute(ct,"");const k=s,T=r,y=v?.nodesRef.current.find(D=>D.id===E)?.context?.elements.floating;return y&&(y.style.pointerEvents=""),M.style.pointerEvents="none",k.style.pointerEvents="auto",T.style.pointerEvents="auto",()=>{M.style.pointerEvents="",k.style.pointerEvents="",T.style.pointerEvents=""}}},[c,o,s,r,x,P,v,E,l]),p.useEffect(()=>{if(!c)return;function M(D){if(C()||!i.current.floatingContext||!n.select("open"))return;const I=n.context.triggerElements;D.relatedTarget&&I.hasElement(D.relatedTarget)||(O(),b(),C()||S(D))}function k(D){R.clear(),O(),m.current?.(D),b()}function T(D){C()||S(D,!1)}const y=r;return y&&(y.addEventListener("mouseleave",M),y.addEventListener("mouseenter",k),y.addEventListener("mouseleave",T),y.addEventListener("pointerdown",F,!0)),()=>{y&&(y.removeEventListener("mouseleave",M),y.removeEventListener("mouseenter",k),y.removeEventListener("mouseleave",T),y.removeEventListener("pointerdown",F,!0))}})}function xr(t,e){return e&&!Oe(e)?0:typeof t=="function"?t():t}function rt(t){return typeof t=="function"?t():t}const vr={current:null};function Rr(t,e={}){const n="rootStore"in t?t.rootStore:t,{dataRef:o,events:r}=n.context,{enabled:s=!0,delay:i=0,handleClose:c=null,mouseOnly:a=!1,restMs:d=0,move:u=!0,triggerElementRef:f=vr,externalTree:m,isActiveTrigger:l=!0}=e,g=at(m),{pointerTypeRef:h,interactedInsideRef:R,handlerRef:x,blockMouseMoveRef:v,performedPointerEventsMutationRef:E,unbindMouseMoveRef:C,restTimeoutPendingRef:P,openChangeTimeout:S,restTimeout:b,handleCloseOptionsRef:O}=En(n),F=Re(c),M=Re(i),k=Re(d);l&&(O.current=F.current?.__options);const T=Z(()=>R.current?!0:o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1),y=p.useCallback((A,w=!0)=>{const L=He(M.current,"close",h.current);L&&!x.current?S.start(L,()=>n.setOpen(!1,G(ce,A))):w&&(S.clear(),n.setOpen(!1,G(ce,A)))},[M,x,n,h,S]),D=Z(()=>{C.current(),x.current=void 0}),I=Z(()=>{if(E.current){const A=Ae(n.select("domReferenceElement")).body;A.style.pointerEvents="",A.removeAttribute(ct),E.current=!1}});p.useEffect(()=>{if(!s)return;function A(w){w.open||(S.clear(),b.clear(),v.current=!0,P.current=!1)}return r.on("openchange",A),()=>{r.off("openchange",A)}},[s,r,S,b,v,P]);const H=Z(A=>{if(T()||!o.current.floatingContext)return;const w=n.context.triggerElements;if(A.relatedTarget&&w.hasElement(A.relatedTarget))return;const L=f.current;F.current?.({...o.current.floatingContext,tree:g,x:A.clientX,y:A.clientY,onClose(){I(),D(),!T()&&L===n.select("domReferenceElement")&&y(A)}})(A)});return p.useEffect(()=>{if(!s)return;const A=f.current??(l?n.select("domReferenceElement"):null);if(!j(A))return;function w(B){if(S.clear(),v.current=!1,a&&!Oe(h.current)||rt(k.current)>0&&!He(M.current,"open"))return;const U=He(M.current,"open",h.current),X=n.select("domReferenceElement"),Y=n.context.triggerElements,_=(Y.hasElement(B.target)||Y.hasMatchingElement(se=>ee(se,B.target)))&&(!X||!ee(X,B.target)),V=B.currentTarget??null,$=n.select("open"),ne=!$||_;_&&$?n.setOpen(!0,G(ce,B,V)):U?S.start(U,()=>{ne&&n.setOpen(!0,G(ce,B,V))}):ne&&n.setOpen(!0,G(ce,B,V))}function L(B){if(T()){I();return}C.current();const U=n.select("domReferenceElement"),X=Ae(U);b.clear(),P.current=!1;const Y=n.context.triggerElements;if(B.relatedTarget&&Y.hasElement(B.relatedTarget))return;if(F.current&&o.current.floatingContext){n.select("open")||S.clear();const V=f.current;x.current=F.current({...o.current.floatingContext,tree:g,x:B.clientX,y:B.clientY,onClose(){I(),D(),!T()&&V===n.select("domReferenceElement")&&y(B,!0)}});const $=x.current;$(B),X.addEventListener("mousemove",$),C.current=()=>{X.removeEventListener("mousemove",$)};return}(h.current!=="touch"||!ee(n.select("floatingElement"),B.relatedTarget))&&y(B)}function W(B){H(B)}return n.select("open")&&A.addEventListener("mouseleave",W),u&&A.addEventListener("mousemove",w,{once:!0}),A.addEventListener("mouseenter",w),A.addEventListener("mouseleave",L),()=>{A.removeEventListener("mouseleave",W),u&&A.removeEventListener("mousemove",w),A.removeEventListener("mouseenter",w),A.removeEventListener("mouseleave",L)}},[D,I,v,o,M,y,n,s,F,H,l,T,a,u,h,k,b,P,S,f,g,C,x]),p.useMemo(()=>{function A(w){h.current=w.pointerType}return{onPointerDown:A,onPointerEnter:A,onMouseMove(w){const{nativeEvent:L}=w,W=w.currentTarget,B=n.select("domReferenceElement"),U=n.context.triggerElements,X=n.select("open"),Y=(U.hasElement(w.target)||U.hasMatchingElement(V=>ee(V,w.target)))&&(!B||!ee(B,w.target));if(a&&!Oe(h.current)||X&&!Y||rt(k.current)===0||!Y&&P.current&&w.movementX**2+w.movementY**2<2)return;b.clear();function _(){if(P.current=!1,T())return;const V=n.select("open");!v.current&&(!V||Y)&&n.setOpen(!0,G(ce,L,W))}h.current==="touch"?_e.flushSync(()=>{_()}):Y&&X?_():(P.current=!0,b.start(rt(k.current),_))}}},[v,T,a,n,h,k,b,P])}function _t(t,e){const[n,o]=t;let r=!1;const s=e.length;for(let i=0,c=s-1;i<s;c=i++){const[a,d]=e[i]||[0,0],[u,f]=e[c]||[0,0];d>=o!=f>=o&&n<=(u-a)*(o-d)/(f-d)+a&&(r=!r)}return r}function wr(t,e){return t[0]>=e.x&&t[0]<=e.x+e.width&&t[1]>=e.y&&t[1]<=e.y+e.height}function br(t={}){const{buffer:e=.5,blockPointerEvents:n=!1,requireIntent:o=!0}=t,r=new Kt;let s=!1,i=null,c=null,a=typeof performance<"u"?performance.now():0;function d(f,m){const l=performance.now(),g=l-a;if(i===null||c===null||g===0)return i=f,c=m,a=l,null;const h=f-i,R=m-c,v=Math.sqrt(h*h+R*R)/g;return i=f,c=m,a=l,v}const u=({x:f,y:m,placement:l,elements:g,onClose:h,nodeId:R,tree:x})=>function(E){function C(){r.clear(),h()}if(r.clear(),!g.domReference||!g.floating||l==null||f==null||m==null)return;const{clientX:P,clientY:S}=E,b=[P,S],O=qe(E),F=E.type==="mouseleave",M=ee(g.floating,O),k=ee(g.domReference,O),T=g.domReference.getBoundingClientRect(),y=g.floating.getBoundingClientRect(),D=l.split("-")[0],I=f>y.right-y.width/2,H=m>y.bottom-y.height/2,A=wr(b,T),w=y.width>T.width,L=y.height>T.height,W=(w?T:y).left,B=(w?T:y).right,U=(L?T:y).top,X=(L?T:y).bottom;if(M&&(s=!0,!F))return;if(k&&(s=!1),k&&!F){s=!0;return}if(F&&j(E.relatedTarget)&&ee(g.floating,E.relatedTarget)||x&&Wn(x.nodesRef.current,R).some(({context:V})=>V?.open))return;if(D==="top"&&m>=T.bottom-1||D==="bottom"&&m<=T.top+1||D==="left"&&f>=T.right-1||D==="right"&&f<=T.left+1)return C();let Y=[];switch(D){case"top":Y=[[W,T.top+1],[W,y.bottom-1],[B,y.bottom-1],[B,T.top+1]];break;case"bottom":Y=[[W,y.top+1],[W,T.bottom-1],[B,T.bottom-1],[B,y.top+1]];break;case"left":Y=[[y.right-1,X],[y.right-1,U],[T.left+1,U],[T.left+1,X]];break;case"right":Y=[[T.right-1,X],[T.right-1,U],[y.left+1,U],[y.left+1,X]];break}function _([V,$]){switch(D){case"top":{const ne=[w?V+e/2:I?V+e*4:V-e*4,$+e+1],se=[w?V-e/2:I?V+e*4:V-e*4,$+e+1],oe=[[y.left,I||w?y.bottom-e:y.top],[y.right,I?w?y.bottom-e:y.top:y.bottom-e]];return[ne,se,...oe]}case"bottom":{const ne=[w?V+e/2:I?V+e*4:V-e*4,$-e],se=[w?V-e/2:I?V+e*4:V-e*4,$-e],oe=[[y.left,I||w?y.top+e:y.bottom],[y.right,I?w?y.top+e:y.bottom:y.top+e]];return[ne,se,...oe]}case"left":{const ne=[V+e+1,L?$+e/2:H?$+e*4:$-e*4],se=[V+e+1,L?$-e/2:H?$+e*4:$-e*4];return[...[[H||L?y.right-e:y.left,y.top],[H?L?y.right-e:y.left:y.right-e,y.bottom]],ne,se]}case"right":{const ne=[V-e,L?$+e/2:H?$+e*4:$-e*4],se=[V-e,L?$-e/2:H?$+e*4:$-e*4],oe=[[H||L?y.left+e:y.right,y.top],[H?L?y.left+e:y.right:y.left+e,y.bottom]];return[ne,se,...oe]}default:return[]}}if(!_t([P,S],Y)){if(s&&!A)return C();if(!F&&o){const V=d(E.clientX,E.clientY);if(V!==null&&V<.1)return C()}_t([P,S],_([f,m]))?!s&&o&&r.start(40,C):C()}};return u.__options={blockPointerEvents:n},u}const Er={...Yn,disabled:me(t=>t.disabled),instantType:me(t=>t.instantType),isInstantPhase:me(t=>t.isInstantPhase),trackCursorAxis:me(t=>t.trackCursorAxis),disableHoverablePopup:me(t=>t.disableHoverablePopup),lastOpenChangeReason:me(t=>t.openChangeReason),closeDelay:me(t=>t.closeDelay),hasViewport:me(t=>t.hasViewport)};class mt extends jn{constructor(e){super({...Cr(),...e},{popupRef:p.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Jt},Er)}setOpen=(e,n)=>{const o=n.reason,r=o===ce,s=e&&o===Fe,i=!e&&(o===rn||o===sn);if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,n),n.isCanceled)return;const c=()=>{const a={open:e,openChangeReason:o};s?a.instantType="focus":i?a.instantType="dismiss":o===ce&&(a.instantType=void 0);const d=n.trigger?.id??null;(d||e)&&(a.activeTriggerId=d,a.activeTriggerElement=n.trigger??null),this.update(a)};r?_e.flushSync(c):c()};static useStore(e,n){const o=qt(()=>new mt(n)).current,r=e??o,s=Nn({popupStore:r,onOpenChange:r.setOpen});return r.state.floatingRootContext=s,r}}function Cr(){return{...Xn(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeDelay:0,hasViewport:!1}}function Sr(t){const{disabled:e=!1,defaultOpen:n=!1,open:o,disableHoverablePopup:r=!1,trackCursorAxis:s="none",actionsRef:i,onOpenChange:c,onOpenChangeComplete:a,handle:d,triggerId:u,defaultTriggerId:f=null,children:m}=t,l=mt.useStore(d?.store,{open:o??n,activeTriggerId:u!==void 0?u:f});l.useControlledProp("open",o,n),l.useControlledProp("activeTriggerId",u,f),l.useContextCallback("onOpenChange",c),l.useContextCallback("onOpenChangeComplete",a);const g=l.useState("open"),h=!e&&g,R=l.useState("activeTriggerId"),x=l.useState("payload");l.useSyncedValues({trackCursorAxis:s,disableHoverablePopup:r}),z(()=>{g&&e&&l.setOpen(!1,G(so))},[g,e,l]),l.useSyncedValue("disabled",e),_n(l);const{forceUnmount:v,transitionStatus:E}=Un(h,l),C=l.useState("isInstantPhase"),P=l.useState("instantType"),S=l.useState("lastOpenChangeReason"),b=p.useRef(null);z(()=>{E==="ending"&&S===tn||E!=="ending"&&C?(P!=="delay"&&(b.current=P),l.set("instantType","delay")):b.current!==null&&(l.set("instantType",b.current),b.current=null)},[E,C,S,P,l]),z(()=>{h&&R==null&&l.set("payload",void 0)},[l,R,h]);const O=p.useCallback(()=>{l.setOpen(!1,Tr(l,io))},[l]);p.useImperativeHandle(i,()=>({unmount:v,close:O}),[v,O]);const F=l.useState("floatingRootContext"),M=gr(F,{enabled:!e}),k=zn(F,{enabled:!e,referencePress:!0}),T=Eo(F,{enabled:!e&&s!=="none",axis:s==="none"?void 0:s}),{getReferenceProps:y,getFloatingProps:D,getTriggerProps:I}=qn([M,k,T]),H=p.useMemo(()=>y(),[y]),A=p.useMemo(()=>I(),[I]),w=p.useMemo(()=>D(),[D]);return l.useSyncedValues({activeTriggerProps:H,inactiveTriggerProps:A,popupProps:w}),K.jsx(gn.Provider,{value:l,children:typeof m=="function"?m({payload:x}):m})}function Tr(t,e){const n=G(e);return n.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},n}const Cn=p.createContext(void 0);function Pr(){return p.useContext(Cn)}const Or=600,Ar=p.forwardRef(function(e,n){const{className:o,render:r,handle:s,payload:i,disabled:c,delay:a,closeDelay:d,id:u,...f}=e,m=Ge(!0),l=s?.store??m;if(!l)throw new Error(Ue(82));const g=co(u),h=l.useState("isTriggerActive",g),R=l.useState("isOpenedByTrigger",g),x=l.useState("floatingRootContext"),v=p.useRef(null),E=a??Or,C=d??0,{registerTrigger:P,isMountedByThisTrigger:S}=Gn(g,v,l,{payload:i,closeDelay:C}),b=Pr(),{delayRef:O,isInstantPhase:F,hasProvider:M}=wo(x,{open:R});l.useSyncedValue("isInstantPhase",F);const k=l.useState("disabled"),T=c??k,y=l.useState("trackCursorAxis"),D=l.useState("disableHoverablePopup"),I=Rr(x,{enabled:!T,mouseOnly:!0,move:!1,handleClose:!D&&y!=="both"?br():null,restMs(){const L=b?.delay,W=typeof O.current=="object"?O.current.open:void 0;let B=E;return M&&(W!==0?B=a??L??E:B=0),B},delay(){const L=typeof O.current=="object"?O.current.close:void 0;let W=C;return d==null&&M&&(W=L),{close:W}},triggerElementRef:v,isActiveTrigger:h}),H=p.useMemo(()=>({open:R}),[R]),A=l.useState("triggerProps",S);return lt("button",e,{state:H,ref:[n,P,v],props:[I,A,{id:g},f],stateAttributesMapping:Kn})}),Sn=p.createContext(void 0);function Mr(){const t=p.useContext(Sn);if(t===void 0)throw new Error(Ue(70));return t}const Lr=p.forwardRef(function(e,n){const{children:o,container:r,className:s,render:i,...c}=e,{portalNode:a,portalSubtree:d}=Qn({container:r,ref:n,componentProps:e,elementProps:c});return!d&&!a?null:K.jsxs(p.Fragment,{children:[d,a&&_e.createPortal(o,a)]})}),Dr=p.forwardRef(function(e,n){const{keepMounted:o=!1,...r}=e;return Ge().useState("mounted")||o?K.jsx(Sn.Provider,{value:o,children:K.jsx(Lr,{ref:n,...r})}):null}),Tn=p.createContext(void 0);function Ir(){const t=p.useContext(Tn);if(t===void 0)throw new Error(Ue(71));return t}const kr=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:s,platform:i,elements:c,middlewareData:a}=e,{element:d,padding:u=0,offsetParent:f="real"}=de(t,e)||{};if(d==null)return{};const m=an(u),l={x:n,y:o},g=ln(r),h=un(g),R=await i.getDimensions(d),x=g==="y",v=x?"top":"left",E=x?"bottom":"right",C=x?"clientHeight":"clientWidth",P=s.reference[h]+s.reference[g]-l[g]-s.floating[h],S=l[g]-s.reference[g],b=f==="real"?await i.getOffsetParent?.(d):c.floating;let O=c.floating[C]||s.floating[h];(!O||!await i.isElement?.(b))&&(O=c.floating[C]||s.floating[h]);const F=P/2-S/2,M=O/2-R[h]/2-1,k=Math.min(m[v],M),T=Math.min(m[E],M),y=k,D=O-R[h]-T,I=O/2-R[h]/2+F,H=it(y,I,D),A=!a.arrow&&be(r)!=null&&I!==H&&s.reference[h]/2-(I<y?k:T)-R[h]/2<0,w=A?I<y?I-y:I-D:0;return{[g]:l[g]+w,data:{[g]:H,centerOffset:I-H-w,...A&&{alignmentOffset:w}},reset:A}}}),Fr=(t,e)=>({...kr(t),options:[t,e]}),Hr={name:"hide",async fn(t){const{width:e,height:n,x:o,y:r}=t.rects.reference,s=e===0&&n===0&&o===0&&r===0;return{data:{referenceHidden:(await ur().fn(t)).data?.referenceHidden||s}}}},Be={sideX:"left",sideY:"top"},Vr={name:"adaptiveOrigin",async fn(t){const{x:e,y:n,rects:{floating:o},elements:{floating:r},platform:s,strategy:i,placement:c}=t,a=le(r),d=a.getComputedStyle(r);if(!(d.transitionDuration!=="0s"&&d.transitionDuration!==""))return{x:e,y:n,data:Be};const f=await s.getOffsetParent?.(r);let m={width:0,height:0};if(i==="fixed"&&a?.visualViewport)m={width:a.visualViewport.width,height:a.visualViewport.height};else if(f===a){const v=cn(r);m={width:v.documentElement.clientWidth,height:v.documentElement.clientHeight}}else await s.isElement?.(f)&&(m=await s.getDimensions(f));const l=te(c);let g=e,h=n;l==="left"&&(g=m.width-(e+o.width)),l==="top"&&(h=m.height-(n+o.height));const R=l==="left"?"right":Be.sideX,x=l==="top"?"bottom":Be.sideY;return{x:g,y:h,data:{sideX:R,sideY:x}}}};function Pn(t,e,n){const o=t==="inline-start"||t==="inline-end";return{top:"top",right:o?n?"inline-start":"inline-end":"right",bottom:"bottom",left:o?n?"inline-end":"inline-start":"left"}[e]}function Ut(t,e,n){const{rects:o,placement:r}=t;return{side:Pn(e,te(r),n),align:be(r)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function Br(t){const{anchor:e,positionMethod:n="absolute",side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:i=0,collisionBoundary:c,collisionPadding:a=5,sticky:d=!1,arrowPadding:u=5,disableAnchorTracking:f=!1,keepMounted:m=!1,floatingRootContext:l,mounted:g,collisionAvoidance:h,shiftCrossAxis:R=!1,nodeId:x,adaptiveOrigin:v,lazyFlip:E=!1,externalTree:C}=t,[P,S]=p.useState(null);!g&&P!==null&&S(null);const b=h.side||"flip",O=h.align||"flip",F=h.fallbackAxisSide||"end",M=typeof e=="function"?e:void 0,k=Z(M),T=M?k:e,y=Re(e),I=vo()==="rtl",H=P||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":I?"left":"right","inline-start":I?"right":"left"}[o],A=s==="center"?H:`${H}-${s}`;let w=a;const L=1,W=o==="bottom"?L:0,B=o==="top"?L:0,U=o==="right"?L:0,X=o==="left"?L:0;typeof w=="number"?w={top:w+W,right:w+X,bottom:w+B,left:w+U}:w&&(w={top:(w.top||0)+W,right:(w.right||0)+X,bottom:(w.bottom||0)+B,left:(w.left||0)+U});const Y={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:w},_=p.useRef(null),V=Re(r),$=Re(i),oe=[sr(N=>{const q=Ut(N,o,I),ie=typeof V.current=="function"?V.current(q):V.current,Q=typeof $.current=="function"?$.current(q):$.current;return{mainAxis:ie,crossAxis:Q,alignmentAxis:Q}},[typeof r!="function"?r:0,typeof i!="function"?i:0,I,o])],pt=O==="none"&&b!=="shift",ht=!pt&&(d||R||b==="shift"),yt=b==="none"?null:lr({...Y,padding:{top:w.top+L,right:w.right+L,bottom:w.bottom+L,left:w.left+L},mainAxis:!R&&b==="flip",crossAxis:O==="flip"?"alignment":!1,fallbackAxisSideDirection:F}),xt=pt?null:ir(N=>{const q=cn(N.elements.floating).documentElement;return{...Y,rootBoundary:R?{x:0,y:0,width:q.clientWidth,height:q.clientHeight}:void 0,mainAxis:O!=="none",crossAxis:ht,limiter:d||R?void 0:cr(ie=>{if(!_.current)return{};const{width:Q,height:xe}=_.current.getBoundingClientRect(),ve=re(te(ie.placement)),Ie=ve==="y"?Q:xe,Ze=ve==="y"?w.left+w.right:w.top+w.bottom;return{offset:Ie/2+Ze/2}})}},[Y,d,R,w,O]);b==="shift"||O==="shift"||s==="center"?oe.push(xt,yt):oe.push(yt,xt),oe.push(ar({...Y,apply({elements:{floating:N},rects:{reference:q},availableWidth:ie,availableHeight:Q}){Object.entries({"--available-width":`${ie}px`,"--available-height":`${Q}px`,"--anchor-width":`${q.width}px`,"--anchor-height":`${q.height}px`}).forEach(([xe,ve])=>{N.style.setProperty(xe,ve)})}}),Fr(()=>({element:_.current||document.createElement("div"),padding:u,offsetParent:"floating"}),[u]),{name:"transformOrigin",fn(N){const{elements:q,middlewareData:ie,placement:Q,rects:xe,y:ve}=N,Ie=te(Q),Ze=re(Ie),Dt=_.current,An=ie.arrow?.x||0,Mn=ie.arrow?.y||0,Ln=Dt?.clientWidth||0,Dn=Dt?.clientHeight||0,et=An+Ln/2,It=Mn+Dn/2,In=Math.abs(ie.shift?.y||0),kn=xe.reference.height/2,Te=typeof r=="function"?r(Ut(N,o,I)):r,Fn=In>Te,Hn={top:`${et}px calc(100% + ${Te}px)`,bottom:`${et}px ${-Te}px`,left:`calc(100% + ${Te}px) ${It}px`,right:`${-Te}px ${It}px`}[Ie],Vn=`${et}px ${xe.reference.y+kn-ve}px`;return q.floating.style.setProperty("--transform-origin",ht&&Ze==="y"&&Fn?Vn:Hn),{}}},Hr,v),z(()=>{!g&&l&&l.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[g,l]);const Qe=p.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:he,elements:Ee,x:vt,y:Rt,middlewareData:ye,update:Le,placement:wt,context:bt,isPositioned:Ce,floatingStyles:Et}=dr({rootContext:l,placement:A,middleware:oe,strategy:n,whileElementsMounted:m?void 0:(...N)=>Nt(...N,Qe),nodeId:x,externalTree:C}),{sideX:Ct,sideY:St}=ye.adaptiveOrigin||Be,Je=Ce?n:"fixed",Tt=p.useMemo(()=>v?{position:Je,[Ct]:vt,[St]:Rt}:{position:Je,...Et},[v,Je,Ct,vt,St,Rt,Et]),De=p.useRef(null);z(()=>{if(!g)return;const N=y.current,q=typeof N=="function"?N():N,Q=(zt(q)?q.current:q)||null||null;Q!==De.current&&(he.setPositionReference(Q),De.current=Q)},[g,he,T,y]),p.useEffect(()=>{if(!g)return;const N=y.current;typeof N!="function"&&zt(N)&&N.current!==De.current&&(he.setPositionReference(N.current),De.current=N.current)},[g,he,T,y]),p.useEffect(()=>{if(m&&g&&Ee.domReference&&Ee.floating)return Nt(Ee.domReference,Ee.floating,Le,Qe)},[m,g,Ee,Le,Qe]);const Se=te(wt),Pt=Pn(o,Se,I),Ot=be(wt)||"center",At=!!ye.hide?.referenceHidden;z(()=>{E&&g&&Ce&&S(Se)},[E,g,Ce,Se]);const Mt=p.useMemo(()=>({position:"absolute",top:ye.arrow?.y,left:ye.arrow?.x}),[ye.arrow]),Lt=ye.arrow?.centerOffset!==0;return p.useMemo(()=>({positionerStyles:Tt,arrowStyles:Mt,arrowRef:_,arrowUncentered:Lt,side:Pt,align:Ot,physicalSide:Se,anchorHidden:At,refs:he,context:bt,isPositioned:Ce,update:Le}),[Tt,Mt,_,Lt,Pt,Ot,Se,At,he,bt,Ce,Le])}function zt(t){return t!=null&&"current"in t}function On(t){return t==="starting"?Jn:Bn}const $r=p.forwardRef(function(e,n){const{render:o,className:r,anchor:s,positionMethod:i="absolute",side:c="top",align:a="center",sideOffset:d=0,alignOffset:u=0,collisionBoundary:f="clipping-ancestors",collisionPadding:m=5,arrowPadding:l=5,sticky:g=!1,disableAnchorTracking:h=!1,collisionAvoidance:R=Zn,...x}=e,v=Ge(),E=Mr(),C=v.useState("open"),P=v.useState("mounted"),S=v.useState("trackCursorAxis"),b=v.useState("disableHoverablePopup"),O=v.useState("floatingRootContext"),F=v.useState("instantType"),M=v.useState("transitionStatus"),k=v.useState("hasViewport"),T=Br({anchor:s,positionMethod:i,floatingRootContext:O,mounted:P,side:c,sideOffset:d,align:a,alignOffset:u,collisionBoundary:f,collisionPadding:m,sticky:g,arrowPadding:l,disableAnchorTracking:h,keepMounted:E,collisionAvoidance:R,adaptiveOrigin:k?Vr:void 0}),y=p.useMemo(()=>{const A={};return(!C||S==="both"||b)&&(A.pointerEvents="none"),{role:"presentation",hidden:!P,style:{...T.positionerStyles,...A}}},[C,S,b,P,T.positionerStyles]),D=p.useMemo(()=>({open:C,side:T.side,align:T.align,anchorHidden:T.anchorHidden,instant:S!=="none"?"tracking-cursor":F}),[C,T.side,T.align,T.anchorHidden,S,F]),I=p.useMemo(()=>({...D,arrowRef:T.arrowRef,arrowStyles:T.arrowStyles,arrowUncentered:T.arrowUncentered}),[D,T.arrowRef,T.arrowStyles,T.arrowUncentered]),H=lt("div",e,{state:D,props:[y,On(M),x],ref:[n,v.useStateSetter("positionerElement")],stateAttributesMapping:en});return K.jsx(Tn.Provider,{value:I,children:H})}),Wr={...en,...to},jr=p.forwardRef(function(e,n){const{className:o,render:r,...s}=e,i=Ge(),{side:c,align:a}=Ir(),d=i.useState("open"),u=i.useState("instantType"),f=i.useState("transitionStatus"),m=i.useState("popupProps"),l=i.useState("floatingRootContext");eo({open:d,ref:i.context.popupRef,onComplete(){d&&i.context.onOpenChangeComplete?.(!0)}});const g=i.useState("disabled"),h=i.useState("closeDelay");yr(l,{enabled:!g,closeDelay:h});const R=p.useMemo(()=>({open:d,side:c,align:a,instant:u,transitionStatus:f}),[d,c,a,u,f]);return lt("div",e,{state:R,ref:[n,i.context.popupRef,i.useStateSetter("popupElement")],props:[m,On(f),s],stateAttributesMapping:Wr})}),Yr=function(e){const{delay:n,closeDelay:o,timeout:r=400}=e,s=p.useMemo(()=>({delay:n,closeDelay:o}),[n,o]),i=p.useMemo(()=>({open:n,close:o}),[n,o]);return K.jsx(Cn.Provider,{value:s,children:K.jsx(Ro,{delay:i,timeoutMs:r,children:e.children})})};function Qr({children:t}){return K.jsx(Yr,{delay:0,closeDelay:0,timeout:0,children:t})}function Jr({children:t,...e}){return K.jsx(Sr,{...e,children:t})}function Zr({className:t,...e}){return K.jsx(Ar,{className:Gt(t),...e})}function es({className:t,side:e="top",children:n}){return K.jsx(Dr,{children:K.jsx($r,{side:e,children:K.jsx(jr,{className:Gt("rounded-md border border-primary-900 bg-primary-950 px-2 py-1 text-xs text-primary-50 shadow-sm",t),children:n})})})}export{Qr as T,Jr as a,Zr as b,es as c,dn as d,On as e,Br as f,Gr as g,Rr as h,br as i,gr as j,Kr as s,yr as u};