@mhmo91/schmancy 0.2.126 → 0.2.128
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{animated-text-CR7nS6VW.js → animated-text-BJXm6krF.js} +3 -3
- package/dist/{animated-text-CR7nS6VW.js.map → animated-text-BJXm6krF.js.map} +1 -1
- package/dist/{animated-text-C7Kwa_OI.cjs → animated-text-rLaot0v2.cjs} +2 -2
- package/dist/{animated-text-C7Kwa_OI.cjs.map → animated-text-rLaot0v2.cjs.map} +1 -1
- package/dist/animated-text.cjs +1 -1
- package/dist/animated-text.js +1 -1
- package/dist/area.cjs +1 -1
- package/dist/{area.component-AypdoH-o.cjs → area.component-CP5oin2j.cjs} +2 -2
- package/dist/{area.component-AypdoH-o.cjs.map → area.component-CP5oin2j.cjs.map} +1 -1
- package/dist/{area.component-DP34t7HX.js → area.component-DlAEUmgd.js} +3 -3
- package/dist/{area.component-DP34t7HX.js.map → area.component-DlAEUmgd.js.map} +1 -1
- package/dist/area.js +1 -1
- package/dist/{autocomplete-DtXL-EYa.js → autocomplete-Bbi68nzP.js} +3 -3
- package/dist/{autocomplete-DtXL-EYa.js.map → autocomplete-Bbi68nzP.js.map} +1 -1
- package/dist/{autocomplete-BrXYON3m.cjs → autocomplete-DEUfHcCH.cjs} +2 -2
- package/dist/{autocomplete-BrXYON3m.cjs.map → autocomplete-DEUfHcCH.cjs.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-D9hGlFti.cjs → checkbox-DrrcDAjr.cjs} +2 -2
- package/dist/{checkbox-D9hGlFti.cjs.map → checkbox-DrrcDAjr.cjs.map} +1 -1
- package/dist/{checkbox-C6z4niEj.js → checkbox-N_JVa-1W.js} +2 -2
- package/dist/{checkbox-C6z4niEj.js.map → checkbox-N_JVa-1W.js.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-wP7Z-qFr.cjs → chips-DrYrCyTG.cjs} +2 -2
- package/dist/{chips-wP7Z-qFr.cjs.map → chips-DrYrCyTG.cjs.map} +1 -1
- package/dist/{chips-De6Vldxt.js → chips-DuSV3Pg2.js} +3 -3
- package/dist/{chips-De6Vldxt.js.map → chips-DuSV3Pg2.js.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{context-object-CVqtbNDv.js → context-object-CD26Iary.js} +20 -17
- package/dist/context-object-CD26Iary.js.map +1 -0
- package/dist/context-object-D81PeS3j.cjs +2 -0
- package/dist/context-object-D81PeS3j.cjs.map +1 -0
- package/dist/{date-range-rIm4WhKI.js → date-range-6fQ4ypDJ.js} +3 -3
- package/dist/{date-range-rIm4WhKI.js.map → date-range-6fQ4ypDJ.js.map} +1 -1
- package/dist/{date-range-BHtt61m5.cjs → date-range-DoZNetuD.cjs} +2 -2
- package/dist/{date-range-BHtt61m5.cjs.map → date-range-DoZNetuD.cjs.map} +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-PEhN0JaA.js → delay-CSAsNZ4k.js} +2 -2
- package/dist/{delay-PEhN0JaA.js.map → delay-CSAsNZ4k.js.map} +1 -1
- package/dist/{delay-xd8PmM2r.cjs → delay-WrR6CJK_.cjs} +2 -2
- package/dist/{delay-xd8PmM2r.cjs.map → delay-WrR6CJK_.cjs.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{divider-B_GBA6wG.js → divider-ByXACxEQ.js} +3 -3
- package/dist/{divider-B_GBA6wG.js.map → divider-ByXACxEQ.js.map} +1 -1
- package/dist/{divider-CW3prtEN.cjs → divider-Cl2Thq2Y.cjs} +2 -2
- package/dist/{divider-CW3prtEN.cjs.map → divider-Cl2Thq2Y.cjs.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/{flex-Cmd1vWus.js → flex-BGVyAdBX.js} +2 -2
- package/dist/{flex-Cmd1vWus.js.map → flex-BGVyAdBX.js.map} +1 -1
- package/dist/{flex-CbweZ1uz.cjs → flex-DeB79N0h.cjs} +2 -2
- package/dist/{flex-CbweZ1uz.cjs.map → flex-DeB79N0h.cjs.map} +1 -1
- package/dist/{form-qGZu5wRz.js → form-DATARECy.js} +2 -2
- package/dist/{form-qGZu5wRz.js.map → form-DATARECy.js.map} +1 -1
- package/dist/{form-GwdkWkeq.cjs → form-Dkh-YG_8.cjs} +2 -2
- package/dist/{form-GwdkWkeq.cjs.map → form-Dkh-YG_8.cjs.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{icon-DYd0ia3y.cjs → icon-BbqYaRVu.cjs} +2 -2
- package/dist/{icon-DYd0ia3y.cjs.map → icon-BbqYaRVu.cjs.map} +1 -1
- package/dist/{icon-0jYWClYF.js → icon-BdqEZEF8.js} +3 -3
- package/dist/{icon-0jYWClYF.js.map → icon-BdqEZEF8.js.map} +1 -1
- package/dist/{icon-button-CNn-TBQr.cjs → icon-button-BUUtmKnu.cjs} +2 -2
- package/dist/{icon-button-CNn-TBQr.cjs.map → icon-button-BUUtmKnu.cjs.map} +1 -1
- package/dist/{icon-button-Cb9UFHRA.js → icon-button-DlnuclQQ.js} +3 -3
- package/dist/{icon-button-Cb9UFHRA.js.map → icon-button-DlnuclQQ.js.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +118 -105
- package/dist/{input-BwUKlNLv.js → input-BDUd1ZGs.js} +2 -2
- package/dist/{input-BwUKlNLv.js.map → input-BDUd1ZGs.js.map} +1 -1
- package/dist/{input-BDvmjqzB.cjs → input-B_MWCRet.cjs} +2 -2
- package/dist/{input-BDvmjqzB.cjs.map → input-B_MWCRet.cjs.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +1 -1
- package/dist/{list-nuLmomtu.js → list-D0J2ndMA.js} +2 -2
- package/dist/{list-nuLmomtu.js.map → list-D0J2ndMA.js.map} +1 -1
- package/dist/{list-DGZ8nQDV.cjs → list-UOeNjOTt.cjs} +2 -2
- package/dist/{list-DGZ8nQDV.cjs.map → list-UOeNjOTt.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-CsMY3rsN.cjs → litElement.mixin-CfkMd-bR.cjs} +2 -2
- package/dist/{litElement.mixin-CsMY3rsN.cjs.map → litElement.mixin-CfkMd-bR.cjs.map} +1 -1
- package/dist/{litElement.mixin-KVNPHS0h.js → litElement.mixin-PXLBM6N4.js} +2 -2
- package/dist/{litElement.mixin-KVNPHS0h.js.map → litElement.mixin-PXLBM6N4.js.map} +1 -1
- package/dist/{menu-BoAxrHvz.cjs → menu-B4k2_5rl.cjs} +2 -2
- package/dist/{menu-BoAxrHvz.cjs.map → menu-B4k2_5rl.cjs.map} +1 -1
- package/dist/{menu-DCdcWg1Q.js → menu-D7PxtMOz.js} +3 -3
- package/dist/{menu-DCdcWg1Q.js.map → menu-D7PxtMOz.js.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-BOoGEXyd.cjs → option-hsAZB8ji.cjs} +2 -2
- package/dist/{option-BOoGEXyd.cjs.map → option-hsAZB8ji.cjs.map} +1 -1
- package/dist/{option-04xx4j0z.js → option-vV2BM1B_.js} +2 -2
- package/dist/{option-04xx4j0z.js.map → option-vV2BM1B_.js.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{outlet-C9H_6XOK.cjs → outlet-DMOeEL6g.cjs} +2 -2
- package/dist/{outlet-C9H_6XOK.cjs.map → outlet-DMOeEL6g.cjs.map} +1 -1
- package/dist/{outlet-DlGwFO9i.js → outlet-DRaXjbOY.js} +2 -2
- package/dist/{outlet-DlGwFO9i.js.map → outlet-DRaXjbOY.js.map} +1 -1
- package/dist/{payment-card-form-DtcRjZp8.js → payment-card-form-8oXgNTFN.js} +3 -3
- package/dist/{payment-card-form-DtcRjZp8.js.map → payment-card-form-8oXgNTFN.js.map} +1 -1
- package/dist/{payment-card-form-BaysKg6Z.cjs → payment-card-form-DfbqzyTv.cjs} +2 -2
- package/dist/{payment-card-form-BaysKg6Z.cjs.map → payment-card-form-DfbqzyTv.cjs.map} +1 -1
- package/dist/{radio-group-BV6zZQBP.cjs → radio-group-CLt-d-Ni.cjs} +2 -2
- package/dist/{radio-group-BV6zZQBP.cjs.map → radio-group-CLt-d-Ni.cjs.map} +1 -1
- package/dist/{radio-group-BPFwj4dx.js → radio-group-DRXtgyf5.js} +2 -2
- package/dist/{radio-group-BPFwj4dx.js.map → radio-group-DRXtgyf5.js.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/{schmancy-steps-container-CT4W6h4t.js → schmancy-steps-container-D1k0kjKI.js} +2 -2
- package/dist/{schmancy-steps-container-CT4W6h4t.js.map → schmancy-steps-container-D1k0kjKI.js.map} +1 -1
- package/dist/{schmancy-steps-container-CQp7mdgo.cjs → schmancy-steps-container-DguK5NK4.cjs} +2 -2
- package/dist/{schmancy-steps-container-CQp7mdgo.cjs.map → schmancy-steps-container-DguK5NK4.cjs.map} +1 -1
- package/dist/{select-DUqzjckq.cjs → select-BUUelLow.cjs} +2 -2
- package/dist/{select-DUqzjckq.cjs.map → select-BUUelLow.cjs.map} +1 -1
- package/dist/{select-BqN9V7cw.js → select-By_Pm8TG.js} +3 -3
- package/dist/{select-BqN9V7cw.js.map → select-By_Pm8TG.js.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/selector-hook-9dSW11-1.js +274 -0
- package/dist/selector-hook-9dSW11-1.js.map +1 -0
- package/dist/selector-hook-CH-z8W2d.cjs +2 -0
- package/dist/selector-hook-CH-z8W2d.cjs.map +1 -0
- package/dist/{sheet-PKhdztII.js → sheet-CHow9LJ8.js} +3 -3
- package/dist/{sheet-PKhdztII.js.map → sheet-CHow9LJ8.js.map} +1 -1
- package/dist/{sheet-RxCJqnwE.cjs → sheet-CyZB5a4W.cjs} +2 -2
- package/dist/{sheet-RxCJqnwE.cjs.map → sheet-CyZB5a4W.cjs.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/{slider-DKZODC7g.js → slider-BORUoU4I.js} +3 -3
- package/dist/{slider-DKZODC7g.js.map → slider-BORUoU4I.js.map} +1 -1
- package/dist/{slider-Cw5jFlAO.cjs → slider-DCRfwhaP.cjs} +2 -2
- package/dist/{slider-Cw5jFlAO.cjs.map → slider-DCRfwhaP.cjs.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-Cr6ZRUW_.js → spinner-C-rMlbyB.js} +3 -3
- package/dist/{spinner-Cr6ZRUW_.js.map → spinner-C-rMlbyB.js.map} +1 -1
- package/dist/{spinner-BIT7SlWT.cjs → spinner-DeHbns2e.cjs} +2 -2
- package/dist/{spinner-BIT7SlWT.cjs.map → spinner-DeHbns2e.cjs.map} +1 -1
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.js +30 -17
- package/dist/{surface-BwHzF1Al.js → surface-HAEl5c8W.js} +2 -2
- package/dist/{surface-BwHzF1Al.js.map → surface-HAEl5c8W.js.map} +1 -1
- package/dist/{surface-CU_71bTu.cjs → surface-TpxKBWnD.cjs} +2 -2
- package/dist/{surface-CU_71bTu.cjs.map → surface-TpxKBWnD.cjs.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-CAAYvRWb.js → table-D7KL2FaN.js} +166 -164
- package/dist/table-D7KL2FaN.js.map +1 -0
- package/dist/table-DXPDEHEh.cjs +65 -0
- package/dist/table-DXPDEHEh.cjs.map +1 -0
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-group-DKgFtkF4.cjs → tabs-group-CR2cSCNr.cjs} +2 -2
- package/dist/{tabs-group-DKgFtkF4.cjs.map → tabs-group-CR2cSCNr.cjs.map} +1 -1
- package/dist/{tabs-group-3mMfpHn0.js → tabs-group-Dm_FCj7q.js} +2 -2
- package/dist/{tabs-group-3mMfpHn0.js.map → tabs-group-Dm_FCj7q.js.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-CjSVtdHt.cjs +2 -0
- package/dist/{tailwind.mixin-BAMa8YNR.cjs.map → tailwind.mixin-CjSVtdHt.cjs.map} +1 -1
- package/dist/tailwind.mixin-Cxj7n9Jd.js +43 -0
- package/dist/{tailwind.mixin-BQyZrGP1.js.map → tailwind.mixin-Cxj7n9Jd.js.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/{teleport.component-CrOAEYhZ.js → teleport.component-CBNKUZwe.js} +38 -38
- package/dist/{teleport.component-CrOAEYhZ.js.map → teleport.component-CBNKUZwe.js.map} +1 -1
- package/dist/{teleport.component-Cmbvbylw.cjs → teleport.component-CplIV2h1.cjs} +2 -2
- package/dist/{teleport.component-Cmbvbylw.cjs.map → teleport.component-CplIV2h1.cjs.map} +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-BX6iD8ez.cjs → textarea-CLlh5-HA.cjs} +2 -2
- package/dist/{textarea-BX6iD8ez.cjs.map → textarea-CLlh5-HA.cjs.map} +1 -1
- package/dist/{textarea-DrtTwsZf.js → textarea-DcSAsR60.js} +2 -2
- package/dist/{textarea-DrtTwsZf.js.map → textarea-DcSAsR60.js.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-C8uLYaSN.cjs → theme-button-53Mhj3kQ.cjs} +2 -2
- package/dist/{theme-button-C8uLYaSN.cjs.map → theme-button-53Mhj3kQ.cjs.map} +1 -1
- package/dist/{theme-button-BedwumBT.js → theme-button-B7_LXWoe.js} +2 -2
- package/dist/{theme-button-BedwumBT.js.map → theme-button-B7_LXWoe.js.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/{theme.component-DvlxAH1p.cjs → theme.component-Drmkh4sF.cjs} +2 -2
- package/dist/{theme.component-DvlxAH1p.cjs.map → theme.component-Drmkh4sF.cjs.map} +1 -1
- package/dist/{theme.component-zxDCAaxd.js → theme.component-yFb6vlsT.js} +2 -2
- package/dist/{theme.component-zxDCAaxd.js.map → theme.component-yFb6vlsT.js.map} +1 -1
- package/dist/theme.js +1 -1
- package/dist/{timezone-1BrrQMHz.js → timezone-DxkvIe7V.js} +3 -3
- package/dist/{timezone-1BrrQMHz.js.map → timezone-DxkvIe7V.js.map} +1 -1
- package/dist/{timezone-D14kTMKK.cjs → timezone-enXRjPy1.cjs} +2 -2
- package/dist/{timezone-D14kTMKK.cjs.map → timezone-enXRjPy1.cjs.map} +1 -1
- package/dist/{tree-C_TPLHEo.cjs → tree-Bt4J6QVI.cjs} +2 -2
- package/dist/{tree-C_TPLHEo.cjs.map → tree-Bt4J6QVI.cjs.map} +1 -1
- package/dist/{tree-DuaRuwS9.js → tree-CQccoc9W.js} +2 -2
- package/dist/{tree-DuaRuwS9.js.map → tree-CQccoc9W.js.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter-Fim6s-vF.js → typewriter-DGserMVU.js} +4 -4
- package/dist/{typewriter-Fim6s-vF.js.map → typewriter-DGserMVU.js.map} +1 -1
- package/dist/{typewriter-C2NQzIJ9.cjs → typewriter-WqDo75_3.cjs} +2 -2
- package/dist/{typewriter-C2NQzIJ9.cjs.map → typewriter-WqDo75_3.cjs.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-C4RygG_b.js → typography-D5E46rwN.js} +2 -2
- package/dist/{typography-C4RygG_b.js.map → typography-D5E46rwN.js.map} +1 -1
- package/dist/{typography-f0kdRUDj.cjs → typography-DbNitvGl.cjs} +2 -2
- package/dist/{typography-f0kdRUDj.cjs.map → typography-DbNitvGl.cjs.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/package.json +1 -1
- package/types/src/store/context-create.d.ts +15 -2
- package/types/src/store/filter-directive.d.ts +38 -11
- package/types/src/store/selector-hook.d.ts +27 -0
- package/types/src/store/selectors.d.ts +30 -1
- package/types/src/store/storage-manager.d.ts +6 -14
- package/types/src/store/types.d.ts +100 -45
- package/types/src/table/row.d.ts +8 -7
- package/types/src/table/table.d.ts +11 -5
- package/dist/context-object-CVqtbNDv.js.map +0 -1
- package/dist/context-object-CgZ6F8E9.cjs +0 -2
- package/dist/context-object-CgZ6F8E9.cjs.map +0 -1
- package/dist/selector-hook-B5oIBdcJ.cjs +0 -2
- package/dist/selector-hook-B5oIBdcJ.cjs.map +0 -1
- package/dist/selector-hook-BdsJkaE2.js +0 -185
- package/dist/selector-hook-BdsJkaE2.js.map +0 -1
- package/dist/table-B3lX6zue.cjs +0 -80
- package/dist/table-B3lX6zue.cjs.map +0 -1
- package/dist/table-CAAYvRWb.js.map +0 -1
- package/dist/tailwind.mixin-BAMa8YNR.cjs +0 -2
- package/dist/tailwind.mixin-BQyZrGP1.js +0 -43
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { b as v, d as z, S as M } from "./context-object-CD26Iary.js";
|
|
2
|
+
import { property as x } from "lit/decorators.js";
|
|
3
|
+
import { map as k, distinctUntilChanged as S, shareReplay as A, combineLatest as O, Subject as E } from "rxjs";
|
|
4
|
+
import { takeUntil as q } from "rxjs/operators";
|
|
5
|
+
function W(n, e, t) {
|
|
6
|
+
if (e === "indexeddb") throw new v("IndexedDB storage is not supported for plain objects", null, { storage: e, key: t });
|
|
7
|
+
const r = M.getInstance(e, t, n);
|
|
8
|
+
var s;
|
|
9
|
+
return typeof (s = r.value) == "object" && s !== null && Object.keys(s).length === 0 && r.$.next(n), r;
|
|
10
|
+
}
|
|
11
|
+
function j(n, e, t) {
|
|
12
|
+
if (n == null) throw new v("Initial data cannot be null or undefined", null, { storage: e, key: t });
|
|
13
|
+
if (n instanceof Map) return function(r, s, i) {
|
|
14
|
+
const l = z.getInstance(s, i, r);
|
|
15
|
+
return l.value.size || l.$.next(new Map(r)), l;
|
|
16
|
+
}(n, e, t);
|
|
17
|
+
if (typeof n == "object") return W(n, e, t);
|
|
18
|
+
throw new v("Initial data must be an object or a Map", null, { storage: e, key: t, dataType: typeof n });
|
|
19
|
+
}
|
|
20
|
+
function N(n, e, t = "local") {
|
|
21
|
+
return j(n, t, e);
|
|
22
|
+
}
|
|
23
|
+
function P(n, e, t = "local") {
|
|
24
|
+
return j(Array.isArray(n) ? new Map(n.map((r, s) => [String(s), r])) : n, t, e);
|
|
25
|
+
}
|
|
26
|
+
const $ = (n, e) => {
|
|
27
|
+
if (!e) return n;
|
|
28
|
+
const t = e.split(".");
|
|
29
|
+
let r = n;
|
|
30
|
+
for (const s of t) {
|
|
31
|
+
if (r == null) return;
|
|
32
|
+
r = r[s];
|
|
33
|
+
}
|
|
34
|
+
return r;
|
|
35
|
+
}, L = (n) => {
|
|
36
|
+
if (!n || n.length < 2) return [];
|
|
37
|
+
const e = [];
|
|
38
|
+
for (let t = 0; t < n.length - 1; t++) e.push(n.substring(t, t + 2).toLowerCase());
|
|
39
|
+
return e;
|
|
40
|
+
}, U = (n, e) => {
|
|
41
|
+
if (!n || !e) return 0;
|
|
42
|
+
const t = n.toLowerCase().trim(), r = e.toLowerCase().trim();
|
|
43
|
+
if (t === r) return 1;
|
|
44
|
+
const s = t.includes(r) ? 1 : 0, i = ((c, a) => {
|
|
45
|
+
if (!c) return !0;
|
|
46
|
+
if (!a) return !1;
|
|
47
|
+
let u = 0, o = 0;
|
|
48
|
+
for (; u < c.length && o < a.length; ) c[u].toLowerCase() === a[o].toLowerCase() && u++, o++;
|
|
49
|
+
return u === c.length;
|
|
50
|
+
})(r, t) ? 0.8 : 0, l = ((c, a) => {
|
|
51
|
+
if (!c) return !0;
|
|
52
|
+
if (!a) return !1;
|
|
53
|
+
const u = (y) => y.toLowerCase().split("").reduce((w, g) => (w[g] = (w[g] || 0) + 1, w), {}), o = u(c), h = u(a);
|
|
54
|
+
return Object.keys(o).every((y) => (h[y] || 0) >= o[y]);
|
|
55
|
+
})(r, t) ? 0.7 : 0, f = ((c, a) => {
|
|
56
|
+
if (!c || !a || c.length < 2 || a.length < 2) return 0;
|
|
57
|
+
const u = L(c), o = L(a);
|
|
58
|
+
if (u.length === 0 || o.length === 0) return 0;
|
|
59
|
+
let h = 0;
|
|
60
|
+
const y = new Array(o.length).fill(!1);
|
|
61
|
+
for (const w of u) for (let g = 0; g < o.length; g++) if (!y[g] && o[g] === w) {
|
|
62
|
+
h++, y[g] = !0;
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
return 2 * h / (u.length + o.length);
|
|
66
|
+
})(t, r), p = Math.max(t.length, r.length), b = p ? 1 - ((c, a) => {
|
|
67
|
+
if (c === a) return 0;
|
|
68
|
+
const u = Array(a.length + 1).fill(null).map((o, h) => [h]);
|
|
69
|
+
for (let o = 0; o <= c.length; o++) u[0][o] = o;
|
|
70
|
+
for (let o = 1; o <= a.length; o++) for (let h = 1; h <= c.length; h++) a.charAt(o - 1) === c.charAt(h - 1) ? u[o][h] = u[o - 1][h - 1] : u[o][h] = Math.min(u[o - 1][h] + 1, u[o][h - 1] + 1, u[o - 1][h - 1] + 1);
|
|
71
|
+
return u[a.length][c.length];
|
|
72
|
+
})(t, r) / p : 0;
|
|
73
|
+
return Math.max(s, i, l, f, b);
|
|
74
|
+
}, _ = (n) => n == null ? "" : String(n), m = (n) => Array.isArray(n);
|
|
75
|
+
function B(n, e, t) {
|
|
76
|
+
if (e == null && t == null) return !0;
|
|
77
|
+
if (e == null || t == null) return n === "==" ? e === t : n === "!=" && e !== t;
|
|
78
|
+
switch (n) {
|
|
79
|
+
case "==":
|
|
80
|
+
return e === t;
|
|
81
|
+
case "!=":
|
|
82
|
+
return e !== t;
|
|
83
|
+
case ">":
|
|
84
|
+
return e > t;
|
|
85
|
+
case "<":
|
|
86
|
+
return e < t;
|
|
87
|
+
case ">=":
|
|
88
|
+
return e >= t;
|
|
89
|
+
case "<=":
|
|
90
|
+
return e <= t;
|
|
91
|
+
case "includes":
|
|
92
|
+
return typeof e == "string" ? _(e).toLowerCase().includes(_(t).toLowerCase()) : !!m(e) && e.includes(t);
|
|
93
|
+
case "notIncludes":
|
|
94
|
+
return typeof e == "string" ? !_(e).toLowerCase().includes(_(t).toLowerCase()) : !m(e) || !e.includes(t);
|
|
95
|
+
case "startsWith":
|
|
96
|
+
return typeof e == "string" && typeof t == "string" && e.toLowerCase().startsWith(t.toLowerCase());
|
|
97
|
+
case "endsWith":
|
|
98
|
+
return typeof e == "string" && typeof t == "string" && e.toLowerCase().endsWith(t.toLowerCase());
|
|
99
|
+
case "in":
|
|
100
|
+
return !!m(t) && t.includes(e);
|
|
101
|
+
case "notIn":
|
|
102
|
+
return !m(t) || !t.includes(e);
|
|
103
|
+
default:
|
|
104
|
+
return !1;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
function D(n, e, t = 0.3) {
|
|
108
|
+
let r, s, i, l = !1;
|
|
109
|
+
if (Array.isArray(e) ? [r, s, i, l = !1] = e : (r = e.key, s = e.operator, i = e.value, l = e.strict || !1), !l && (i === "" || i == null || m(i) && i.length === 0)) return { valid: !0, score: 1 };
|
|
110
|
+
const f = $(n, r);
|
|
111
|
+
if (l) return f !== i ? { valid: !1, score: 0 } : { valid: !0, score: 1 };
|
|
112
|
+
if (s === "any") {
|
|
113
|
+
if (typeof f != "string" || typeof i != "string") return { valid: !1, score: 0 };
|
|
114
|
+
const p = U(f, i);
|
|
115
|
+
return p < t ? { valid: !1, score: 0 } : { valid: !0, score: p };
|
|
116
|
+
}
|
|
117
|
+
{
|
|
118
|
+
const p = B(s, f, i);
|
|
119
|
+
return { valid: p, score: p ? 1 : 0 };
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function I(n, e = [], t = 0.3) {
|
|
123
|
+
if (!e.length) return Array.from(n.values());
|
|
124
|
+
const r = [];
|
|
125
|
+
for (const [s, i] of n.entries()) {
|
|
126
|
+
let l = 0, f = 0, p = !0;
|
|
127
|
+
for (const b of e) {
|
|
128
|
+
const c = D(i, b, t);
|
|
129
|
+
if (!c.valid) {
|
|
130
|
+
p = !1;
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
l += c.score, f++;
|
|
134
|
+
}
|
|
135
|
+
p && r.push({ item: i, score: f > 0 ? l / f : 1 });
|
|
136
|
+
}
|
|
137
|
+
return r.sort((s, i) => i.score - s.score), r.map((s) => s.item);
|
|
138
|
+
}
|
|
139
|
+
function T(n, e = [], t = 0.3) {
|
|
140
|
+
const r = /* @__PURE__ */ new Map();
|
|
141
|
+
return n.forEach((s, i) => r.set(String(i), s)), I(r, e, t);
|
|
142
|
+
}
|
|
143
|
+
const Q = I, V = T;
|
|
144
|
+
function C(n, e) {
|
|
145
|
+
if (n === e) return !0;
|
|
146
|
+
if (n instanceof Map && e instanceof Map) {
|
|
147
|
+
if (n.size !== e.size) return !1;
|
|
148
|
+
for (const [t, r] of n) if (!e.has(t) || !C(r, e.get(t))) return !1;
|
|
149
|
+
return !0;
|
|
150
|
+
}
|
|
151
|
+
if (n instanceof Set && e instanceof Set) {
|
|
152
|
+
if (n.size !== e.size) return !1;
|
|
153
|
+
for (const t of n) if (!e.has(t)) return !1;
|
|
154
|
+
return !0;
|
|
155
|
+
}
|
|
156
|
+
if (typeof n == "object" && n !== null && typeof e == "object" && e !== null) {
|
|
157
|
+
const t = Object.keys(n), r = Object.keys(e);
|
|
158
|
+
if (t.length !== r.length) return !1;
|
|
159
|
+
for (const s of t) if (!C(n[s], e[s])) return !1;
|
|
160
|
+
return !0;
|
|
161
|
+
}
|
|
162
|
+
return !1;
|
|
163
|
+
}
|
|
164
|
+
function F(n, e) {
|
|
165
|
+
return n.$.pipe(k(e), S(C), A(1));
|
|
166
|
+
}
|
|
167
|
+
function d(n, e) {
|
|
168
|
+
return n.$.pipe(k(e), S(C), A(1));
|
|
169
|
+
}
|
|
170
|
+
function X(n) {
|
|
171
|
+
return d(n, (e) => Array.from(e.values()));
|
|
172
|
+
}
|
|
173
|
+
function Y(n, e) {
|
|
174
|
+
return d(n, (t) => {
|
|
175
|
+
const r = [];
|
|
176
|
+
return t.forEach((s, i) => {
|
|
177
|
+
e(s, i) && r.push(s);
|
|
178
|
+
}), r;
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
function Z(n, e) {
|
|
182
|
+
return d(n, (t) => t.get(e));
|
|
183
|
+
}
|
|
184
|
+
function ee(n, e) {
|
|
185
|
+
return d(n, (t) => {
|
|
186
|
+
if (!e) return t.size;
|
|
187
|
+
let r = 0;
|
|
188
|
+
return t.forEach((s, i) => {
|
|
189
|
+
e(s, i) && r++;
|
|
190
|
+
}), r;
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
function te(n, e) {
|
|
194
|
+
return O(n).pipe(k((t) => e(...t)), S(C), A(1));
|
|
195
|
+
}
|
|
196
|
+
function ne(n) {
|
|
197
|
+
return d(n, (e) => Array.from(e.keys()));
|
|
198
|
+
}
|
|
199
|
+
function re(n) {
|
|
200
|
+
return d(n, (e) => Array.from(e.entries()));
|
|
201
|
+
}
|
|
202
|
+
function se(n, e) {
|
|
203
|
+
return d(n, (t) => {
|
|
204
|
+
const r = [];
|
|
205
|
+
return t.forEach((s, i) => {
|
|
206
|
+
r.push(e(s, i));
|
|
207
|
+
}), r;
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
function oe(n, e) {
|
|
211
|
+
return d(n, (t) => Array.from(t.values()).sort(e));
|
|
212
|
+
}
|
|
213
|
+
function ie(n, e) {
|
|
214
|
+
return d(n, (t) => {
|
|
215
|
+
for (const [r, s] of t.entries()) if (e(s, r)) return s;
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
function G(n, e = (r) => r, t = {}) {
|
|
219
|
+
return function(r, s, i) {
|
|
220
|
+
x({ attribute: !1, type: Object })(r, s);
|
|
221
|
+
const l = r.connectedCallback, f = r.disconnectedCallback;
|
|
222
|
+
r.connectedCallback = function() {
|
|
223
|
+
var c;
|
|
224
|
+
this._selectorCleanup && !this._selectorCleanup.closed || (this._selectorCleanup = new E()), this._selectorSubscriptions || (this._selectorSubscriptions = /* @__PURE__ */ new Map()), this._selectorInitialized || (this._selectorInitialized = /* @__PURE__ */ new Set());
|
|
225
|
+
const p = function(a) {
|
|
226
|
+
return "set" in a && typeof a.set == "function" && a.value instanceof Map;
|
|
227
|
+
}(n) ? d(n, e) : F(n, e);
|
|
228
|
+
t.required || this._selectorInitialized.has(s) || (l == null || l.call(this), this._selectorInitialized.add(s)), this._selectorSubscriptions.has(s) && ((c = this._selectorSubscriptions.get(s)) == null || c.unsubscribe());
|
|
229
|
+
const b = p.pipe(q(this._selectorCleanup)).subscribe({ next: (a) => {
|
|
230
|
+
var o;
|
|
231
|
+
const u = t.deepClone ? structuredClone(a) : a;
|
|
232
|
+
t.updateOnly || (this[s] = u), (o = this.requestUpdate) == null || o.call(this), t.required && !this._selectorInitialized.has(s) && u != null && (l == null || l.call(this), this._selectorInitialized.add(s));
|
|
233
|
+
}, error: (a) => {
|
|
234
|
+
} });
|
|
235
|
+
this._selectorSubscriptions.set(s, b);
|
|
236
|
+
}, r.disconnectedCallback = function() {
|
|
237
|
+
f == null || f.call(this), this._selectorCleanup && (this._selectorCleanup.next(), this._selectorCleanup.complete()), this._selectorSubscriptions && (this._selectorSubscriptions.forEach((p) => p.unsubscribe()), this._selectorSubscriptions.clear());
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
function ae(n, e, t = {}) {
|
|
242
|
+
return function(r, s, i) {
|
|
243
|
+
G(n, (l) => {
|
|
244
|
+
const f = e(this);
|
|
245
|
+
return f ? l.get(f) : void 0;
|
|
246
|
+
}, t)(r, s);
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
export {
|
|
250
|
+
N as a,
|
|
251
|
+
P as b,
|
|
252
|
+
j as c,
|
|
253
|
+
B as d,
|
|
254
|
+
T as e,
|
|
255
|
+
I as f,
|
|
256
|
+
$ as g,
|
|
257
|
+
Q as h,
|
|
258
|
+
V as i,
|
|
259
|
+
ae as j,
|
|
260
|
+
F as k,
|
|
261
|
+
d as l,
|
|
262
|
+
X as m,
|
|
263
|
+
Y as n,
|
|
264
|
+
Z as o,
|
|
265
|
+
ee as p,
|
|
266
|
+
te as q,
|
|
267
|
+
ne as r,
|
|
268
|
+
G as s,
|
|
269
|
+
re as t,
|
|
270
|
+
se as u,
|
|
271
|
+
oe as v,
|
|
272
|
+
ie as w
|
|
273
|
+
};
|
|
274
|
+
//# sourceMappingURL=selector-hook-9dSW11-1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selector-hook-9dSW11-1.js","sources":["../src/store/context-create.ts","../src/store/filter-directive.ts","../src/store/selectors.ts","../src/store/selector-hook.ts"],"sourcesContent":["// src/store/context-create.ts\nimport SchmancyCollectionStore from './context-collection'\nimport { SchmancyStoreObject } from './context-object'\nimport { ICollectionStore, IStore, StorageType, StoreError } from './types'\n\n/**\n * Type guard to check if an object is empty\n */\nfunction isEmptyObject(obj: unknown): boolean {\n\tif (typeof obj !== 'object' || obj === null) {\n\t\treturn false\n\t}\n\treturn Object.keys(obj).length === 0\n}\n\n/**\n * Type guard to check if object is an iterable collection\n */\n// function isCollection(obj: unknown): obj is Iterable<unknown> {\n// \t// Must be non-null and of type 'object'\n// \tif (obj == null || typeof obj !== 'object') {\n// \t\treturn false\n// \t}\n\n// \t// Exclude plain objects\n// \tconst proto = Object.getPrototypeOf(obj)\n// \tif (proto === Object.prototype || proto === null) {\n// \t\treturn false\n// \t}\n\n// \t// Check for Symbol.iterator method\n// \treturn typeof obj[Symbol.iterator] === 'function'\n// }\n\n/**\n * Type guard for Map objects\n */\nfunction isMap<K, V>(value: unknown): value is Map<K, V> {\n\treturn value instanceof Map\n}\n\n/**\n * Creates a regular object store\n */\nfunction createObjectStore<T extends Record<string, any>>(\n\tinitialData: T,\n\tstorage: StorageType,\n\tkey: string,\n): IStore<T> & SchmancyStoreObject<T> {\n\t// Validate storage type\n\tif (storage === 'indexeddb') {\n\t\tthrow new StoreError('IndexedDB storage is not supported for plain objects', null, { storage, key })\n\t}\n\n\t// Create the store instance\n\tconst store = SchmancyStoreObject.getInstance<T>(storage, key, initialData)\n\n\t// Initialize with provided data if store is empty\n\tif (isEmptyObject(store.value)) {\n\t\tstore.$.next(initialData)\n\t}\n\n\treturn store\n}\n\n/**\n * Creates a collection store\n */\nfunction createCollectionStore<V>(\n\tinitialData: Map<string, V>,\n\tstorage: StorageType,\n\tkey: string,\n): ICollectionStore<V> & SchmancyCollectionStore<V> {\n\t// Create the store instance\n\tconst store = SchmancyCollectionStore.getInstance(storage, key, initialData)\n\n\t// Initialize with provided data if store is empty\n\tif (!store.value.size) {\n\t\tstore.$.next(new Map(initialData))\n\t}\n\n\treturn store\n}\n\n/**\n * Creates a context for managing state with better type safety\n * Overload for object stores\n */\nexport function createContext<T extends Record<string, any>>(\n\tinitialData: T,\n\tstorage: StorageType,\n\tkey: string,\n): IStore<T> & SchmancyStoreObject<T>\n\n/**\n * Creates a context for managing state with better type safety\n * Overload for collection stores\n */\nexport function createContext<V>(\n\tinitialData: Map<string, V>,\n\tstorage: StorageType,\n\tkey: string,\n): ICollectionStore<V> & SchmancyCollectionStore<V>\n\n/**\n * Implementation of the createContext function\n */\nexport function createContext<T extends Record<string, any> | Map<string, any>>(\n\tinitialData: T | Map<string, any>,\n\tstorage: StorageType,\n\tkey: string,\n): (IStore<T> & SchmancyStoreObject<T>) | (ICollectionStore<any> & SchmancyCollectionStore<any>) {\n\t// Validate input\n\tif (initialData === null || initialData === undefined) {\n\t\tthrow new StoreError('Initial data cannot be null or undefined', null, { storage, key })\n\t}\n\n\t// Determine store type based on input data\n\tif (isMap(initialData)) {\n\t\treturn createCollectionStore(initialData as Map<string, any>, storage, key)\n\t} else if (typeof initialData === 'object') {\n\t\treturn createObjectStore(initialData, storage, key)\n\t} else {\n\t\tthrow new StoreError('Initial data must be an object or a Map', null, {\n\t\t\tstorage,\n\t\t\tkey,\n\t\t\tdataType: typeof initialData,\n\t\t})\n\t}\n}\n\n/**\n * Creates a context with type inference, simplifying common patterns\n */\nexport function createObjectContext<T extends Record<string, any>>(\n\tinitialData: T,\n\tkey: string,\n\tstorage: StorageType = 'local',\n): IStore<T> & SchmancyStoreObject<T> {\n\treturn createContext(initialData, storage, key)\n}\n\n/**\n * Creates a collection context with type inference\n */\nexport function createCollectionContext<V>(\n\tinitialData: Map<string, V> | V[],\n\tkey: string,\n\tstorage: StorageType = 'local',\n): ICollectionStore<V> & SchmancyCollectionStore<V> {\n\t// Convert array to Map if needed\n\tconst dataMap = Array.isArray(initialData)\n\t\t? new Map(initialData.map((item, index) => [String(index), item]))\n\t\t: initialData\n\n\treturn createContext<V>(dataMap, storage, key)\n}\n","// src/store/filter-directive.ts\n\n/** Supported comparison operators with TypeScript literal types */\nexport type ComparisonOperator =\n\t| '=='\n\t| '!='\n\t| '>'\n\t| '<'\n\t| '>='\n\t| '<='\n\t| 'includes'\n\t| 'notIncludes'\n\t| 'startsWith'\n\t| 'endsWith'\n\t| 'in'\n\t| 'notIn'\n\t| 'any' // fuzzy search operator\n\n/**\n * Type-safe condition tuple\n */\nexport type ConditionTuple = [field: string, op: ComparisonOperator, expected: unknown, strict?: boolean]\n\n/**\n * Type-safe condition object\n */\nexport interface ConditionObject {\n\tkey: string\n\toperator: ComparisonOperator\n\tvalue: unknown\n\tstrict?: boolean\n}\n\n/**\n * Unified query condition type\n */\nexport type QueryCondition = ConditionTuple | ConditionObject\n\n/**\n * Filter result with item and score\n */\nexport interface ScoredItem<T> {\n\titem: T\n\tscore: number\n}\n\n/**\n * Get a nested value from an object using a dot-separated path.\n * Checks explicitly for null/undefined so falsy values like 0 or false are preserved.\n */\nexport const getFieldValue = <T = any>(item: Record<string, any>, path: string): T => {\n\tif (!path) return item as unknown as T\n\n\tconst parts = path.split('.')\n\tlet value: any = item\n\n\tfor (const part of parts) {\n\t\tif (value == null) return undefined as unknown as T\n\t\tvalue = value[part]\n\t}\n\n\treturn value as T\n}\n\n/**\n * Compute the Levenshtein distance between two strings.\n */\nconst levenshtein = (a: string, b: string): number => {\n\tif (a === b) return 0\n\n\tconst matrix: number[][] = Array(b.length + 1)\n\t\t.fill(null)\n\t\t.map((_, i) => [i])\n\n\t// initialize the first row\n\tfor (let j = 0; j <= a.length; j++) {\n\t\tmatrix[0][j] = j\n\t}\n\n\tfor (let i = 1; i <= b.length; i++) {\n\t\tfor (let j = 1; j <= a.length; j++) {\n\t\t\tif (b.charAt(i - 1) === a.charAt(j - 1)) {\n\t\t\t\tmatrix[i][j] = matrix[i - 1][j - 1]\n\t\t\t} else {\n\t\t\t\tmatrix[i][j] = Math.min(\n\t\t\t\t\tmatrix[i - 1][j] + 1, // deletion\n\t\t\t\t\tmatrix[i][j - 1] + 1, // insertion\n\t\t\t\t\tmatrix[i - 1][j - 1] + 1, // substitution\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t}\n\treturn matrix[b.length][a.length]\n}\n\n/**\n * Check if string `sub` is a subsequence of string `str`.\n * All characters in `sub` must appear in order in `str` (they need not be contiguous).\n */\nconst isSubsequence = (sub: string, str: string): boolean => {\n\tif (!sub) return true\n\tif (!str) return false\n\n\tlet i = 0,\n\t\tj = 0\n\twhile (i < sub.length && j < str.length) {\n\t\tif (sub[i].toLowerCase() === str[j].toLowerCase()) i++\n\t\tj++\n\t}\n\treturn i === sub.length\n}\n\n/**\n * Check if every character (with frequency) in the query exists in the target.\n * For example, \"aovc\" matches \"avocados\".\n */\nconst anagramMatch = (query: string, target: string): boolean => {\n\tif (!query) return true\n\tif (!target) return false\n\n\tconst countChars = (s: string): Record<string, number> =>\n\t\ts\n\t\t\t.toLowerCase()\n\t\t\t.split('')\n\t\t\t.reduce(\n\t\t\t\t(acc, char) => {\n\t\t\t\t\tacc[char] = (acc[char] || 0) + 1\n\t\t\t\t\treturn acc\n\t\t\t\t},\n\t\t\t\t{} as Record<string, number>,\n\t\t\t)\n\n\tconst queryCount = countChars(query)\n\tconst targetCount = countChars(target)\n\treturn Object.keys(queryCount).every(char => (targetCount[char] || 0) >= queryCount[char])\n}\n\n/**\n * Generate bigrams for a string.\n */\nconst getBigrams = (s: string): string[] => {\n\tif (!s || s.length < 2) return []\n\n\tconst bigrams: string[] = []\n\tfor (let i = 0; i < s.length - 1; i++) {\n\t\tbigrams.push(s.substring(i, i + 2).toLowerCase())\n\t}\n\treturn bigrams\n}\n\n/**\n * Compute Dice's coefficient for two strings based on bigrams.\n * Returns a value between 0 (no similarity) and 1 (perfect match).\n */\nconst diceCoefficient = (s1: string, s2: string): number => {\n\tif (!s1 || !s2 || s1.length < 2 || s2.length < 2) return 0\n\n\tconst bigrams1 = getBigrams(s1)\n\tconst bigrams2 = getBigrams(s2)\n\n\tif (bigrams1.length === 0 || bigrams2.length === 0) return 0\n\n\tlet intersection = 0\n\tconst used = new Array(bigrams2.length).fill(false)\n\n\tfor (const bigram of bigrams1) {\n\t\tfor (let i = 0; i < bigrams2.length; i++) {\n\t\t\tif (!used[i] && bigrams2[i] === bigram) {\n\t\t\t\tintersection++\n\t\t\t\tused[i] = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn (2 * intersection) / (bigrams1.length + bigrams2.length)\n}\n\n/**\n * Compute a fuzzy similarity score between two strings.\n * The score is computed by taking the maximum of several methods:\n * - Direct substring match (score 1)\n * - Subsequence check (score 0.8)\n * - Anagram subset match (score 0.7)\n * - Dice coefficient\n * - Normalized Levenshtein similarity\n */\nconst computeFuzzyScore = (actual: string, expected: string): number => {\n\tif (!actual || !expected) return 0\n\n\tconst a = actual.toLowerCase().trim()\n\tconst b = expected.toLowerCase().trim()\n\n\tif (a === b) return 1\n\n\tconst substringScore = a.includes(b) ? 1 : 0\n\tconst subsequenceScore = isSubsequence(b, a) ? 0.8 : 0\n\tconst anagramScore = anagramMatch(b, a) ? 0.7 : 0\n\tconst diceScore = diceCoefficient(a, b)\n\n\tconst maxLen = Math.max(a.length, b.length)\n\tconst levenshteinScore = maxLen ? 1 - levenshtein(a, b) / maxLen : 0\n\n\treturn Math.max(substringScore, subsequenceScore, anagramScore, diceScore, levenshteinScore)\n}\n\n/**\n * Safely coerce value to string if possible, or return empty string\n */\nconst safeString = (value: unknown): string => {\n\tif (value == null) return ''\n\treturn String(value)\n}\n\n/**\n * Type guard for arrays\n */\nconst isArray = (value: unknown): value is Array<unknown> => {\n\treturn Array.isArray(value)\n}\n\n/**\n * Compare two values based on a comparison operator.\n * For non-fuzzy operators, this returns a boolean.\n */\nexport function compareValues(op: ComparisonOperator, actual: unknown, expected: unknown): boolean {\n\t// Handle null/undefined cases\n\tif (actual == null && expected == null) return true\n\tif (actual == null || expected == null) {\n\t\t// For equality operators, null == null but null != non-null\n\t\tif (op === '==') return actual === expected\n\t\tif (op === '!=') return actual !== expected\n\t\t// Other operators should return false for null/undefined values\n\t\treturn false\n\t}\n\n\tswitch (op) {\n\t\tcase '==':\n\t\t\treturn actual === expected\n\t\tcase '!=':\n\t\t\treturn actual !== expected\n\t\tcase '>':\n\t\t\treturn (actual as number) > (expected as number)\n\t\tcase '<':\n\t\t\treturn (actual as number) < (expected as number)\n\t\tcase '>=':\n\t\t\treturn (actual as number) >= (expected as number)\n\t\tcase '<=':\n\t\t\treturn (actual as number) <= (expected as number)\n\t\tcase 'includes': {\n\t\t\tif (typeof actual === 'string') {\n\t\t\t\treturn safeString(actual).toLowerCase().includes(safeString(expected).toLowerCase())\n\t\t\t} else if (isArray(actual)) {\n\t\t\t\treturn actual.includes(expected)\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t\tcase 'notIncludes': {\n\t\t\tif (typeof actual === 'string') {\n\t\t\t\treturn !safeString(actual).toLowerCase().includes(safeString(expected).toLowerCase())\n\t\t\t} else if (isArray(actual)) {\n\t\t\t\treturn !actual.includes(expected)\n\t\t\t}\n\t\t\treturn true\n\t\t}\n\t\tcase 'startsWith': {\n\t\t\tif (typeof actual === 'string' && typeof expected === 'string') {\n\t\t\t\treturn actual.toLowerCase().startsWith(expected.toLowerCase())\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t\tcase 'endsWith': {\n\t\t\tif (typeof actual === 'string' && typeof expected === 'string') {\n\t\t\t\treturn actual.toLowerCase().endsWith(expected.toLowerCase())\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t\tcase 'in': {\n\t\t\tif (isArray(expected)) {\n\t\t\t\treturn expected.includes(actual)\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t\tcase 'notIn': {\n\t\t\tif (isArray(expected)) {\n\t\t\t\treturn !expected.includes(actual)\n\t\t\t}\n\t\t\treturn true\n\t\t}\n\t\tdefault: {\n\t\t\tconsole.warn(`Operator \"${op}\" is not supported in strict comparison.`)\n\t\t\treturn false\n\t\t}\n\t}\n}\n\n/**\n * Apply a query condition to an item and return score\n */\nfunction applyQueryCondition<T extends Record<string, any>>(\n\titem: T,\n\tquery: QueryCondition,\n\tfuzzyThreshold: number = 0.3,\n): { valid: boolean; score: number } {\n\tlet field: string,\n\t\top: ComparisonOperator,\n\t\texpected: unknown,\n\t\tstrict = false\n\n\tif (Array.isArray(query)) {\n\t\t;[field, op, expected, strict = false] = query\n\t} else {\n\t\tfield = query.key\n\t\top = query.operator\n\t\texpected = query.value\n\t\tstrict = query.strict || false\n\t}\n\n\t// Skip empty filters for non-strict queries\n\tif (!strict && (expected === '' || expected == null || (isArray(expected) && expected.length === 0))) {\n\t\treturn { valid: true, score: 1 }\n\t}\n\n\tconst actual = getFieldValue(item, field)\n\n\t// If strict mode is enabled, enforce exact equality\n\tif (strict) {\n\t\tif (actual !== expected) {\n\t\t\treturn { valid: false, score: 0 }\n\t\t}\n\t\treturn { valid: true, score: 1 }\n\t}\n\n\tif (op === 'any') {\n\t\t// Fuzzy search requires both values to be strings\n\t\tif (typeof actual !== 'string' || typeof expected !== 'string') {\n\t\t\treturn { valid: false, score: 0 }\n\t\t}\n\n\t\tconst score = computeFuzzyScore(actual, expected)\n\t\tif (score < fuzzyThreshold) {\n\t\t\treturn { valid: false, score: 0 }\n\t\t}\n\n\t\treturn { valid: true, score }\n\t} else {\n\t\t// For non-fuzzy operators, check condition\n\t\tconst matches = compareValues(op, actual, expected)\n\t\treturn {\n\t\t\tvalid: matches,\n\t\t\tscore: matches ? 1 : 0,\n\t\t}\n\t}\n}\n\n/**\n * Filter a Map of items given an array of query conditions.\n * For each query condition:\n * - If the expected value is empty/null/undefined, it is treated as a match.\n * - For non-fuzzy operators, the condition must strictly match.\n * - For the \"any\" operator, a fuzzy similarity score is computed.\n * Items with a fuzzy score below a given threshold (e.g., 0.3) are excluded.\n *\n * The overall item score is the average of the scores from all conditions.\n * The results are sorted in descending order of relevance.\n *\n * @param items - A Map containing items to filter.\n * @param queries - An array of query conditions to apply.\n * @param fuzzyThreshold - Minimum score required for fuzzy matches (default: 0.3)\n * @returns An array of items that match all query conditions, sorted by relevance.\n */\nexport function filterMapItems<T extends Record<string, any>>(\n\titems: Map<string, T>,\n\tqueries: QueryCondition[] = [],\n\tfuzzyThreshold: number = 0.3,\n): T[] {\n\t// If no queries, return all items unsorted\n\tif (!queries.length) {\n\t\treturn Array.from(items.values())\n\t}\n\n\t// Score and filter each item\n\tconst scoredItems: ScoredItem<T>[] = []\n\n\tfor (const [_, item] of items.entries()) {\n\t\tlet totalScore = 0\n\t\tlet matchCount = 0\n\t\tlet valid = true\n\n\t\tfor (const query of queries) {\n\t\t\tconst result = applyQueryCondition(item, query, fuzzyThreshold)\n\n\t\t\tif (!result.valid) {\n\t\t\t\tvalid = false\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\ttotalScore += result.score\n\t\t\tmatchCount++\n\t\t}\n\n\t\tif (valid) {\n\t\t\tscoredItems.push({\n\t\t\t\titem,\n\t\t\t\tscore: matchCount > 0 ? totalScore / matchCount : 1,\n\t\t\t})\n\t\t}\n\t}\n\n\t// Sort by descending score\n\tscoredItems.sort((a, b) => b.score - a.score)\n\n\treturn scoredItems.map(x => x.item)\n}\n\n/**\n * Filter an array of items using query conditions\n */\nexport function filterArrayItems<T extends Record<string, any>>(\n\titems: T[],\n\tqueries: QueryCondition[] = [],\n\tfuzzyThreshold: number = 0.3,\n): T[] {\n\t// Create temporary map with numeric indices as keys\n\tconst map = new Map<string, T>()\n\titems.forEach((item, index) => map.set(String(index), item))\n\n\treturn filterMapItems(map, queries, fuzzyThreshold)\n}\n\n// Export a simpler alias for filterMapItems\nexport const filterMap = filterMapItems\n\n// Export an alias for filterArrayItems\nexport const filterArray = filterArrayItems\n","// src/store/selectors.ts\nimport { Observable, combineLatest, distinctUntilChanged, map, shareReplay } from 'rxjs'\nimport { IStore, ICollectionStore } from './types'\n\n/**\n * Deep equality comparison for maps and complex objects\n * More efficient than JSON.stringify for large objects\n */\nfunction deepEqual(a: unknown, b: unknown): boolean {\n\tif (a === b) return true\n\n\tif (a instanceof Map && b instanceof Map) {\n\t\tif (a.size !== b.size) return false\n\t\tfor (const [key, value] of a) {\n\t\t\tif (!b.has(key) || !deepEqual(value, b.get(key))) return false\n\t\t}\n\t\treturn true\n\t}\n\n\tif (a instanceof Set && b instanceof Set) {\n\t\tif (a.size !== b.size) return false\n\t\tfor (const item of a) {\n\t\t\tif (!b.has(item)) return false\n\t\t}\n\t\treturn true\n\t}\n\n\tif (typeof a === 'object' && a !== null && typeof b === 'object' && b !== null) {\n\t\tconst keysA = Object.keys(a)\n\t\tconst keysB = Object.keys(b)\n\n\t\tif (keysA.length !== keysB.length) return false\n\n\t\tfor (const key of keysA) {\n\t\t\t// @ts-ignore: Index signature\n\t\t\tif (!deepEqual(a[key], b[key])) return false\n\t\t}\n\n\t\treturn true\n\t}\n\n\treturn false\n}\n\n/**\n * Creates a selector that derives a value from store state\n *\n * @param store The store to observe\n * @param selectorFn Function that transforms the state\n * @returns An observable of the selected state that only emits when the derived value changes\n */\nexport function createSelector<T, R>(store: IStore<T>, selectorFn: (state: T) => R): Observable<R> {\n\treturn store.$.pipe(map(selectorFn), distinctUntilChanged<R>(deepEqual), shareReplay(1))\n}\n\n/**\n * Creates a selector for collection stores that derives a value from the collection\n *\n * @param store The collection store to observe\n * @param selectorFn Function that transforms the collection\n * @returns An observable of the selected state that only emits when the derived value changes\n */\nexport function createCollectionSelector<T, R>(\n\tstore: ICollectionStore<T>,\n\tselectorFn: (state: Map<string, T>) => R,\n): Observable<R> {\n\treturn store.$.pipe(map(selectorFn), distinctUntilChanged<R>(deepEqual), shareReplay(1))\n}\n\n/**\n * Creates a selector that returns all items from a collection as an array\n *\n * @param store The collection store\n * @returns An observable of all items as an array\n */\nexport function createItemsSelector<T>(store: ICollectionStore<T>): Observable<T[]> {\n\treturn createCollectionSelector(store, collection => Array.from(collection.values()))\n}\n\n/**\n * Creates a selector that filters items from a collection\n *\n * @param store The collection store\n * @param filterFn Function that returns true for items to include\n * @returns An observable of filtered items as an array\n */\nexport function createFilterSelector<T>(\n\tstore: ICollectionStore<T>,\n\tfilterFn: (item: T, key: string) => boolean,\n): Observable<T[]> {\n\treturn createCollectionSelector(store, collection => {\n\t\tconst result: T[] = []\n\t\tcollection.forEach((item, key) => {\n\t\t\tif (filterFn(item, key)) {\n\t\t\t\tresult.push(item)\n\t\t\t}\n\t\t})\n\t\treturn result\n\t})\n}\n\n/**\n * Creates a selector that retrieves a single item from a collection\n *\n * @param store The collection store\n * @param itemKey The key of the item to select\n * @returns An observable of the selected item that emits when the item changes\n */\nexport function createItemSelector<T>(store: ICollectionStore<T>, itemKey: string): Observable<T | undefined> {\n\treturn createCollectionSelector(store, collection => collection.get(itemKey))\n}\n\n/**\n * Creates a selector that counts items in a collection, optionally filtered\n *\n * @param store The collection store\n * @param filterFn Optional function to filter which items to count\n * @returns An observable of the count\n */\nexport function createCountSelector<T>(\n\tstore: ICollectionStore<T>,\n\tfilterFn?: (item: T, key: string) => boolean,\n): Observable<number> {\n\treturn createCollectionSelector(store, collection => {\n\t\tif (!filterFn) return collection.size\n\n\t\tlet count = 0\n\t\tcollection.forEach((item, key) => {\n\t\t\tif (filterFn(item, key)) count++\n\t\t})\n\t\treturn count\n\t})\n}\n\n/**\n * Creates a compound selector that depends on multiple other selectors\n *\n * @param selectors Array of source selectors\n * @param combinerFn Function that combines all selector results\n * @returns An observable of the combined result\n */\nexport function createCompoundSelector<T extends unknown[], R>(\n\tselectors: { [K in keyof T]: Observable<T[K]> },\n\tcombinerFn: (...values: T) => R,\n): Observable<R> {\n\treturn combineLatest(selectors).pipe(\n\t\tmap(values => combinerFn(...(values as T))),\n\t\tdistinctUntilChanged<R>(deepEqual),\n\t\tshareReplay(1),\n\t)\n}\n\n/**\n * Creates a selector that returns all keys from a collection\n */\nexport function createKeysSelector<T>(store: ICollectionStore<T>): Observable<string[]> {\n\treturn createCollectionSelector(store, collection => Array.from(collection.keys()))\n}\n\n/**\n * Creates a selector that returns entries (key-value pairs) from a collection\n */\nexport function createEntriesSelector<T>(store: ICollectionStore<T>): Observable<[string, T][]> {\n\treturn createCollectionSelector(store, collection => Array.from(collection.entries()))\n}\n\n/**\n * Creates a selector that maps collection values through a transform function\n */\nexport function createMapSelector<T, R>(\n\tstore: ICollectionStore<T>,\n\tmapFn: (item: T, key: string) => R,\n): Observable<R[]> {\n\treturn createCollectionSelector(store, collection => {\n\t\tconst result: R[] = []\n\t\tcollection.forEach((item, key) => {\n\t\t\tresult.push(mapFn(item, key))\n\t\t})\n\t\treturn result\n\t})\n}\n\n/**\n * Creates a selector that sorts collection items\n */\nexport function createSortSelector<T>(store: ICollectionStore<T>, compareFn: (a: T, b: T) => number): Observable<T[]> {\n\treturn createCollectionSelector(store, collection => {\n\t\treturn Array.from(collection.values()).sort(compareFn)\n\t})\n}\n\n/**\n * Creates a selector that finds the first item matching a predicate\n */\nexport function createFindSelector<T>(\n\tstore: ICollectionStore<T>,\n\tpredicate: (item: T, key: string) => boolean,\n): Observable<T | undefined> {\n\treturn createCollectionSelector(store, collection => {\n\t\tfor (const [key, item] of collection.entries()) {\n\t\t\tif (predicate(item, key)) {\n\t\t\t\treturn item\n\t\t\t}\n\t\t}\n\t\treturn undefined\n\t})\n}\n","// src/store/selector-hook.ts\nimport { property as litProperty } from 'lit/decorators.js'\nimport { Observable, Subject, Subscription } from 'rxjs'\nimport { takeUntil } from 'rxjs/operators'\nimport { createCollectionSelector, createSelector } from './selectors'\nimport { ICollectionStore, IStore } from './types'\n\n/**\n * Component lifecycle interface\n */\ninterface ComponentWithLifecycle {\n\t// Lifecycle hooks\n\tisConnected: boolean\n\tdisconnectedCallback?: () => void\n\tconnectedCallback?: () => void\n\trequestUpdate?: () => void\n\n\t// Internal properties\n\t_selectorCleanup?: Subject<void>\n\t_selectorSubscriptions?: Map<string, Subscription>\n\t_selectorInitialized?: Set<string>\n\n\t// Value storage\n\t[key: string]: any\n}\n\n/**\n * Property descriptor interface\n */\ntype PropertyDescriptor<T> = {\n\tget?: () => T\n\tset?: (value: T) => void\n\tvalue?: T\n\tconfigurable?: boolean\n\tenumerable?: boolean\n\twritable?: boolean\n}\n\n/**\n * Options for selecting from a store\n */\ninterface SelectOptions {\n\t/** If true, will wait for selector to emit a non-null value before calling connectedCallback */\n\trequired?: boolean\n\n\t/** If true, will only update the component and not set the property value */\n\tupdateOnly?: boolean\n\n\t/** If true, will use structuredClone to deeply clone values (prevents mutations) */\n\tdeepClone?: boolean\n\n\t/** Custom equality function to determine when to update */\n\tequals?: (a: any, b: any) => boolean\n}\n\n/**\n * Type guard to check if a store is a collection store\n */\nfunction isCollectionStore<T>(store: IStore<any> | ICollectionStore<T>): store is ICollectionStore<T> {\n\treturn 'set' in store && typeof store.set === 'function' && store.value instanceof Map\n}\n\n/**\n * Selector decorator that connects a component property to a store selector\n *\n * @param store The store to select from\n * @param selectorFn Optional function to transform the store state\n * @param options Additional options for the selector\n */\nexport function select<T, R>(\n\tstore: IStore<T> | ICollectionStore<T>,\n\tselectorFn: (state: any) => R = (state: R) => state,\n\toptions: SelectOptions = {},\n) {\n\treturn function (proto: Record<string, any>, propName: string, _descriptor?: PropertyDescriptor<R>) {\n\t\t// Register as a Lit property\n\t\tlitProperty({ attribute: false, type: Object })(proto, propName)\n\n\t\t// Store original lifecycle methods\n\t\tconst originalConnectedCallback = proto.connectedCallback\n\t\tconst originalDisconnectedCallback = proto.disconnectedCallback\n\n\t\t// Override connectedCallback to set up subscription\n\t\tproto.connectedCallback = function (this: ComponentWithLifecycle) {\n\t\t\t// Initialize tracking properties if needed\n\t\t\tif (!this._selectorCleanup || this._selectorCleanup.closed) {\n\t\t\t\tthis._selectorCleanup = new Subject<void>()\n\t\t\t}\n\n\t\t\tif (!this._selectorSubscriptions) {\n\t\t\t\tthis._selectorSubscriptions = new Map()\n\t\t\t}\n\n\t\t\tif (!this._selectorInitialized) {\n\t\t\t\tthis._selectorInitialized = new Set()\n\t\t\t}\n\n\t\t\t// Create the appropriate selector\n\t\t\tconst selector: Observable<R> = isCollectionStore(store)\n\t\t\t\t? createCollectionSelector(store, selectorFn)\n\t\t\t\t: createSelector(store as IStore<T>, selectorFn)\n\n\t\t\t// Call original connectedCallback immediately if not waiting for data\n\t\t\tif (!options.required && !this._selectorInitialized.has(propName)) {\n\t\t\t\toriginalConnectedCallback?.call(this)\n\t\t\t\tthis._selectorInitialized.add(propName)\n\t\t\t}\n\n\t\t\t// Clean up any existing subscription\n\t\t\tif (this._selectorSubscriptions.has(propName)) {\n\t\t\t\tthis._selectorSubscriptions.get(propName)?.unsubscribe()\n\t\t\t}\n\n\t\t\t// Create new subscription\n\t\t\tconst subscription = selector.pipe(takeUntil(this._selectorCleanup)).subscribe({\n\t\t\t\tnext: (value: R) => {\n\t\t\t\t\t// Handle value updates\n\t\t\t\t\tconst newValue = options.deepClone ? structuredClone(value) : value\n\n\t\t\t\t\tif (!options.updateOnly) {\n\t\t\t\t\t\tthis[propName] = newValue\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.requestUpdate?.()\n\n\t\t\t\t\t// If required and not initialized, call connectedCallback when we get a value\n\t\t\t\t\tif (\n\t\t\t\t\t\toptions.required &&\n\t\t\t\t\t\t!this._selectorInitialized.has(propName) &&\n\t\t\t\t\t\tnewValue !== null &&\n\t\t\t\t\t\tnewValue !== undefined\n\t\t\t\t\t) {\n\t\t\t\t\t\toriginalConnectedCallback?.call(this)\n\t\t\t\t\t\tthis._selectorInitialized.add(propName)\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\terror: (err: Error) => {\n\t\t\t\t\tconsole.error(`Error in selector subscription for ${propName}:`, err)\n\t\t\t\t},\n\t\t\t})\n\n\t\t\t// Store the subscription for cleanup\n\t\t\tthis._selectorSubscriptions.set(propName, subscription)\n\t\t}\n\n\t\t// Override disconnectedCallback to clean up subscriptions\n\t\tproto.disconnectedCallback = function (this: ComponentWithLifecycle) {\n\t\t\t// Call original disconnectedCallback\n\t\t\toriginalDisconnectedCallback?.call(this)\n\n\t\t\t// Clean up subscriptions\n\t\t\tif (this._selectorCleanup) {\n\t\t\t\tthis._selectorCleanup.next()\n\t\t\t\tthis._selectorCleanup.complete()\n\t\t\t}\n\n\t\t\tif (this._selectorSubscriptions) {\n\t\t\t\tthis._selectorSubscriptions.forEach(sub => sub.unsubscribe())\n\t\t\t\tthis._selectorSubscriptions.clear()\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Creates a selector decorator that selects a specific item from a collection store\n *\n * @param store The collection store\n * @param keyGetter Function that returns the key to select\n * @param options Additional options\n */\nexport function selectItem<T>(\n\tstore: ICollectionStore<T>,\n\tkeyGetter: (component: any) => string,\n\toptions: SelectOptions = {},\n) {\n\treturn function (proto: Record<string, any>, propName: string, _descriptor?: PropertyDescriptor<T | undefined>) {\n\t\tselect(\n\t\t\tstore,\n\t\t\tstate => {\n\t\t\t\t// This will be evaluated during subscription, when 'this' is available\n\t\t\t\tconst itemKey = keyGetter(this)\n\t\t\t\treturn itemKey ? state.get(itemKey) : undefined\n\t\t\t},\n\t\t\toptions,\n\t\t)(proto, propName)\n\t}\n}\n"],"names":["createObjectStore","initialData","storage","key","StoreError","store","SchmancyStoreObject","getInstance","obj","value","Object","keys","length","$","next","createContext","Map","SchmancyCollectionStore","size","dataType","createObjectContext","createCollectionContext","Array","isArray","map","item","index","String","getFieldValue","path","parts","split","part","getBigrams","s","bigrams","i","push","substring","toLowerCase","computeFuzzyScore","actual","expected","a","trim","b","substringScore","includes","subsequenceScore","sub","str","j","anagramScore","query","target","countChars","reduce","acc","char","queryCount","targetCount","every","diceScore","s1","s2","bigrams1","bigrams2","intersection","used","fill","bigram","maxLen","Math","max","levenshteinScore","matrix","_","charAt","min","safeString","compareValues","op","startsWith","endsWith","applyQueryCondition","fuzzyThreshold","field","strict","operator","valid","score","matches","filterMapItems","items","queries","from","values","scoredItems","entries","totalScore","matchCount","result","sort","x","filterArrayItems","forEach","set","filterMap","filterArray","deepEqual","has","get","Set","keysA","keysB","createSelector","selectorFn","pipe","distinctUntilChanged","shareReplay","createCollectionSelector","createItemsSelector","collection","createFilterSelector","filterFn","createItemSelector","itemKey","createCountSelector","count","createCompoundSelector","selectors","combinerFn","combineLatest","createKeysSelector","createEntriesSelector","createMapSelector","mapFn","createSortSelector","compareFn","createFindSelector","predicate","select","state","options","proto","propName","_descriptor","litProperty","attribute","type","originalConnectedCallback","connectedCallback","originalDisconnectedCallback","disconnectedCallback","this","_selectorCleanup","closed","Subject","_selectorSubscriptions","_selectorInitialized","selector","required","call","add","unsubscribe","subscription","takeUntil","subscribe","newValue","deepClone","structuredClone","updateOnly","requestUpdate","error","err","complete","clear","selectItem","keyGetter"],"mappings":";;;;AA4CA,SAASA,EACRC,GACAC,GACAC,GAAAA;AAGA,MAAID,MAAY,YACf,OAAM,IAAIE,EAAW,wDAAwD,MAAM,EAAEF,SAASC,GAAAA,KAAAA,EAAAA,CAAAA;AAI/F,QAAME,IAAQC,EAAoBC,YAAeL,GAASC,GAAKF;AA/ChE,MAAuBO;AAsDf,SAtDeA,QAAAA,IAkDJH,EAAMI,UAjDL,YAAYD,MAAQ,QAGhCE,OAAOC,KAAKH,CAAAA,EAAKI,WAAW,KA+C5BP,EAAAQ,EAAEC,KAAKb,CAGPI,GAAAA;AACR;AA4CgB,SAAAU,EACfd,GACAC,GACAC,GAAAA;AAGI,MACH,KADGF,KACH,OAAM,IAAIG,EAAW,4CAA4C,MAAM,EAAEF,SAAAA,GAASC;AAI/E,MAAMF,aAhFce,IAiFhB,QAnDT,SACCf,GACAC,GACAC,GAAAA;AAGA,UAAME,IAAQY,EAAwBV,YAAYL,GAASC,GAAKF;AAOzD,WAJFI,EAAMI,MAAMS,QAChBb,EAAMQ,EAAEC,KAAK,IAAIE,IAAIf,CAAAA,CAAAA,GAGfI;AAAAA,EACR,EAqC+BJ,GAAiCC,GAASC,CAAAA;AACxE,MAAkBF,OAAAA,KAAgB,SAC1B,QAAAD,EAAkBC,GAAaC,GAASC,CAEzC;AAAA,QAAA,IAAIC,EAAW,2CAA2C,MAAM,EACrEF,YACAC,KACAgB,GAAAA,UAAAA,OAAiBlB;AAGpB;AAKO,SAASmB,EACfnB,GACAE,GACAD,IAAuB,SAEhB;AAAA,SAAAa,EAAcd,GAAaC,GAASC;AAC5C;AAKO,SAASkB,EACfpB,GACAE,GACAD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AGnBrB,IAAAA,KAAKI,2BACRJ,KAAKI,uBAAuBrD,QAAexD,CAAAA,MAAAA,EAAImH,gBAC/CV,KAAKI,uBAAuBkB;IAE9B;AAAA,EACD;AACD;AASO,SAASC,GACf5K,GACA6K,GACAnC,IAAyB,CAAA,GAElB;AAAA,SAAA,SAAUC,GAA4BC,GAAkBC,GAC9DL;AAAAA,MACCxI,GACSyI,CAAAA,MAEF;AAAA,YAAAhB,IAAUoD,EAAUxB,IAAAA;AAC1B,aAAO5B,IAAUgB,EAAM/B,IAAIe,CAAW,IAAA;AAAA,IAAA,GAEvCiB,CAPDF,EAQEG,GAAOC,CACV;AAAA,EAAA;AACD;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const w=require("./context-object-D81PeS3j.cjs"),E=require("lit/decorators.js"),g=require("rxjs"),O=require("rxjs/operators");function q(n,e,t){if(e==="indexeddb")throw new w.StoreError("IndexedDB storage is not supported for plain objects",null,{storage:e,key:t});const r=w.SchmancyStoreObject.getInstance(e,t,n);var o;return typeof(o=r.value)=="object"&&o!==null&&Object.keys(o).length===0&&r.$.next(n),r}function I(n,e,t){if(n==null)throw new w.StoreError("Initial data cannot be null or undefined",null,{storage:e,key:t});if(n instanceof Map)return function(r,o,i){const u=w.SchmancyCollectionStore.getInstance(o,i,r);return u.value.size||u.$.next(new Map(r)),u}(n,e,t);if(typeof n=="object")return q(n,e,t);throw new w.StoreError("Initial data must be an object or a Map",null,{storage:e,key:t,dataType:typeof n})}const L=(n,e)=>{if(!e)return n;const t=e.split(".");let r=n;for(const o of t){if(r==null)return;r=r[o]}return r},k=n=>{if(!n||n.length<2)return[];const e=[];for(let t=0;t<n.length-1;t++)e.push(n.substring(t,t+2).toLowerCase());return e},U=(n,e)=>{if(!n||!e)return 0;const t=n.toLowerCase().trim(),r=e.toLowerCase().trim();if(t===r)return 1;const o=t.includes(r)?1:0,i=((l,c)=>{if(!l)return!0;if(!c)return!1;let a=0,s=0;for(;a<l.length&&s<c.length;)l[a].toLowerCase()===c[s].toLowerCase()&&a++,s++;return a===l.length})(r,t)?.8:0,u=((l,c)=>{if(!l)return!0;if(!c)return!1;const a=b=>b.toLowerCase().split("").reduce((S,y)=>(S[y]=(S[y]||0)+1,S),{}),s=a(l),h=a(c);return Object.keys(s).every(b=>(h[b]||0)>=s[b])})(r,t)?.7:0,f=((l,c)=>{if(!l||!c||l.length<2||c.length<2)return 0;const a=k(l),s=k(c);if(a.length===0||s.length===0)return 0;let h=0;const b=new Array(s.length).fill(!1);for(const S of a)for(let y=0;y<s.length;y++)if(!b[y]&&s[y]===S){h++,b[y]=!0;break}return 2*h/(a.length+s.length)})(t,r),p=Math.max(t.length,r.length),C=p?1-((l,c)=>{if(l===c)return 0;const a=Array(c.length+1).fill(null).map((s,h)=>[h]);for(let s=0;s<=l.length;s++)a[0][s]=s;for(let s=1;s<=c.length;s++)for(let h=1;h<=l.length;h++)c.charAt(s-1)===l.charAt(h-1)?a[s][h]=a[s-1][h-1]:a[s][h]=Math.min(a[s-1][h]+1,a[s][h-1]+1,a[s-1][h-1]+1);return a[c.length][l.length]})(t,r)/p:0;return Math.max(o,i,u,f,C)},v=n=>n==null?"":String(n),m=n=>Array.isArray(n);function M(n,e,t){if(e==null&&t==null)return!0;if(e==null||t==null)return n==="=="?e===t:n==="!="&&e!==t;switch(n){case"==":return e===t;case"!=":return e!==t;case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t;case"includes":return typeof e=="string"?v(e).toLowerCase().includes(v(t).toLowerCase()):!!m(e)&&e.includes(t);case"notIncludes":return typeof e=="string"?!v(e).toLowerCase().includes(v(t).toLowerCase()):!m(e)||!e.includes(t);case"startsWith":return typeof e=="string"&&typeof t=="string"&&e.toLowerCase().startsWith(t.toLowerCase());case"endsWith":return typeof e=="string"&&typeof t=="string"&&e.toLowerCase().endsWith(t.toLowerCase());case"in":return!!m(t)&&t.includes(e);case"notIn":return!m(t)||!t.includes(e);default:return!1}}function W(n,e,t=.3){let r,o,i,u=!1;if(Array.isArray(e)?[r,o,i,u=!1]=e:(r=e.key,o=e.operator,i=e.value,u=e.strict||!1),!u&&(i===""||i==null||m(i)&&i.length===0))return{valid:!0,score:1};const f=L(n,r);if(u)return f!==i?{valid:!1,score:0}:{valid:!0,score:1};if(o==="any"){if(typeof f!="string"||typeof i!="string")return{valid:!1,score:0};const p=U(f,i);return p<t?{valid:!1,score:0}:{valid:!0,score:p}}{const p=M(o,f,i);return{valid:p,score:p?1:0}}}function A(n,e=[],t=.3){if(!e.length)return Array.from(n.values());const r=[];for(const[o,i]of n.entries()){let u=0,f=0,p=!0;for(const C of e){const l=W(i,C,t);if(!l.valid){p=!1;break}u+=l.score,f++}p&&r.push({item:i,score:f>0?u/f:1})}return r.sort((o,i)=>i.score-o.score),r.map(o=>o.item)}function x(n,e=[],t=.3){const r=new Map;return n.forEach((o,i)=>r.set(String(i),o)),A(r,e,t)}const $=A,F=x;function _(n,e){if(n===e)return!0;if(n instanceof Map&&e instanceof Map){if(n.size!==e.size)return!1;for(const[t,r]of n)if(!e.has(t)||!_(r,e.get(t)))return!1;return!0}if(n instanceof Set&&e instanceof Set){if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0}if(typeof n=="object"&&n!==null&&typeof e=="object"&&e!==null){const t=Object.keys(n),r=Object.keys(e);if(t.length!==r.length)return!1;for(const o of t)if(!_(n[o],e[o]))return!1;return!0}return!1}function z(n,e){return n.$.pipe(g.map(e),g.distinctUntilChanged(_),g.shareReplay(1))}function d(n,e){return n.$.pipe(g.map(e),g.distinctUntilChanged(_),g.shareReplay(1))}function j(n,e=r=>r,t={}){return function(r,o,i){E.property({attribute:!1,type:Object})(r,o);const u=r.connectedCallback,f=r.disconnectedCallback;r.connectedCallback=function(){var l;this._selectorCleanup&&!this._selectorCleanup.closed||(this._selectorCleanup=new g.Subject),this._selectorSubscriptions||(this._selectorSubscriptions=new Map),this._selectorInitialized||(this._selectorInitialized=new Set);const p=function(c){return"set"in c&&typeof c.set=="function"&&c.value instanceof Map}(n)?d(n,e):z(n,e);t.required||this._selectorInitialized.has(o)||(u==null||u.call(this),this._selectorInitialized.add(o)),this._selectorSubscriptions.has(o)&&((l=this._selectorSubscriptions.get(o))==null||l.unsubscribe());const C=p.pipe(O.takeUntil(this._selectorCleanup)).subscribe({next:c=>{var s;const a=t.deepClone?structuredClone(c):c;t.updateOnly||(this[o]=a),(s=this.requestUpdate)==null||s.call(this),t.required&&!this._selectorInitialized.has(o)&&a!=null&&(u==null||u.call(this),this._selectorInitialized.add(o))},error:c=>{}});this._selectorSubscriptions.set(o,C)},r.disconnectedCallback=function(){f==null||f.call(this),this._selectorCleanup&&(this._selectorCleanup.next(),this._selectorCleanup.complete()),this._selectorSubscriptions&&(this._selectorSubscriptions.forEach(p=>p.unsubscribe()),this._selectorSubscriptions.clear())}}}exports.compareValues=M,exports.createCollectionContext=function(n,e,t="local"){return I(Array.isArray(n)?new Map(n.map((r,o)=>[String(o),r])):n,t,e)},exports.createCollectionSelector=d,exports.createCompoundSelector=function(n,e){return g.combineLatest(n).pipe(g.map(t=>e(...t)),g.distinctUntilChanged(_),g.shareReplay(1))},exports.createContext=I,exports.createCountSelector=function(n,e){return d(n,t=>{if(!e)return t.size;let r=0;return t.forEach((o,i)=>{e(o,i)&&r++}),r})},exports.createEntriesSelector=function(n){return d(n,e=>Array.from(e.entries()))},exports.createFilterSelector=function(n,e){return d(n,t=>{const r=[];return t.forEach((o,i)=>{e(o,i)&&r.push(o)}),r})},exports.createFindSelector=function(n,e){return d(n,t=>{for(const[r,o]of t.entries())if(e(o,r))return o})},exports.createItemSelector=function(n,e){return d(n,t=>t.get(e))},exports.createItemsSelector=function(n){return d(n,e=>Array.from(e.values()))},exports.createKeysSelector=function(n){return d(n,e=>Array.from(e.keys()))},exports.createMapSelector=function(n,e){return d(n,t=>{const r=[];return t.forEach((o,i)=>{r.push(e(o,i))}),r})},exports.createObjectContext=function(n,e,t="local"){return I(n,t,e)},exports.createSelector=z,exports.createSortSelector=function(n,e){return d(n,t=>Array.from(t.values()).sort(e))},exports.filterArray=F,exports.filterArrayItems=x,exports.filterMap=$,exports.filterMapItems=A,exports.getFieldValue=L,exports.select=j,exports.selectItem=function(n,e,t={}){return function(r,o,i){j(n,u=>{const f=e(this);return f?u.get(f):void 0},t)(r,o)}};
|
|
2
|
+
//# sourceMappingURL=selector-hook-CH-z8W2d.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selector-hook-CH-z8W2d.cjs","sources":["../src/store/context-create.ts","../src/store/filter-directive.ts","../src/store/selectors.ts","../src/store/selector-hook.ts"],"sourcesContent":["// src/store/context-create.ts\nimport SchmancyCollectionStore from './context-collection'\nimport { SchmancyStoreObject } from './context-object'\nimport { ICollectionStore, IStore, StorageType, StoreError } from './types'\n\n/**\n * Type guard to check if an object is empty\n */\nfunction isEmptyObject(obj: unknown): boolean {\n\tif (typeof obj !== 'object' || obj === null) {\n\t\treturn false\n\t}\n\treturn Object.keys(obj).length === 0\n}\n\n/**\n * Type guard to check if object is an iterable collection\n */\n// function isCollection(obj: unknown): obj is Iterable<unknown> {\n// \t// Must be non-null and of type 'object'\n// \tif (obj == null || typeof obj !== 'object') {\n// \t\treturn false\n// \t}\n\n// \t// Exclude plain objects\n// \tconst proto = Object.getPrototypeOf(obj)\n// \tif (proto === Object.prototype || proto === null) {\n// \t\treturn false\n// \t}\n\n// \t// Check for Symbol.iterator method\n// \treturn typeof obj[Symbol.iterator] === 'function'\n// }\n\n/**\n * Type guard for Map objects\n */\nfunction isMap<K, V>(value: unknown): value is Map<K, V> {\n\treturn value instanceof Map\n}\n\n/**\n * Creates a regular object store\n */\nfunction createObjectStore<T extends Record<string, any>>(\n\tinitialData: T,\n\tstorage: StorageType,\n\tkey: string,\n): IStore<T> & SchmancyStoreObject<T> {\n\t// Validate storage type\n\tif (storage === 'indexeddb') {\n\t\tthrow new StoreError('IndexedDB storage is not supported for plain objects', null, { storage, key })\n\t}\n\n\t// Create the store instance\n\tconst store = SchmancyStoreObject.getInstance<T>(storage, key, initialData)\n\n\t// Initialize with provided data if store is empty\n\tif (isEmptyObject(store.value)) {\n\t\tstore.$.next(initialData)\n\t}\n\n\treturn store\n}\n\n/**\n * Creates a collection store\n */\nfunction createCollectionStore<V>(\n\tinitialData: Map<string, V>,\n\tstorage: StorageType,\n\tkey: string,\n): ICollectionStore<V> & SchmancyCollectionStore<V> {\n\t// Create the store instance\n\tconst store = SchmancyCollectionStore.getInstance(storage, key, initialData)\n\n\t// Initialize with provided data if store is empty\n\tif (!store.value.size) {\n\t\tstore.$.next(new Map(initialData))\n\t}\n\n\treturn store\n}\n\n/**\n * Creates a context for managing state with better type safety\n * Overload for object stores\n */\nexport function createContext<T extends Record<string, any>>(\n\tinitialData: T,\n\tstorage: StorageType,\n\tkey: string,\n): IStore<T> & SchmancyStoreObject<T>\n\n/**\n * Creates a context for managing state with better type safety\n * Overload for collection stores\n */\nexport function createContext<V>(\n\tinitialData: Map<string, V>,\n\tstorage: StorageType,\n\tkey: string,\n): ICollectionStore<V> & SchmancyCollectionStore<V>\n\n/**\n * Implementation of the createContext function\n */\nexport function createContext<T extends Record<string, any> | Map<string, any>>(\n\tinitialData: T | Map<string, any>,\n\tstorage: StorageType,\n\tkey: string,\n): (IStore<T> & SchmancyStoreObject<T>) | (ICollectionStore<any> & SchmancyCollectionStore<any>) {\n\t// Validate input\n\tif (initialData === null || initialData === undefined) {\n\t\tthrow new StoreError('Initial data cannot be null or undefined', null, { storage, key })\n\t}\n\n\t// Determine store type based on input data\n\tif (isMap(initialData)) {\n\t\treturn createCollectionStore(initialData as Map<string, any>, storage, key)\n\t} else if (typeof initialData === 'object') {\n\t\treturn createObjectStore(initialData, storage, key)\n\t} else {\n\t\tthrow new StoreError('Initial data must be an object or a Map', null, {\n\t\t\tstorage,\n\t\t\tkey,\n\t\t\tdataType: typeof initialData,\n\t\t})\n\t}\n}\n\n/**\n * Creates a context with type inference, simplifying common patterns\n */\nexport function createObjectContext<T extends Record<string, any>>(\n\tinitialData: T,\n\tkey: string,\n\tstorage: StorageType = 'local',\n): IStore<T> & SchmancyStoreObject<T> {\n\treturn createContext(initialData, storage, key)\n}\n\n/**\n * Creates a collection context with type inference\n */\nexport function createCollectionContext<V>(\n\tinitialData: Map<string, V> | V[],\n\tkey: string,\n\tstorage: StorageType = 'local',\n): ICollectionStore<V> & SchmancyCollectionStore<V> {\n\t// Convert array to Map if needed\n\tconst dataMap = Array.isArray(initialData)\n\t\t? new Map(initialData.map((item, index) => [String(index), item]))\n\t\t: initialData\n\n\treturn createContext<V>(dataMap, storage, key)\n}\n","// src/store/filter-directive.ts\n\n/** Supported comparison operators with TypeScript literal types */\nexport type ComparisonOperator =\n\t| '=='\n\t| '!='\n\t| '>'\n\t| '<'\n\t| '>='\n\t| '<='\n\t| 'includes'\n\t| 'notIncludes'\n\t| 'startsWith'\n\t| 'endsWith'\n\t| 'in'\n\t| 'notIn'\n\t| 'any' // fuzzy search operator\n\n/**\n * Type-safe condition tuple\n */\nexport type ConditionTuple = [field: string, op: ComparisonOperator, expected: unknown, strict?: boolean]\n\n/**\n * Type-safe condition object\n */\nexport interface ConditionObject {\n\tkey: string\n\toperator: ComparisonOperator\n\tvalue: unknown\n\tstrict?: boolean\n}\n\n/**\n * Unified query condition type\n */\nexport type QueryCondition = ConditionTuple | ConditionObject\n\n/**\n * Filter result with item and score\n */\nexport interface ScoredItem<T> {\n\titem: T\n\tscore: number\n}\n\n/**\n * Get a nested value from an object using a dot-separated path.\n * Checks explicitly for null/undefined so falsy values like 0 or false are preserved.\n */\nexport const getFieldValue = <T = any>(item: Record<string, any>, path: string): T => {\n\tif (!path) return item as unknown as T\n\n\tconst parts = path.split('.')\n\tlet value: any = item\n\n\tfor (const part of parts) {\n\t\tif (value == null) return undefined as unknown as T\n\t\tvalue = value[part]\n\t}\n\n\treturn value as T\n}\n\n/**\n * Compute the Levenshtein distance between two strings.\n */\nconst levenshtein = (a: string, b: string): number => {\n\tif (a === b) return 0\n\n\tconst matrix: number[][] = Array(b.length + 1)\n\t\t.fill(null)\n\t\t.map((_, i) => [i])\n\n\t// initialize the first row\n\tfor (let j = 0; j <= a.length; j++) {\n\t\tmatrix[0][j] = j\n\t}\n\n\tfor (let i = 1; i <= b.length; i++) {\n\t\tfor (let j = 1; j <= a.length; j++) {\n\t\t\tif (b.charAt(i - 1) === a.charAt(j - 1)) {\n\t\t\t\tmatrix[i][j] = matrix[i - 1][j - 1]\n\t\t\t} else {\n\t\t\t\tmatrix[i][j] = Math.min(\n\t\t\t\t\tmatrix[i - 1][j] + 1, // deletion\n\t\t\t\t\tmatrix[i][j - 1] + 1, // insertion\n\t\t\t\t\tmatrix[i - 1][j - 1] + 1, // substitution\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t}\n\treturn matrix[b.length][a.length]\n}\n\n/**\n * Check if string `sub` is a subsequence of string `str`.\n * All characters in `sub` must appear in order in `str` (they need not be contiguous).\n */\nconst isSubsequence = (sub: string, str: string): boolean => {\n\tif (!sub) return true\n\tif (!str) return false\n\n\tlet i = 0,\n\t\tj = 0\n\twhile (i < sub.length && j < str.length) {\n\t\tif (sub[i].toLowerCase() === str[j].toLowerCase()) i++\n\t\tj++\n\t}\n\treturn i === sub.length\n}\n\n/**\n * Check if every character (with frequency) in the query exists in the target.\n * For example, \"aovc\" matches \"avocados\".\n */\nconst anagramMatch = (query: string, target: string): boolean => {\n\tif (!query) return true\n\tif (!target) return false\n\n\tconst countChars = (s: string): Record<string, number> =>\n\t\ts\n\t\t\t.toLowerCase()\n\t\t\t.split('')\n\t\t\t.reduce(\n\t\t\t\t(acc, char) => {\n\t\t\t\t\tacc[char] = (acc[char] || 0) + 1\n\t\t\t\t\treturn acc\n\t\t\t\t},\n\t\t\t\t{} as Record<string, number>,\n\t\t\t)\n\n\tconst queryCount = countChars(query)\n\tconst targetCount = countChars(target)\n\treturn Object.keys(queryCount).every(char => (targetCount[char] || 0) >= queryCount[char])\n}\n\n/**\n * Generate bigrams for a string.\n */\nconst getBigrams = (s: string): string[] => {\n\tif (!s || s.length < 2) return []\n\n\tconst bigrams: string[] = []\n\tfor (let i = 0; i < s.length - 1; i++) {\n\t\tbigrams.push(s.substring(i, i + 2).toLowerCase())\n\t}\n\treturn bigrams\n}\n\n/**\n * Compute Dice's coefficient for two strings based on bigrams.\n * Returns a value between 0 (no similarity) and 1 (perfect match).\n */\nconst diceCoefficient = (s1: string, s2: string): number => {\n\tif (!s1 || !s2 || s1.length < 2 || s2.length < 2) return 0\n\n\tconst bigrams1 = getBigrams(s1)\n\tconst bigrams2 = getBigrams(s2)\n\n\tif (bigrams1.length === 0 || bigrams2.length === 0) return 0\n\n\tlet intersection = 0\n\tconst used = new Array(bigrams2.length).fill(false)\n\n\tfor (const bigram of bigrams1) {\n\t\tfor (let i = 0; i < bigrams2.length; i++) {\n\t\t\tif (!used[i] && bigrams2[i] === bigram) {\n\t\t\t\tintersection++\n\t\t\t\tused[i] = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn (2 * intersection) / (bigrams1.length + bigrams2.length)\n}\n\n/**\n * Compute a fuzzy similarity score between two strings.\n * The score is computed by taking the maximum of several methods:\n * - Direct substring match (score 1)\n * - Subsequence check (score 0.8)\n * - Anagram subset match (score 0.7)\n * - Dice coefficient\n * - Normalized Levenshtein similarity\n */\nconst computeFuzzyScore = (actual: string, expected: string): number => {\n\tif (!actual || !expected) return 0\n\n\tconst a = actual.toLowerCase().trim()\n\tconst b = expected.toLowerCase().trim()\n\n\tif (a === b) return 1\n\n\tconst substringScore = a.includes(b) ? 1 : 0\n\tconst subsequenceScore = isSubsequence(b, a) ? 0.8 : 0\n\tconst anagramScore = anagramMatch(b, a) ? 0.7 : 0\n\tconst diceScore = diceCoefficient(a, b)\n\n\tconst maxLen = Math.max(a.length, b.length)\n\tconst levenshteinScore = maxLen ? 1 - levenshtein(a, b) / maxLen : 0\n\n\treturn Math.max(substringScore, subsequenceScore, anagramScore, diceScore, levenshteinScore)\n}\n\n/**\n * Safely coerce value to string if possible, or return empty string\n */\nconst safeString = (value: unknown): string => {\n\tif (value == null) return ''\n\treturn String(value)\n}\n\n/**\n * Type guard for arrays\n */\nconst isArray = (value: unknown): value is Array<unknown> => {\n\treturn Array.isArray(value)\n}\n\n/**\n * Compare two values based on a comparison operator.\n * For non-fuzzy operators, this returns a boolean.\n */\nexport function compareValues(op: ComparisonOperator, actual: unknown, expected: unknown): boolean {\n\t// Handle null/undefined cases\n\tif (actual == null && expected == null) return true\n\tif (actual == null || expected == null) {\n\t\t// For equality operators, null == null but null != non-null\n\t\tif (op === '==') return actual === expected\n\t\tif (op === '!=') return actual !== expected\n\t\t// Other operators should return false for null/undefined values\n\t\treturn false\n\t}\n\n\tswitch (op) {\n\t\tcase '==':\n\t\t\treturn actual === expected\n\t\tcase '!=':\n\t\t\treturn actual !== expected\n\t\tcase '>':\n\t\t\treturn (actual as number) > (expected as number)\n\t\tcase '<':\n\t\t\treturn (actual as number) < (expected as number)\n\t\tcase '>=':\n\t\t\treturn (actual as number) >= (expected as number)\n\t\tcase '<=':\n\t\t\treturn (actual as number) <= (expected as number)\n\t\tcase 'includes': {\n\t\t\tif (typeof actual === 'string') {\n\t\t\t\treturn safeString(actual).toLowerCase().includes(safeString(expected).toLowerCase())\n\t\t\t} else if (isArray(actual)) {\n\t\t\t\treturn actual.includes(expected)\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t\tcase 'notIncludes': {\n\t\t\tif (typeof actual === 'string') {\n\t\t\t\treturn !safeString(actual).toLowerCase().includes(safeString(expected).toLowerCase())\n\t\t\t} else if (isArray(actual)) {\n\t\t\t\treturn !actual.includes(expected)\n\t\t\t}\n\t\t\treturn true\n\t\t}\n\t\tcase 'startsWith': {\n\t\t\tif (typeof actual === 'string' && typeof expected === 'string') {\n\t\t\t\treturn actual.toLowerCase().startsWith(expected.toLowerCase())\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t\tcase 'endsWith': {\n\t\t\tif (typeof actual === 'string' && typeof expected === 'string') {\n\t\t\t\treturn actual.toLowerCase().endsWith(expected.toLowerCase())\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t\tcase 'in': {\n\t\t\tif (isArray(expected)) {\n\t\t\t\treturn expected.includes(actual)\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t\tcase 'notIn': {\n\t\t\tif (isArray(expected)) {\n\t\t\t\treturn !expected.includes(actual)\n\t\t\t}\n\t\t\treturn true\n\t\t}\n\t\tdefault: {\n\t\t\tconsole.warn(`Operator \"${op}\" is not supported in strict comparison.`)\n\t\t\treturn false\n\t\t}\n\t}\n}\n\n/**\n * Apply a query condition to an item and return score\n */\nfunction applyQueryCondition<T extends Record<string, any>>(\n\titem: T,\n\tquery: QueryCondition,\n\tfuzzyThreshold: number = 0.3,\n): { valid: boolean; score: number } {\n\tlet field: string,\n\t\top: ComparisonOperator,\n\t\texpected: unknown,\n\t\tstrict = false\n\n\tif (Array.isArray(query)) {\n\t\t;[field, op, expected, strict = false] = query\n\t} else {\n\t\tfield = query.key\n\t\top = query.operator\n\t\texpected = query.value\n\t\tstrict = query.strict || false\n\t}\n\n\t// Skip empty filters for non-strict queries\n\tif (!strict && (expected === '' || expected == null || (isArray(expected) && expected.length === 0))) {\n\t\treturn { valid: true, score: 1 }\n\t}\n\n\tconst actual = getFieldValue(item, field)\n\n\t// If strict mode is enabled, enforce exact equality\n\tif (strict) {\n\t\tif (actual !== expected) {\n\t\t\treturn { valid: false, score: 0 }\n\t\t}\n\t\treturn { valid: true, score: 1 }\n\t}\n\n\tif (op === 'any') {\n\t\t// Fuzzy search requires both values to be strings\n\t\tif (typeof actual !== 'string' || typeof expected !== 'string') {\n\t\t\treturn { valid: false, score: 0 }\n\t\t}\n\n\t\tconst score = computeFuzzyScore(actual, expected)\n\t\tif (score < fuzzyThreshold) {\n\t\t\treturn { valid: false, score: 0 }\n\t\t}\n\n\t\treturn { valid: true, score }\n\t} else {\n\t\t// For non-fuzzy operators, check condition\n\t\tconst matches = compareValues(op, actual, expected)\n\t\treturn {\n\t\t\tvalid: matches,\n\t\t\tscore: matches ? 1 : 0,\n\t\t}\n\t}\n}\n\n/**\n * Filter a Map of items given an array of query conditions.\n * For each query condition:\n * - If the expected value is empty/null/undefined, it is treated as a match.\n * - For non-fuzzy operators, the condition must strictly match.\n * - For the \"any\" operator, a fuzzy similarity score is computed.\n * Items with a fuzzy score below a given threshold (e.g., 0.3) are excluded.\n *\n * The overall item score is the average of the scores from all conditions.\n * The results are sorted in descending order of relevance.\n *\n * @param items - A Map containing items to filter.\n * @param queries - An array of query conditions to apply.\n * @param fuzzyThreshold - Minimum score required for fuzzy matches (default: 0.3)\n * @returns An array of items that match all query conditions, sorted by relevance.\n */\nexport function filterMapItems<T extends Record<string, any>>(\n\titems: Map<string, T>,\n\tqueries: QueryCondition[] = [],\n\tfuzzyThreshold: number = 0.3,\n): T[] {\n\t// If no queries, return all items unsorted\n\tif (!queries.length) {\n\t\treturn Array.from(items.values())\n\t}\n\n\t// Score and filter each item\n\tconst scoredItems: ScoredItem<T>[] = []\n\n\tfor (const [_, item] of items.entries()) {\n\t\tlet totalScore = 0\n\t\tlet matchCount = 0\n\t\tlet valid = true\n\n\t\tfor (const query of queries) {\n\t\t\tconst result = applyQueryCondition(item, query, fuzzyThreshold)\n\n\t\t\tif (!result.valid) {\n\t\t\t\tvalid = false\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\ttotalScore += result.score\n\t\t\tmatchCount++\n\t\t}\n\n\t\tif (valid) {\n\t\t\tscoredItems.push({\n\t\t\t\titem,\n\t\t\t\tscore: matchCount > 0 ? totalScore / matchCount : 1,\n\t\t\t})\n\t\t}\n\t}\n\n\t// Sort by descending score\n\tscoredItems.sort((a, b) => b.score - a.score)\n\n\treturn scoredItems.map(x => x.item)\n}\n\n/**\n * Filter an array of items using query conditions\n */\nexport function filterArrayItems<T extends Record<string, any>>(\n\titems: T[],\n\tqueries: QueryCondition[] = [],\n\tfuzzyThreshold: number = 0.3,\n): T[] {\n\t// Create temporary map with numeric indices as keys\n\tconst map = new Map<string, T>()\n\titems.forEach((item, index) => map.set(String(index), item))\n\n\treturn filterMapItems(map, queries, fuzzyThreshold)\n}\n\n// Export a simpler alias for filterMapItems\nexport const filterMap = filterMapItems\n\n// Export an alias for filterArrayItems\nexport const filterArray = filterArrayItems\n","// src/store/selectors.ts\nimport { Observable, combineLatest, distinctUntilChanged, map, shareReplay } from 'rxjs'\nimport { IStore, ICollectionStore } from './types'\n\n/**\n * Deep equality comparison for maps and complex objects\n * More efficient than JSON.stringify for large objects\n */\nfunction deepEqual(a: unknown, b: unknown): boolean {\n\tif (a === b) return true\n\n\tif (a instanceof Map && b instanceof Map) {\n\t\tif (a.size !== b.size) return false\n\t\tfor (const [key, value] of a) {\n\t\t\tif (!b.has(key) || !deepEqual(value, b.get(key))) return false\n\t\t}\n\t\treturn true\n\t}\n\n\tif (a instanceof Set && b instanceof Set) {\n\t\tif (a.size !== b.size) return false\n\t\tfor (const item of a) {\n\t\t\tif (!b.has(item)) return false\n\t\t}\n\t\treturn true\n\t}\n\n\tif (typeof a === 'object' && a !== null && typeof b === 'object' && b !== null) {\n\t\tconst keysA = Object.keys(a)\n\t\tconst keysB = Object.keys(b)\n\n\t\tif (keysA.length !== keysB.length) return false\n\n\t\tfor (const key of keysA) {\n\t\t\t// @ts-ignore: Index signature\n\t\t\tif (!deepEqual(a[key], b[key])) return false\n\t\t}\n\n\t\treturn true\n\t}\n\n\treturn false\n}\n\n/**\n * Creates a selector that derives a value from store state\n *\n * @param store The store to observe\n * @param selectorFn Function that transforms the state\n * @returns An observable of the selected state that only emits when the derived value changes\n */\nexport function createSelector<T, R>(store: IStore<T>, selectorFn: (state: T) => R): Observable<R> {\n\treturn store.$.pipe(map(selectorFn), distinctUntilChanged<R>(deepEqual), shareReplay(1))\n}\n\n/**\n * Creates a selector for collection stores that derives a value from the collection\n *\n * @param store The collection store to observe\n * @param selectorFn Function that transforms the collection\n * @returns An observable of the selected state that only emits when the derived value changes\n */\nexport function createCollectionSelector<T, R>(\n\tstore: ICollectionStore<T>,\n\tselectorFn: (state: Map<string, T>) => R,\n): Observable<R> {\n\treturn store.$.pipe(map(selectorFn), distinctUntilChanged<R>(deepEqual), shareReplay(1))\n}\n\n/**\n * Creates a selector that returns all items from a collection as an array\n *\n * @param store The collection store\n * @returns An observable of all items as an array\n */\nexport function createItemsSelector<T>(store: ICollectionStore<T>): Observable<T[]> {\n\treturn createCollectionSelector(store, collection => Array.from(collection.values()))\n}\n\n/**\n * Creates a selector that filters items from a collection\n *\n * @param store The collection store\n * @param filterFn Function that returns true for items to include\n * @returns An observable of filtered items as an array\n */\nexport function createFilterSelector<T>(\n\tstore: ICollectionStore<T>,\n\tfilterFn: (item: T, key: string) => boolean,\n): Observable<T[]> {\n\treturn createCollectionSelector(store, collection => {\n\t\tconst result: T[] = []\n\t\tcollection.forEach((item, key) => {\n\t\t\tif (filterFn(item, key)) {\n\t\t\t\tresult.push(item)\n\t\t\t}\n\t\t})\n\t\treturn result\n\t})\n}\n\n/**\n * Creates a selector that retrieves a single item from a collection\n *\n * @param store The collection store\n * @param itemKey The key of the item to select\n * @returns An observable of the selected item that emits when the item changes\n */\nexport function createItemSelector<T>(store: ICollectionStore<T>, itemKey: string): Observable<T | undefined> {\n\treturn createCollectionSelector(store, collection => collection.get(itemKey))\n}\n\n/**\n * Creates a selector that counts items in a collection, optionally filtered\n *\n * @param store The collection store\n * @param filterFn Optional function to filter which items to count\n * @returns An observable of the count\n */\nexport function createCountSelector<T>(\n\tstore: ICollectionStore<T>,\n\tfilterFn?: (item: T, key: string) => boolean,\n): Observable<number> {\n\treturn createCollectionSelector(store, collection => {\n\t\tif (!filterFn) return collection.size\n\n\t\tlet count = 0\n\t\tcollection.forEach((item, key) => {\n\t\t\tif (filterFn(item, key)) count++\n\t\t})\n\t\treturn count\n\t})\n}\n\n/**\n * Creates a compound selector that depends on multiple other selectors\n *\n * @param selectors Array of source selectors\n * @param combinerFn Function that combines all selector results\n * @returns An observable of the combined result\n */\nexport function createCompoundSelector<T extends unknown[], R>(\n\tselectors: { [K in keyof T]: Observable<T[K]> },\n\tcombinerFn: (...values: T) => R,\n): Observable<R> {\n\treturn combineLatest(selectors).pipe(\n\t\tmap(values => combinerFn(...(values as T))),\n\t\tdistinctUntilChanged<R>(deepEqual),\n\t\tshareReplay(1),\n\t)\n}\n\n/**\n * Creates a selector that returns all keys from a collection\n */\nexport function createKeysSelector<T>(store: ICollectionStore<T>): Observable<string[]> {\n\treturn createCollectionSelector(store, collection => Array.from(collection.keys()))\n}\n\n/**\n * Creates a selector that returns entries (key-value pairs) from a collection\n */\nexport function createEntriesSelector<T>(store: ICollectionStore<T>): Observable<[string, T][]> {\n\treturn createCollectionSelector(store, collection => Array.from(collection.entries()))\n}\n\n/**\n * Creates a selector that maps collection values through a transform function\n */\nexport function createMapSelector<T, R>(\n\tstore: ICollectionStore<T>,\n\tmapFn: (item: T, key: string) => R,\n): Observable<R[]> {\n\treturn createCollectionSelector(store, collection => {\n\t\tconst result: R[] = []\n\t\tcollection.forEach((item, key) => {\n\t\t\tresult.push(mapFn(item, key))\n\t\t})\n\t\treturn result\n\t})\n}\n\n/**\n * Creates a selector that sorts collection items\n */\nexport function createSortSelector<T>(store: ICollectionStore<T>, compareFn: (a: T, b: T) => number): Observable<T[]> {\n\treturn createCollectionSelector(store, collection => {\n\t\treturn Array.from(collection.values()).sort(compareFn)\n\t})\n}\n\n/**\n * Creates a selector that finds the first item matching a predicate\n */\nexport function createFindSelector<T>(\n\tstore: ICollectionStore<T>,\n\tpredicate: (item: T, key: string) => boolean,\n): Observable<T | undefined> {\n\treturn createCollectionSelector(store, collection => {\n\t\tfor (const [key, item] of collection.entries()) {\n\t\t\tif (predicate(item, key)) {\n\t\t\t\treturn item\n\t\t\t}\n\t\t}\n\t\treturn undefined\n\t})\n}\n","// src/store/selector-hook.ts\nimport { property as litProperty } from 'lit/decorators.js'\nimport { Observable, Subject, Subscription } from 'rxjs'\nimport { takeUntil } from 'rxjs/operators'\nimport { createCollectionSelector, createSelector } from './selectors'\nimport { ICollectionStore, IStore } from './types'\n\n/**\n * Component lifecycle interface\n */\ninterface ComponentWithLifecycle {\n\t// Lifecycle hooks\n\tisConnected: boolean\n\tdisconnectedCallback?: () => void\n\tconnectedCallback?: () => void\n\trequestUpdate?: () => void\n\n\t// Internal properties\n\t_selectorCleanup?: Subject<void>\n\t_selectorSubscriptions?: Map<string, Subscription>\n\t_selectorInitialized?: Set<string>\n\n\t// Value storage\n\t[key: string]: any\n}\n\n/**\n * Property descriptor interface\n */\ntype PropertyDescriptor<T> = {\n\tget?: () => T\n\tset?: (value: T) => void\n\tvalue?: T\n\tconfigurable?: boolean\n\tenumerable?: boolean\n\twritable?: boolean\n}\n\n/**\n * Options for selecting from a store\n */\ninterface SelectOptions {\n\t/** If true, will wait for selector to emit a non-null value before calling connectedCallback */\n\trequired?: boolean\n\n\t/** If true, will only update the component and not set the property value */\n\tupdateOnly?: boolean\n\n\t/** If true, will use structuredClone to deeply clone values (prevents mutations) */\n\tdeepClone?: boolean\n\n\t/** Custom equality function to determine when to update */\n\tequals?: (a: any, b: any) => boolean\n}\n\n/**\n * Type guard to check if a store is a collection store\n */\nfunction isCollectionStore<T>(store: IStore<any> | ICollectionStore<T>): store is ICollectionStore<T> {\n\treturn 'set' in store && typeof store.set === 'function' && store.value instanceof Map\n}\n\n/**\n * Selector decorator that connects a component property to a store selector\n *\n * @param store The store to select from\n * @param selectorFn Optional function to transform the store state\n * @param options Additional options for the selector\n */\nexport function select<T, R>(\n\tstore: IStore<T> | ICollectionStore<T>,\n\tselectorFn: (state: any) => R = (state: R) => state,\n\toptions: SelectOptions = {},\n) {\n\treturn function (proto: Record<string, any>, propName: string, _descriptor?: PropertyDescriptor<R>) {\n\t\t// Register as a Lit property\n\t\tlitProperty({ attribute: false, type: Object })(proto, propName)\n\n\t\t// Store original lifecycle methods\n\t\tconst originalConnectedCallback = proto.connectedCallback\n\t\tconst originalDisconnectedCallback = proto.disconnectedCallback\n\n\t\t// Override connectedCallback to set up subscription\n\t\tproto.connectedCallback = function (this: ComponentWithLifecycle) {\n\t\t\t// Initialize tracking properties if needed\n\t\t\tif (!this._selectorCleanup || this._selectorCleanup.closed) {\n\t\t\t\tthis._selectorCleanup = new Subject<void>()\n\t\t\t}\n\n\t\t\tif (!this._selectorSubscriptions) {\n\t\t\t\tthis._selectorSubscriptions = new Map()\n\t\t\t}\n\n\t\t\tif (!this._selectorInitialized) {\n\t\t\t\tthis._selectorInitialized = new Set()\n\t\t\t}\n\n\t\t\t// Create the appropriate selector\n\t\t\tconst selector: Observable<R> = isCollectionStore(store)\n\t\t\t\t? createCollectionSelector(store, selectorFn)\n\t\t\t\t: createSelector(store as IStore<T>, selectorFn)\n\n\t\t\t// Call original connectedCallback immediately if not waiting for data\n\t\t\tif (!options.required && !this._selectorInitialized.has(propName)) {\n\t\t\t\toriginalConnectedCallback?.call(this)\n\t\t\t\tthis._selectorInitialized.add(propName)\n\t\t\t}\n\n\t\t\t// Clean up any existing subscription\n\t\t\tif (this._selectorSubscriptions.has(propName)) {\n\t\t\t\tthis._selectorSubscriptions.get(propName)?.unsubscribe()\n\t\t\t}\n\n\t\t\t// Create new subscription\n\t\t\tconst subscription = selector.pipe(takeUntil(this._selectorCleanup)).subscribe({\n\t\t\t\tnext: (value: R) => {\n\t\t\t\t\t// Handle value updates\n\t\t\t\t\tconst newValue = options.deepClone ? structuredClone(value) : value\n\n\t\t\t\t\tif (!options.updateOnly) {\n\t\t\t\t\t\tthis[propName] = newValue\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.requestUpdate?.()\n\n\t\t\t\t\t// If required and not initialized, call connectedCallback when we get a value\n\t\t\t\t\tif (\n\t\t\t\t\t\toptions.required &&\n\t\t\t\t\t\t!this._selectorInitialized.has(propName) &&\n\t\t\t\t\t\tnewValue !== null &&\n\t\t\t\t\t\tnewValue !== undefined\n\t\t\t\t\t) {\n\t\t\t\t\t\toriginalConnectedCallback?.call(this)\n\t\t\t\t\t\tthis._selectorInitialized.add(propName)\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\terror: (err: Error) => {\n\t\t\t\t\tconsole.error(`Error in selector subscription for ${propName}:`, err)\n\t\t\t\t},\n\t\t\t})\n\n\t\t\t// Store the subscription for cleanup\n\t\t\tthis._selectorSubscriptions.set(propName, subscription)\n\t\t}\n\n\t\t// Override disconnectedCallback to clean up subscriptions\n\t\tproto.disconnectedCallback = function (this: ComponentWithLifecycle) {\n\t\t\t// Call original disconnectedCallback\n\t\t\toriginalDisconnectedCallback?.call(this)\n\n\t\t\t// Clean up subscriptions\n\t\t\tif (this._selectorCleanup) {\n\t\t\t\tthis._selectorCleanup.next()\n\t\t\t\tthis._selectorCleanup.complete()\n\t\t\t}\n\n\t\t\tif (this._selectorSubscriptions) {\n\t\t\t\tthis._selectorSubscriptions.forEach(sub => sub.unsubscribe())\n\t\t\t\tthis._selectorSubscriptions.clear()\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Creates a selector decorator that selects a specific item from a collection store\n *\n * @param store The collection store\n * @param keyGetter Function that returns the key to select\n * @param options Additional options\n */\nexport function selectItem<T>(\n\tstore: ICollectionStore<T>,\n\tkeyGetter: (component: any) => string,\n\toptions: SelectOptions = {},\n) {\n\treturn function (proto: Record<string, any>, propName: string, _descriptor?: PropertyDescriptor<T | undefined>) {\n\t\tselect(\n\t\t\tstore,\n\t\t\tstate => {\n\t\t\t\t// This will be evaluated during subscription, when 'this' is available\n\t\t\t\tconst itemKey = keyGetter(this)\n\t\t\t\treturn itemKey ? state.get(itemKey) : undefined\n\t\t\t},\n\t\t\toptions,\n\t\t)(proto, propName)\n\t}\n}\n"],"names":["createObjectStore","initialData","storage","key","StoreError","store","SchmancyStoreObject","getInstance","obj","value","Object","keys","length","$","next","createContext","r","e","Map","SchmancyCollectionStore","size","dataType","getFieldValue","item","path","parts","split","part","getBigrams","s","bigrams","i","push","substring","toLowerCase","computeFuzzyScore","actual","expected","a","trim","b","substringScore","includes","subsequenceScore","sub","str","j","anagramScore","query","target","countChars","reduce","acc","char","queryCount","targetCount","every","diceScore","s1","s2","bigrams1","bigrams2","intersection","used","Array","fill","bigram","maxLen","Math","max","levenshteinScore","matrix","map","_","charAt","min","safeString","String","isArray","compareValues","op","startsWith","endsWith","applyQueryCondition","fuzzyThreshold","field","strict","operator","valid","score","matches","filterMapItems","items","queries","from","values","scoredItems","entries","totalScore","matchCount","result","sort","x","filterArrayItems","forEach","index","set","filterMap","filterArray","deepEqual","has","get","Set","keysA","keysB","createSelector","selectorFn","pipe","distinctUntilChanged","shareReplay","createCollectionSelector","select","state","options","proto","propName","_descriptor","litProperty","attribute","type","originalConnectedCallback","connectedCallback","originalDisconnectedCallback","disconnectedCallback","this","_selectorCleanup","closed","Subject","_selectorSubscriptions","_selectorInitialized","selector","required","call","add","unsubscribe","subscription","takeUntil","subscribe","newValue","deepClone","structuredClone","updateOnly","requestUpdate","error","err","complete","clear","selectors","combinerFn","combineLatest","filterFn","collection","count","predicate","itemKey","mapFn","compareFn","keyGetter"],"mappings":"2IA4CA,SAASA,EACRC,EACAC,EACAC,EAAAA,CAGA,GAAID,IAAY,YACf,MAAM,IAAIE,EAAWA,WAAA,uDAAwD,KAAM,CAAEF,QAASC,EAAAA,IAAAA,CAAAA,CAAAA,EAI/F,MAAME,EAAQC,EAAAA,oBAAoBC,YAAeL,EAASC,EAAKF,CA/ChE,EAAA,IAAuBO,EAsDf,OArDY,OADGA,EAkDJH,EAAMI,QAjDL,UAAYD,IAAQ,MAGhCE,OAAOC,KAAKH,CAAAA,EAAKI,SAAW,GA+C5BP,EAAAQ,EAAEC,KAAKb,CAGPI,EAAAA,CACR,CA4CgB,SAAAU,EACfd,EACAC,EACAC,EAAAA,CAGI,GACHa,GADGf,KACH,MAAM,IAAIG,EAAWA,WAAA,2CAA4C,KAAM,CAAEF,UAASC,IAI/Ec,CAAA,CAAA,EAAA,GAAMhB,aAhFciB,IAiF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EAAaC,EAASC,EAC5C,sDE6CgB,SAAsBE,EAA4BiK,GAC1D,OAAA9C,EAAyBnH,EAAqB4J,GAC7CjG,MAAM8B,KAAKmE,EAAWlE,OAAAA,CAAAA,EAAUM,KAAKiE,CAE9C,CAAA,CAAA,4JClBO,SACNjK,EACAkK,EACA5C,EAAyB,CAAA,EAElB,CAAA,OAAA,SAAUC,EAA4BC,EAAkBC,GAC9DL,EACCpH,EACSqH,IAEF,MAAA0C,EAAUG,EAAUjC,IAC1B,EAAA,OAAO8B,EAAU1C,EAAMX,IAAIqD,SAAW,EAEvCzC,GACCC,EAAOC,EACV,CACD"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Subject as E, switchMap as O, forkJoin as x, fromEvent as p, of as b, takeUntil as f, timer as k, map as m, defaultIfEmpty as A, tap as c, delay as y, filter as P, take as F, mergeMap as j, merge as B } from "rxjs";
|
|
2
2
|
import "lit/directives/class-map.js";
|
|
3
3
|
import "lit/directives/style-map.js";
|
|
4
|
-
import { T as H } from "./tailwind.mixin-
|
|
4
|
+
import { T as H } from "./tailwind.mixin-Cxj7n9Jd.js";
|
|
5
5
|
import { css as U, html as g } from "lit";
|
|
6
6
|
import { customElement as $, property as h, query as z, queryAssignedElements as D } from "lit/decorators.js";
|
|
7
|
-
import { $ as I } from "./litElement.mixin-
|
|
7
|
+
import { $ as I } from "./litElement.mixin-PXLBM6N4.js";
|
|
8
8
|
import { when as N } from "lit/directives/when.js";
|
|
9
9
|
var T = Object.getOwnPropertyDescriptor;
|
|
10
10
|
let C = class extends H(U``) {
|
|
@@ -209,4 +209,4 @@ export {
|
|
|
209
209
|
S as b,
|
|
210
210
|
v as s
|
|
211
211
|
};
|
|
212
|
-
//# sourceMappingURL=sheet-
|
|
212
|
+
//# sourceMappingURL=sheet-CHow9LJ8.js.map
|