@oracle/oraclejet 11.1.0 → 11.1.1
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/README.md +1 -1
- package/THIRDPARTYLICENSE.txt +7 -7
- package/dist/css/alta/oj-alta-min.css +1 -1
- package/dist/css/alta/oj-alta-notag-min.css +1 -1
- package/dist/css/alta/oj-alta-notag.css +1 -1
- package/dist/css/alta/oj-alta.css +1 -1
- package/dist/css/alta-android/oj-alta-min.css +1 -1
- package/dist/css/alta-android/oj-alta.css +1 -1
- package/dist/css/alta-ios/oj-alta-min.css +1 -1
- package/dist/css/alta-ios/oj-alta.css +1 -1
- package/dist/css/alta-windows/oj-alta-min.css +1 -1
- package/dist/css/alta-windows/oj-alta.css +1 -1
- package/dist/css/redwood/oj-redwood-min.css +1 -1
- package/dist/css/redwood/oj-redwood-notag-min.css +1 -1
- package/dist/css/redwood/oj-redwood-notag-novars-min.css +1 -1
- package/dist/css/redwood/oj-redwood-notag-novars.css +1 -1
- package/dist/css/redwood/oj-redwood-notag.css +1 -1
- package/dist/css/redwood/oj-redwood-novars-min.css +1 -1
- package/dist/css/redwood/oj-redwood-novars.css +1 -1
- package/dist/css/redwood/oj-redwood.css +1 -1
- package/dist/css/stable/oj-stable-min.css +1 -1
- package/dist/css/stable/oj-stable.css +1 -1
- package/dist/js/libs/oj/debug/ojcore-base.js +2 -2
- package/dist/js/libs/oj/debug/ojtemplateengine.js +19 -2
- package/dist/js/libs/oj/debug/ojvcomponent-template.js +11 -6
- package/dist/js/libs/oj/debug_esm/ojcore-base.js +2 -2
- package/dist/js/libs/oj/debug_esm/ojtemplateengine.js +18 -1
- package/dist/js/libs/oj/debug_esm/ojvcomponent-template.js +10 -6
- package/dist/js/libs/oj/main-template.js +3 -3
- package/dist/js/libs/oj/min/ojcore-base.js +1 -1
- package/dist/js/libs/oj/min/ojtemplateengine.js +1 -1
- package/dist/js/libs/oj/min/ojtemplateengine.js.map +1 -1
- package/dist/js/libs/oj/min/ojvcomponent-template.js +1 -1
- package/dist/js/libs/oj/min/ojvcomponent-template.js.map +1 -1
- package/dist/js/libs/persist/debug/{offline-persistence-toolkit-arraystore-1.5.4.js → offline-persistence-toolkit-arraystore-1.5.5.js} +0 -0
- package/dist/js/libs/persist/debug/{offline-persistence-toolkit-core-1.5.4.js → offline-persistence-toolkit-core-1.5.5.js} +116 -22
- package/dist/js/libs/persist/debug/{offline-persistence-toolkit-filesystemstore-1.5.4.js → offline-persistence-toolkit-filesystemstore-1.5.5.js} +0 -0
- package/dist/js/libs/persist/debug/{offline-persistence-toolkit-localstore-1.5.4.js → offline-persistence-toolkit-localstore-1.5.5.js} +0 -0
- package/dist/js/libs/persist/debug/{offline-persistence-toolkit-pouchdbstore-1.5.4.js → offline-persistence-toolkit-pouchdbstore-1.5.5.js} +0 -0
- package/dist/js/libs/persist/debug/{offline-persistence-toolkit-responseproxy-1.5.4.js → offline-persistence-toolkit-responseproxy-1.5.5.js} +0 -0
- package/dist/js/libs/persist/debug/persistenceManager.js +114 -21
- package/dist/js/libs/persist/debug/persistenceUtils.js +2 -1
- package/dist/js/libs/persist/min/impl/PersistenceSyncManager.js +1 -1
- package/dist/js/libs/persist/min/impl/PersistenceXMLHttpRequest.js +1 -1
- package/dist/js/libs/persist/min/impl/sql-where-parser.min.js +1 -1
- package/dist/js/libs/persist/min/{offline-persistence-toolkit-arraystore-1.5.4.js → offline-persistence-toolkit-arraystore-1.5.5.js} +0 -0
- package/dist/js/libs/persist/min/{offline-persistence-toolkit-core-1.5.4.js → offline-persistence-toolkit-core-1.5.5.js} +330 -330
- package/dist/js/libs/persist/min/{offline-persistence-toolkit-filesystemstore-1.5.4.js → offline-persistence-toolkit-filesystemstore-1.5.5.js} +330 -330
- package/dist/js/libs/persist/min/{offline-persistence-toolkit-localstore-1.5.4.js → offline-persistence-toolkit-localstore-1.5.5.js} +0 -0
- package/dist/js/libs/persist/min/{offline-persistence-toolkit-pouchdbstore-1.5.4.js → offline-persistence-toolkit-pouchdbstore-1.5.5.js} +330 -330
- package/dist/js/libs/persist/min/{offline-persistence-toolkit-responseproxy-1.5.4.js → offline-persistence-toolkit-responseproxy-1.5.5.js} +331 -331
- package/dist/js/libs/persist/min/persistenceManager.js +1 -1
- package/dist/js/libs/persist/min/persistenceUtils.js +1 -1
- package/dist/js/libs/persist/min/pouchdb-browser-7.2.2.js +330 -330
- package/dist/js/libs/persist/min/pouchdb.find.js +1 -1
- package/dist/js/libs/persist/min/queryHandlers.js +1 -1
- package/dist/metadata/components/allComponents.json +233 -233
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/accordion/themes/base/_oj-accordion.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/accordion/themes/redwood/_oj-accordion.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/accordion/themes/redwood/oj-accordion.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/accordion/themes/stable/_oj-accordion.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/accordion/themes/stable/oj-accordion.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/action-card/themes/base/_oj-action-card.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/action-card/themes/redwood/_oj-action-card.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/action-card/themes/redwood/oj-action-card.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/action-card/themes/stable/_oj-action-card.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/action-card/themes/stable/oj-action-card.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/all-components/themes/base/_oj.common.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/all-components/themes/base/oj.common.settings.cssvariables.css +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/all-components/themes/redwood/_oj-all-components-common.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/all-components/themes/redwood/_oj-all-components-notag.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/all-components/themes/redwood/_oj-all-components.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/all-components/themes/redwood/_oj.redwood.settings.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/all-components/themes/redwood/oj.redwood.cssvars.settings.css +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/all-components/themes/stable/_oj-all-components-common.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/all-components/themes/stable/_oj-all-components-notag.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/all-components/themes/stable/_oj-all-components.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/all-components/themes/stable/_oj.stable.settings.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/all-components/themes/stable/oj.stable.cssvars.settings.css +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/animation/themes/base/_oj-animation.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/animation/themes/redwood/_oj-animation.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/animation/themes/redwood/_oj-animation.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/animation/themes/redwood/oj-animation.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/animation/themes/stable/_oj-animation.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/animation/themes/stable/_oj-animation.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/animation/themes/stable/oj-animation.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/app-layout/themes/base/_oj-app-layout.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/app-layout/themes/redwood/_oj-app-layout.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/app-layout/themes/redwood/_oj-app-layout.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/app-layout/themes/stable/_oj-app-layout.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/app-layout/themes/stable/_oj-app-layout.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/app-layout-hybrid/themes/base/_oj-app-layout-hybrid.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/app-layout-hybrid/themes/redwood/_oj-app-layout-hybrid.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/app-layout-hybrid/themes/redwood/oj-app-layout-hybrid.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/app-layout-hybrid/themes/stable/_oj-app-layout-hybrid.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/app-layout-hybrid/themes/stable/oj-app-layout-hybrid.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/app-layout-web/themes/base/_oj-app-layout-web.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/app-layout-web/themes/redwood/_oj-app-layout-web.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/app-layout-web/themes/redwood/oj-app-layout-web.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/app-layout-web/themes/stable/_oj-app-layout-web.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/app-layout-web/themes/stable/oj-app-layout-web.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/avatar/themes/base/_oj-avatar.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/avatar/themes/redwood/_oj-avatar-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/avatar/themes/redwood/_oj-avatar.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/avatar/themes/redwood/oj-avatar.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/avatar/themes/stable/_oj-avatar-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/avatar/themes/stable/_oj-avatar.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/avatar/themes/stable/oj-avatar.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/badge/themes/base/_oj-badge.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/badge/themes/redwood/_oj-badge-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/badge/themes/redwood/_oj-badge.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/badge/themes/redwood/oj-badge.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/badge/themes/stable/_oj-badge-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/badge/themes/stable/_oj-badge.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/badge/themes/stable/oj-badge.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/button/themes/base/_oj-button.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/button/themes/redwood/_oj-button-ignore.scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/button/themes/redwood/_oj-button-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/button/themes/redwood/_oj-button.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/button/themes/redwood/oj-button.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/button/themes/stable/_oj-button-ignore.scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/button/themes/stable/_oj-button.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/button/themes/stable/oj-button.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/buttonset/themes/base/_oj-buttonset.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/buttonset/themes/redwood/_oj-buttonset-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/buttonset/themes/redwood/_oj-buttonset.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/buttonset/themes/redwood/_oj-buttonset.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/buttonset/themes/stable/_oj-buttonset-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/buttonset/themes/stable/_oj-buttonset.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/buttonset/themes/stable/_oj-buttonset.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/buttonset-many/themes/redwood/oj-buttonset-many.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/buttonset-many/themes/stable/oj-buttonset-many.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/buttonset-one/themes/redwood/oj-buttonset-one.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/buttonset-one/themes/stable/oj-buttonset-one.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/chart/themes/base/_oj-chart.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/chart/themes/redwood/_oj-chart.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/chart/themes/redwood/oj-chart.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/chart/themes/stable/_oj-chart.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/chart/themes/stable/oj-chart.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/checkboxset/themes/redwood/_oj-checkboxset.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/checkboxset/themes/redwood/oj-checkboxset.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/checkboxset/themes/stable/_oj-checkboxset.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/checkboxset/themes/stable/oj-checkboxset.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/collapsible/themes/base/_oj-collapsible.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/collapsible/themes/redwood/_oj-collapsible.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/collapsible/themes/redwood/oj-collapsible.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/collapsible/themes/stable/_oj-collapsible.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/collapsible/themes/stable/oj-collapsible.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/collection/themes/redwood/_oj-collection.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/collection/themes/stable/_oj-collection.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/color-palette/themes/base/_oj-color-palette.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/color-palette/themes/redwood/_oj-color-palette.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/color-palette/themes/redwood/oj-color-palette.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/color-palette/themes/stable/_oj-color-palette.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/color-palette/themes/stable/oj-color-palette.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/color-spectrum/themes/base/_oj-color-spectrum.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/color-spectrum/themes/redwood/_oj-color-spectrum.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/color-spectrum/themes/redwood/oj-color-spectrum.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/color-spectrum/themes/stable/_oj-color-spectrum.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/color-spectrum/themes/stable/oj-color-spectrum.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/combobox/themes/base/_oj-combobox.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/combobox/themes/redwood/_oj-combobox.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/combobox/themes/redwood/_oj-combobox.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/combobox/themes/stable/_oj-combobox.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/combobox/themes/stable/_oj-combobox.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/combobox-many/themes/redwood/oj-combobox-many.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/combobox-many/themes/stable/oj-combobox-many.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/combobox-one/themes/redwood/oj-combobox-one.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/combobox-one/themes/stable/oj-combobox-one.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/conveyor-belt/themes/base/_oj-conveyor-belt.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/conveyor-belt/themes/redwood/_oj-conveyor-belt.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/conveyor-belt/themes/redwood/oj-conveyor-belt.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/conveyor-belt/themes/stable/_oj-conveyor-belt.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/conveyor-belt/themes/stable/oj-conveyor-belt.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/core/themes/redwood/_oj-core-ignore.scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/core/themes/redwood/_oj-core-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/core/themes/redwood/_oj-core.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/core/themes/stable/_oj-core.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/data-grid/themes/base/_oj-data-grid.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/data-grid/themes/redwood/_oj-data-grid.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/data-grid/themes/redwood/oj-data-grid.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/data-grid/themes/stable/_oj-data-grid.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/data-grid/themes/stable/oj-data-grid.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/date-picker/themes/redwood/oj-date-picker.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/date-picker/themes/stable/oj-date-picker.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/date-time-picker/themes/base/_oj-date-time-picker.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/date-time-picker/themes/redwood/_oj-date-time-picker.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/date-time-picker/themes/redwood/_oj-date-time-picker.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/date-time-picker/themes/redwood/oj-date-time-picker.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/date-time-picker/themes/stable/_oj-date-time-picker.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/date-time-picker/themes/stable/_oj-date-time-picker.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/date-time-picker/themes/stable/oj-date-time-picker.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/diagram/themes/base/_oj-diagram.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/diagram/themes/redwood/_oj-diagram.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/diagram/themes/redwood/oj-diagram.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/diagram/themes/stable/_oj-diagram.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/diagram/themes/stable/oj-diagram.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/dialog/themes/base/_oj-dialog.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/dialog/themes/redwood/_oj-dialog-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/dialog/themes/redwood/_oj-dialog.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/dialog/themes/redwood/_oj-dialog.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/dialog/themes/redwood/oj-dialog.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/dialog/themes/stable/_oj-dialog-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/dialog/themes/stable/_oj-dialog.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/dialog/themes/stable/_oj-dialog.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/dialog/themes/stable/oj-dialog.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/drawer-layout/themes/base/_oj-drawer-layout.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/drawer-layout/themes/redwood/_oj-drawer-layout.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/drawer-layout/themes/redwood/oj-drawer-layout.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/drawer-layout/themes/stable/_oj-drawer-layout.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/drawer-layout/themes/stable/oj-drawer-layout.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/drawer-popup/themes/base/_oj-drawer-popup.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/drawer-popup/themes/redwood/_oj-drawer-popup.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/drawer-popup/themes/redwood/oj-drawer-popup.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/drawer-popup/themes/stable/_oj-drawer-popup.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/drawer-popup/themes/stable/oj-drawer-popup.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/dvt/themes/base/_oj-dvt.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/dvt/themes/redwood/_oj-dvt.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/dvt/themes/redwood/_oj-dvt.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/dvt/themes/stable/_oj-dvt.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/dvt/themes/stable/_oj-dvt.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/file-picker/themes/base/_oj-file-picker.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/file-picker/themes/redwood/_oj-file-picker.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/file-picker/themes/redwood/oj-file-picker.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/file-picker/themes/stable/_oj-file-picker.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/file-picker/themes/stable/oj-file-picker.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/film-strip/themes/base/_oj-film-strip.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/film-strip/themes/redwood/_oj-film-strip.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/film-strip/themes/redwood/oj-film-strip.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/film-strip/themes/stable/_oj-film-strip.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/film-strip/themes/stable/oj-film-strip.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/flex/themes/base/_oj-flex.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/flex/themes/redwood/oj-flex.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/flex/themes/stable/oj-flex.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/form-control/themes/base/_oj-form-control.mixins.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/form-control/themes/base/_oj-form-control.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/form-control/themes/base/_oj-messaging.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/form-control/themes/redwood/_oj-form-control.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/form-control/themes/redwood/_oj-form-control.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/form-control/themes/redwood/_oj-messaging.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/form-control/themes/redwood/_oj-messaging.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/form-control/themes/stable/_oj-form-control.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/form-control/themes/stable/_oj-form-control.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/form-control/themes/stable/_oj-messaging.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/form-control/themes/stable/_oj-messaging.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/form-layout/themes/base/_oj-form-layout.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/form-layout/themes/redwood/_oj-form-layout.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/form-layout/themes/redwood/_oj-form-layout.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/form-layout/themes/redwood/oj-form-layout.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/form-layout/themes/stable/_oj-form-layout.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/form-layout/themes/stable/_oj-form-layout.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/form-layout/themes/stable/oj-form-layout.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/gantt/themes/base/_oj-gantt.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/gantt/themes/redwood/_oj-gantt.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/gantt/themes/redwood/oj-gantt.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/gantt/themes/stable/_oj-gantt.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/gantt/themes/stable/oj-gantt.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/gauge/themes/base/_oj-gauge.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/gauge/themes/redwood/_oj-gauge.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/gauge/themes/redwood/oj-gauge.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/gauge/themes/stable/_oj-gauge.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/gauge/themes/stable/oj-gauge.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/grid/themes/base/_oj-grid.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/grid/themes/redwood/oj-grid.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/grid/themes/stable/oj-grid.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/helpers/themes/base/_oj-helpers.scss +1 -1
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/helpers/themes/base/_oj-responsive-helpers.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/helpers/themes/redwood/_oj-theme.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/helpers/themes/redwood/oj-helpers.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/helpers/themes/redwood/oj-responsive.helpers.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/helpers/themes/stable/_oj-theme.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/helpers/themes/stable/oj-helpers.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/helpers/themes/stable/oj-responsive.helpers.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/highlight-text/themes/base/_oj-highlight-text.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/highlight-text/themes/redwood/oj-highlight-text.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/highlight-text/themes/stable/oj-highlight-text.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/icon-circle/themes/base/_oj-icon-circle.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/icon-circle/themes/redwood/_oj-icon-circle-ignore.scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/icon-circle/themes/redwood/_oj-icon-circle.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/icon-circle/themes/redwood/oj-icon-circle.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/icons/themes/base/_oj-icons.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/icons/themes/redwood/_oj-icon-font.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/icons/themes/redwood/_oj-icons-ignore.scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/icons/themes/redwood/_oj-icons.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/icons/themes/redwood/oj-icons.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/icons/themes/stable/_oj-icon-font.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/icons/themes/stable/_oj-icons.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/icons/themes/stable/oj-icons.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/indexer/themes/base/_oj-indexer.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/indexer/themes/redwood/_oj-indexer.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/indexer/themes/redwood/oj-indexer.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/indexer/themes/stable/_oj-indexer.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/indexer/themes/stable/oj-indexer.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-date/themes/redwood/oj-input-date.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-date/themes/stable/oj-input-date.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-date-time/themes/redwood/oj-input-date-time.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-date-time/themes/stable/oj-input-date-time.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-number/themes/base/_oj-input-number.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-number/themes/redwood/_oj-input-number.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-number/themes/redwood/oj-input-number.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-number/themes/stable/_oj-input-number.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-number/themes/stable/oj-input-number.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-password/themes/redwood/oj-input-password.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-password/themes/stable/oj-input-password.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-search/themes/base/_oj-input-search.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-search/themes/redwood/_oj-input-search-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-search/themes/redwood/_oj-input-search.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-search/themes/redwood/_oj-input-search.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-search/themes/stable/_oj-input-search-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-search/themes/stable/_oj-input-search.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-search/themes/stable/_oj-input-search.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-text/themes/base/_oj-input-text.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-text/themes/redwood/_oj-input-text.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-text/themes/redwood/oj-input-text.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-text/themes/stable/_oj-input-text.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-text/themes/stable/oj-input-text.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-time/themes/redwood/oj-input-time.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/input-time/themes/stable/oj-input-time.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/label/themes/base/_oj-label.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/label/themes/redwood/_oj-label-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/label/themes/redwood/_oj-label.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/label/themes/redwood/oj-label.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/label/themes/stable/_oj-label.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/label/themes/stable/oj-label.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/label-value/themes/base/_oj-label-value.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/label-value/themes/redwood/_oj-label-value.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/label-value/themes/stable/_oj-label-value.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/led-gauge/themes/base/_oj-led-gauge.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/led-gauge/themes/redwood/_oj-led-gauge.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/led-gauge/themes/redwood/oj-led-gauge.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/led-gauge/themes/stable/_oj-led-gauge.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/led-gauge/themes/stable/oj-led-gauge.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/legend/themes/base/_oj-legend.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/legend/themes/redwood/_oj-legend.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/legend/themes/redwood/oj-legend.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/legend/themes/stable/_oj-legend.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/legend/themes/stable/oj-legend.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/list-box/themes/base/_oj-list-box.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/list-box/themes/redwood/_oj-list-box.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/list-box/themes/redwood/_oj-list-box.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/list-box/themes/stable/_oj-list-box.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/list-box/themes/stable/_oj-list-box.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/list-item-layout/themes/base/_oj-list-item-layout.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/list-item-layout/themes/redwood/_oj-list-item-layout.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/list-item-layout/themes/redwood/oj-list-item-layout.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/list-item-layout/themes/stable/_oj-list-item-layout.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/list-item-layout/themes/stable/oj-list-item-layout.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/list-view/themes/base/_oj-list-view.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/list-view/themes/redwood/_oj-list-view.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/list-view/themes/redwood/oj-list-view.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/list-view/themes/stable/_oj-list-view.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/list-view/themes/stable/oj-list-view.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/masonry-layout/themes/base/_oj-masonry-layout.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/masonry-layout/themes/redwood/_oj-masonry-layout.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/masonry-layout/themes/redwood/_oj-masonry-layout.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/masonry-layout/themes/redwood/oj-masonry-layout.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/masonry-layout/themes/stable/_oj-masonry-layout.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/masonry-layout/themes/stable/_oj-masonry-layout.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/masonry-layout/themes/stable/oj-masonry-layout.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/menu/themes/base/_oj-menu.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/menu/themes/redwood/_oj-menu.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/menu/themes/redwood/oj-menu.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/menu/themes/stable/_oj-menu.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/menu/themes/stable/oj-menu.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/menu-button/themes/base/_oj-menu-button.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/menu-button/themes/redwood/_oj-menu-button.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/menu-button/themes/redwood/_oj-menu-button.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/menu-button/themes/redwood/oj-menu-button.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/menu-button/themes/stable/_oj-menu-button.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/menu-button/themes/stable/_oj-menu-button.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/menu-button/themes/stable/oj-menu-button.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/menu-select-many/themes/base/_oj-menu-select-many.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/menu-select-many/themes/redwood/_oj-menu-select-many.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/menu-select-many/themes/redwood/oj-menu-select-many.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/menu-select-many/themes/stable/_oj-menu-select-many.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/menu-select-many/themes/stable/oj-menu-select-many.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/message/themes/base/_oj-message.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/message/themes/redwood/_oj-message-ignore.scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/message/themes/redwood/_oj-message.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/message/themes/redwood/_oj-message.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/message/themes/redwood/oj-message.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/message/themes/stable/_oj-message.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/message/themes/stable/_oj-message.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/message/themes/stable/oj-message.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/messages/themes/base/_oj-messages.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/messages/themes/redwood/_oj-messages.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/messages/themes/redwood/_oj-messages.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/messages/themes/redwood/oj-messages.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/messages/themes/stable/_oj-messages.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/messages/themes/stable/_oj-messages.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/messages/themes/stable/oj-messages.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/module/themes/base/_oj-module.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/module/themes/redwood/oj-module.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/module/themes/stable/oj-module.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/n-box/themes/base/_oj-n-box.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/n-box/themes/redwood/_oj-n-box.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/n-box/themes/redwood/oj-n-box.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/n-box/themes/stable/_oj-n-box.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/n-box/themes/stable/oj-n-box.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/navigation-list/themes/base/_oj-navigation-list.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/navigation-list/themes/redwood/_oj-navigation-list-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/navigation-list/themes/redwood/_oj-navigation-list.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/navigation-list/themes/redwood/oj-navigation-list.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/navigation-list/themes/stable/_oj-navigation-list-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/navigation-list/themes/stable/_oj-navigation-list.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/navigation-list/themes/stable/oj-navigation-list.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/off-canvas/themes/base/_oj-off-canvas.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/off-canvas/themes/redwood/_oj-off-canvas.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/off-canvas/themes/redwood/oj-off-canvas.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/off-canvas/themes/stable/_oj-off-canvas.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/off-canvas/themes/stable/oj-off-canvas.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/optgroup/themes/base/_oj-optgroup.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/optgroup/themes/redwood/oj-optgroup.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/optgroup/themes/stable/oj-optgroup.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/option/themes/base/_oj-option.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/option/themes/redwood/oj-option.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/option/themes/stable/oj-option.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/paging-control/themes/base/_oj-paging-control.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/paging-control/themes/redwood/_oj-paging-control.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/paging-control/themes/redwood/oj-paging-control.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/paging-control/themes/stable/_oj-paging-control.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/paging-control/themes/stable/oj-paging-control.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/palette/themes/redwood/_oj-palette-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/palette/themes/redwood/_oj-palette.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/palette/themes/stable/_oj-palette.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/panel/themes/base/_oj-panel.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/panel/themes/redwood/_oj-panel-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/panel/themes/redwood/_oj-panel.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/panel/themes/redwood/oj-panel.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/panel/themes/stable/_oj-panel.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/panel/themes/stable/oj-panel.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/picto-chart/themes/base/_oj-picto-chart.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/picto-chart/themes/redwood/_oj-picto-chart.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/picto-chart/themes/redwood/oj-picto-chart.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/picto-chart/themes/stable/_oj-picto-chart.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/picto-chart/themes/stable/oj-picto-chart.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/popup/themes/base/_oj-layer.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/popup/themes/base/_oj-popup.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/popup/themes/redwood/_oj-layer.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/popup/themes/redwood/_oj-popup.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/popup/themes/redwood/oj-popup.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/popup/themes/stable/_oj-layer.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/popup/themes/stable/_oj-popup.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/popup/themes/stable/oj-popup.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/progress-bar/themes/base/_oj-progress-bar.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/progress-bar/themes/redwood/_oj-progress-bar-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/progress-bar/themes/redwood/_oj-progress-bar.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/progress-bar/themes/redwood/_oj-progress-bar.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/progress-bar/themes/redwood/oj-progress-bar.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/progress-bar/themes/stable/_oj-progress-bar.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/progress-bar/themes/stable/_oj-progress-bar.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/progress-bar/themes/stable/oj-progress-bar.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/progress-circle/themes/base/_oj-progress-circle.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/progress-circle/themes/redwood/_oj-progress-circle-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/progress-circle/themes/redwood/_oj-progress-circle.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/progress-circle/themes/redwood/_oj-progress-circle.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/progress-circle/themes/redwood/oj-progress-circle.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/progress-circle/themes/stable/_oj-progress-circle.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/progress-circle/themes/stable/_oj-progress-circle.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/progress-circle/themes/stable/oj-progress-circle.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/radio-checkbox/themes/base/_oj-radiocheckbox.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/radio-checkbox/themes/redwood/_oj-radiocheckbox-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/radio-checkbox/themes/redwood/_oj-radiocheckbox.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/radio-checkbox/themes/redwood/_oj-radiocheckbox.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/radio-checkbox/themes/stable/_oj-radiocheckbox.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/radio-checkbox/themes/stable/_oj-radiocheckbox.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/radioset/themes/redwood/_oj-radioset.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/radioset/themes/redwood/oj-radioset.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/radioset/themes/stable/_oj-radioset.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/radioset/themes/stable/oj-radioset.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/rangeslider/themes/redwood/_oj-rangeslider.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/rangeslider/themes/redwood/oj-rangeslider.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/rangeslider/themes/stable/_oj-rangeslider.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/rangeslider/themes/stable/oj-rangeslider.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/rating-gauge/themes/base/_oj-rating-gauge.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/rating-gauge/themes/redwood/_oj-rating-gauge.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/rating-gauge/themes/redwood/oj-rating-gauge.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/rating-gauge/themes/stable/_oj-rating-gauge.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/rating-gauge/themes/stable/oj-rating-gauge.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/refresher/themes/base/_oj-refresher.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/refresher/themes/redwood/_oj-refresher.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/refresher/themes/redwood/_oj-refresher.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/refresher/themes/redwood/oj-refresher.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/refresher/themes/stable/_oj-refresher.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/refresher/themes/stable/_oj-refresher.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/refresher/themes/stable/oj-refresher.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/resizable/themes/base/_oj-resizable.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/resizable/themes/redwood/_oj-resizable.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/resizable/themes/stable/_oj-resizable.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/row-expander/themes/base/_oj-row-expander.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/row-expander/themes/redwood/_oj-row-expander.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/row-expander/themes/redwood/oj-row-expander.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/row-expander/themes/stable/_oj-row-expander.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/row-expander/themes/stable/oj-row-expander.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/scrollbar/themes/base/_oj-scrollbar.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/scrollbar/themes/redwood/_oj-scrollbar-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/scrollbar/themes/redwood/_oj-scrollbar.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/scrollbar/themes/redwood/_oj-scrollbar.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/scrollbar/themes/stable/_oj-scrollbar.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/scrollbar/themes/stable/_oj-scrollbar.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/select/themes/base/_oj-select.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/select/themes/redwood/_oj-select.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/select/themes/redwood/_oj-select.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/select/themes/stable/_oj-select.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/select/themes/stable/_oj-select.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/select-many/themes/redwood/oj-select-many.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/select-many/themes/stable/oj-select-many.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/select-one/themes/redwood/oj-select-one.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/select-original/themes/base/_oj-select-original.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/select-original/themes/redwood/_oj-select-original.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/select-original/themes/redwood/_oj-select-original.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/select-original/themes/stable/_oj-select-original.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/select-original/themes/stable/_oj-select-original.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/select-single/themes/base/_oj-select-single.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/select-single/themes/redwood/oj-select-single.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/select-single/themes/stable/oj-select-single.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/selector/themes/base/_oj-selector.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/selector/themes/redwood/_oj-selector.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/selector/themes/redwood/oj-selector.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/selector/themes/stable/_oj-selector.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/selector/themes/stable/oj-selector.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/slider/themes/base/_oj-slider.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/slider/themes/redwood/_oj-slider.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/slider/themes/redwood/oj-slider.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/slider/themes/stable/_oj-slider.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/slider/themes/stable/oj-slider.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/spark-chart/themes/base/_oj-spark-chart.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/spark-chart/themes/redwood/oj-spark-chart.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/spark-chart/themes/stable/oj-spark-chart.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/status-meter-gauge/themes/base/_oj-status-meter-gauge.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/status-meter-gauge/themes/redwood/_oj-status-meter-gauge.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/status-meter-gauge/themes/redwood/oj-status-meter-gauge.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/status-meter-gauge/themes/stable/_oj-status-meter-gauge.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/status-meter-gauge/themes/stable/oj-status-meter-gauge.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/stream-list/themes/base/_oj-stream-list.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/stream-list/themes/redwood/_oj-stream-list.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/stream-list/themes/redwood/_oj-stream-list.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/stream-list/themes/redwood/oj-stream-list.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/stream-list/themes/stable/_oj-stream-list.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/stream-list/themes/stable/_oj-stream-list.servervars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/stream-list/themes/stable/oj-stream-list.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/sunburst/themes/base/_oj-sunburst.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/sunburst/themes/redwood/_oj-sunburst.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/sunburst/themes/redwood/oj-sunburst.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/sunburst/themes/stable/_oj-sunburst.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/sunburst/themes/stable/oj-sunburst.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/swipe-actions/themes/base/_oj-swipe-actions.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/swipe-actions/themes/redwood/_oj-swipe-actions.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/swipe-actions/themes/redwood/oj-swipe-actions.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/swipe-actions/themes/stable/_oj-swipe-actions.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/swipe-actions/themes/stable/oj-swipe-actions.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/switch/themes/base/_oj-switch.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/switch/themes/redwood/_oj-switch.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/switch/themes/redwood/oj-switch.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/switch/themes/stable/_oj-switch.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/switch/themes/stable/oj-switch.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/switcher/themes/base/_oj-switcher.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/switcher/themes/redwood/oj-switcher.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/switcher/themes/stable/oj-switcher.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tab-bar/themes/base/_oj-tab-bar.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tab-bar/themes/redwood/_oj-tab-bar-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tab-bar/themes/redwood/_oj-tab-bar.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tab-bar/themes/redwood/oj-tab-bar.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tab-bar/themes/stable/_oj-tab-bar-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tab-bar/themes/stable/_oj-tab-bar.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tab-bar/themes/stable/oj-tab-bar.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/table/themes/base/_oj-table.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/table/themes/redwood/_oj-table.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/table/themes/redwood/oj-table.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/table/themes/stable/_oj-table.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/table/themes/stable/oj-table.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tag-cloud/themes/base/_oj-tag-cloud.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tag-cloud/themes/redwood/_oj-tag-cloud.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tag-cloud/themes/redwood/oj-tag-cloud.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tag-cloud/themes/stable/_oj-tag-cloud.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tag-cloud/themes/stable/oj-tag-cloud.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tags/themes/base/_oj-notags.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tags/themes/base/_oj-tags.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tags/themes/redwood/_oj-tags-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tags/themes/redwood/_oj-tags.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tags/themes/redwood/oj-notags.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tags/themes/redwood/oj-tags.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tags/themes/stable/_oj-tags.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tags/themes/stable/oj-notags.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tags/themes/stable/oj-tags.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/text-area/themes/base/_oj-text-area.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/text-area/themes/redwood/_oj-text-area.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/text-area/themes/redwood/oj-text-area.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/text-area/themes/stable/_oj-text-area.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/text-area/themes/stable/oj-text-area.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/text-field/themes/base/_oj-text-field.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/text-field/themes/redwood/_oj-text-field-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/text-field/themes/redwood/_oj-text-field.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/text-field/themes/stable/_oj-text-field.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/thematic-map/themes/base/_oj-thematic-map.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/thematic-map/themes/redwood/_oj-thematic-map.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/thematic-map/themes/redwood/oj-thematic-map.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/thematic-map/themes/stable/_oj-thematic-map.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/thematic-map/themes/stable/oj-thematic-map.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/time-axis/themes/base/_oj-time-axis.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/time-axis/themes/redwood/_oj-time-axis.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/time-axis/themes/redwood/oj-time-axis.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/time-axis/themes/stable/_oj-time-axis.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/time-axis/themes/stable/oj-time-axis.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/timeline/themes/base/_oj-timeline.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/timeline/themes/redwood/_oj-timeline.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/timeline/themes/redwood/oj-timeline.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/timeline/themes/stable/_oj-timeline.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/timeline/themes/stable/oj-timeline.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/toolbar/themes/base/_oj-toolbar.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/toolbar/themes/redwood/_oj-toolbar.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/toolbar/themes/redwood/oj-toolbar.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/toolbar/themes/stable/_oj-toolbar.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/toolbar/themes/stable/oj-toolbar.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tooltip/themes/base/_oj-tooltip.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tooltip/themes/redwood/_oj-tooltip.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tooltip/themes/redwood/oj-tooltip.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tooltip/themes/stable/_oj-tooltip.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tooltip/themes/stable/oj-tooltip.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/train/themes/base/_oj-train.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/train/themes/redwood/_oj-train.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/train/themes/redwood/oj-train.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/train/themes/stable/_oj-train.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/train/themes/stable/oj-train.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tree-view/themes/base/_oj-tree-view.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tree-view/themes/redwood/_oj-tree-view.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tree-view/themes/redwood/oj-tree-view.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tree-view/themes/stable/_oj-tree-view.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/tree-view/themes/stable/oj-tree-view.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/treemap/themes/base/_oj-treemap.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/treemap/themes/redwood/_oj-treemap.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/treemap/themes/redwood/oj-treemap.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/treemap/themes/stable/_oj-treemap.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/treemap/themes/stable/oj-treemap.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/typography/themes/base/_oj-typography.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/typography/themes/redwood/_oj-typography-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/typography/themes/redwood/_oj-typography.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/typography/themes/redwood/oj-typography.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/typography/themes/stable/_oj-typography-scoped.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/typography/themes/stable/_oj-typography.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/typography/themes/stable/oj-typography.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/utilities/_oj.utilities.bidi.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/utilities/_oj.utilities.icons.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/utilities/_oj.utilities.json.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/utilities/_oj.utilities.masonrylayout.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/utilities/_oj.utilities.modules.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/validation-group/themes/base/_oj-validation-group.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/validation-group/themes/redwood/oj-validation-group.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/validation-group/themes/stable/oj-validation-group.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/waterfall-layout/themes/base/_oj-waterfall-layout.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/waterfall-layout/themes/redwood/_oj-waterfall-layout.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/waterfall-layout/themes/redwood/oj-waterfall-layout.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/waterfall-layout/themes/stable/_oj-waterfall-layout.cssvars.scss +0 -0
- package/dist/pcss/oj/{v11.1.0 → v11.1.1}/oj/waterfall-layout/themes/stable/oj-waterfall-layout.scss +0 -0
- package/dist/scss/common/helpers/_oj.common.helpers.scss +1 -1
- package/dist/webpack-tools/4.x/webpack.config.js +3 -3
- package/dist/webpack-tools/webpack.config.js +3 -3
- package/package.json +1 -1
|
@@ -96,7 +96,7 @@ function(){if("undefined"==typeof Symbol||"undefined"==typeof Map||"undefined"==
|
|
|
96
96
|
// based on https://github.com/montagejs/collections
|
|
97
97
|
()?(// prefer built-in Map/Set
|
|
98
98
|
i=Set,o=Map):(// fall back to our polyfill
|
|
99
|
-
i=y,o=v);var g,_=Function.prototype.toString,m
|
|
99
|
+
i=y,o=v);var g,_,m=Function.prototype.toString,b=m.call(Object);function w(e){var t,n,r;if(!e||"object"!=typeof e)return e;if(Array.isArray(e)){for(t=[],n=0,r=e.length;n<r;n++)t[n]=w(e[n]);return t}
|
|
100
100
|
// special case: to avoid inconsistencies between IndexedDB
|
|
101
101
|
// and other backends, we automatically stringify Dates
|
|
102
102
|
if(e instanceof Date)return e.toISOString();if(function(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer||"undefined"!=typeof Blob&&e instanceof Blob}(e))return function(e){if(e instanceof ArrayBuffer)return function(e){if("function"==typeof e.slice)return e.slice(0);
|
|
@@ -107,55 +107,55 @@ return"function"==typeof e.slice?e.slice(0,t,n):e.webkitSlice(0,t,n);
|
|
|
107
107
|
// PhantomJS slice() replacement
|
|
108
108
|
}(e);if(!function(e){var t=Object.getPrototypeOf(e);
|
|
109
109
|
/* istanbul ignore if */if(null===t)// not sure when this happens, but I guess it can
|
|
110
|
-
return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&
|
|
110
|
+
return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&m.call(n)==b}(e))return e;// don't clone objects like Workers
|
|
111
111
|
for(n in t={},e)
|
|
112
112
|
/* istanbul ignore else */
|
|
113
|
-
if(Object.prototype.hasOwnProperty.call(e,n)){var i=
|
|
113
|
+
if(Object.prototype.hasOwnProperty.call(e,n)){var i=w(e[n]);void 0!==i&&(t[n]=i)}return t}function k(e){var t=!1;return f((function(n){
|
|
114
114
|
/* istanbul ignore if */
|
|
115
115
|
if(t)
|
|
116
116
|
// this is a smoke test and should never actually happen
|
|
117
|
-
throw new Error("once called more than once");t=!0,e.apply(this,n)}))}function
|
|
117
|
+
throw new Error("once called more than once");t=!0,e.apply(this,n)}))}function j(e){
|
|
118
118
|
//create the function we will be returning
|
|
119
119
|
return f((function(t){
|
|
120
120
|
// Clone arguments
|
|
121
|
-
t=
|
|
121
|
+
t=w(t);var n=this,r="function"==typeof t[t.length-1]&&t.pop(),i=new Promise((function(r,i){var o;try{var s=k((function(e,t){e?i(e):r(t)}));
|
|
122
122
|
// create a callback for this invocation
|
|
123
123
|
// apply the function in the orig context
|
|
124
124
|
t.push(s),(o=e.apply(n,t))&&"function"==typeof o.then&&r(o)}catch(e){i(e)}}));
|
|
125
125
|
// if the last argument is a function, assume its a callback
|
|
126
126
|
// if there is a callback, call it back
|
|
127
|
-
return r&&i.then((function(e){r(null,e)}),r),i}))}function
|
|
127
|
+
return r&&i.then((function(e){r(null,e)}),r),i}))}function O(e,t){return j(f((function(n){if(this._closed)return Promise.reject(new Error("database is closed"));if(this._destroyed)return Promise.reject(new Error("database is destroyed"));var r=this;return function(e,t,n){
|
|
128
128
|
/* istanbul ignore if */
|
|
129
129
|
if(e.constructor.listeners("debug").length){for(var r=["api",e.name,t],i=0;i<n.length-1;i++)r.push(n[i]);e.constructor.emit("debug",r);
|
|
130
130
|
// override the callback itself to log the response
|
|
131
131
|
var o=n[n.length-1];n[n.length-1]=function(n,r){var i=["api",e.name,t];i=i.concat(n?["error",n]:["success",r]),e.constructor.emit("debug",i),o(n,r)}}}(r,e,n),this.taskqueue.isReady?t.apply(this,n):new Promise((function(t,i){r.taskqueue.addTask((function(o){o?i(o):t(r[e].apply(r,n))}))}))})))}
|
|
132
132
|
// like underscore/lodash _.pick()
|
|
133
|
-
function
|
|
133
|
+
function S(e,t){for(var n={},r=0,i=t.length;r<i;r++){var o=t[r];o in e&&(n[o]=e[o])}return n}
|
|
134
134
|
// Most browsers throttle concurrent requests at 6, so it's silly
|
|
135
135
|
// to shim _bulk_get by trying to launch potentially hundreds of requests
|
|
136
136
|
// and then letting the majority time out. We can handle this ourselves.
|
|
137
|
-
function
|
|
137
|
+
function P(e){return e}function A(e){return[{ok:e}]}
|
|
138
138
|
// shim for P/CouchDB adapters that don't directly implement _bulk_get
|
|
139
|
-
function
|
|
139
|
+
function x(e,t,n){var r=t.docs,i=new o;
|
|
140
140
|
// consolidate into one request per doc if possible
|
|
141
|
-
r.forEach((function(e){i.has(e.id)?i.get(e.id).push(e):i.set(e.id,[e])}));var s=i.size,u=0,a=new Array(s);function c(){var e;++u===s&&(e=[],a.forEach((function(t){t.docs.forEach((function(n){e.push({id:t.id,docs:[n]})}))})),n(null,{results:e}))}var f=[];i.forEach((function(e,t){f.push(t)}));var l=0;!function n(){if(!(l>=f.length)){var r=Math.min(l+6,f.length),o=f.slice(l,r);!function(r,o){r.forEach((function(r,s){var u=o+s,f=i.get(r),l=
|
|
141
|
+
r.forEach((function(e){i.has(e.id)?i.get(e.id).push(e):i.set(e.id,[e])}));var s=i.size,u=0,a=new Array(s);function c(){var e;++u===s&&(e=[],a.forEach((function(t){t.docs.forEach((function(n){e.push({id:t.id,docs:[n]})}))})),n(null,{results:e}))}var f=[];i.forEach((function(e,t){f.push(t)}));var l=0;!function n(){if(!(l>=f.length)){var r=Math.min(l+6,f.length),o=f.slice(l,r);!function(r,o){r.forEach((function(r,s){var u=o+s,f=i.get(r),l=S(f[0],["atts_since","attachments"]);l.open_revs=f.map((function(e){
|
|
142
142
|
// rev is optional, open_revs disallowed
|
|
143
143
|
return e.rev})),
|
|
144
144
|
// remove falsey / undefined revisions
|
|
145
|
-
l.open_revs=l.open_revs.filter(
|
|
145
|
+
l.open_revs=l.open_revs.filter(P);var d=P;0===l.open_revs.length&&(delete l.open_revs,
|
|
146
146
|
// when fetching only the "winning" leaf,
|
|
147
147
|
// transform the result so it looks like an open_revs
|
|
148
148
|
// request
|
|
149
|
-
d=
|
|
149
|
+
d=A),
|
|
150
150
|
// globally-supplied options
|
|
151
151
|
["revs","attachments","binary","ajax","latest"].forEach((function(e){e in t&&(l[e]=t[e])})),e.get(r,l,(function(e,t){var i,o,s;
|
|
152
|
-
/* istanbul ignore if */i=e?[{error:e}]:d(t),o=r,s=i,a[u]={id:o,docs:s},c(),n()}))}))}(o,l),l+=o.length}}()}try{localStorage.setItem("_pouch_check_localstorage",1),g=!!localStorage.getItem("_pouch_check_localstorage")}catch(e){g=!1}function
|
|
152
|
+
/* istanbul ignore if */i=e?[{error:e}]:d(t),o=r,s=i,a[u]={id:o,docs:s},c(),n()}))}))}(o,l),l+=o.length}}()}try{localStorage.setItem("_pouch_check_localstorage",1),g=!!localStorage.getItem("_pouch_check_localstorage")}catch(e){g=!1}function q(){return g}
|
|
153
153
|
// Custom nextTick() shim for browsers. In node, this will just be process.nextTick(). We
|
|
154
|
-
function
|
|
154
|
+
function E(){d.call(this),this._listeners={},
|
|
155
155
|
/* istanbul ignore next */
|
|
156
|
-
function(e){
|
|
156
|
+
function(e){q()&&addEventListener("storage",(function(t){e.emit(t.key)}))}(this)}function C(e){
|
|
157
157
|
/* istanbul ignore else */
|
|
158
|
-
if("undefined"!=typeof console&&"function"==typeof console[e]){var t=Array.prototype.slice.call(arguments,1);console[e].apply(console,t)}}function
|
|
158
|
+
if("undefined"!=typeof console&&"function"==typeof console[e]){var t=Array.prototype.slice.call(arguments,1);console[e].apply(console,t)}}function B(e){var t=0;return e||(t=2e3),function(e,t){var n=6e5;// Hard-coded default of 10 minutes
|
|
159
159
|
return e=parseInt(e,10)||0,(t=parseInt(t,10))!=t||t<=e?t=(e||1)<<1:t+=1,
|
|
160
160
|
// In order to not exceed maxTimeout, pick a random value between half of maxTimeout and maxTimeout
|
|
161
161
|
t>n&&(e=3e5,// divide by two
|
|
@@ -163,56 +163,56 @@ t=n),~~((t-e)*Math.random()+e);// ~~ coerces to an int, but fast.
|
|
|
163
163
|
}(e,t)}
|
|
164
164
|
// designed to give info to browser users, who are disturbed
|
|
165
165
|
// when they see http errors in the console
|
|
166
|
-
function
|
|
166
|
+
function $(e,t){C("info","The above "+e+" is totally normal. "+t)}l(E,d),E.prototype.addListener=function(e,t,n,r){
|
|
167
167
|
/* istanbul ignore if */
|
|
168
168
|
if(!this._listeners[t]){var i=this,o=!1;this._listeners[t]=u,this.on(e,u)}function u(){
|
|
169
169
|
/* istanbul ignore if */
|
|
170
|
-
if(i._listeners[t])if(o)o="waiting";else{o=!0;var e=
|
|
171
|
-
/* istanbul ignore next */n.changes(e).on("change",(function(e){e.seq>r.since&&!r.cancelled&&(r.since=e.seq,r.onChange(e))})).on("complete",(function(){"waiting"===o&&s(u),o=!1})).on("error",(function(){o=!1}))}}},
|
|
170
|
+
if(i._listeners[t])if(o)o="waiting";else{o=!0;var e=S(r,["style","include_docs","attachments","conflicts","filter","doc_ids","view","since","query_params","binary","return_docs"]);
|
|
171
|
+
/* istanbul ignore next */n.changes(e).on("change",(function(e){e.seq>r.since&&!r.cancelled&&(r.since=e.seq,r.onChange(e))})).on("complete",(function(){"waiting"===o&&s(u),o=!1})).on("error",(function(){o=!1}))}}},E.prototype.removeListener=function(e,t){
|
|
172
172
|
/* istanbul ignore if */
|
|
173
173
|
t in this._listeners&&(d.prototype.removeListener.call(this,e,this._listeners[t]),delete this._listeners[t])},
|
|
174
174
|
/* istanbul ignore next */
|
|
175
|
-
|
|
175
|
+
E.prototype.notifyLocalWindows=function(e){
|
|
176
176
|
//do a useless change on a storage thing
|
|
177
177
|
//in order to get other windows's listeners to activate
|
|
178
|
-
|
|
178
|
+
q()&&(localStorage[e]="a"===localStorage[e]?"b":"a")},E.prototype.notify=function(e){this.emit(e),this.notifyLocalWindows(e)},_="function"==typeof Object.assign?Object.assign:function(e){for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)// Skip over if undefined or null
|
|
179
179
|
for(var i in r)
|
|
180
180
|
// Avoid bugs when hasOwnProperty is shadowed
|
|
181
|
-
Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t};function
|
|
181
|
+
Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t};var T=_;function D(e,t,n){Error.call(this,n),this.status=e,this.name=t,this.message=n,this.error=!0}l(D,Error),D.prototype.toString=function(){return JSON.stringify({status:this.status,name:this.name,message:this.message,reason:this.reason})},new D(401,"unauthorized","Name or password is incorrect.");var L=new D(400,"bad_request","Missing JSON list of 'docs'"),I=new D(404,"not_found","missing"),R=new D(409,"conflict","Document update conflict"),M=new D(400,"bad_request","_id field must contain a string"),N=new D(412,"missing_id","_id is required for puts"),K=new D(400,"bad_request","Only reserved document ids may start with underscore."),U=(new D(412,"precondition_failed","Database not open"),new D(500,"unknown_error","Database encountered an unknown error")),F=new D(500,"badarg","Some query argument is invalid"),J=(new D(400,"invalid_request","Request was invalid"),new D(400,"query_parse_error","Some query parameter is invalid")),V=new D(500,"doc_validation","Bad special document member"),z=new D(400,"bad_request","Something wrong with the request"),G=new D(400,"bad_request","Document must be a JSON object"),Q=(new D(404,"not_found","Database not found"),new D(500,"indexed_db_went_bad","unknown")),W=(new D(500,"web_sql_went_bad","unknown"),new D(500,"levelDB_went_went_bad","unknown"),new D(403,"forbidden","Forbidden by design doc validate_doc_update function"),new D(400,"bad_request","Invalid rev format")),Y=(new D(412,"file_exists","The database could not be created, the file already exists."),new D(412,"missing_stub","A pre-existing attachment stub wasn't found"));function H(e,t){function n(t){for(
|
|
182
182
|
// inherit error properties from our parent error manually
|
|
183
183
|
// so as to allow proper JSON parsing.
|
|
184
184
|
/* jshint ignore:start */
|
|
185
185
|
var n=Object.getOwnPropertyNames(e),r=0,i=n.length;r<i;r++)"function"!=typeof e[n[r]]&&(this[n[r]]=e[n[r]]);
|
|
186
|
-
/* jshint ignore:end */void 0!==t&&(this.reason=t)}return n.prototype=
|
|
186
|
+
/* jshint ignore:end */void 0!==t&&(this.reason=t)}return n.prototype=D.prototype,new n(t)}function X(e){if("object"!=typeof e){var t=e;(e=U).data=t}return"error"in e&&"conflict"===e.error&&(e.name="conflict",e.status=409),"name"in e||(e.name=e.error||"unknown"),"status"in e||(e.status=500),"message"in e||(e.message=e.message||e.reason),e}function Z(e){var t={},n=e.filter&&"function"==typeof e.filter;return t.query=e.query_params,function(r){r.doc||(
|
|
187
187
|
// CSG sends events on the changes feed that don't have documents,
|
|
188
188
|
// this hack makes a whole lot of existing code robust.
|
|
189
|
-
r.doc={});var i=n&&function(e,t,n){try{return!e(t,n)}catch(e){var r="Filter function threw: "+e.toString();return
|
|
189
|
+
r.doc={});var i=n&&function(e,t,n){try{return!e(t,n)}catch(e){var r="Filter function threw: "+e.toString();return H(z,r)}}(e.filter,r.doc,t);if("object"==typeof i)return i;if(i)return!1;if(e.include_docs){if(!e.attachments)for(var o in r.doc._attachments)
|
|
190
190
|
/* istanbul ignore else */
|
|
191
|
-
r.doc._attachments.hasOwnProperty(o)&&(r.doc._attachments[o].stub=!0)}else delete r.doc;return!0}}function
|
|
191
|
+
r.doc._attachments.hasOwnProperty(o)&&(r.doc._attachments[o].stub=!0)}else delete r.doc;return!0}}function ee(e){for(var t=[],n=0,r=e.length;n<r;n++)t=t.concat(e[n]);return t}
|
|
192
192
|
// shim for Function.prototype.name,
|
|
193
193
|
// Determine id an ID is valid
|
|
194
194
|
// - invalid IDs begin with an underescore that does not begin '_design' or
|
|
195
195
|
// '_local'
|
|
196
196
|
// - any other string value is a valid id
|
|
197
197
|
// Returns the specific error object for each case
|
|
198
|
-
function
|
|
198
|
+
function te(e){var t;if(e?"string"!=typeof e?t=H(M):/^_/.test(e)&&!/^_(design|local)/.test(e)&&(t=H(K)):t=H(N),t)throw t}
|
|
199
199
|
// Checks if a PouchDB object is "remote" or not. This is
|
|
200
|
-
function
|
|
200
|
+
function ne(e){return"boolean"==typeof e._remote?e._remote:
|
|
201
201
|
/* istanbul ignore next */
|
|
202
|
-
"function"==typeof e.type&&(
|
|
203
|
-
/* istanbul ignore next */)}function
|
|
202
|
+
"function"==typeof e.type&&(C("warn","db.type() is deprecated and will be removed in a future version of PouchDB"),"http"===e.type()
|
|
203
|
+
/* istanbul ignore next */)}function re(e){if(!e)return null;var t=e.split("/");return 2===t.length?t:1===t.length?[e,e]:null}function ie(e){var t=re(e);return t?t.join("/"):null}
|
|
204
204
|
// originally parseUri 1.2.2, now patched by us
|
|
205
205
|
// (c) Steven Levithan <stevenlevithan.com>
|
|
206
206
|
// MIT License
|
|
207
|
-
new
|
|
207
|
+
new D(413,"invalid_url","Provided URL is invalid");var oe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],se="queryKey",ue=/(?:^|&)([^&=]*)=?([^&]*)/g,ae=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/;function ce(e){for(var t=ae.exec(e),n={},r=14;r--;){var i=oe[r],o=t[r]||"",s=-1!==["user","password"].indexOf(i);n[i]=s?decodeURIComponent(o):o}return n[se]={},n[oe[12]].replace(ue,(function(e,t,r){t&&(n[se][t]=r)})),n}
|
|
208
208
|
// Based on https://github.com/alexdavid/scope-eval v0.0.3
|
|
209
209
|
// (source: https://unpkg.com/scope-eval@0.0.3/scope_eval.js)
|
|
210
210
|
// This is basically just a wrapper around new Function()
|
|
211
|
-
function
|
|
211
|
+
function fe(e,t){var n=[],r=[];for(var i in t)t.hasOwnProperty(i)&&(n.push(i),r.push(t[i]));return n.push(e),Function.apply(null,n).apply(null,r)}
|
|
212
212
|
// this is essentially the "update sugar" function from daleharvey/pouchdb#1388
|
|
213
213
|
// the diffFun tells us what delta to apply to the doc. it either returns
|
|
214
214
|
// the doc, or false if it doesn't need to do an update after all
|
|
215
|
-
function
|
|
215
|
+
function le(e,t,n){return new Promise((function(r,i){e.get(t,(function(o,s){if(o){
|
|
216
216
|
/* istanbul ignore next */
|
|
217
217
|
if(404!==o.status)return i(o);s={}}
|
|
218
218
|
// the user might change the _rev, so save it for posterity
|
|
@@ -224,34 +224,34 @@ return r({updated:!1,rev:u});
|
|
|
224
224
|
// so reset them here
|
|
225
225
|
a._id=t,a._rev=u,r(function(e,t,n){return e.put(t).then((function(e){return{updated:!0,rev:e.rev}}),(function(r){
|
|
226
226
|
/* istanbul ignore next */
|
|
227
|
-
if(409!==r.status)throw r;return
|
|
227
|
+
if(409!==r.status)throw r;return le(e,t._id,n)}))}(e,a,n))}))}))}var de=function(e){return atob(e)},he=function(e){return btoa(e)};
|
|
228
228
|
// Abstracts constructing a Blob object, so it also works in older
|
|
229
229
|
// browsers that don't support the native Blob constructor (e.g.
|
|
230
230
|
// old QtWebKit versions, Android < 4.4).
|
|
231
|
-
function
|
|
231
|
+
function pe(e,t){
|
|
232
232
|
/* global BlobBuilder,MSBlobBuilder,MozBlobBuilder,WebKitBlobBuilder */
|
|
233
233
|
e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),r=0;r<e.length;r+=1)n.append(e[r]);return n.getBlob(t.type)}}
|
|
234
234
|
// From http://stackoverflow.com/questions/14967647/ (continues on next line)
|
|
235
235
|
// encode-decode-image-with-base64-breaks-image (2013-04-21)
|
|
236
|
-
function
|
|
236
|
+
function ve(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i<t;i++)r[i]=e.charCodeAt(i);return n}function ye(e,t){return pe([ve(e)],{type:t})}function ge(e,t){return ye(de(e),t)}
|
|
237
237
|
//Can't find original post, but this is close
|
|
238
238
|
//http://stackoverflow.com/questions/6965107/ (continues on next line)
|
|
239
239
|
//converting-between-strings-and-arraybuffers
|
|
240
240
|
// shim for browsers that don't support it
|
|
241
|
-
function
|
|
241
|
+
function _e(e,t){var n=new FileReader,r="function"==typeof n.readAsBinaryString;n.onloadend=function(e){var n=e.target.result||"";if(r)return t(n);t(function(e){for(var t="",n=new Uint8Array(e),r=n.byteLength,i=0;i<r;i++)t+=String.fromCharCode(n[i]);return t}(n))},r?n.readAsBinaryString(e):n.readAsArrayBuffer(e)}function me(e,t){_e(e,(function(e){t(e)}))}function be(e,t){me(e,(function(e){t(he(e))}))}
|
|
242
242
|
// simplified API. universal browser support is assumed
|
|
243
243
|
// this is not used in the browser
|
|
244
|
-
var
|
|
244
|
+
var we=self.setImmediate||self.setTimeout;function ke(e,t,n,r,i){(n>0||r<t.size)&&(
|
|
245
245
|
// only slice blob if we really need to
|
|
246
|
-
t=function(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.slice(t,n)}(t,n,r)),function(e,t){var n=new FileReader;n.onloadend=function(e){var n=e.target.result||new ArrayBuffer(0);t(n)},n.readAsArrayBuffer(e)}(t,(function(t){e.append(t),i()}))}function
|
|
246
|
+
t=function(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.slice(t,n)}(t,n,r)),function(e,t){var n=new FileReader;n.onloadend=function(e){var n=e.target.result||new ArrayBuffer(0);t(n)},n.readAsArrayBuffer(e)}(t,(function(t){e.append(t),i()}))}function je(e,t,n,r,i){(n>0||r<t.length)&&(
|
|
247
247
|
// only create a substring if we really need to
|
|
248
|
-
t=t.substring(n,r)),e.appendBinary(t),i()}function
|
|
248
|
+
t=t.substring(n,r)),e.appendBinary(t),i()}function Oe(e,t){var n="string"==typeof e,r=n?e.length:e.size,i=Math.min(32768,r),o=Math.ceil(r/i),s=0,u=n?new a:new a.ArrayBuffer,c=n?je:ke;function f(){we(d)}function l(){var e=function(e){return he(e)}(u.end(!0));t(e),u.destroy()}function d(){var t=s*i;s++,c(u,e,t,t+i,s<o?f:l)}d()}function Se(e){return a.hash(e)}function Pe(e,t){var n=w(e);return t?(delete n._rev_tree,Se(JSON.stringify(n))):u.v4().replace(/-/g,"").toLowerCase()}var Ae=u.v4;// mimic old import, only v4 is ever used elsewhere
|
|
249
249
|
// We fetch all leafs of the revision tree, and sort them based on tree length
|
|
250
250
|
// and whether they were deleted, undeleted documents with the longest revision
|
|
251
251
|
// tree (most edits) win
|
|
252
252
|
// The final sort algorithm is slightly documented in a sidebar here:
|
|
253
253
|
// http://guide.couchdb.org/draft/conflicts.html
|
|
254
|
-
function
|
|
254
|
+
function xe(e){for(var t,n,r,i,o=e.rev_tree.slice();i=o.pop();){var s=i.ids,u=s[2],a=i.pos;if(u.length)// non-leaf
|
|
255
255
|
for(var c=0,f=u.length;c<f;c++)o.push({pos:a+1,ids:u[c]});else{var l=!!s[1].deleted,d=s[0];
|
|
256
256
|
// sort by deleted, then pos, then id
|
|
257
257
|
t&&!(r!==l?r:n!==a?n<a:t<d)||(t=d,n=a,r=l)}}return n+"-"+t}
|
|
@@ -259,94 +259,94 @@ t&&!(r!==l?r:n!==a?n<a:t<d)||(t=d,n=a,r=l)}}return n+"-"+t}
|
|
|
259
259
|
// traverse revisions
|
|
260
260
|
// The return value from the callback will be passed as context to all
|
|
261
261
|
// children of that node
|
|
262
|
-
function
|
|
262
|
+
function qe(e,t){for(var n,r=e.slice();n=r.pop();)for(var i=n.pos,o=n.ids,s=o[2],u=t(0===s.length,i,o[0],n.ctx,o[1]),a=0,c=s.length;a<c;a++)r.push({pos:i+1,ids:s[a],ctx:u})}function Ee(e,t){return e.pos-t.pos}function Ce(e){var t=[];qe(e,(function(e,n,r,i,o){e&&t.push({rev:n+"-"+r,pos:n,opts:o})})),t.sort(Ee).reverse();for(var n=0,r=t.length;n<r;n++)delete t[n].pos;return t}
|
|
263
263
|
// returns revs of all conflicts that is leaves such that
|
|
264
264
|
// 1. are not deleted and
|
|
265
265
|
// 2. are different than winning revision
|
|
266
|
-
function
|
|
266
|
+
function Be(e){for(var t=xe(e),n=Ce(e.rev_tree),r=[],i=0,o=n.length;i<o;i++){var s=n[i];s.rev===t||s.opts.deleted||r.push(s.rev)}return r}
|
|
267
267
|
// compact a tree by marking its non-leafs as missing,
|
|
268
268
|
// and return a list of revs to delete
|
|
269
269
|
// build up a list of all the paths to the leafs in this revision tree
|
|
270
|
-
function
|
|
270
|
+
function $e(e){for(var t,n=[],r=e.slice();t=r.pop();){var i=t.pos,o=t.ids,s=o[0],u=o[1],a=o[2],c=0===a.length,f=t.history?t.history.slice():[];f.push({id:s,opts:u}),c&&n.push({pos:i+1-f.length,ids:f});for(var l=0,d=a.length;l<d;l++)r.push({pos:i+1,ids:a[l],history:f})}return n.reverse()}
|
|
271
271
|
// for a better overview of what this is doing, read:
|
|
272
|
-
function
|
|
272
|
+
function Te(e,t){return e.pos-t.pos}
|
|
273
273
|
// classic binary search
|
|
274
274
|
// assuming the arr is sorted, insert the item in the proper place
|
|
275
|
-
function
|
|
275
|
+
function De(e,t,n){var r=function(e,t,n){for(var r,i=0,o=e.length;i<o;)n(e[r=i+o>>>1],t)<0?i=r+1:o=r;return i}(e,t,n);e.splice(r,0,t)}
|
|
276
276
|
// Turn a path as a flat array into a tree with a single branch.
|
|
277
277
|
// If any should be stemmed from the beginning of the array, that's passed
|
|
278
278
|
// in as the second argument
|
|
279
|
-
function
|
|
279
|
+
function Le(e,t){for(var n,r,i=t,o=e.length;i<o;i++){var s=e[i],u=[s.id,s.opts,[]];r?(r[2].push(u),r=u):n=r=u}return n}
|
|
280
280
|
// compare the IDs of two trees
|
|
281
|
-
function
|
|
281
|
+
function Ie(e,t){return e[0]<t[0]?-1:1}
|
|
282
282
|
// Merge two trees together
|
|
283
283
|
// The roots of tree1 and tree2 must be the same revision
|
|
284
|
-
function
|
|
284
|
+
function Re(e,t){for(var n=[{tree1:e,tree2:t}],r=!1;n.length>0;){var i=n.pop(),o=i.tree1,s=i.tree2;(o[1].status||s[1].status)&&(o[1].status="available"===o[1].status||"available"===s[1].status?"available":"missing");for(var u=0;u<s[2].length;u++)if(o[2][0]){for(var a=!1,c=0;c<o[2].length;c++)o[2][c][0]===s[2][u][0]&&(n.push({tree1:o[2][c],tree2:s[2][u]}),a=!0);a||(r="new_branch",De(o[2],s[2][u],Ie))}else r="new_leaf",o[2][0]=s[2][u]}return{conflicts:r,tree:e}}function Me(e,t,n){var r,i=[],o=!1,s=!1;if(!e.length)return{tree:[t],conflicts:"new_leaf"};for(var u=0,a=e.length;u<a;u++){var c=e[u];if(c.pos===t.pos&&c.ids[0]===t.ids[0])
|
|
285
285
|
// Paths start at the same position and have the same root, so they need
|
|
286
286
|
// merged
|
|
287
|
-
r=
|
|
287
|
+
r=Re(c.ids,t.ids),i.push({pos:c.pos,ids:r.tree}),o=o||r.conflicts,s=!0;else if(!0!==n){
|
|
288
288
|
// The paths start at a different position, take the earliest path and
|
|
289
289
|
// traverse up until it as at the same point from root as the path we
|
|
290
290
|
// want to merge. If the keys match we return the longer path with the
|
|
291
291
|
// other merged After stemming we dont want to expand the trees
|
|
292
|
-
var f=c.pos<t.pos?c:t,l=c.pos<t.pos?t:c,d=l.pos-f.pos,h=[],p=[];for(p.push({ids:f.ids,diff:d,parent:null,parentIdx:null});p.length>0;){var v=p.pop();if(0!==v.diff)for(var y=v.ids[2],g=0,_=y.length;g<_;g++)p.push({ids:y[g],diff:v.diff-1,parent:v.ids,parentIdx:g});else v.ids[0]===l.ids[0]&&h.push(v)}var m=h[0];m?(r=
|
|
292
|
+
var f=c.pos<t.pos?c:t,l=c.pos<t.pos?t:c,d=l.pos-f.pos,h=[],p=[];for(p.push({ids:f.ids,diff:d,parent:null,parentIdx:null});p.length>0;){var v=p.pop();if(0!==v.diff)for(var y=v.ids[2],g=0,_=y.length;g<_;g++)p.push({ids:y[g],diff:v.diff-1,parent:v.ids,parentIdx:g});else v.ids[0]===l.ids[0]&&h.push(v)}var m=h[0];m?(r=Re(m.ids,l.ids),m.parent[2][m.parentIdx]=r.tree,i.push({pos:f.pos,ids:f.ids}),o=o||r.conflicts,s=!0):i.push(c)}else i.push(c)}
|
|
293
293
|
// We didnt find
|
|
294
|
-
return s||i.push(t),i.sort(
|
|
294
|
+
return s||i.push(t),i.sort(Te),{tree:i,conflicts:o||"internal_node"}}
|
|
295
295
|
// To ensure we dont grow the revision tree infinitely, we stem old revisions
|
|
296
|
-
function
|
|
296
|
+
function Ne(e,t,n){var r=Me(e,t),i=function(e,t){for(
|
|
297
297
|
// First we break out the tree into a complete list of root to leaf paths
|
|
298
|
-
var n,r,i
|
|
298
|
+
var n,r,i=$e(e),o=0,s=i.length;o<s;o++){
|
|
299
299
|
// Then for each path, we cut off the start of the path based on the
|
|
300
300
|
// `depth` to stem to, and generate a new set of flat trees
|
|
301
301
|
var u,a=i[o],c=a.ids;if(c.length>t){
|
|
302
302
|
// only do the stemming work if we actually need to stem
|
|
303
|
-
n||(n={});var f=c.length-t;u={pos:a.pos+f,ids:
|
|
304
|
-
u={pos:a.pos,ids:
|
|
303
|
+
n||(n={});var f=c.length-t;u={pos:a.pos+f,ids:Le(c,f)};for(var l=0;l<f;l++){var d=a.pos+l+"-"+c[l].id;n[d]=!0}}else// no need to actually stem
|
|
304
|
+
u={pos:a.pos,ids:Le(c,0)};
|
|
305
305
|
// Then we remerge all those flat trees together, ensuring that we dont
|
|
306
306
|
// connect trees that would go beyond the depth limit
|
|
307
|
-
r=r?
|
|
307
|
+
r=r?Me(r,u,!0).tree:[u]}
|
|
308
308
|
// this is memory-heavy per Chrome profiler, avoid unless we actually stemmed
|
|
309
|
-
return n&&
|
|
309
|
+
return n&&qe(r,(function(e,t,r){
|
|
310
310
|
// some revisions may have been removed in a branch but not in another
|
|
311
311
|
delete n[t+"-"+r]})),{tree:r,revs:n?Object.keys(n):[]}}(r.tree,n);return{tree:i.tree,stemmedRevs:i.revs,conflicts:r.conflicts}}
|
|
312
312
|
// return true if a rev exists in the rev tree, false otherwise
|
|
313
|
-
function
|
|
313
|
+
function Ke(e){return e.ids}
|
|
314
314
|
// check if a specific revision of a doc has been deleted
|
|
315
315
|
// - metadata: the metadata object from the doc store
|
|
316
316
|
// - rev: (optional) the revision to check. defaults to winning revision
|
|
317
|
-
function
|
|
317
|
+
function Ue(e,t){t||(t=xe(e));for(var n,r=t.substring(t.indexOf("-")+1),i=e.rev_tree.map(Ke);n=i.pop();){if(n[0]===r)return!!n[1].deleted;i=i.concat(n[2])}}function Fe(e){return/^_local/.test(e)}
|
|
318
318
|
// returns the current leaf node for a given revision
|
|
319
|
-
function
|
|
319
|
+
function Je(e,t,n){d.call(this);var r=this;this.db=e;var i=(t=t?w(t):{}).complete=k((function(t,n){var i,s;t?(s="error",("listenerCount"in(i=r)?i.listenerCount(s):d.listenerCount(i,s))>0&&r.emit("error",t)):r.emit("complete",n),r.removeAllListeners(),e.removeListener("destroyed",o)}));function o(){r.cancel()}n&&(r.on("complete",(function(e){n(null,e)})),r.on("error",n)),e.once("destroyed",o),t.onChange=function(e,t,n){
|
|
320
320
|
/* istanbul ignore if */
|
|
321
321
|
r.isCancelled||function(e,t,n,r){
|
|
322
322
|
// isolate try/catches to avoid V8 deoptimizations
|
|
323
|
-
try{e.emit("change",t,n,r)}catch(e){
|
|
323
|
+
try{e.emit("change",t,n,r)}catch(e){C("error",'Error in .on("change", function):',e)}}(r,e,t,n)};var s=new Promise((function(e,n){t.complete=function(t,r){t?n(t):e(r)}}));r.once("cancel",(function(){e.removeListener("destroyed",o),t.complete(null,{status:"cancelled"})})),this.then=s.then.bind(s),this.catch=s.catch.bind(s),this.then((function(e){i(null,e)}),i),e.taskqueue.isReady?r.validateChanges(t):e.taskqueue.addTask((function(e){e?t.complete(e):r.isCancelled?r.emit("cancel"):r.validateChanges(t)}))}function Ve(e,t,n){var r=[{rev:e._rev}];"all_docs"===n.style&&(r=Ce(t.rev_tree).map((function(e){return{rev:e.rev}})));var i={id:t.id,changes:r,doc:e};return Ue(t,e._rev)&&(i.deleted=!0),n.conflicts&&(i.doc._conflicts=Be(t),i.doc._conflicts.length||delete i.doc._conflicts),i}
|
|
324
324
|
/*
|
|
325
325
|
* A generic pouch adapter
|
|
326
|
-
*/function
|
|
326
|
+
*/function ze(e,t){return e<t?-1:e>t?1:0}
|
|
327
327
|
// Wrapper for functions that call the bulkdocs api with a single doc,
|
|
328
328
|
// if the first result is an error, return an error
|
|
329
|
-
function
|
|
329
|
+
function Ge(e,t){return function(n,r){n||r[0]&&r[0].error?((n=n||r[0]).docId=t,e(n)):e(null,r.length?r[0]:r)}}
|
|
330
330
|
// clean docs given to us by the user
|
|
331
331
|
// compare two docs, first by _id then by _rev
|
|
332
|
-
function
|
|
332
|
+
function Qe(e,t){var n=ze(e._id,t._id);return 0!==n?n:ze(e._revisions?e._revisions.start:0,t._revisions?t._revisions.start:0)}
|
|
333
333
|
// for every node in a revision tree computes its distance from the closest
|
|
334
334
|
// leaf
|
|
335
335
|
// all compaction is done in a queue, to avoid attaching
|
|
336
336
|
// too many listeners at once
|
|
337
|
-
function
|
|
337
|
+
function We(e){var t=e._compactionQueue[0],n=t.opts,r=t.callback;e.get("_local/compaction").catch((function(){return!1})).then((function(t){t&&t.last_seq&&(n.last_seq=t.last_seq),e._compact(n,(function(t,n){
|
|
338
338
|
/* istanbul ignore if */
|
|
339
|
-
t?r(t):r(null,n),s((function(){e._compactionQueue.shift(),e._compactionQueue.length&&
|
|
339
|
+
t?r(t):r(null,n),s((function(){e._compactionQueue.shift(),e._compactionQueue.length&&We(e)}))}))}))}function Ye(){
|
|
340
340
|
// re-bind prototyped methods
|
|
341
|
-
for(var e in d.call(this),
|
|
341
|
+
for(var e in d.call(this),Ye.prototype)"function"==typeof this[e]&&(this[e]=this[e].bind(this))}function He(){this.isReady=!1,this.failed=!1,this.queue=[]}function Xe(e,t){
|
|
342
342
|
// In Node our test suite only tests this for PouchAlt unfortunately
|
|
343
343
|
/* istanbul ignore if */
|
|
344
|
-
if(!(this instanceof
|
|
344
|
+
if(!(this instanceof Xe))return new Xe(e,t);var n=this;if(t=t||{},e&&"object"==typeof e&&(e=(t=e).name,delete t.name),void 0===t.deterministic_revs&&(t.deterministic_revs=!0),this.__opts=t=w(t),n.auto_compaction=t.auto_compaction,n.prefix=Xe.prefix,"string"!=typeof e)throw new Error("Missing/invalid DB name");var r=function(e,t){var n=e.match(/([a-z-]*):\/\/(.*)/);if(n)
|
|
345
345
|
// the http adapter expects the fully qualified name
|
|
346
|
-
return{name:/https?/.test(n[1])?n[1]+"://"+n[2]:n[2],adapter:n[1]};var r=
|
|
347
|
-
for(var u=0;u<i.length&&"idb"===(s=i[u])&&"websql"in r&&
|
|
346
|
+
return{name:/https?/.test(n[1])?n[1]+"://"+n[2]:n[2],adapter:n[1]};var r=Xe.adapters,i=Xe.preferredAdapters,o=Xe.prefix,s=t.adapter;if(!s)// automatically determine adapter
|
|
347
|
+
for(var u=0;u<i.length&&"idb"===(s=i[u])&&"websql"in r&&q()&&localStorage["_pouch__websqldb_"+o+e];++u)
|
|
348
348
|
// log it, because this can be confusing during development
|
|
349
|
-
|
|
349
|
+
C("log",'PouchDB is downgrading "'+e+'" to WebSQL to avoid data loss, because it was already opened with WebSQL.');var a=r[s];
|
|
350
350
|
// if adapter is invalid, then an error will be thrown later
|
|
351
351
|
return{name:a&&"use_prefix"in a&&!a.use_prefix?e:o+e,adapter:s}}
|
|
352
352
|
// OK, so here's the deal. Consider this code:
|
|
@@ -359,35 +359,35 @@ return{name:a&&"use_prefix"in a&&!a.use_prefix?e:o+e,adapter:s}}
|
|
|
359
359
|
// responsible for emitting the initial event, which then gets emitted
|
|
360
360
|
// by the constructor, which then broadcasts it to any other dbs
|
|
361
361
|
// that may have been created with the same name.
|
|
362
|
-
((t.prefix||"")+e,t);if(t.name=r.name,t.adapter=t.adapter||r.adapter,n.name=e,n._adapter=t.adapter,
|
|
362
|
+
((t.prefix||"")+e,t);if(t.name=r.name,t.adapter=t.adapter||r.adapter,n.name=e,n._adapter=t.adapter,Xe.emit("debug",["adapter","Picked adapter: ",t.adapter]),!Xe.adapters[t.adapter]||!Xe.adapters[t.adapter].valid())throw new Error("Invalid Adapter: "+t.adapter);Ye.call(n),n.taskqueue=new He,n.adapter=t.adapter,Xe.adapters[t.adapter].call(n,t,(function(e){if(e)return n.taskqueue.fail(e);!function(e){function t(t){e.removeListener("closed",n),t||e.constructor.emit("destroyed",e.name)}function n(){e.removeListener("destroyed",t),e.constructor.emit("unref",e)}e.once("destroyed",t),e.once("closed",n),e.constructor.emit("ref",e)}(n),n.emit("created",n),Xe.emit("created",n.name),n.taskqueue.ready(n)}))}
|
|
363
363
|
// AbortController was introduced quite a while after fetch and
|
|
364
364
|
// isnt required for PouchDB to function so polyfill if needed
|
|
365
|
-
l(
|
|
366
|
-
/* istanbul ignore else */
|
|
367
|
-
/* istanbul ignore else */){if(
|
|
365
|
+
l(Je,d),Je.prototype.cancel=function(){this.isCancelled=!0,this.db.taskqueue.isReady&&this.emit("cancel")},Je.prototype.validateChanges=function(e){var t=e.complete,n=this;
|
|
366
|
+
/* istanbul ignore else */Xe._changesFilterPlugin?Xe._changesFilterPlugin.validate(e,(function(r){if(r)return t(r);n.doChanges(e)})):n.doChanges(e)},Je.prototype.doChanges=function(e){var t=this,n=e.complete;if("live"in(e=w(e))&&!("continuous"in e)&&(e.continuous=e.live),e.processChange=Ve,"latest"===e.since&&(e.since="now"),e.since||(e.since=0),"now"!==e.since
|
|
367
|
+
/* istanbul ignore else */){if(Xe._changesFilterPlugin){if(Xe._changesFilterPlugin.normalize(e),Xe._changesFilterPlugin.shouldFilter(this,e))return Xe._changesFilterPlugin.filter(this,e)}else["doc_ids","filter","selector","view"].forEach((function(t){t in e&&C("warn",'The "'+t+'" option was passed in to changes/replicate, but pouchdb-changes-filter plugin is not installed, so it was ignored. Please install the plugin to enable filtering.')}));"descending"in e||(e.descending=!1),
|
|
368
368
|
// 0 and 1 should return 1 document
|
|
369
369
|
e.limit=0===e.limit?1:e.limit,e.complete=n;var r=this.db._changes(e);
|
|
370
370
|
/* istanbul ignore else */if(r&&"function"==typeof r.cancel){var i=t.cancel;t.cancel=f((function(e){r.cancel(),i.apply(this,e)}))}}else this.db.info().then((function(r){
|
|
371
371
|
/* istanbul ignore if */
|
|
372
|
-
t.isCancelled?n(null,{status:"cancelled"}):(e.since=r.update_seq,t.doChanges(e))}),n)},l(
|
|
372
|
+
t.isCancelled?n(null,{status:"cancelled"}):(e.since=r.update_seq,t.doChanges(e))}),n)},l(Ye,d),Ye.prototype.post=O("post",(function(e,t,n){if("function"==typeof t&&(n=t,t={}),"object"!=typeof e||Array.isArray(e))return n(H(G));this.bulkDocs({docs:[e]},t,Ge(n,e._id))})),Ye.prototype.put=O("put",(function(e,t,n){if("function"==typeof t&&(n=t,t={}),"object"!=typeof e||Array.isArray(e))return n(H(G));if(te(e._id),Fe(e._id)&&"function"==typeof this._putLocal)return e._deleted?this._removeLocal(e,n):this._putLocal(e,n);var r,i,o,s,u=this;function a(n){"function"==typeof u._put&&!1!==t.new_edits?u._put(e,t,n):u.bulkDocs({docs:[e]},t,Ge(n,e._id))}t.force&&e._rev?(i=(r=e._rev.split("-"))[1],o=parseInt(r[0],10)+1,s=Pe(),e._revisions={start:o,ids:[s,i]},e._rev=o+"-"+s,t.new_edits=!1,a((function(t){var r=t?null:{ok:!0,id:e._id,rev:e._rev};n(t,r)}))):a(n)})),Ye.prototype.putAttachment=O("putAttachment",(function(e,t,n,r,i){var o=this;function s(e){var n="_rev"in e?parseInt(e._rev,10):0;return e._attachments=e._attachments||{},e._attachments[t]={content_type:i,data:r,revpos:++n},o.put(e)}return"function"==typeof i&&(i=r,r=n,n=null),
|
|
373
373
|
// Lets fix in https://github.com/pouchdb/pouchdb/issues/3267
|
|
374
374
|
/* istanbul ignore if */
|
|
375
|
-
void 0===i&&(i=r,r=n,n=null),i||
|
|
375
|
+
void 0===i&&(i=r,r=n,n=null),i||C("warn","Attachment",t,"on document",e,"is missing content_type"),o.get(e).then((function(e){if(e._rev!==n)throw H(R);return s(e)}),(function(t){
|
|
376
376
|
// create new doc
|
|
377
377
|
/* istanbul ignore else */
|
|
378
|
-
if(t.reason===
|
|
378
|
+
if(t.reason===I.message)return s({_id:e});throw t}))})),Ye.prototype.removeAttachment=O("removeAttachment",(function(e,t,n,r){var i=this;i.get(e,(function(e,o){
|
|
379
379
|
/* istanbul ignore if */
|
|
380
380
|
if(e)r(e);else if(o._rev===n){
|
|
381
381
|
/* istanbul ignore if */
|
|
382
|
-
if(!o._attachments)return r();delete o._attachments[t],0===Object.keys(o._attachments).length&&delete o._attachments,i.put(o,r)}else r(
|
|
382
|
+
if(!o._attachments)return r();delete o._attachments[t],0===Object.keys(o._attachments).length&&delete o._attachments,i.put(o,r)}else r(H(R))}))})),Ye.prototype.remove=O("remove",(function(e,t,n,r){var i;"string"==typeof t?(
|
|
383
383
|
// id, rev, opts, callback style
|
|
384
384
|
i={_id:e,_rev:t},"function"==typeof n&&(r=n,n={})):(
|
|
385
385
|
// doc, opts, callback style
|
|
386
|
-
i=e,"function"==typeof t?(r=t,n={}):(r=n,n=t)),(n=n||{}).was_delete=!0;var o={_id:i._id,_rev:i._rev||n.rev,_deleted:!0};if(
|
|
386
|
+
i=e,"function"==typeof t?(r=t,n={}):(r=n,n=t)),(n=n||{}).was_delete=!0;var o={_id:i._id,_rev:i._rev||n.rev,_deleted:!0};if(Fe(o._id)&&"function"==typeof this._removeLocal)return this._removeLocal(i,r);this.bulkDocs({docs:[o]},n,Ge(r,o._id))})),Ye.prototype.revsDiff=O("revsDiff",(function(e,t,n){"function"==typeof t&&(n=t,t={});var r=Object.keys(e);if(!r.length)return n(null,{});var i=0,s=new o;function u(e,t){s.has(e)||s.set(e,{missing:[]}),s.get(e).missing.push(t)}r.map((function(t){this._getRevisionTree(t,(function(o,a){if(o&&404===o.status&&"missing"===o.message)s.set(t,{missing:e[t]});else{if(o)
|
|
387
387
|
/* istanbul ignore next */
|
|
388
388
|
return n(o);!function(t,n){
|
|
389
389
|
// Is this fast enough? Maybe we should switch to a set simulated by a map
|
|
390
|
-
var r=e[t].slice(0);
|
|
390
|
+
var r=e[t].slice(0);qe(n,(function(e,n,i,o,s){var a=n+"-"+i,c=r.indexOf(a);-1!==c&&(r.splice(c,1),
|
|
391
391
|
/* istanbul ignore if */
|
|
392
392
|
"available"!==s.status&&u(t,a))})),
|
|
393
393
|
// Traversing the tree is synchronous, so now `missingForId` contains
|
|
@@ -402,24 +402,24 @@ var c={};return s.forEach((function(e,t){c[t]=e})),n(null,c)}}))}),this)})),
|
|
|
402
402
|
// for local databases (except the cost of multiple transactions, which is
|
|
403
403
|
// small). The http adapter overrides this in order
|
|
404
404
|
// to do a more efficient single HTTP request.
|
|
405
|
-
|
|
405
|
+
Ye.prototype.bulkGet=O("bulkGet",(function(e,t){x(this,e,t)})),
|
|
406
406
|
// compact one document and fire callback
|
|
407
407
|
// by compacting we mean removing all revisions which
|
|
408
408
|
// are further from the leaf in revision tree than max_height
|
|
409
|
-
|
|
409
|
+
Ye.prototype.compactDocument=O("compactDocument",(function(e,t,n){var r=this;this._getRevisionTree(e,(function(i,o){
|
|
410
410
|
/* istanbul ignore if */
|
|
411
|
-
if(i)return n(i);var s=function(e){var t={},n=[];return
|
|
411
|
+
if(i)return n(i);var s=function(e){var t={},n=[];return qe(e,(function(e,r,i,o){var s=r+"-"+i;return e&&(t[s]=0),void 0!==o&&n.push({from:o,to:s}),s})),n.reverse(),n.forEach((function(e){void 0===t[e.from]?t[e.from]=1+t[e.to]:t[e.from]=Math.min(t[e.from],1+t[e.to])})),t}(o),u=[],a=[];Object.keys(s).forEach((function(e){s[e]>t&&u.push(e)})),qe(o,(function(e,t,n,r,i){var o=t+"-"+n;"available"===i.status&&-1!==u.indexOf(o)&&a.push(o)})),r._doCompaction(e,a,n)}))})),
|
|
412
412
|
// compact the whole database using single document
|
|
413
413
|
// compaction
|
|
414
|
-
|
|
414
|
+
Ye.prototype.compact=O("compact",(function(e,t){"function"==typeof e&&(t=e,e={});var n=this;e=e||{},n._compactionQueue=n._compactionQueue||[],n._compactionQueue.push({opts:e,callback:t}),1===n._compactionQueue.length&&We(n)})),Ye.prototype._compact=function(e,t){var n=this,r={return_docs:!1,last_seq:e.last_seq||0},i=[];n.changes(r).on("change",(function(e){i.push(n.compactDocument(e.id,0))})).on("complete",(function(e){var r=e.last_seq;Promise.all(i).then((function(){return le(n,"_local/compaction",(function(e){return(!e.last_seq||e.last_seq<r)&&(e.last_seq=r,e)}))})).then((function(){t(null,{ok:!0})})).catch(t)})).on("error",t)},
|
|
415
415
|
/* Begin api wrappers. Specific functionality to storage belongs in the
|
|
416
416
|
_[method] */
|
|
417
|
-
|
|
417
|
+
Ye.prototype.get=O("get",(function(e,t,n){if("function"==typeof t&&(n=t,t={}),"string"!=typeof e)return n(H(M));if(Fe(e)&&"function"==typeof this._getLocal)return this._getLocal(e,n);var r=[],i=this;function o(){var o=[],s=r.length;
|
|
418
418
|
/* istanbul ignore if */if(!s)return n(null,o);
|
|
419
419
|
// order with open_revs is unspecified
|
|
420
420
|
r.forEach((function(r){i.get(e,{rev:r,revs:t.revs,latest:t.latest,attachments:t.attachments,binary:t.binary},(function(e,t){if(e)o.push({missing:r});else{for(
|
|
421
421
|
// using latest=true can produce duplicates
|
|
422
|
-
var i,u=0,a=o.length;u<a;u++)if(o[u].ok&&o[u].ok._rev===t._rev){i=!0;break}i||o.push({ok:t})}--s||n(null,o)}))}))}if(!t.open_revs)return this._get(e,t,(function(r,o){if(r)return r.docId=e,n(r);var s=o.doc,u=o.metadata,a=o.ctx;if(t.conflicts){var c=
|
|
422
|
+
var i,u=0,a=o.length;u<a;u++)if(o[u].ok&&o[u].ok._rev===t._rev){i=!0;break}i||o.push({ok:t})}--s||n(null,o)}))}))}if(!t.open_revs)return this._get(e,t,(function(r,o){if(r)return r.docId=e,n(r);var s=o.doc,u=o.metadata,a=o.ctx;if(t.conflicts){var c=Be(u);c.length&&(s._conflicts=c)}if(Ue(u,s._rev)&&(s._deleted=!0),t.revs||t.revs_info){for(var f=s._rev.split("-"),l=parseInt(f[0],10),d=f[1],h=$e(u.rev_tree),p=null,v=0;v<h.length;v++){var y=h[v],g=y.ids.map((function(e){return e.id})).indexOf(d);(g===l-1||!p&&-1!==g)&&(p=y)}
|
|
423
423
|
/* istanbul ignore if */if(!p)return(r=new Error("invalid rev tree")).docId=e,n(r);var _=p.ids.map((function(e){return e.id})).indexOf(s._rev.split("-")[1])+1,m=p.ids.length-_;if(p.ids.splice(_,m),p.ids.reverse(),t.revs&&(s._revisions={start:p.pos+p.ids.length-1,ids:p.ids.map((function(e){return e.id}))}),t.revs_info){var b=p.pos+p.ids.length;s._revs_info=p.ids.map((function(e){return{rev:--b+"-"+e.id,status:e.opts.status}}))}}if(t.attachments&&s._attachments){var w=s._attachments,k=Object.keys(w).length;if(0===k)return n(null,s);Object.keys(w).forEach((function(e){this._getAttachment(s._id,e,w[e],{
|
|
424
424
|
// Previously the revision handling was done in adapter.js
|
|
425
425
|
// getAttachment, however since idb-next doesnt we need to
|
|
@@ -428,27 +428,27 @@ rev:s._rev,binary:t.binary,ctx:a},(function(t,r){var i=s._attachments[e];i.data=
|
|
|
428
428
|
/* istanbul ignore else */
|
|
429
429
|
s._attachments.hasOwnProperty(j)&&(s._attachments[j].stub=!0);n(null,s)}}));if("all"===t.open_revs)this._getRevisionTree(e,(function(e,t){
|
|
430
430
|
/* istanbul ignore if */
|
|
431
|
-
if(e)return n(e);r=
|
|
431
|
+
if(e)return n(e);r=Ce(t).map((function(e){return e.rev})),o()}));else{if(!Array.isArray(t.open_revs))return n(H(U,"function_clause"));r=t.open_revs;for(var s=0;s<r.length;s++){var u=r[s];
|
|
432
432
|
// looks like it's the only thing couchdb checks
|
|
433
|
-
if("string"!=typeof u||!/^\d+-/.test(u))return n(
|
|
433
|
+
if("string"!=typeof u||!/^\d+-/.test(u))return n(H(W))}o()}})),
|
|
434
434
|
// TODO: I dont like this, it forces an extra read for every
|
|
435
435
|
// attachment read and enforces a confusing api between
|
|
436
436
|
// adapter.js and the adapter implementation
|
|
437
|
-
|
|
437
|
+
Ye.prototype.getAttachment=O("getAttachment",(function(e,t,n,r){var i=this;n instanceof Function&&(r=n,n={}),this._get(e,n,(function(o,s){return o?r(o):s.doc._attachments&&s.doc._attachments[t]?(n.ctx=s.ctx,n.binary=!0,void i._getAttachment(e,t,s.doc._attachments[t],n,r)):r(H(I))}))})),Ye.prototype.allDocs=O("allDocs",(function(e,t){if("function"==typeof e&&(t=e,e={}),e.skip=void 0!==e.skip?e.skip:0,e.start_key&&(e.startkey=e.start_key),e.end_key&&(e.endkey=e.end_key),"keys"in e){if(!Array.isArray(e.keys))return t(new TypeError("options.keys must be an array"));var n=["startkey","endkey","key"].filter((function(t){return t in e}))[0];if(n)return void t(H(J,"Query parameter `"+n+"` is not compatible with multi-get"));if(!ne(this)&&(function(e){var t="limit"in e?e.keys.slice(e.skip,e.limit+e.skip):e.skip>0?e.keys.slice(e.skip):e.keys;e.keys=t,e.skip=0,delete e.limit,e.descending&&(t.reverse(),e.descending=!1)}(e),0===e.keys.length))return this._allDocs({limit:0},t)}return this._allDocs(e,t)})),Ye.prototype.changes=function(e,t){return"function"==typeof e&&(t=e,e={}),
|
|
438
438
|
// By default set return_docs to false if the caller has opts.live = true,
|
|
439
439
|
// this will prevent us from collecting the set of changes indefinitely
|
|
440
440
|
// resulting in growing memory
|
|
441
|
-
(e=e||{}).return_docs="return_docs"in e?e.return_docs:!e.live,new
|
|
441
|
+
(e=e||{}).return_docs="return_docs"in e?e.return_docs:!e.live,new Je(this,e,t)},Ye.prototype.close=O("close",(function(e){return this._closed=!0,this.emit("closed"),this._close(e)})),Ye.prototype.info=O("info",(function(e){var t=this;this._info((function(n,r){if(n)return e(n);
|
|
442
442
|
// assume we know better than the adapter, unless it informs us
|
|
443
|
-
r.db_name=r.db_name||t.name,r.auto_compaction=!(!t.auto_compaction||
|
|
443
|
+
r.db_name=r.db_name||t.name,r.auto_compaction=!(!t.auto_compaction||ne(t)),r.adapter=t.adapter,e(null,r)}))})),Ye.prototype.id=O("id",(function(e){return this._id(e)})),
|
|
444
444
|
/* istanbul ignore next */
|
|
445
|
-
|
|
445
|
+
Ye.prototype.type=function(){return"function"==typeof this._type?this._type():this.adapter},Ye.prototype.bulkDocs=O("bulkDocs",(function(e,t,n){if("function"==typeof t&&(n=t,t={}),t=t||{},Array.isArray(e)&&(e={docs:e}),!e||!e.docs||!Array.isArray(e.docs))return n(H(L));for(var r=0;r<e.docs.length;++r)if("object"!=typeof e.docs[r]||Array.isArray(e.docs[r]))return n(H(G));var i;if(e.docs.forEach((function(e){e._attachments&&Object.keys(e._attachments).forEach((function(t){i=i||function(e){return"_"===e.charAt(0)&&e+" is not a valid attachment name, attachment names cannot start with '_'"}(t),e._attachments[t].content_type||C("warn","Attachment",t,"on document",e._id,"is missing content_type")}))})),i)return n(H(z,i));"new_edits"in t||(t.new_edits=!("new_edits"in e)||e.new_edits);var o=this;t.new_edits||ne(o)||
|
|
446
446
|
// ensure revisions of the same doc are sorted, so that
|
|
447
447
|
// the local adapter processes them correctly (#2935)
|
|
448
|
-
e.docs.sort(
|
|
448
|
+
e.docs.sort(Qe),function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n._deleted)delete n._attachments;// ignore atts for deleted docs
|
|
449
449
|
else if(n._attachments)for(
|
|
450
450
|
// filter out extraneous keys from _attachments
|
|
451
|
-
var r=Object.keys(n._attachments),i=0;i<r.length;i++){var o=r[i];n._attachments[o]=
|
|
451
|
+
var r=Object.keys(n._attachments),i=0;i<r.length;i++){var o=r[i];n._attachments[o]=S(n._attachments[o],["data","digest","content_type","length","revpos","stub"])}}}(e.docs);
|
|
452
452
|
// in the case of conflicts, we want to return the _ids to the user
|
|
453
453
|
// however, the underlying adapter may destroy the docs array, so
|
|
454
454
|
// create a copy here
|
|
@@ -456,44 +456,44 @@ var s=e.docs.map((function(e){return e._id}));return this._bulkDocs(e,t,(functio
|
|
|
456
456
|
// add ids for error/conflict responses (not required for CouchDB)
|
|
457
457
|
if(t.new_edits||(
|
|
458
458
|
// this is what couch does when new_edits is false
|
|
459
|
-
r=r.filter((function(e){return e.error}))),!
|
|
459
|
+
r=r.filter((function(e){return e.error}))),!ne(o))for(var i=0,u=r.length;i<u;i++)r[i].id=r[i].id||s[i];n(null,r)}))})),Ye.prototype.registerDependentDatabase=O("registerDependentDatabase",(function(e,t){var n=new this.constructor(e,this.__opts);le(this,"_local/_pouch_dependentDbs",(function(t){return t.dependentDbs=t.dependentDbs||{},!t.dependentDbs[e]&&(t.dependentDbs[e]=!0,t)})).then((function(){t(null,{db:n})})).catch(t)})),Ye.prototype.destroy=O("destroy",(function(e,t){"function"==typeof e&&(t=e,e={});var n=this,r=!("use_prefix"in n)||n.use_prefix;function i(){
|
|
460
460
|
// call destroy method of the particular adaptor
|
|
461
|
-
n._destroy(e,(function(e,r){if(e)return t(e);n._destroyed=!0,n.emit("destroyed"),t(null,r||{ok:!0})}))}if(
|
|
461
|
+
n._destroy(e,(function(e,r){if(e)return t(e);n._destroyed=!0,n.emit("destroyed"),t(null,r||{ok:!0})}))}if(ne(n))
|
|
462
462
|
// no need to check for dependent DBs if it's a remote DB
|
|
463
463
|
return i();n.get("_local/_pouch_dependentDbs",(function(e,o){if(e)
|
|
464
464
|
/* istanbul ignore if */
|
|
465
465
|
return 404!==e.status?t(e):i();var s=o.dependentDbs,u=n.constructor,a=Object.keys(s).map((function(e){
|
|
466
466
|
// use_prefix is only false in the browser
|
|
467
467
|
/* istanbul ignore next */
|
|
468
|
-
var t=r?e.replace(new RegExp("^"+u.prefix),""):e;return new u(t,n.__opts).destroy()}));Promise.all(a).then(i,t)}))})),
|
|
468
|
+
var t=r?e.replace(new RegExp("^"+u.prefix),""):e;return new u(t,n.__opts).destroy()}));Promise.all(a).then(i,t)}))})),He.prototype.execute=function(){var e;if(this.failed)for(;e=this.queue.shift();)e(this.failed);else for(;e=this.queue.shift();)e()},He.prototype.fail=function(e){this.failed=e,this.execute()},He.prototype.ready=function(e){this.isReady=!0,this.db=e,this.execute()},He.prototype.addTask=function(e){this.queue.push(e),this.failed&&this.execute()},l(Xe,Ye);var Ze="undefined"!=typeof AbortController?AbortController:function(){return{abort:function(){}}},et=fetch,tt=Headers;Xe.adapters={},Xe.preferredAdapters=[],Xe.prefix="_pouch_";var nt=new d;
|
|
469
469
|
// this would just be "return doc[field]", but fields
|
|
470
470
|
// can be "deep" due to dot notation
|
|
471
|
-
function
|
|
471
|
+
function rt(e,t){for(var n=e,r=0,i=t.length;r<i&&(n=n[t[r]]);r++);return n}
|
|
472
472
|
// Converts a string in dot notation to an array of its components, with backslash escaping
|
|
473
|
-
function
|
|
473
|
+
function it(e){for(
|
|
474
474
|
// fields may be deep (e.g. "foo.bar.baz"), so parse
|
|
475
475
|
var t=[],n="",r=0,i=e.length;r<i;r++){var o=e[r];"."===o?r>0&&"\\"===e[r-1]?// escaped delimiter
|
|
476
476
|
n=n.substring(0,n.length-1)+".":(// not escaped, so delimiter
|
|
477
477
|
t.push(n),n=""):// normal character
|
|
478
|
-
n+=o}return t.push(n),t}!function(e){Object.keys(d.prototype).forEach((function(t){"function"==typeof d.prototype[t]&&(e[t]=
|
|
478
|
+
n+=o}return t.push(n),t}!function(e){Object.keys(d.prototype).forEach((function(t){"function"==typeof d.prototype[t]&&(e[t]=nt[t].bind(nt))}));
|
|
479
479
|
// these are created in constructor.js, and allow us to notify each DB with
|
|
480
480
|
// the same name that it was destroyed, via the constructor object
|
|
481
481
|
var t=e._destructionListeners=new o;e.on("ref",(function(e){t.has(e.name)||t.set(e.name,[]),t.get(e.name).push(e)})),e.on("unref",(function(e){if(t.has(e.name)){var n=t.get(e.name),r=n.indexOf(e);r<0||(n.splice(r,1),n.length>1?
|
|
482
482
|
/* istanbul ignore next */
|
|
483
|
-
t.set(e.name,n):t.delete(e.name))}})),e.on("destroyed",(function(e){if(t.has(e)){var n=t.get(e);t.delete(e),n.forEach((function(e){e.emit("destroyed",!0)}))}}))}(
|
|
483
|
+
t.set(e.name,n):t.delete(e.name))}})),e.on("destroyed",(function(e){if(t.has(e)){var n=t.get(e);t.delete(e),n.forEach((function(e){e.emit("destroyed",!0)}))}}))}(Xe),Xe.adapter=function(e,t,n){
|
|
484
484
|
/* istanbul ignore else */
|
|
485
|
-
t.valid()&&(
|
|
486
|
-
e(
|
|
487
|
-
|
|
485
|
+
t.valid()&&(Xe.adapters[e]=t,n&&Xe.preferredAdapters.push(e))},Xe.plugin=function(e){if("function"==typeof e)// function style for plugins
|
|
486
|
+
e(Xe);else{if("object"!=typeof e||0===Object.keys(e).length)throw new Error('Invalid plugin: got "'+e+'", expected an object or a function');Object.keys(e).forEach((function(t){// object style for plugins
|
|
487
|
+
Xe.prototype[t]=e[t]}))}return this.__defaults&&(Xe.__defaults=T({},this.__defaults)),Xe},Xe.defaults=function(e){function t(e,n){if(!(this instanceof t))return new t(e,n);n=n||{},e&&"object"==typeof e&&(e=(n=e).name,delete n.name),n=T({},t.__defaults,n),Xe.call(this,e,n)}return l(t,Xe),t.preferredAdapters=Xe.preferredAdapters.slice(),Object.keys(Xe).forEach((function(e){e in t||(t[e]=Xe[e])})),
|
|
488
488
|
// make default options transitive
|
|
489
489
|
// https://github.com/pouchdb/pouchdb/issues/5922
|
|
490
|
-
t.__defaults
|
|
490
|
+
t.__defaults=T({},this.__defaults,e),t},Xe.fetch=function(e,t){return et(e,t)};var ot=["$or","$nor","$not"];function st(e){return ot.indexOf(e)>-1}function ut(e){return Object.keys(e)[0]}
|
|
491
491
|
// flatten an array of selectors joined by an $and operator
|
|
492
|
-
function
|
|
492
|
+
function at(e){
|
|
493
493
|
// sort to ensure that e.g. if the user specified
|
|
494
494
|
// $and: [{$gt: 'a'}, {$gt: 'b'}], then it's collapsed into
|
|
495
495
|
// just {$gt: 'b'}
|
|
496
|
-
var t={};return e.forEach((function(e){Object.keys(e).forEach((function(n){var r=e[n];if("object"!=typeof r&&(r={$eq:r}),
|
|
496
|
+
var t={};return e.forEach((function(e){Object.keys(e).forEach((function(n){var r=e[n];if("object"!=typeof r&&(r={$eq:r}),st(n))t[n]=r instanceof Array?r.map((function(e){return at([e])})):at([r]);else{var i=t[n]=t[n]||{};Object.keys(r).forEach((function(e){var t=r[e];return"$gt"===e||"$gte"===e?
|
|
497
497
|
// collapse logically equivalent gt/gte values
|
|
498
498
|
function(e,t,n){void 0===n.$eq&&(// do nothing
|
|
499
499
|
void 0!==n.$gte?"$gte"===e?t>n.$gte&&(// more specificity
|
|
@@ -523,32 +523,32 @@ t.$ne=[e]}
|
|
|
523
523
|
// TODO: check for user errors here
|
|
524
524
|
delete t.$gt,delete t.$gte,delete t.$lt,delete t.$lte,delete t.$ne,t.$eq=e}
|
|
525
525
|
//#7458: execute function mergeAndedSelectors on nested $and
|
|
526
|
-
(t,i):void(i[e]=t)}))}}))})),t}function
|
|
526
|
+
(t,i):void(i[e]=t)}))}}))})),t}function ct(e){for(var t in e){if(Array.isArray(e))for(var n in e)e[n].$and&&(e[n]=at(e[n].$and));var r=e[t];"object"==typeof r&&ct(r)}return e}
|
|
527
527
|
//#7458: determine id $and is present in selector (at any level)
|
|
528
|
-
function
|
|
528
|
+
function ft(e,t){for(var n in e){"$and"===n&&(t=!0);var r=e[n];"object"==typeof r&&(t=ft(r,t))}return t}
|
|
529
529
|
// normalize the selector
|
|
530
|
-
function
|
|
530
|
+
function lt(e){var t=w(e),n=!1;
|
|
531
531
|
//#7458: if $and is present in selector (at any level) merge nested $and
|
|
532
|
-
|
|
532
|
+
ft(t,!1)&&("$and"in(t=ct(t))&&(t=at(t.$and)),n=!0),["$or","$nor"].forEach((function(e){e in t&&
|
|
533
533
|
// message each individual selector
|
|
534
534
|
// e.g. {foo: 'bar'} becomes {foo: {$eq: 'bar'}}
|
|
535
535
|
t[e].forEach((function(e){for(var t=Object.keys(e),n=0;n<t.length;n++){var r=t[n],i=e[r];"object"==typeof i&&null!==i||(e[r]={$eq:i})}}))})),"$not"in t&&(
|
|
536
536
|
//This feels a little like forcing, but it will work for now,
|
|
537
537
|
//I would like to come back to this and make the merging of selectors a little more generic
|
|
538
|
-
t.$not=
|
|
538
|
+
t.$not=at([t.$not]));for(var r=Object.keys(t),i=0;i<r.length;i++){var o=r[i],s=t[o];"object"!=typeof s||null===s?s={$eq:s}:"$ne"in s&&!n&&(
|
|
539
539
|
// I put these in an array, since there may be more than one
|
|
540
540
|
// but in the "mergeAnded" operation, I already take care of that
|
|
541
541
|
s.$ne=[s.$ne]),t[o]=s}return t}// verified by -Number.MIN_VALUE
|
|
542
542
|
// set to '_' for easier debugging
|
|
543
|
-
function
|
|
543
|
+
function dt(e,t){if(e===t)return 0;e=ht(e),t=ht(t);var n=gt(e),r=gt(t);if(n-r!=0)return n-r;switch(typeof e){case"number":return e-t;case"boolean":return e<t?-1:1;case"string":return function(e,t){
|
|
544
544
|
// See: https://github.com/daleharvey/pouchdb/issues/40
|
|
545
545
|
// This is incompatible with the CouchDB implementation, but its the
|
|
546
546
|
// best we can do for now
|
|
547
|
-
return e===t?0:e>t?1:-1}(e,t)}return Array.isArray(e)?function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var i=
|
|
547
|
+
return e===t?0:e>t?1:-1}(e,t)}return Array.isArray(e)?function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var i=dt(e[r],t[r]);if(0!==i)return i}return e.length===t.length?0:e.length>t.length?1:-1}(e,t):function(e,t){for(var n=Object.keys(e),r=Object.keys(t),i=Math.min(n.length,r.length),o=0;o<i;o++){
|
|
548
548
|
// First sort the keys
|
|
549
|
-
var s=
|
|
549
|
+
var s=dt(n[o],r[o]);if(0!==s)return s;
|
|
550
550
|
// if the keys are equal sort the values
|
|
551
|
-
if(0!==(s=
|
|
551
|
+
if(0!==(s=dt(e[n[o]],t[r[o]])))return s}return n.length===r.length?0:n.length>r.length?1:-1}
|
|
552
552
|
// The collation is defined by erlangs ordered terms
|
|
553
553
|
// the atoms null, true, false come first, then numbers, strings,
|
|
554
554
|
// arrays, then objects
|
|
@@ -556,13 +556,13 @@ if(0!==(s=lt(e[n[o]],t[r[o]])))return s}return n.length===r.length?0:n.length>r.
|
|
|
556
556
|
(e,t)}
|
|
557
557
|
// couch considers null/NaN/Infinity/-Infinity === undefined,
|
|
558
558
|
// for the purposes of mapreduce indexes. also, dates get stringified.
|
|
559
|
-
function
|
|
559
|
+
function ht(e){switch(typeof e){case"undefined":return null;case"number":return e===1/0||e===-1/0||isNaN(e)?null:e;case"object":var t=e;if(Array.isArray(e)){var n=e.length;e=new Array(n);for(var r=0;r<n;r++)e[r]=ht(t[r]);
|
|
560
560
|
/* istanbul ignore next */}else{if(e instanceof Date)return e.toJSON();if(null!==e)for(var i in// generic object
|
|
561
|
-
e={},t)if(t.hasOwnProperty(i)){var o=t[i];void 0!==o&&(e[i]=
|
|
561
|
+
e={},t)if(t.hasOwnProperty(i)){var o=t[i];void 0!==o&&(e[i]=ht(o))}}}return e}
|
|
562
562
|
// convert the given key to a string that would be appropriate
|
|
563
563
|
// for lexical sorting, e.g. within a database, where the
|
|
564
564
|
// sorting is the same given by the collate() function.
|
|
565
|
-
function
|
|
565
|
+
function pt(e){return gt(e=ht(e))+""+function(e){if(null!==e)switch(typeof e){case"boolean":return e?1:0;case"number":
|
|
566
566
|
// conversion:
|
|
567
567
|
// x yyy zz...zz
|
|
568
568
|
// x = 0 for negative, 1 for 0, 2 for positive
|
|
@@ -571,15 +571,15 @@ function ht(e){return yt(e=dt(e))+""+function(e){if(null!==e)switch(typeof e){ca
|
|
|
571
571
|
return function(e){if(0===e)return"1";
|
|
572
572
|
// convert number to exponential format for easier and
|
|
573
573
|
// more succinct string sorting
|
|
574
|
-
var t,n=e.toExponential().split(/e\+?/),
|
|
574
|
+
var t,n,r=e.toExponential().split(/e\+?/),i=parseInt(r[1],10),o=e<0,s=o?"0":"2",u=(n=function(e,t,n){
|
|
575
575
|
/* istanbul ignore next */
|
|
576
|
-
for(var r="",i=3-e.length;r.length<i;)r+="0";return r}(t=((i
|
|
576
|
+
for(var r="",i=3-e.length;r.length<i;)r+="0";return r}(t=((o?-i:i)- -324).toString()),n+t);s+=""+u;
|
|
577
577
|
// then sort by the factor
|
|
578
|
-
var
|
|
579
|
-
/* istanbul ignore next */
|
|
580
|
-
|
|
578
|
+
var a=Math.abs(parseFloat(r[0]));// [1..10)
|
|
579
|
+
/* istanbul ignore next */o&&(// for negative reverse ordering
|
|
580
|
+
a=10-a);var c=a.toFixed(20);
|
|
581
581
|
// strip zeros from the end
|
|
582
|
-
return
|
|
582
|
+
return s+""+c.replace(/\.?0+$/,"")}
|
|
583
583
|
// create a comparator based on the sort object
|
|
584
584
|
(e);case"string":
|
|
585
585
|
// We've to be sure that key does not contain \u0000
|
|
@@ -589,7 +589,7 @@ return o+""+u.replace(/\.?0+$/,"")}
|
|
|
589
589
|
// 2 -> 2, 2
|
|
590
590
|
/* eslint-disable no-control-regex */
|
|
591
591
|
return e.replace(/\u0002/g,"").replace(/\u0001/g,"").replace(/\u0000/g,"");
|
|
592
|
-
/* eslint-enable no-control-regex */case"object":var t=Array.isArray(e),n=t?e:Object.keys(e),r=-1,i=n.length,o="";if(t)for(;++r<i;)o+=
|
|
592
|
+
/* eslint-enable no-control-regex */case"object":var t=Array.isArray(e),n=t?e:Object.keys(e),r=-1,i=n.length,o="";if(t)for(;++r<i;)o+=pt(n[r]);else for(;++r<i;){var s=n[r];o+=pt(s)+pt(e[s])}return o}return""}(e)+"\0"}function vt(e,t){var n,r=t;if("1"===e[t])n=0,t++;else{var i="0"===e[t];t++;var o="",s=e.substring(t,t+3),u=parseInt(s,10)+-324;for(
|
|
593
593
|
/* istanbul ignore next */
|
|
594
594
|
i&&(u=-u),t+=3;;){var a=e[t];if("\0"===a)break;o+=a,t++}n=1===(o=o.split(".")).length?parseInt(o,10):parseFloat(o[0]+"."+o[1])
|
|
595
595
|
/* istanbul ignore next */,i&&(n-=10
|
|
@@ -600,89 +600,89 @@ i&&(u=-u),t+=3;;){var a=e[t];if("\0"===a)break;o+=a,t++}n=1===(o=o.split(".")).l
|
|
|
600
600
|
n=parseFloat(n+"e"+u))}return{num:n,length:t-r}}
|
|
601
601
|
// move up the stack while parsing
|
|
602
602
|
// this function moved outside of parseIndexableString for performance
|
|
603
|
-
function
|
|
603
|
+
function yt(e,t){var n=e.pop();if(t.length){var r=t[t.length-1];n===r.element&&(
|
|
604
604
|
// popping a meta-element, e.g. an object whose value is another object
|
|
605
605
|
t.pop(),r=t[t.length-1]);var i=r.element,o=r.index;Array.isArray(i)?i.push(n):o===e.length-2?i[e.pop()]=n:e.push(n);// obj with key only
|
|
606
|
-
}}function
|
|
606
|
+
}}function gt(e){var t=["boolean","number","string","object"].indexOf(typeof e);
|
|
607
607
|
//false if -1 otherwise true, but fast!!!!1
|
|
608
608
|
return~t?null===e?1:Array.isArray(e)?5:t<3?t+2:t+3:
|
|
609
609
|
/* istanbul ignore next */
|
|
610
|
-
Array.isArray(e)?5:void 0}function
|
|
610
|
+
Array.isArray(e)?5:void 0}function _t(e,t,n){return n.every((function(n){var r=t[n],i=it(n),o=rt(e,i);return st(n)?function(e,t,n){return"$or"===e?t.some((function(e){return _t(n,e,Object.keys(e))})):"$not"===e?!_t(n,t,Object.keys(t)):!t.find((function(e){return _t(n,e,Object.keys(e))}))}(n,r,e):mt(r,e,i,o)}))}function mt(e,t,n,r){return!e||(
|
|
611
611
|
// is matcher an object, if so continue recursion
|
|
612
|
-
"object"==typeof e?Object.keys(e).every((function(i){var o=e[i];return function(e,t,n,r,i){if(!
|
|
612
|
+
"object"==typeof e?Object.keys(e).every((function(i){var o=e[i];return function(e,t,n,r,i){if(!jt[e])throw new Error('unknown operator "'+e+'" - should be one of $eq, $lte, $lt, $gt, $gte, $exists, $ne, $in, $nin, $size, $mod, $regex, $elemMatch, $type, $allMatch or $all');return jt[e](t,n,r,i)}(i,t,o,n,r)})):e===r)}function bt(e){return null!=e}function wt(e){return void 0!==e}function kt(e,t){return t.some((function(t){return e instanceof Array?e.indexOf(t)>-1:e===t}))}var jt={$elemMatch:function(e,t,n,r){return!!Array.isArray(r)&&0!==r.length&&("object"==typeof r[0]?r.some((function(e){return _t(e,t,Object.keys(t))})):r.some((function(r){return mt(t,e,n,r)})))},$allMatch:function(e,t,n,r){return!!Array.isArray(r)&&
|
|
613
613
|
/* istanbul ignore next */
|
|
614
|
-
0!==r.length&&("object"==typeof r[0]?r.every((function(e){return
|
|
614
|
+
0!==r.length&&("object"==typeof r[0]?r.every((function(e){return _t(e,t,Object.keys(t))})):r.every((function(r){return mt(t,e,n,r)})))},$eq:function(e,t,n,r){return wt(r)&&0===dt(r,t)},$gte:function(e,t,n,r){return wt(r)&&dt(r,t)>=0},$gt:function(e,t,n,r){return wt(r)&&dt(r,t)>0},$lte:function(e,t,n,r){return wt(r)&&dt(r,t)<=0},$lt:function(e,t,n,r){return wt(r)&&dt(r,t)<0},$exists:function(e,t,n,r){
|
|
615
615
|
//a field that is null is still considered to exist
|
|
616
|
-
return t?
|
|
616
|
+
return t?wt(r):!wt(r)},$mod:function(e,t,n,r){return bt(r)&&function(e,t){var n=t[0],r=t[1];if(0===n)throw new Error("Bad divisor, cannot divide by zero");if(parseInt(n,10)!==n)throw new Error("Divisor is not an integer");if(parseInt(r,10)!==r)throw new Error("Modulus is not an integer");return parseInt(e,10)===e&&e%n===r}(r,t)},$ne:function(e,t,n,r){return t.every((function(e){return 0!==dt(r,e)}))},$in:function(e,t,n,r){return bt(r)&&kt(r,t)},$nin:function(e,t,n,r){return bt(r)&&!kt(r,t)},$size:function(e,t,n,r){return bt(r)&&function(e,t){return e.length===t}(r,t)},$all:function(e,t,n,r){return Array.isArray(r)&&function(e,t){return t.every((function(t){return e.indexOf(t)>-1}))}(r,t)},$regex:function(e,t,n,r){return bt(r)&&function(e,t){return new RegExp(t).test(e)}(r,t)},$type:function(e,t,n,r){return function(e,t){switch(t){case"null":return null===e;case"boolean":return"boolean"==typeof e;case"number":return"number"==typeof e;case"string":return"string"==typeof e;case"array":return e instanceof Array;case"object":return"[object Object]"==={}.toString.call(e)}throw new Error(t+" not supported as a type.Please use one of object, string, array, number, boolean or null.")}(r,t)}};
|
|
617
617
|
// return true if the given doc matches the supplied selector
|
|
618
|
-
function
|
|
618
|
+
function Ot(e,t){if(e.selector&&e.filter&&"_selector"!==e.filter){var n="string"==typeof e.filter?e.filter:"function";return t(new Error('selector invalid for filter "'+n+'"'))}t()}function St(e){e.view&&!e.filter&&(e.filter="_view"),e.selector&&!e.filter&&(e.filter="_selector"),e.filter&&"string"==typeof e.filter&&("_view"===e.filter?e.view=ie(e.view):e.filter=ie(e.filter))}function Pt(e,t){return t.filter&&"string"==typeof t.filter&&!t.doc_ids&&!ne(e.db)}function At(e,t){var n=t.complete;if("_view"===t.filter){if(!t.view||"string"!=typeof t.view){var r=H(z,"`view` filter parameter not found or invalid.");return n(r)}
|
|
619
619
|
// fetch a view from a design doc, make it behave like a filter
|
|
620
|
-
var i=
|
|
620
|
+
var i=re(t.view);e.db.get("_design/"+i[0],(function(r,o){
|
|
621
621
|
/* istanbul ignore if */
|
|
622
622
|
if(e.isCancelled)return n(null,{status:"cancelled"});
|
|
623
|
-
/* istanbul ignore next */if(r)return n(
|
|
623
|
+
/* istanbul ignore next */if(r)return n(X(r));var s=o&&o.views&&o.views[i[1]]&&o.views[i[1]].map;if(!s)return n(H(I,o.views?"missing json key: "+i[1]:"missing json key: views"));t.filter=fe(["return function(doc) {",' "use strict";'," var emitted = false;"," var emit = function (a, b) {"," emitted = true;"," };"," var view = "+s+";"," view(doc);"," if (emitted) {"," return true;"," }","};"].join("\n"),{}),e.doChanges(t)}))}else if(t.selector)t.filter=function(e){return function(e,t){
|
|
624
624
|
/* istanbul ignore if */
|
|
625
625
|
if("object"!=typeof t)
|
|
626
626
|
// match the CouchDB error message
|
|
627
|
-
throw new Error("Selector error: expected a JSON object");var n=function(e,t,n){if(e=e.filter((function(e){return
|
|
627
|
+
throw new Error("Selector error: expected a JSON object");var n=function(e,t,n){if(e=e.filter((function(e){return _t(e.doc,t.selector,n)})),t.sort){
|
|
628
628
|
// in-memory sort
|
|
629
|
-
var r=function(e){function t(t){return e.map((function(e){var n=
|
|
629
|
+
var r=function(e){function t(t){return e.map((function(e){var n=it(ut(e));return rt(t,n)}))}return function(e,n){var r,i,o=dt(t(e.doc),t(n.doc));return 0!==o?o:(r=e.doc._id)<(i=n.doc._id)?-1:r>i?1:0;
|
|
630
630
|
// this is what mango seems to do
|
|
631
|
-
}}(t.sort);e=e.sort(r),"string"!=typeof t.sort[0]&&"desc"===(i=t.sort[0])[
|
|
631
|
+
}}(t.sort);e=e.sort(r),"string"!=typeof t.sort[0]&&"desc"===(i=t.sort[0])[ut(i)]&&(e=e.reverse())}var i;if("limit"in t||"skip"in t){
|
|
632
632
|
// have to do the limit in-memory
|
|
633
|
-
var o=t.skip||0,s=("limit"in t?t.limit:e.length)+o;e=e.slice(o,s)}return e}([{doc:e}],{selector:t=
|
|
633
|
+
var o=t.skip||0,s=("limit"in t?t.limit:e.length)+o;e=e.slice(o,s)}return e}([{doc:e}],{selector:t=lt(t)},Object.keys(t));return n&&1===n.length}(e,t.selector)},e.doChanges(t);else{
|
|
634
634
|
// fetch a filter from a design doc
|
|
635
|
-
var o=
|
|
635
|
+
var o=re(t.filter);e.db.get("_design/"+o[0],(function(r,i){
|
|
636
636
|
/* istanbul ignore if */
|
|
637
637
|
if(e.isCancelled)return n(null,{status:"cancelled"});
|
|
638
|
-
/* istanbul ignore next */if(r)return n(
|
|
638
|
+
/* istanbul ignore next */if(r)return n(X(r));var s=i&&i.filters&&i.filters[o[1]];if(!s)return n(H(I,i&&i.filters?"missing json key: "+o[1]:"missing json key: filters"));t.filter=fe('"use strict";\nreturn '+s+";",{}),e.doChanges(t)}))}}function xt(e){return e.reduce((function(e,t){return e[t]=!0,e}),{})}
|
|
639
639
|
// List of top level reserved words for doc
|
|
640
640
|
// TODO: remove from pouchdb-core (breaking)
|
|
641
|
-
|
|
641
|
+
Xe.plugin((function(e){e._changesFilterPlugin={validate:Ot,normalize:St,shouldFilter:Pt,filter:At}})),Xe.version="7.2.2";var qt=xt(["_id","_rev","_attachments","_deleted","_revisions","_revs_info","_conflicts","_deleted_conflicts","_local_seq","_rev_tree",
|
|
642
642
|
//replication documents
|
|
643
643
|
"_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats",
|
|
644
644
|
// Specific to Couchbase Sync Gateway
|
|
645
|
-
"_removed"]),
|
|
645
|
+
"_removed"]),Et=xt(["_attachments",
|
|
646
646
|
//replication documents
|
|
647
647
|
"_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats"]);
|
|
648
648
|
// List of reserved words that should end up the document
|
|
649
|
-
function
|
|
649
|
+
function Ct(e){if(!/^\d+-/.test(e))return H(W);var t=e.indexOf("-"),n=e.substring(0,t),r=e.substring(t+1);return{prefix:parseInt(n,10),id:r}}
|
|
650
650
|
// Preprocess documents, parse their revisions, assign an id and a
|
|
651
651
|
// revision for new writes that are missing them, etc
|
|
652
|
-
function
|
|
652
|
+
function Bt(e,t,n){var r,i,o;n||(n={deterministic_revs:!0});var s={status:"available"};if(e._deleted&&(s.deleted=!0),t)if(e._id||(e._id=Ae()),i=Pe(e,n.deterministic_revs),e._rev){if((o=Ct(e._rev)).error)return o;e._rev_tree=[{pos:o.prefix,ids:[o.id,{status:"missing"},[[i,s,[]]]]}],r=o.prefix+1}else e._rev_tree=[{pos:1,ids:[i,s,[]]}],r=1;else if(e._revisions&&(e._rev_tree=function(e,t){for(var n=e.start-e.ids.length+1,r=e.ids,i=[r[0],t,[]],o=1,s=r.length;o<s;o++)i=[r[o],{status:"missing"},[i]];return[{pos:n,ids:i}]}(e._revisions,s),r=e._revisions.start,i=e._revisions.ids[0]),!e._rev_tree){if((o=Ct(e._rev)).error)return o;r=o.prefix,i=o.id,e._rev_tree=[{pos:r,ids:[i,s,[]]}]}te(e._id),e._rev=r+"-"+i;var u={metadata:{},data:{}};for(var a in e)
|
|
653
653
|
/* istanbul ignore else */
|
|
654
|
-
if(Object.prototype.hasOwnProperty.call(e,a)){var c="_"===a[0];if(c&&!
|
|
655
|
-
function(e,t,n){var r=function(e){try{return
|
|
656
|
-
function(e,t,n){
|
|
654
|
+
if(Object.prototype.hasOwnProperty.call(e,a)){var c="_"===a[0];if(c&&!qt[a]){var f=H(V,a);throw f.message=V.message+": "+a,f}c&&!Et[a]?u.metadata[a.slice(1)]=e[a]:u.data[a]=e[a]}return u}function $t(e,t,n){if(e.stub)return n();"string"==typeof e.data?// input is a base64 string
|
|
655
|
+
function(e,t,n){var r=function(e){try{return de(e)}catch(e){return{error:H(F,"Attachment is not a valid base64 string")}}}(e.data);if(r.error)return n(r.error);e.length=r.length,e.data="blob"===t?ye(r,e.content_type):"base64"===t?he(r):r,Oe(r,(function(t){e.digest="md5-"+t,n()}))}(e,t,n):// input is a blob
|
|
656
|
+
function(e,t,n){Oe(e.data,(function(r){e.digest="md5-"+r,
|
|
657
657
|
// size is for blobs (browser), length is for buffers (node)
|
|
658
|
-
e.length=e.data.size||e.data.length||0,"binary"===t?
|
|
658
|
+
e.length=e.data.size||e.data.length||0,"binary"===t?me(e.data,(function(t){e.data=t,n()})):"base64"===t?be(e.data,(function(t){e.data=t,n()})):n()}))}(e,t,n)}function Tt(e,t,n,r,i,s,u,a,c){
|
|
659
659
|
// Default to 1000 locally
|
|
660
|
-
e=e||1e3;var f=a.new_edits,l=new o,d=0,h=t.length;function p(){++d===h&&c&&c()}t.forEach((function(e,t){if(e._id&&
|
|
660
|
+
e=e||1e3;var f=a.new_edits,l=new o,d=0,h=t.length;function p(){++d===h&&c&&c()}t.forEach((function(e,t){if(e._id&&Fe(e._id)){var r=e._deleted?"_removeLocal":"_putLocal";n[r](e,{ctx:i},(function(e,n){s[t]=e||n,p()}))}else{var o=e.metadata.id;l.has(o)?(h--,// duplicate
|
|
661
661
|
l.get(o).push([e,t])):l.set(o,[[e,t]])}})),
|
|
662
662
|
// in the case of new_edits, the user can provide multiple docs
|
|
663
663
|
// with the same id. these need to be processed sequentially
|
|
664
664
|
l.forEach((function(t,n){var i=0;function o(){++i<t.length?c():p()}function c(){var c=t[i],l=c[0],d=c[1];if(r.has(n))!function(e,t,n,r,i,o,s,u){if(function(e,t){for(var n,r=e.slice(),i=t.split("-"),o=parseInt(i[0],10),s=i[1];n=r.pop();){if(n.pos===o&&n.ids[0]===s)return!0;for(var u=n.ids[2],a=0,c=u.length;a<c;a++)r.push({pos:n.pos+1,ids:u[a]})}return!1}(t.rev_tree,n.metadata.rev)&&!u)return r[i]=n,o();
|
|
665
665
|
// sometimes this is pre-calculated. historically not always
|
|
666
|
-
var a=t.winningRev||
|
|
666
|
+
var a=t.winningRev||xe(t),c="deleted"in t?t.deleted:Ue(t,a),f="deleted"in n.metadata?n.metadata.deleted:Ue(n.metadata),l=/^1-/.test(n.metadata.rev);if(c&&!f&&u&&l){var d=n.data;d._rev=a,d._id=n.metadata.id,n=Bt(d,u)}var h=Ne(t.rev_tree,n.metadata.rev_tree[0],e);if(u&&(c&&f&&"new_leaf"!==h.conflicts||!c&&"new_leaf"!==h.conflicts||c&&!f&&"new_branch"===h.conflicts)){var p=H(R);return r[i]=p,o()}var v=n.metadata.rev;n.metadata.rev_tree=h.tree,n.stemmedRevs=h.stemmedRevs||[],
|
|
667
667
|
/* istanbul ignore else */
|
|
668
668
|
t.rev_map&&(n.metadata.rev_map=t.rev_map);
|
|
669
669
|
// recalculate
|
|
670
|
-
var y=
|
|
670
|
+
var y=xe(n.metadata),g=Ue(n.metadata,y),_=c===g?0:c<g?-1:1;s(n,y,g,v===y?g:Ue(n.metadata,v),!0,_,i,o)}(e,r.get(n),l,s,d,o,u,f);else{
|
|
671
671
|
// Ensure stemming applies to new writes as well
|
|
672
|
-
var h=
|
|
672
|
+
var h=Ne([],l.metadata.rev_tree[0],e);l.metadata.rev_tree=h.tree,l.stemmedRevs=h.stemmedRevs||[],function(e,t,n){
|
|
673
673
|
// Cant insert new deleted documents
|
|
674
|
-
var r=
|
|
674
|
+
var r=xe(e.metadata),i=Ue(e.metadata,r);if("was_delete"in a&&i)return s[t]=H(I,"deleted"),n();
|
|
675
675
|
// 4712 - detect whether a new document was inserted with a _rev
|
|
676
|
-
|
|
676
|
+
var o=f&&function(e){return"missing"===e.metadata.rev_tree[0].ids[1].status}(e);if(o){var c=H(R);return s[t]=c,n()}u(e,r,i,i,!1,i?0:1,t,n)}(l,d,o)}}c()}))}
|
|
677
677
|
// IndexedDB requires a versioned database structure, so we use the
|
|
678
678
|
// version here to manage migrations.
|
|
679
|
-
var
|
|
679
|
+
var Dt="document-store",Lt="by-sequence",It="attach-store",Rt="attach-seq-store",Mt="meta-store",Nt="local-store",Kt="detect-blob-support";
|
|
680
680
|
// The object stores created for each database
|
|
681
681
|
// DOC_STORE stores the document meta data, its revision history and state
|
|
682
682
|
// Keyed by document id
|
|
683
|
-
function
|
|
683
|
+
function Ut(e){try{return JSON.stringify(e)}catch(t){
|
|
684
684
|
/* istanbul ignore next */
|
|
685
|
-
return c.stringify(e)}}function
|
|
685
|
+
return c.stringify(e)}}function Ft(e){return function(t){var n="unknown_error";t.target&&t.target.error&&(n=t.target.error.name||t.target.error.message),e(H(Q,n,t.type))}}
|
|
686
686
|
// Unfortunately, the metadata has to be stringified
|
|
687
687
|
// when it is put into the database, because otherwise
|
|
688
688
|
// IndexedDB can throw errors for deeply-nested objects.
|
|
@@ -690,8 +690,8 @@ return c.stringify(e)}}function Ut(e){return function(t){var n="unknown_error";t
|
|
|
690
690
|
// we use this custom vuvuzela library that avoids recursion.
|
|
691
691
|
// If we could do it all over again, we'd probably use a
|
|
692
692
|
// format for the revision trees other than JSON.
|
|
693
|
-
function
|
|
694
|
-
id:e.id}}function
|
|
693
|
+
function Jt(e,t,n){return{data:Ut(e),winningRev:t,deletedOrLocal:n?"1":"0",seq:e.seq,// highest seq for this doc
|
|
694
|
+
id:e.id}}function Vt(e){if(!e)return null;var t=function(e){
|
|
695
695
|
// This try/catch guards against stack overflow errors.
|
|
696
696
|
// JSON.parse() is faster than vuvuzela.parse() but vuvuzela
|
|
697
697
|
// cannot overflow.
|
|
@@ -700,33 +700,33 @@ try{return JSON.parse(e)}catch(t){
|
|
|
700
700
|
return c.parse(e)}}(e.data);return t.winningRev=e.winningRev,t.deleted="1"===e.deletedOrLocal,t.seq=e.seq,t}
|
|
701
701
|
// read the doc back out from the database. we don't store the
|
|
702
702
|
// _id or _rev because we already have _doc_id_rev.
|
|
703
|
-
function
|
|
703
|
+
function zt(e){if(!e)return e;var t=e._doc_id_rev.lastIndexOf(":");return e._id=e._doc_id_rev.substring(0,t-1),e._rev=e._doc_id_rev.substring(t+1),delete e._doc_id_rev,e}
|
|
704
704
|
// Read a blob from the database, encoding as necessary
|
|
705
705
|
// and translating from base64 if the IDB doesn't support
|
|
706
706
|
// native Blobs
|
|
707
|
-
function
|
|
708
|
-
r(e?"string"!=typeof e?e:
|
|
707
|
+
function Gt(e,t,n,r){n?// we have blob support
|
|
708
|
+
r(e?"string"!=typeof e?e:ge(e,t):pe([""],{type:t})):// as base64 string
|
|
709
709
|
e?"string"!=typeof e?// we have blob support
|
|
710
|
-
|
|
711
|
-
r(e):r("")}function
|
|
710
|
+
_e(e,(function(e){r(he(e))})):// no blob support
|
|
711
|
+
r(e):r("")}function Qt(e,t,n,r){var i=Object.keys(e._attachments||{});if(!i.length)return r&&r();var o=0;function s(){++o===i.length&&r&&r()}i.forEach((function(r){t.attachments&&t.include_docs?function(e,t){var r=e._attachments[t],i=r.digest;n.objectStore(It).get(i).onsuccess=function(e){r.body=e.target.result.body,s()}}(e,r):(e._attachments[r].stub=!0,s())}))}
|
|
712
712
|
// IDB-specific postprocessing necessary because
|
|
713
713
|
// we don't know whether we stored a true Blob or
|
|
714
714
|
// a base64-encoded string, and if it's a Blob it
|
|
715
715
|
// needs to be read outside of the transaction context
|
|
716
|
-
function
|
|
716
|
+
function Wt(e,t){return Promise.all(e.map((function(e){if(e.doc&&e.doc._attachments){var n=Object.keys(e.doc._attachments);return Promise.all(n.map((function(n){var r=e.doc._attachments[n];if("body"in r){var i=r.body,o=r.content_type;return new Promise((function(s){Gt(i,o,t,(function(t){e.doc._attachments[n]=T(S(r,["digest","content_type"]),{data:t}),s()}))}))}})))}})))}function Yt(e,t,n){var r=[],i=n.objectStore(Lt),o=n.objectStore(It),s=n.objectStore(Rt),u=e.length;function a(){--u||r.length&&r.forEach((function(e){s.index("digestSeq").count(IDBKeyRange.bound(e+"::",e+"::",!1,!1)).onsuccess=function(t){t.target.result||
|
|
717
717
|
// orphaned
|
|
718
718
|
o.delete(e)}}))}e.forEach((function(e){var n=i.index("_doc_id_rev"),o=t+"::"+e;n.getKey(o).onsuccess=function(e){var t=e.target.result;if("number"!=typeof t)return a();i.delete(t),s.index("seq").openCursor(IDBKeyRange.only(t)).onsuccess=function(e){var t=e.target.result;if(t){var n=t.value.digestSeq.split("::")[0];r.push(n),s.delete(t.primaryKey),t.continue()}else// done
|
|
719
|
-
a()}}}))}function
|
|
719
|
+
a()}}}))}function Ht(e,t,n){try{return{txn:e.transaction(t,n)}}catch(e){return{error:e}}}var Xt=new E;function Zt(e,t,n,r,i,s){for(var u,a,c,f,l,d,h,p,v=t.docs,y=0,g=v.length;y<g;y++){var _=v[y];_._id&&Fe(_._id)||(_=v[y]=Bt(_,n.new_edits,e)).error&&!h&&(h=_)}if(h)return s(h);var m=!1,b=0,w=new Array(v.length),k=new o,j=!1,O=r._meta.blobSupport?"blob":"base64";function S(){m=!0,P()}function P(){p&&m&&(
|
|
720
720
|
// caching the docCount saves a lot of time in allDocs() and
|
|
721
721
|
// info(), which is why we go to all the trouble of doing this
|
|
722
|
-
p.docCount+=b,d.put(p))}function A(){j||(
|
|
722
|
+
p.docCount+=b,d.put(p))}function A(){j||(Xt.notify(r._meta.name),s(null,w))}function x(e,t,n,r,i,o,s,u){e.metadata.winningRev=t,e.metadata.deleted=n;var a=e.data;if(a._id=e.metadata.id,a._rev=e.metadata.rev,r&&(a._deleted=!0),a._attachments&&Object.keys(a._attachments).length)return function(e,t,n,r,i,o){var s=e.data,u=0,a=Object.keys(s._attachments);function c(){u===a.length&&q(e,t,n,r,i,o)}function l(){u++,c()}a.forEach((function(n){var r=e.data._attachments[n];if(r.stub)u++,c();else{var i=r.data;delete r.data,r.revpos=parseInt(t,10),function(e,t,n){f.count(e).onsuccess=function(r){if(r.target.result)return n();// already exists
|
|
723
723
|
var i={digest:e,body:t};f.put(i).onsuccess=n}}(r.digest,i,l)}}))}
|
|
724
724
|
// map seqs to attachment digests, which
|
|
725
725
|
// we will need later during compaction
|
|
726
|
-
(e,t,n,i,s,u);b+=o,P(),q(e,t,n,i,s,u)}function q(e,t,n,i,o,s){var f=e.data,d=e.metadata;function h(o){var s=e.stemmedRevs||[];i&&r.auto_compaction&&(s=s.concat(function(e){var t=[];return
|
|
726
|
+
(e,t,n,i,s,u);b+=o,P(),q(e,t,n,i,s,u)}function q(e,t,n,i,o,s){var f=e.data,d=e.metadata;function h(o){var s=e.stemmedRevs||[];i&&r.auto_compaction&&(s=s.concat(function(e){var t=[];return qe(e.rev_tree,(function(e,n,r,i,o){"available"!==o.status||e||(t.push(n+"-"+r),o.status="missing")})),t}(e.metadata))),s&&s.length&&Yt(s,e.metadata.id,u),d.seq=o.target.result;
|
|
727
727
|
// Current _rev is calculated from _rev_tree on read
|
|
728
728
|
// delete metadata.rev;
|
|
729
|
-
var c=
|
|
729
|
+
var c=Jt(d,t,n);a.put(c).onsuccess=p}function p(){w[o]={ok:!0,id:d.id,rev:d.rev},k.set(e.metadata.id,e.metadata),function(e,t,n){var r=0,i=Object.keys(e.data._attachments||{});if(!i.length)return n();function o(){++r===i.length&&n()}function s(n){var r=e.data._attachments[n].digest,i=l.put({seq:t,digestSeq:r+"::"+t});i.onsuccess=o,i.onerror=function(e){
|
|
730
730
|
// this callback is for a constaint error, which we ignore
|
|
731
731
|
// because this docid/rev has already been associated with
|
|
732
732
|
// the digest (e.g. when new_edits == false)
|
|
@@ -736,12 +736,12 @@ o()}}for(var u=0;u<i.length;u++)s(i[u]);// do in parallel
|
|
|
736
736
|
}(e,d.seq,s)}f._doc_id_rev=d.id+"::"+d.rev,delete f._id,delete f._rev;var v=c.put(f);v.onsuccess=h,v.onerror=function(e){
|
|
737
737
|
// ConstraintError, need to update, not put (see #1638 for details)
|
|
738
738
|
e.preventDefault(),// avoid transaction abort
|
|
739
|
-
e.stopPropagation(),c.index("_doc_id_rev").getKey(f._doc_id_rev).onsuccess=function(e){c.put(f,e.target.result).onsuccess=h}}}!function(e,t,n){if(!e.length)return n();var r,i=0;function o(){i++,e.length===i&&(r?n(r):n())}e.forEach((function(e){var n=e.data&&e.data._attachments?Object.keys(e.data._attachments):[],i=0;if(!n.length)return o();function s(e){r=e,++i===n.length&&o()}for(var u in e.data._attachments)e.data._attachments.hasOwnProperty(u)
|
|
739
|
+
e.stopPropagation(),c.index("_doc_id_rev").getKey(f._doc_id_rev).onsuccess=function(e){c.put(f,e.target.result).onsuccess=h}}}!function(e,t,n){if(!e.length)return n();var r,i=0;function o(){i++,e.length===i&&(r?n(r):n())}e.forEach((function(e){var n=e.data&&e.data._attachments?Object.keys(e.data._attachments):[],i=0;if(!n.length)return o();function s(e){r=e,++i===n.length&&o()}for(var u in e.data._attachments)e.data._attachments.hasOwnProperty(u)&&$t(e.data._attachments[u],t,s)}))}(v,O,(function(t){if(t)return s(t);!function(){var t=Ht(i,[Dt,Lt,It,Nt,Rt,Mt],"readwrite");if(t.error)return s(t.error);(u=t.txn).onabort=Ft(s),u.ontimeout=Ft(s),u.oncomplete=A,a=u.objectStore(Dt),c=u.objectStore(Lt),f=u.objectStore(It),l=u.objectStore(Rt),(d=u.objectStore(Mt)).get(Mt).onsuccess=function(e){p=e.target.result,P()},function(e){var t=[];if(v.forEach((function(e){e.data&&e.data._attachments&&Object.keys(e.data._attachments).forEach((function(n){var r=e.data._attachments[n];r.stub&&t.push(r.digest)}))})),!t.length)return e();var n,r=0;function i(){++r===t.length&&e(n)}t.forEach((function(e){!function(e,t){f.get(e).onsuccess=function(n){if(n.target.result)t();else{var r=H(Y,"unknown stub attachment with digest "+e);r.status=412,t(r)}}}(e,(function(e){e&&!n&&(n=e),i()}))}))}((function(t){if(t)return j=!0,s(t);!function(){if(v.length)for(var t=0,i=0,o=v.length;i<o;i++){var s=v[i];s._id&&Fe(s._id)?c():a.get(s.metadata.id).onsuccess=f}function c(){++t===v.length&&Tt(e.revs_limit,v,r,k,u,w,x,n,S)}function f(e){var t=Vt(e.target.result);t&&k.set(t.id,t),c()}}()}))}()}))}
|
|
740
740
|
// Abstraction over IDBCursor and getAll()/getAllKeys() that allows us to batch our operations
|
|
741
741
|
// while falling back to a normal IDBCursor operation on browsers that don't support getAll() or
|
|
742
742
|
// getAllKeys(). This allows for a much faster implementation than just straight-up cursors, because
|
|
743
743
|
// we're not processing each document one-at-a-time.
|
|
744
|
-
function
|
|
744
|
+
function en(e,t,n,r,i){
|
|
745
745
|
// Bail out of getAll()/getAllKeys() in the following cases:
|
|
746
746
|
// 1) either method is unsupported - we need both
|
|
747
747
|
// 2) batchSize is 1 (might as well use IDBCursor)
|
|
@@ -755,20 +755,20 @@ return i();
|
|
|
755
755
|
var n,u=o[o.length-1];if(t&&t.upper)try{n=IDBKeyRange.bound(u,t.upper,!0,t.upperOpen)}catch(e){if("DataError"===e.name&&0===e.code)return i();// we're done, startkey and endkey are equal
|
|
756
756
|
}else n=IDBKeyRange.lowerBound(u,!0);t=n,o=null,s=null,e.getAll(t,r).onsuccess=a,e.getAllKeys(t,r).onsuccess=c}},e.getAll(t,r).onsuccess=a,e.getAllKeys(t,r).onsuccess=c):n?e.openCursor(t,"prev").onsuccess=f:e.openCursor(t).onsuccess=f}
|
|
757
757
|
// simple shim for objectStore.getAll(), falling back to IDBCursor
|
|
758
|
-
function
|
|
758
|
+
function tn(e,t,n){var r,i,o="startkey"in e&&e.startkey,s="endkey"in e&&e.endkey,u="key"in e&&e.key,a="keys"in e&&e.keys,c=e.skip||0,f="number"==typeof e.limit?e.limit:-1,l=!1!==e.inclusive_end;if(!a&&(r=function(e,t,n,r,i){try{if(e&&t)return i?IDBKeyRange.bound(t,e,!n,!1):IDBKeyRange.bound(e,t,!1,!n);if(e)return i?IDBKeyRange.upperBound(e):IDBKeyRange.lowerBound(e);if(t)return i?IDBKeyRange.lowerBound(t,!n):IDBKeyRange.upperBound(t,!n);if(r)return IDBKeyRange.only(r)}catch(e){return{error:e}}return null}(o,s,l,u,e.descending),(i=r&&r.error)&&("DataError"!==i.name||0!==i.code)))
|
|
759
759
|
// DataError with error code 0 indicates start is less than end, so
|
|
760
760
|
// can just do an empty query. Else need to throw
|
|
761
|
-
return n(
|
|
761
|
+
return n(H(Q,i.name,i.message));var d=[Dt,Lt,Mt];e.attachments&&d.push(It);var h=Ht(t,d,"readonly");if(h.error)return n(h.error);var p=h.txn;p.oncomplete=function(){e.attachments?Wt(w,e.binary).then(S):S()}
|
|
762
762
|
// don't bother doing any requests if start > end or limit === 0
|
|
763
|
-
,p.onabort=
|
|
763
|
+
,p.onabort=Ft(n);var v,y,g=p.objectStore(Dt),_=p.objectStore(Lt),m=p.objectStore(Mt),b=_.index("_doc_id_rev"),w=[];function k(t,n){var r={id:n.id,key:n.id,value:{rev:t}};n.deleted?a&&(w.push(r),
|
|
764
764
|
// deleted docs are okay with "keys" requests
|
|
765
765
|
r.value.deleted=!0,r.doc=null):c--<=0&&(w.push(r),e.include_docs&&
|
|
766
766
|
// if the user specifies include_docs=true, then we don't
|
|
767
767
|
// want to block the main cursor while we're fetching the doc
|
|
768
|
-
function(t,n,r){var i=t.id+"::"+r;b.get(i).onsuccess=function(r){if(n.doc=
|
|
768
|
+
function(t,n,r){var i=t.id+"::"+r;b.get(i).onsuccess=function(r){if(n.doc=zt(r.target.result)||{},e.conflicts){var i=Be(t);i.length&&(n.doc._conflicts=i)}Qt(n.doc,e,p)}}(n,r,t))}function j(e){for(var t=0,n=e.length;t<n&&w.length!==f;t++){var r=e[t];if(r.error&&a)
|
|
769
769
|
// key was not found with "keys" requests
|
|
770
|
-
w.push(r);else{var i=
|
|
771
|
-
/* istanbul ignore if */e.update_seq&&void 0!==y&&(t.update_seq=y),n(null,t)}return m.get(
|
|
770
|
+
w.push(r);else{var i=Vt(r);k(i.winningRev,i)}}}function O(e,t,n){n&&(j(t),w.length<f&&n.continue())}function S(){var t={total_rows:v,offset:e.skip,rows:w};
|
|
771
|
+
/* istanbul ignore if */e.update_seq&&void 0!==y&&(t.update_seq=y),n(null,t)}return m.get(Mt).onsuccess=function(e){v=e.target.result.docCount},
|
|
772
772
|
/* istanbul ignore if */
|
|
773
773
|
e.update_seq&&function(e,t){e.openCursor(null,"prev").onsuccess=function(e){var t=e.target.result,n=void 0;return t&&t.key&&(n=t.key),function(e){e.target.result&&e.target.result.length>0&&(y=e.target.result[0])}({target:{result:[n]}})}}(_),i||0===f?void 0:a?function(e,t,n){
|
|
774
774
|
// It's not guaranted to be returned in right order
|
|
@@ -779,7 +779,7 @@ var r=[];e.openCursor(t).onsuccess=function(e){var t=e.target.result;t?(r.push(t
|
|
|
779
779
|
e.getAll(t).onsuccess=n}(g,r,(function(t){var n=t.target.result;e.descending&&(n=n.reverse()),j(n)})):
|
|
780
780
|
// else do a cursor
|
|
781
781
|
// choose a batch size based on the skip, since we'll need to skip that many
|
|
782
|
-
void
|
|
782
|
+
void en(g,r,e.descending,f+c,O)}
|
|
783
783
|
// Blobs are not supported in all versions of IndexedDB, notably
|
|
784
784
|
// Chrome <37 and Android <5. In those versions, storing a blob will throw.
|
|
785
785
|
// Various other blob bugs exist in Chrome v37-42 (inclusive).
|
|
@@ -789,38 +789,38 @@ void Zt(g,r,e.descending,f+c,O)}
|
|
|
789
789
|
// 404 bug: https://code.google.com/p/chromium/issues/detail?id=447916
|
|
790
790
|
// FileReader bug: https://code.google.com/p/chromium/issues/detail?id=447836
|
|
791
791
|
// This task queue ensures that IDB open calls are done in their own tick
|
|
792
|
-
var
|
|
792
|
+
var nn=!1,rn=[];function on(){!nn&&rn.length&&(nn=!0,rn.shift()())}function sn(e,t,n,r){if((e=w(e)).continuous){var s=n+":"+Ae();return Xt.addListener(n,s,t,e),Xt.notify(n),{cancel:function(){Xt.removeListener(n,s)}}}var u=e.doc_ids&&new i(e.doc_ids);e.since=e.since||0;var a=e.since,c="limit"in e?e.limit:-1;0===c&&(c=1);var f,l,d,h,p=[],v=0,y=Z(e),g=new o;function _(e,t,n,r){if(n.seq!==t)
|
|
793
793
|
// some other seq is later
|
|
794
794
|
return r();if(n.winningRev===e._rev)
|
|
795
795
|
// this is the winning doc
|
|
796
796
|
return r(n,e);
|
|
797
797
|
// fetch winning doc in separate request
|
|
798
|
-
var i=e._id+"::"+n.winningRev;h.get(i).onsuccess=function(e){r(n,
|
|
798
|
+
var i=e._id+"::"+n.winningRev;h.get(i).onsuccess=function(e){r(n,zt(e.target.result))}}function m(){e.complete(null,{results:p,last_seq:a})}var b=[Dt,Lt];e.attachments&&b.push(It);var k=Ht(r,b,"readonly");if(k.error)return e.complete(k.error);(f=k.txn).onabort=Ft(e.complete),f.oncomplete=function(){!e.continuous&&e.attachments?
|
|
799
799
|
// cannot guarantee that postProcessing was already done,
|
|
800
800
|
// so do it again
|
|
801
|
-
|
|
801
|
+
Wt(p).then(m):m()},l=f.objectStore(Lt),d=f.objectStore(Dt),h=l.index("_doc_id_rev"),en(l,e.since&&!e.descending?IDBKeyRange.lowerBound(e.since,!0):null,e.descending,c,(function(t,n,r){if(r&&t.length){var i=new Array(t.length),o=new Array(t.length),s=0;n.forEach((function(n,a){!function(e,t,n){if(u&&!u.has(e._id))return n();var r=g.get(e._id);if(r)// cached
|
|
802
802
|
return _(e,t,r,n);
|
|
803
803
|
// metadata not cached, have to go fetch it
|
|
804
|
-
d.get(e._id).onsuccess=function(i){r=
|
|
804
|
+
d.get(e._id).onsuccess=function(i){r=Vt(i.target.result),g.set(e._id,r),_(e,t,r,n)}}(zt(n),t[a],(function(n,u){o[a]=n,i[a]=u,++s===t.length&&function(){for(var t=[],n=0,s=i.length;n<s&&v!==c;n++){var u=i[n];if(u){var a=o[n];t.push(l(a,u))}}Promise.all(t).then((function(t){for(var n=0,r=t.length;n<r;n++)t[n]&&e.onChange(t[n])})).catch(e.complete),v!==c&&r.continue()}
|
|
805
805
|
// Fetch all metadatas/winningdocs from this batch in parallel, then process
|
|
806
806
|
// them all only once all data has been collected. This is done in parallel
|
|
807
807
|
// because it's faster than doing it one-at-a-time.
|
|
808
808
|
()}))}))}function l(t,n){var r=e.processChange(n,t,e);a=r.seq=t.seq;var i=y(r);return"object"==typeof i?Promise.reject(i):i?(v++,e.return_docs&&p.push(r),
|
|
809
809
|
// process the attachment immediately
|
|
810
810
|
// for the benefit of live listeners
|
|
811
|
-
e.attachments&&e.include_docs?new Promise((function(t){
|
|
811
|
+
e.attachments&&e.include_docs?new Promise((function(t){Qt(n,e,f,(function(){Wt([r],e.binary).then((function(){t(r)}))}))})):Promise.resolve(r)):Promise.resolve()}}))}var un,an=new o,cn=new o;function fn(e,t){var n=this;!function(e,t,n){rn.push((function(){e((function(e,r){!function(e,t,n,r){try{e(t,n)}catch(t){
|
|
812
812
|
// Shouldn't happen, but in some odd cases
|
|
813
813
|
// IndexedDB implementations might throw a sync
|
|
814
814
|
// error, in which case this will at least log it.
|
|
815
|
-
r.emit("error",t)}}(t,e,r,n),
|
|
815
|
+
r.emit("error",t)}}(t,e,r,n),nn=!1,s((function(){on()}))}))})),on()}((function(t){!function(e,t,n){var r=t.name,i=null;
|
|
816
816
|
// called when creating a fresh new database
|
|
817
817
|
// migration to version 2
|
|
818
818
|
// unfortunately "deletedOrLocal" is a misnomer now that we no longer
|
|
819
819
|
// store local docs in the main doc-store, but whaddyagonnado
|
|
820
|
-
function o(e,t){var n=e.objectStore(
|
|
820
|
+
function o(e,t){var n=e.objectStore(Dt);n.createIndex("deletedOrLocal","deletedOrLocal",{unique:!1}),n.openCursor().onsuccess=function(e){var r=e.target.result;if(r){var i=r.value,o=Ue(i);i.deletedOrLocal=o?"1":"0",n.put(i),r.continue()}else t()}}
|
|
821
821
|
// migration to version 3 (part 1)
|
|
822
822
|
// migration to version 3 (part 2)
|
|
823
|
-
function u(e,t){var n=e.objectStore(
|
|
823
|
+
function u(e,t){var n=e.objectStore(Nt),r=e.objectStore(Dt),i=e.objectStore(Lt);r.openCursor().onsuccess=function(e){var o=e.target.result;if(o){var s=o.value,u=s.id,a=Fe(u),c=xe(s);if(a){var f=u+"::"+c,l=u+"::",d=u+"::~",h=i.index("_doc_id_rev"),p=IDBKeyRange.bound(l,d,!1,!1),v=h.openCursor(p);
|
|
824
824
|
// remove all seq entries
|
|
825
825
|
// associated with this docId
|
|
826
826
|
v.onsuccess=function(e){if(v=e.target.result){var t=v.value;t._doc_id_rev===f&&n.put(t),i.delete(v.primaryKey),v.continue()}else
|
|
@@ -828,7 +828,7 @@ v.onsuccess=function(e){if(v=e.target.result){var t=v.value;t._doc_id_rev===f&&n
|
|
|
828
828
|
r.delete(o.primaryKey),o.continue()}}else o.continue()}else t&&t()}}
|
|
829
829
|
// migration to version 4 (part 1)
|
|
830
830
|
// migration to version 4 (part 2)
|
|
831
|
-
function a(e,t){var n=e.objectStore(
|
|
831
|
+
function a(e,t){var n=e.objectStore(Lt),r=e.objectStore(It),i=e.objectStore(Rt);r.count().onsuccess=function(e){if(!e.target.result)return t();// done
|
|
832
832
|
n.openCursor().onsuccess=function(e){var n=e.target.result;if(!n)return t();// done
|
|
833
833
|
for(var r=n.value,o=n.primaryKey,s=Object.keys(r._attachments||{}),u={},a=0;a<s.length;a++)u[r._attachments[s[a]].digest]=!0;var c=Object.keys(u);for(a=0;a<c.length;a++){var f=c[a];i.put({seq:o,digestSeq:f+"::"+o})}n.continue()}}}
|
|
834
834
|
// migration to version 5
|
|
@@ -840,85 +840,85 @@ for(var r=n.value,o=n.primaryKey,s=Object.keys(r._attachments||{}),u={},a=0;a<s.
|
|
|
840
840
|
function c(e){
|
|
841
841
|
// ensure that every metadata has a winningRev and seq,
|
|
842
842
|
// which was previously created on-the-fly but better to migrate
|
|
843
|
-
var t=e.objectStore(
|
|
843
|
+
var t=e.objectStore(Lt),n=e.objectStore(Dt);n.openCursor().onsuccess=function(e){var r=e.target.result;if(r){var i=function(e){return e.data?Vt(e):(
|
|
844
844
|
// old format, when we didn't store it stringified
|
|
845
|
-
e.deleted="1"===e.deletedOrLocal,e)}(r.value);if(i.winningRev=i.winningRev||
|
|
845
|
+
e.deleted="1"===e.deletedOrLocal,e)}(r.value);if(i.winningRev=i.winningRev||xe(i),i.seq)return o();!function(){
|
|
846
846
|
// metadata.seq was added post-3.2.0, so if it's missing,
|
|
847
847
|
// we need to fetch it manually
|
|
848
|
-
var e=i.id+"::",n=i.id+"::",r=t.index("_doc_id_rev").openCursor(IDBKeyRange.bound(e,n)),s=0;r.onsuccess=function(e){var t=e.target.result;if(!t)return i.seq=s,o();var n=t.primaryKey;n>s&&(s=n),t.continue()}}()}function o(){var e=
|
|
848
|
+
var e=i.id+"::",n=i.id+"::",r=t.index("_doc_id_rev").openCursor(IDBKeyRange.bound(e,n)),s=0;r.onsuccess=function(e){var t=e.target.result;if(!t)return i.seq=s,o();var n=t.primaryKey;n>s&&(s=n),t.continue()}}()}function o(){var e=Jt(i,i.winningRev,i.deleted);n.put(e).onsuccess=function(){r.continue()}}}}e._meta=null,e._remote=!1,e.type=function(){return"idb"},e._id=j((function(t){t(null,e._meta.instanceId)})),e._bulkDocs=function(n,r,o){Zt(t,n,r,e,i,o)},
|
|
849
849
|
// First we look up the metadata in the ids database, then we fetch the
|
|
850
850
|
// current revision(s) from the by sequence store
|
|
851
|
-
e._get=function(e,t,n){var r,o,s,u=t.ctx;if(!u){var a=
|
|
851
|
+
e._get=function(e,t,n){var r,o,s,u=t.ctx;if(!u){var a=Ht(i,[Dt,Lt,It],"readonly");if(a.error)return n(a.error);u=a.txn}function c(){n(s,{doc:r,metadata:o,ctx:u})}u.objectStore(Dt).get(e).onsuccess=function(e){
|
|
852
852
|
// we can determine the result here if:
|
|
853
853
|
// 1. there is no such document
|
|
854
854
|
// 2. the document is deleted and we don't ask about specific rev
|
|
855
855
|
// When we ask with opts.rev we expect the answer to be either
|
|
856
856
|
// doc (possibly with _deleted=true) or missing error
|
|
857
|
-
if(!(o=
|
|
857
|
+
if(!(o=Vt(e.target.result)))return s=H(I,"missing"),c();var n;if(t.rev)n=t.latest?function(e,t){for(var n,r=t.rev_tree.slice();n=r.pop();){var i=n.pos,o=n.ids,s=o[0],u=o[1],a=o[2],c=0===a.length,f=n.history?n.history.slice():[];if(f.push({id:s,pos:i,opts:u}),c)for(var l=0,d=f.length;l<d;l++){var h=f[l];if(h.pos+"-"+h.id===e)
|
|
858
858
|
// return the rev of this leaf
|
|
859
859
|
return i+"-"+s}for(var p=0,v=a.length;p<v;p++)r.push({pos:i+1,ids:a[p],history:f})}
|
|
860
|
-
/* istanbul ignore next */throw new Error("Unable to resolve latest revision for id "+t.id+", rev "+e)}(t.rev,o):t.rev;else if(n=o.winningRev,
|
|
860
|
+
/* istanbul ignore next */throw new Error("Unable to resolve latest revision for id "+t.id+", rev "+e)}(t.rev,o):t.rev;else if(n=o.winningRev,Ue(o))return s=H(I,"deleted"),c();var i=u.objectStore(Lt),a=o.id+"::"+n;i.index("_doc_id_rev").get(a).onsuccess=function(e){if((r=e.target.result)&&(r=zt(r)),!r)return s=H(I,"missing"),c();c()}}},e._getAttachment=function(e,t,n,r,o){var s;if(r.ctx)s=r.ctx;else{var u=Ht(i,[Dt,Lt,It],"readonly");if(u.error)return o(u.error);s=u.txn}var a=n.digest,c=n.content_type;s.objectStore(It).get(a).onsuccess=function(e){Gt(e.target.result.body,c,r.binary,(function(e){o(null,e)}))}},e._info=function(t){var n,r,o=Ht(i,[Mt,Lt],"readonly");if(o.error)return t(o.error);var s=o.txn;s.objectStore(Mt).get(Mt).onsuccess=function(e){r=e.target.result.docCount},s.objectStore(Lt).openCursor(null,"prev").onsuccess=function(e){var t=e.target.result;n=t?t.key:0},s.oncomplete=function(){t(null,{doc_count:r,update_seq:n,
|
|
861
861
|
// for debugging
|
|
862
|
-
idb_attachment_format:e._meta.blobSupport?"binary":"base64"})}},e._allDocs=function(e,t){
|
|
862
|
+
idb_attachment_format:e._meta.blobSupport?"binary":"base64"})}},e._allDocs=function(e,t){tn(e,i,t)},e._changes=function(t){return sn(t,e,r,i)},e._close=function(e){
|
|
863
863
|
// https://developer.mozilla.org/en-US/docs/IndexedDB/IDBDatabase#close
|
|
864
864
|
// "Returns immediately and closes the connection in a separate thread..."
|
|
865
|
-
i.close(),
|
|
865
|
+
i.close(),an.delete(r),e()},e._getRevisionTree=function(e,t){var n=Ht(i,[Dt],"readonly");if(n.error)return t(n.error);n.txn.objectStore(Dt).get(e).onsuccess=function(e){var n=Vt(e.target.result);n?t(null,n.rev_tree):t(H(I))}},
|
|
866
866
|
// This function removes revisions of document docId
|
|
867
867
|
// which are listed in revs and sets this document
|
|
868
868
|
// revision to to rev_tree
|
|
869
|
-
e._doCompaction=function(e,t,n){var r=
|
|
870
|
-
t(null,n)):t(
|
|
871
|
-
var r=e._rev,o=e._id;e._rev=r?"0-"+(parseInt(r.split("-")[1],10)+1):"0-1";var s,u=t.ctx;if(!u){var a=
|
|
872
|
-
n(null,s)}:n(
|
|
869
|
+
e._doCompaction=function(e,t,n){var r=Ht(i,[Dt,Lt,It,Rt],"readwrite");if(r.error)return n(r.error);var o=r.txn;o.objectStore(Dt).get(e).onsuccess=function(n){var r=Vt(n.target.result);qe(r.rev_tree,(function(e,n,r,i,o){var s=n+"-"+r;-1!==t.indexOf(s)&&(o.status="missing")})),Yt(t,e,o);var i=r.winningRev,s=r.deleted;o.objectStore(Dt).put(Jt(r,i,s))},o.onabort=Ft(n),o.oncomplete=function(){n()}},e._getLocal=function(e,t){var n=Ht(i,[Nt],"readonly");if(n.error)return t(n.error);var r=n.txn.objectStore(Nt).get(e);r.onerror=Ft(t),r.onsuccess=function(e){var n=e.target.result;n?(delete n._doc_id_rev,// for backwards compat
|
|
870
|
+
t(null,n)):t(H(I))}},e._putLocal=function(e,t,n){"function"==typeof t&&(n=t,t={}),delete e._revisions;// ignore this, trust the rev
|
|
871
|
+
var r=e._rev,o=e._id;e._rev=r?"0-"+(parseInt(r.split("-")[1],10)+1):"0-1";var s,u=t.ctx;if(!u){var a=Ht(i,[Nt],"readwrite");if(a.error)return n(a.error);(u=a.txn).onerror=Ft(n),u.oncomplete=function(){s&&n(null,s)}}var c,f=u.objectStore(Nt);r?(c=f.get(o)).onsuccess=function(i){var o=i.target.result;o&&o._rev===r?f.put(e).onsuccess=function(){s={ok:!0,id:e._id,rev:e._rev},t.ctx&&// return immediately
|
|
872
|
+
n(null,s)}:n(H(R))}:(// new doc
|
|
873
873
|
(c=f.add(e)).onerror=function(e){
|
|
874
874
|
// constraint error, already exists
|
|
875
|
-
n(
|
|
875
|
+
n(H(R)),e.preventDefault(),// avoid transaction abort
|
|
876
876
|
e.stopPropagation()},c.onsuccess=function(){s={ok:!0,id:e._id,rev:e._rev},t.ctx&&// return immediately
|
|
877
|
-
n(null,s)})},e._removeLocal=function(e,t,n){"function"==typeof t&&(n=t,t={});var r,o=t.ctx;if(!o){var s=
|
|
878
|
-
n(null,r)):n(
|
|
877
|
+
n(null,s)})},e._removeLocal=function(e,t,n){"function"==typeof t&&(n=t,t={});var r,o=t.ctx;if(!o){var s=Ht(i,[Nt],"readwrite");if(s.error)return n(s.error);(o=s.txn).oncomplete=function(){r&&n(null,r)}}var u=e._id,a=o.objectStore(Nt),c=a.get(u);c.onerror=Ft(n),c.onsuccess=function(i){var o=i.target.result;o&&o._rev===e._rev?(a.delete(u),r={ok:!0,id:u,rev:"0-0"},t.ctx&&// return immediately
|
|
878
|
+
n(null,r)):n(H(I))}},e._destroy=function(e,t){Xt.removeAllListeners(r);
|
|
879
879
|
//Close open request for "dbName" database to fix ie delay.
|
|
880
|
-
var n=
|
|
880
|
+
var n=cn.get(r);n&&n.result&&(n.result.close(),an.delete(r));var i=indexedDB.deleteDatabase(r);i.onsuccess=function(){
|
|
881
881
|
//Remove open request from the list.
|
|
882
|
-
|
|
882
|
+
cn.delete(r),q()&&r in localStorage&&delete localStorage[r],t(null,{ok:!0})},i.onerror=Ft(t)};var f=an.get(r);if(f)return i=f.idb,e._meta=f.global,s((function(){n(null,e)}));var l=indexedDB.open(r,5);cn.set(r,l),l.onupgradeneeded=function(e){var t=e.target.result;if(e.oldVersion<1)return function(e){var t=e.createObjectStore(Dt,{keyPath:"id"});e.createObjectStore(Lt,{autoIncrement:!0}).createIndex("_doc_id_rev","_doc_id_rev",{unique:!0}),e.createObjectStore(It,{keyPath:"digest"}),e.createObjectStore(Mt,{keyPath:"id",autoIncrement:!1}),e.createObjectStore(Kt),
|
|
883
883
|
// added in v2
|
|
884
884
|
t.createIndex("deletedOrLocal","deletedOrLocal",{unique:!1}),
|
|
885
885
|
// added in v3
|
|
886
|
-
e.createObjectStore(
|
|
886
|
+
e.createObjectStore(Nt,{keyPath:"_id"});
|
|
887
887
|
// added in v4
|
|
888
|
-
var n=e.createObjectStore(
|
|
888
|
+
var n=e.createObjectStore(Rt,{autoIncrement:!0});n.createIndex("seq","seq"),n.createIndex("digestSeq","digestSeq",{unique:!0})}(t);// new db, initial schema
|
|
889
889
|
// do migrations
|
|
890
890
|
var n=e.currentTarget.transaction;
|
|
891
891
|
// these migrations have to be done in this function, before
|
|
892
892
|
// control is returned to the event loop, because IndexedDB
|
|
893
|
-
e.oldVersion<3&&function(e){e.createObjectStore(
|
|
893
|
+
e.oldVersion<3&&function(e){e.createObjectStore(Nt,{keyPath:"_id"}).createIndex("_doc_id_rev","_doc_id_rev",{unique:!0})}(t),e.oldVersion<4&&function(e){var t=e.createObjectStore(Rt,{autoIncrement:!0});t.createIndex("seq","seq"),t.createIndex("digestSeq","digestSeq",{unique:!0})}(t);var r=[o,// v1 -> v2
|
|
894
894
|
u,// v2 -> v3
|
|
895
895
|
a,// v3 -> v4
|
|
896
|
-
c],i=e.oldVersion;!function e(){var t=r[i-1];i++,t&&t(n,e)}()},l.onsuccess=function(t){(i=t.target.result).onversionchange=function(){i.close(),
|
|
896
|
+
c],i=e.oldVersion;!function e(){var t=r[i-1];i++,t&&t(n,e)}()},l.onsuccess=function(t){(i=t.target.result).onversionchange=function(){i.close(),an.delete(r)},i.onabort=function(e){C("error","Database has a global failure",e.target.error),i.close(),an.delete(r)};
|
|
897
897
|
// Do a few setup operations (in parallel as much as possible):
|
|
898
898
|
// 1. Fetch meta doc
|
|
899
899
|
// 2. Check blob support
|
|
900
900
|
// 3. Calculate docCount
|
|
901
901
|
// 4. Generate an instanceId if necessary
|
|
902
902
|
// 5. Store docCount and instanceId on meta doc
|
|
903
|
-
var o,s,u,a,c=i.transaction([
|
|
903
|
+
var o,s,u,a,c=i.transaction([Mt,Kt,Dt],"readwrite"),f=!1;function l(){void 0!==u&&f&&(e._meta={name:r,instanceId:a,blobSupport:u},an.set(r,{idb:i,global:e._meta}),n(null,e))}function d(){if(void 0!==s&&void 0!==o){var e=r+"_id";e in o?a=o[e]:o[e]=a=Ae(),o.docCount=s,c.objectStore(Mt).put(o)}}
|
|
904
904
|
// fetch or generate the instanceId
|
|
905
|
-
c.objectStore(
|
|
905
|
+
c.objectStore(Mt).get(Mt).onsuccess=function(e){o=e.target.result||{id:Mt},d()},
|
|
906
906
|
// countDocs
|
|
907
|
-
function(e,t){e.objectStore(
|
|
907
|
+
function(e,t){e.objectStore(Dt).index("deletedOrLocal").count(IDBKeyRange.only("0")).onsuccess=function(e){!function(e){s=e,d()}(e.target.result)}}(c),
|
|
908
908
|
// check blob support
|
|
909
|
-
|
|
909
|
+
un||(
|
|
910
910
|
// make sure blob support is only checked once
|
|
911
|
-
|
|
911
|
+
un=function(e){return new Promise((function(t){var n=pe([""]),r=e.objectStore(Kt).put(n,"key");r.onsuccess=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);
|
|
912
912
|
// MS Edge pretends to be Chrome 42:
|
|
913
913
|
// https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx
|
|
914
914
|
t(n||!e||parseInt(e[1],10)>=43)},r.onerror=e.onabort=function(e){
|
|
915
915
|
// If the transaction aborts now its due to not being able to
|
|
916
916
|
// write to the database, likely due to the disk being full
|
|
917
917
|
e.preventDefault(),e.stopPropagation(),t(!1)}})).catch((function(){return!1;// error, so assume unsupported
|
|
918
|
-
}))}(c)),
|
|
918
|
+
}))}(c)),un.then((function(e){u=e,l()})),
|
|
919
919
|
// only when the metadata put transaction has completed,
|
|
920
920
|
// consider the setup done
|
|
921
|
-
c.oncomplete=function(){f=!0,l()},c.onabort=
|
|
921
|
+
c.oncomplete=function(){f=!0,l()},c.onabort=Ft(n)},l.onerror=function(e){var t=e.target.error&&e.target.error.message;t?-1!==t.indexOf("stored database is a higher version")&&(t=new Error('This DB was created with the newer "indexeddb" adapter, but you are trying to open it with the older "idb" adapter')):t="Failed to open indexedDB, are you in private browsing mode?",C("error",t),n(H(Q,t))}}(n,e,t)}),t,n.constructor)}fn.valid=function(){
|
|
922
922
|
// Following #7085 buggy idb versions (typically Safari < 10.1) are
|
|
923
923
|
// considered valid.
|
|
924
924
|
// On Firefox SecurityError is thrown while referencing indexedDB if cookies
|
|
@@ -926,40 +926,40 @@ c.oncomplete=function(){f=!0,l()},c.onabort=Ut(n)},l.onerror=function(e){var t=e
|
|
|
926
926
|
try{
|
|
927
927
|
// some outdated implementations of IDB that appear on Samsung
|
|
928
928
|
// and HTC Android devices <4.4 are missing IDBKeyRange
|
|
929
|
-
return"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}};var
|
|
929
|
+
return"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}};var ln=5e3,dn={};function hn(e){var t=e.doc||e.ok,n=t&&t._attachments;n&&Object.keys(n).forEach((function(e){var t=n[e];t.data=ge(t.data,t.content_type)}))}function pn(e){return/^_design/.test(e)?"_design/"+encodeURIComponent(e.slice(8)):/^_local/.test(e)?"_local/"+encodeURIComponent(e.slice(7)):encodeURIComponent(e)}function vn(e){return e._attachments&&Object.keys(e._attachments)?Promise.all(Object.keys(e._attachments).map((function(t){var n=e._attachments[t];if(n.data&&"string"!=typeof n.data)return new Promise((function(e){be(n.data,e)})).then((function(e){n.data=e}))}))):Promise.resolve()}
|
|
930
930
|
// Get all the information you possibly can about the URI given by name and
|
|
931
931
|
// return it as a suitable object.
|
|
932
932
|
// Generate a URL with the host data given by opts and the given path
|
|
933
|
-
function
|
|
933
|
+
function yn(e,t){return gn(e,e.db+"/"+t)}
|
|
934
934
|
// Generate a URL with the host data given by opts and the given path
|
|
935
|
-
function
|
|
935
|
+
function gn(e,t){
|
|
936
936
|
// If the host already has a path, then we need to have a path delimiter
|
|
937
937
|
// Otherwise, the path delimiter is the empty string
|
|
938
938
|
var n=e.path?"/":"";
|
|
939
939
|
// If the host already has a path, then we need to have a path delimiter
|
|
940
940
|
// Otherwise, the path delimiter is the empty string
|
|
941
|
-
return e.protocol+"://"+e.host+(e.port?":"+e.port:"")+"/"+e.path+n+t}function
|
|
941
|
+
return e.protocol+"://"+e.host+(e.port?":"+e.port:"")+"/"+e.path+n+t}function _n(e){return"?"+Object.keys(e).map((function(t){return t+"="+encodeURIComponent(e[t])})).join("&")}
|
|
942
942
|
// Implements the PouchDB API for dealing with CouchDB instances over HTTP
|
|
943
|
-
function
|
|
943
|
+
function mn(e,t){
|
|
944
944
|
// The functions that will be publicly available for HttpPouch
|
|
945
945
|
var r=this,i=function(e,t){
|
|
946
946
|
// encode db name if opts.prefix is a url (#5574)
|
|
947
|
-
if(function(e){if(!e.prefix)return!1;var t=
|
|
947
|
+
if(function(e){if(!e.prefix)return!1;var t=ce(e.prefix).protocol;return"http"===t||"https"===t}(t)){var n=t.name.substr(t.prefix.length);
|
|
948
948
|
// Ensure prefix has a trailing slash
|
|
949
|
-
e=t.prefix.replace(/\/?$/,"/")+encodeURIComponent(n)}var r=
|
|
949
|
+
e=t.prefix.replace(/\/?$/,"/")+encodeURIComponent(n)}var r=ce(e);(r.user||r.password)&&(r.auth={username:r.user,password:r.password});
|
|
950
950
|
// Split the path part of the URI into parts using '/' as the delimiter
|
|
951
951
|
// after removing any leading '/' and any trailing '/'
|
|
952
952
|
var i=r.path.replace(/(^\/|\/$)/g,"").split("/");return r.db=i.pop(),
|
|
953
953
|
// Prevent double encoding of URI component
|
|
954
|
-
-1===r.db.indexOf("%")&&(r.db=encodeURIComponent(r.db)),r.path=i.join("/"),r}(e.name,e),o=
|
|
954
|
+
-1===r.db.indexOf("%")&&(r.db=encodeURIComponent(r.db)),r.path=i.join("/"),r}(e.name,e),o=yn(i,"");e=w(e);var u,a=function(t,n){if((n=n||{}).headers=n.headers||new tt,n.credentials="include",e.auth||i.auth){var r=e.auth||i.auth,o=r.username+":"+r.password,s=he(unescape(encodeURIComponent(o)));n.headers.set("Authorization","Basic "+s)}var u=e.headers||{};return Object.keys(u).forEach((function(e){n.headers.append(e,u[e])})),
|
|
955
955
|
/* istanbul ignore if */
|
|
956
|
-
function(e){var t="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",n=-1!==t.indexOf("msie"),r=-1!==t.indexOf("trident"),i=-1!==t.indexOf("edge"),o=!("method"in e)||"GET"===e.method;return(n||r||i)&&o}(n)&&(t+=(-1===t.indexOf("?")?"?":"&")+"_nonce="+Date.now()),(e.fetch||
|
|
956
|
+
function(e){var t="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",n=-1!==t.indexOf("msie"),r=-1!==t.indexOf("trident"),i=-1!==t.indexOf("edge"),o=!("method"in e)||"GET"===e.method;return(n||r||i)&&o}(n)&&(t+=(-1===t.indexOf("?")?"?":"&")+"_nonce="+Date.now()),(e.fetch||et)(t,n)};function c(e,t){return O(e,f((function(e){d().then((function(){return t.apply(this,e)})).catch((function(t){e.pop()(t)}))}))).bind(r)}function l(e,t,n){var r={};return(t=t||{}).headers=t.headers||new tt,t.headers.get("Content-Type")||t.headers.set("Content-Type","application/json"),t.headers.get("Accept")||t.headers.set("Accept","application/json"),a(e,t).then((function(e){return r.ok=e.ok,r.status=e.status,e.json()})).then((function(e){if(r.data=e,!r.ok){r.data.status=r.status;var t=X(r.data);if(n)return n(t);throw t}if(Array.isArray(r.data)&&(r.data=r.data.map((function(e){return e.error||e.missing?X(e):e}))),!n)return r;n(null,r.data)}))}function d(){return e.skip_setup?Promise.resolve():
|
|
957
957
|
// If there is a setup in process or previous successful setup
|
|
958
958
|
// done then we will use that
|
|
959
959
|
// If previous setups have been rejected we will try again
|
|
960
960
|
u||((u=l(o).catch((function(e){return e&&e.status&&404===e.status?(
|
|
961
961
|
// Doesnt exist, create it
|
|
962
|
-
|
|
962
|
+
$(404,"PouchDB is just detecting if the remote exists."),l(o,{method:"PUT"})):Promise.reject(e)})).catch((function(e){
|
|
963
963
|
// If we try to create a database that already exists, skipped in
|
|
964
964
|
// istanbul since its catching a race condition.
|
|
965
965
|
/* istanbul ignore if */
|
|
@@ -967,33 +967,33 @@ return!(!e||!e.status||412!==e.status)||Promise.reject(e)}))).catch((function(){
|
|
|
967
967
|
// Get the attachment
|
|
968
968
|
s((function(){t(null,r)})),r._remote=!0,
|
|
969
969
|
/* istanbul ignore next */
|
|
970
|
-
r.type=function(){return"http"},r.id=c("id",(function(e){a(
|
|
970
|
+
r.type=function(){return"http"},r.id=c("id",(function(e){a(gn(i,"")).then((function(e){return e.json()})).catch((function(){return{}})).then((function(t){
|
|
971
971
|
// Bad response or missing `uuid` should not prevent ID generation.
|
|
972
|
-
var n=t&&t.uuid?t.uuid+i.db:
|
|
972
|
+
var n=t&&t.uuid?t.uuid+i.db:yn(i,"");e(null,n)}))})),
|
|
973
973
|
// Sends a POST request to the host calling the couchdb _compact function
|
|
974
974
|
// version: The version of CouchDB it is running
|
|
975
|
-
r.compact=c("compact",(function(e,t){"function"==typeof e&&(t=e,e={}),e=
|
|
975
|
+
r.compact=c("compact",(function(e,t){"function"==typeof e&&(t=e,e={}),e=w(e),l(yn(i,"_compact"),{method:"POST"}).then((function(){
|
|
976
976
|
// Ping the http if it's finished compaction
|
|
977
977
|
!function n(){r.info((function(r,i){
|
|
978
978
|
// CouchDB may send a "compact_running:true" if it's
|
|
979
979
|
// already compacting. PouchDB Server doesn't.
|
|
980
980
|
/* istanbul ignore else */
|
|
981
|
-
i&&!i.compact_running?t(null,{ok:!0}):setTimeout(n,e.interval||200)}))}()}))})),r.bulkGet=
|
|
982
|
-
/* istanbul ignore next */n.attachments=!0),e.latest&&(n.latest=!0),l(
|
|
981
|
+
i&&!i.compact_running?t(null,{ok:!0}):setTimeout(n,e.interval||200)}))}()}))})),r.bulkGet=O("bulkGet",(function(e,t){var n=this;function r(t){var n={};e.revs&&(n.revs=!0),e.attachments&&(
|
|
982
|
+
/* istanbul ignore next */n.attachments=!0),e.latest&&(n.latest=!0),l(yn(i,"_bulk_get"+_n(n)),{method:"POST",body:JSON.stringify({docs:e.docs})}).then((function(n){e.attachments&&e.binary&&n.data.results.forEach((function(e){e.docs.forEach(hn)})),t(null,n.data)})).catch(t)}
|
|
983
983
|
/* istanbul ignore next */function o(){
|
|
984
984
|
// avoid "url too long error" by splitting up into multiple requests
|
|
985
985
|
var r=Math.ceil(e.docs.length/50),i=0,o=new Array(r);function s(e){return function(n,s){
|
|
986
986
|
// err is impossible because shim returns a list of errs in that case
|
|
987
|
-
o[e]=s.results,++i===r&&t(null,{results:
|
|
987
|
+
o[e]=s.results,++i===r&&t(null,{results:ee(o)})}}for(var u=0;u<r;u++){var a=S(e,["revs","attachments","binary","latest"]);a.docs=e.docs.slice(50*u,Math.min(e.docs.length,50*(u+1))),x(n,a,s(u))}}
|
|
988
988
|
// mark the whole database as either supporting or not supporting _bulk_get
|
|
989
|
-
var s=
|
|
989
|
+
var s=gn(i,""),u=dn[s];
|
|
990
990
|
/* istanbul ignore next */"boolean"!=typeof u?
|
|
991
991
|
// check if this database supports _bulk_get
|
|
992
|
-
r((function(e,n){e?(
|
|
992
|
+
r((function(e,n){e?(dn[s]=!1,$(e.status,"PouchDB is just detecting if the remote supports the _bulk_get API."),o()):(dn[s]=!0,t(null,n))})):u?r(t):o()})),
|
|
993
993
|
// Calls GET on the host, which gets back a JSON string containing
|
|
994
994
|
// couchdb: A welcome string
|
|
995
995
|
// version: The version of CouchDB it is running
|
|
996
|
-
r._info=function(e){d().then((function(){return a(
|
|
996
|
+
r._info=function(e){d().then((function(){return a(yn(i,""))})).then((function(e){return e.json()})).then((function(t){t.host=yn(i,""),e(null,t)})).catch(e)},r.fetch=function(e,t){return d().then((function(){var n="/"===e.substring(0,1)?gn(i,e.substring(1)):yn(i,e);return a(n,t)}))},
|
|
997
997
|
// Get the document with the given id from the database given by host.
|
|
998
998
|
// The id could be solely the _id in the database, or it may be a
|
|
999
999
|
// _design/ID or _local/ID path
|
|
@@ -1014,45 +1014,45 @@ r?n(r):t():l()}function c(){i--,a()}
|
|
|
1014
1014
|
// Sync Gateway would normally send it back as multipart/mixed,
|
|
1015
1015
|
// which we cannot parse. Also, this is more efficient than
|
|
1016
1016
|
// receiving attachments as base64-encoded strings.
|
|
1017
|
-
return function(r){var o=n[r],s=
|
|
1018
|
-
/* istanbul ignore if */),t.update_seq&&(r.update_seq=t.update_seq),e=
|
|
1017
|
+
return function(r){var o=n[r],s=pn(e._id)+"/"+h(r)+"?rev="+e._rev;return a(yn(i,s)).then((function(e){return"buffer"in e?e.buffer():e.blob()})).then((function(e){if(t.binary){var n=Object.getOwnPropertyDescriptor(e.__proto__,"type");return n&&!n.set||(e.type=o.content_type),e}return new Promise((function(t){be(e,t)}))})).then((function(e){delete o.stub,delete o.length,o.data=e}))}(r)}})))}(t=w(t)).revs&&(r.revs=!0),t.revs_info&&(r.revs_info=!0),t.latest&&(r.latest=!0),t.open_revs&&("all"!==t.open_revs&&(t.open_revs=JSON.stringify(t.open_revs)),r.open_revs=t.open_revs),t.rev&&(r.rev=t.rev),t.conflicts&&(r.conflicts=t.conflicts
|
|
1018
|
+
/* istanbul ignore if */),t.update_seq&&(r.update_seq=t.update_seq),e=pn(e),l(yn(i,e+_n(r))).then((function(e){return Promise.resolve().then((function(){if(t.attachments)return n=e.data,Array.isArray(n)?Promise.all(n.map((function(e){if(e.ok)return o(e.ok)}))):o(n);var n})).then((function(){n(null,e.data)}))})).catch((function(t){t.docId=e,n(t)}))})),
|
|
1019
1019
|
// Delete the document given by doc from the database given by host.
|
|
1020
1020
|
r.remove=c("remove",(function(e,t,n,r){var o;"string"==typeof t?(
|
|
1021
1021
|
// id, rev, opts, callback style
|
|
1022
1022
|
o={_id:e,_rev:t},"function"==typeof n&&(r=n,n={})):(
|
|
1023
1023
|
// doc, opts, callback style
|
|
1024
|
-
o=e,"function"==typeof t?(r=t,n={}):(r=n,n=t));var s=o._rev||n.rev;l(
|
|
1024
|
+
o=e,"function"==typeof t?(r=t,n={}):(r=n,n=t));var s=o._rev||n.rev;l(yn(i,pn(o._id))+"?rev="+s,{method:"DELETE"},r).catch(r)})),r.getAttachment=c("getAttachment",(function(e,t,r,o){"function"==typeof r&&(o=r,r={});var s,u=r.rev?"?rev="+r.rev:"",c=yn(i,pn(e))+"/"+h(t)+u;a(c,{method:"GET"}).then((function(e){if(s=e.headers.get("content-type"),e.ok)return void 0===n||n.browser||"function"!=typeof e.buffer?e.blob():e.buffer();throw e})).then((function(e){
|
|
1025
1025
|
// TODO: also remove
|
|
1026
1026
|
void 0===n||n.browser||(e.type=s),o(null,e)})).catch((function(e){o(e)}))})),
|
|
1027
1027
|
// Remove the attachment given by the id and rev
|
|
1028
|
-
r.removeAttachment=c("removeAttachment",(function(e,t,n,r){l(
|
|
1028
|
+
r.removeAttachment=c("removeAttachment",(function(e,t,n,r){l(yn(i,pn(e)+"/"+h(t))+"?rev="+n,{method:"DELETE"},r).catch(r)})),
|
|
1029
1029
|
// Add the attachment given by blob and its contentType property
|
|
1030
1030
|
// to the document with the given id, the revision given by rev, and
|
|
1031
1031
|
// add it to the database given by host.
|
|
1032
|
-
r.putAttachment=c("putAttachment",(function(e,t,n,r,o,s){"function"==typeof o&&(s=o,o=r,r=n,n=null);var u=
|
|
1032
|
+
r.putAttachment=c("putAttachment",(function(e,t,n,r,o,s){"function"==typeof o&&(s=o,o=r,r=n,n=null);var u=pn(e)+"/"+h(t),a=yn(i,u);if(n&&(a+="?rev="+n),"string"==typeof r){
|
|
1033
1033
|
// input is assumed to be a base64 string
|
|
1034
|
-
var c;try{c=
|
|
1034
|
+
var c;try{c=de(r)}catch(e){return s(H(F,"Attachment is not a valid base64 string"))}r=c?ye(c,o):""}
|
|
1035
1035
|
// Add the attachment
|
|
1036
|
-
l(a,{headers:new
|
|
1036
|
+
l(a,{headers:new tt({"Content-Type":o}),method:"PUT",body:r},s).catch(s)})),
|
|
1037
1037
|
// Update/create multiple documents given by req in the database
|
|
1038
1038
|
// given by host.
|
|
1039
1039
|
r._bulkDocs=function(e,t,n){
|
|
1040
1040
|
// If new_edits=false then it prevents the database from creating
|
|
1041
1041
|
// new revision numbers for the documents. Instead it just uses
|
|
1042
1042
|
// the old ones. This is used in database replication.
|
|
1043
|
-
e.new_edits=t.new_edits,d().then((function(){return Promise.all(e.docs.map(
|
|
1043
|
+
e.new_edits=t.new_edits,d().then((function(){return Promise.all(e.docs.map(vn))})).then((function(){
|
|
1044
1044
|
// Update/create the documents
|
|
1045
|
-
return l(
|
|
1045
|
+
return l(yn(i,"_bulk_docs"),{method:"POST",body:JSON.stringify(e)},n)})).catch(n)},
|
|
1046
1046
|
// Update/create document
|
|
1047
|
-
r._put=function(e,t,n){d().then((function(){return
|
|
1047
|
+
r._put=function(e,t,n){d().then((function(){return vn(e)})).then((function(){return l(yn(i,pn(e._id)),{method:"PUT",body:JSON.stringify(e)})})).then((function(e){n(null,e.data)})).catch((function(t){t.docId=e&&e._id,n(t)}))},
|
|
1048
1048
|
// Get a listing of the documents in the database given
|
|
1049
1049
|
// by host and ordered by increasing id.
|
|
1050
1050
|
r.allDocs=c("allDocs",(function(e,t){"function"==typeof e&&(t=e,e={});
|
|
1051
1051
|
// List of parameters to add to the GET request
|
|
1052
|
-
var n,r={},o="GET";(e=
|
|
1052
|
+
var n,r={},o="GET";(e=w(e)).conflicts&&(r.conflicts=!0
|
|
1053
1053
|
/* istanbul ignore if */),e.update_seq&&(r.update_seq=!0),e.descending&&(r.descending=!0),e.include_docs&&(r.include_docs=!0),
|
|
1054
1054
|
// added in CouchDB 1.6.0
|
|
1055
|
-
e.attachments&&(r.attachments=!0),e.key&&(r.key=JSON.stringify(e.key)),e.start_key&&(e.startkey=e.start_key),e.startkey&&(r.startkey=JSON.stringify(e.startkey)),e.end_key&&(e.endkey=e.end_key),e.endkey&&(r.endkey=JSON.stringify(e.endkey)),void 0!==e.inclusive_end&&(r.inclusive_end=!!e.inclusive_end),void 0!==e.limit&&(r.limit=e.limit),void 0!==e.skip&&(r.skip=e.skip);var s=
|
|
1055
|
+
e.attachments&&(r.attachments=!0),e.key&&(r.key=JSON.stringify(e.key)),e.start_key&&(e.startkey=e.start_key),e.startkey&&(r.startkey=JSON.stringify(e.startkey)),e.end_key&&(e.endkey=e.end_key),e.endkey&&(r.endkey=JSON.stringify(e.endkey)),void 0!==e.inclusive_end&&(r.inclusive_end=!!e.inclusive_end),void 0!==e.limit&&(r.limit=e.limit),void 0!==e.skip&&(r.skip=e.skip);var s=_n(r);void 0!==e.keys&&(o="POST",n={keys:e.keys}),l(yn(i,"_all_docs"+s),{method:o,body:JSON.stringify(n)}).then((function(n){e.include_docs&&e.attachments&&e.binary&&n.data.rows.forEach(hn),t(null,n.data)})).catch(t)})),
|
|
1056
1056
|
// Get a list of changes made to documents in the database given by host.
|
|
1057
1057
|
// TODO According to the README, there should be two other methods here,
|
|
1058
1058
|
// api.changes.addListener and api.changes.removeListener.
|
|
@@ -1061,10 +1061,10 @@ r._changes=function(e){
|
|
|
1061
1061
|
// if there is a large set of changes to be returned we can start
|
|
1062
1062
|
// processing them quicker instead of waiting on the entire
|
|
1063
1063
|
// set of changes to return and attempting to process them at once
|
|
1064
|
-
var t="batch_size"in e?e.batch_size:25;(e=
|
|
1064
|
+
var t="batch_size"in e?e.batch_size:25;(e=w(e)).continuous&&!("heartbeat"in e)&&(e.heartbeat=1e4);var n="timeout"in e?e.timeout:3e4;
|
|
1065
1065
|
// ensure CHANGES_TIMEOUT_BUFFER applies
|
|
1066
|
-
"timeout"in e&&e.timeout&&n-e.timeout<
|
|
1067
|
-
/* istanbul ignore if */),"heartbeat"in e&&e.heartbeat&&n-e.heartbeat<
|
|
1066
|
+
"timeout"in e&&e.timeout&&n-e.timeout<ln&&(n=e.timeout+ln
|
|
1067
|
+
/* istanbul ignore if */),"heartbeat"in e&&e.heartbeat&&n-e.heartbeat<ln&&(n=e.heartbeat+ln);var r={};"timeout"in e&&e.timeout&&(r.timeout=e.timeout);var o=void 0!==e.limit&&e.limit,u=o;
|
|
1068
1068
|
// If opts.query_params exists, pass it through to the changes request.
|
|
1069
1069
|
// These parameters may be used by the filter on the source database.
|
|
1070
1070
|
if(e.style&&(r.style=e.style),(e.include_docs||e.filter&&"function"==typeof e.filter)&&(r.include_docs=!0),e.attachments&&(r.attachments=!0),e.continuous&&(r.feed="longpoll"),e.seq_interval&&(r.seq_interval=e.seq_interval),e.conflicts&&(r.conflicts=!0),e.descending&&(r.descending=!0
|
|
@@ -1075,12 +1075,12 @@ e.query_params.hasOwnProperty(a)&&(r[a]=e.query_params[a]);var c,f="GET";e.doc_i
|
|
|
1075
1075
|
// requires both a "filter" and a "doc_ids" param.
|
|
1076
1076
|
r.filter="_doc_ids",f="POST",c={doc_ids:e.doc_ids}):e.selector&&(
|
|
1077
1077
|
// set this automagically for the user, similar to above
|
|
1078
|
-
r.filter="_selector",f="POST",c={selector:e.selector});var h,p=new
|
|
1078
|
+
r.filter="_selector",f="POST",c={selector:e.selector});var h,p=new Ze,v=function(n,s){if(!e.aborted){r.since=n,
|
|
1079
1079
|
// "since" can be any kind of json object in Cloudant/CouchDB 2.x
|
|
1080
1080
|
/* istanbul ignore next */
|
|
1081
1081
|
"object"==typeof r.since&&(r.since=JSON.stringify(r.since)),e.descending?o&&(r.limit=u):r.limit=!o||u>t?t:u;
|
|
1082
1082
|
// Set the options for the ajax call
|
|
1083
|
-
var a=
|
|
1083
|
+
var a=yn(i,"_changes"+_n(r)),v={signal:p.signal,method:f,body:JSON.stringify(c)};h=n,
|
|
1084
1084
|
/* istanbul ignore if */
|
|
1085
1085
|
e.aborted||
|
|
1086
1086
|
// Get the changes
|
|
@@ -1088,7 +1088,7 @@ d().then((function(){return l(a,v,s)})).catch(s)}},y={results:[]},g=function(n,r
|
|
|
1088
1088
|
// If the result of the ajax call (res) contains changes (res.results)
|
|
1089
1089
|
if(r&&r.results){i=r.results.length,y.last_seq=r.last_seq;var a=null,c=null;
|
|
1090
1090
|
// Attach 'pending' property if server supports it (CouchDB 2.0+)
|
|
1091
|
-
/* istanbul ignore if */"number"==typeof r.pending&&(a=r.pending),"string"!=typeof y.last_seq&&"number"!=typeof y.last_seq||(c=y.last_seq),e.query_params,r.results=r.results.filter((function(t){u--;var n=
|
|
1091
|
+
/* istanbul ignore if */"number"==typeof r.pending&&(a=r.pending),"string"!=typeof y.last_seq&&"number"!=typeof y.last_seq||(c=y.last_seq),e.query_params,r.results=r.results.filter((function(t){u--;var n=Z(e)(t);return n&&(e.include_docs&&e.attachments&&e.binary&&hn(t),e.return_docs&&y.results.push(t),e.onChange(t,a,c)),n}))}else if(n)
|
|
1092
1092
|
// In case of an error, stop listening for changes and call
|
|
1093
1093
|
// opts.complete
|
|
1094
1094
|
return e.aborted=!0,void e.complete(n);
|
|
@@ -1108,22 +1108,22 @@ r.revsDiff=c("revsDiff",(function(e,t,n){
|
|
|
1108
1108
|
// If no options were given, set the callback to be the second parameter
|
|
1109
1109
|
"function"==typeof t&&(n=t,t={}),
|
|
1110
1110
|
// Get the missing document/revision IDs
|
|
1111
|
-
l(
|
|
1111
|
+
l(yn(i,"_revs_diff"),{method:"POST",body:JSON.stringify(e)},n).catch(n)})),r._close=function(e){e()},r._destroy=function(e,t){l(yn(i,""),{method:"DELETE"}).then((function(e){t(null,e)})).catch((function(e){
|
|
1112
1112
|
/* istanbul ignore if */
|
|
1113
1113
|
404===e.status?t(null,{ok:!0}):t(e)}))}}
|
|
1114
1114
|
// HttpPouch is a valid adapter.
|
|
1115
|
-
function
|
|
1115
|
+
function bn(e){this.status=400,this.name="query_parse_error",this.message=e,this.error=!0;try{Error.captureStackTrace(this,bn)}catch(e){}}function wn(e){this.status=404,this.name="not_found",this.message=e,this.error=!0;try{Error.captureStackTrace(this,wn)}catch(e){}}function kn(e){this.status=500,this.name="invalid_value",this.message=e,this.error=!0;try{Error.captureStackTrace(this,kn)}catch(e){}}function jn(e,t){return t&&e.then((function(e){s((function(){t(null,e)}))}),(function(e){s((function(){t(e)}))})),e}function On(e,t){return function(){var n=arguments,r=this;return e.add((function(){return t.apply(r,n)}))}}
|
|
1116
1116
|
// uniq an array of strings, order not guaranteed
|
|
1117
1117
|
// similar to underscore/lodash _.uniq
|
|
1118
|
-
function
|
|
1119
|
-
throw
|
|
1118
|
+
function Sn(e){var t=new i(e),n=new Array(t.size),r=-1;return t.forEach((function(e){n[++r]=e})),n}function Pn(e){var t=new Array(e.size),n=-1;return e.forEach((function(e,r){t[++n]=r})),t}function An(e){return new kn("builtin "+e+" function requires map values to be numbers or number arrays")}function xn(e){for(var t=0,n=0,r=e.length;n<r;n++){var i=e[n];if("number"!=typeof i){if(!Array.isArray(i))// not array/number
|
|
1119
|
+
throw An("_sum");
|
|
1120
1120
|
// lists of numbers are also allowed, sum them separately
|
|
1121
|
-
t="number"==typeof t?[t]:t;for(var o=0,s=i.length;o<s;o++){var u=i[o];if("number"!=typeof u)throw
|
|
1122
|
-
t[0]+=i}return t}
|
|
1121
|
+
t="number"==typeof t?[t]:t;for(var o=0,s=i.length;o<s;o++){var u=i[o];if("number"!=typeof u)throw An("_sum");void 0===t[o]?t.push(u):t[o]+=u}}else"number"==typeof t?t+=i:// add number to array
|
|
1122
|
+
t[0]+=i}return t}mn.valid=function(){return!0},l(bn,Error),l(wn,Error),l(kn,Error);var qn=C.bind(null,"log"),En=Array.isArray,Cn=JSON.parse;function Bn(e,t){return fe("return ("+e.replace(/;\s*$/,"")+");",{emit:t,sum:xn,log:qn,isArray:En,toJSON:Cn})}
|
|
1123
1123
|
/*
|
|
1124
1124
|
* Simple task queue to sequentialize actions. Assumes
|
|
1125
1125
|
* callbacks will eventually fire (once).
|
|
1126
|
-
*/function
|
|
1126
|
+
*/function $n(){this.promise=new Promise((function(e){e()}))}function Tn(e){if(!e)return"undefined";// backwards compat for empty reduce
|
|
1127
1127
|
// for backwards compat with mapreduce, functions/strings are stringified
|
|
1128
1128
|
// as-is. everything else is JSON-stringified.
|
|
1129
1129
|
switch(typeof e){case"function":case"string":
|
|
@@ -1131,22 +1131,22 @@ switch(typeof e){case"function":case"string":
|
|
|
1131
1131
|
return e.toString();default:
|
|
1132
1132
|
// e.g. a JSON object in the case of mango queries
|
|
1133
1133
|
return JSON.stringify(e)}}
|
|
1134
|
-
/* create a string signature for a view so we can cache it and uniq it */function
|
|
1134
|
+
/* create a string signature for a view so we can cache it and uniq it */function Dn(e,t,n,r,i,o){var s,u=function(e,t){
|
|
1135
1135
|
// the "undefined" part is for backwards compatibility
|
|
1136
|
-
return
|
|
1136
|
+
return Tn(e)+Tn(t)+"undefined"}(n,r);if(!i&&
|
|
1137
1137
|
// cache this to ensure we don't try to update the same view twice
|
|
1138
|
-
(s=e._cachedViews=e._cachedViews||{})[u])return s[u];var a=e.info().then((function(a){var c=a.db_name+"-mrview-"+(i?"temp":
|
|
1138
|
+
(s=e._cachedViews=e._cachedViews||{})[u])return s[u];var a=e.info().then((function(a){var c=a.db_name+"-mrview-"+(i?"temp":Se(u));
|
|
1139
1139
|
// save the view name in the source db so it can be cleaned up if necessary
|
|
1140
1140
|
// (e.g. when the _design doc is deleted, remove all associated view data)
|
|
1141
|
-
return
|
|
1141
|
+
return le(e,"_local/"+o,(function(e){e.views=e.views||{};var n=t;-1===n.indexOf("/")&&(n=t+"/"+t);var r=e.views[n]=e.views[n]||{};
|
|
1142
1142
|
/* istanbul ignore if */if(!r[c])return r[c]=!0,e})).then((function(){return e.registerDependentDatabase(c).then((function(t){var i=t.db;i.auto_compaction=!0;var o={name:c,db:i,sourceDB:e,adapter:e.adapter,mapFun:n,reduceFun:r};return o.db.get("_local/lastSeq").catch((function(e){
|
|
1143
1143
|
/* istanbul ignore if */
|
|
1144
|
-
if(404!==e.status)throw e})).then((function(e){return o.seq=e?e.seq:0,s&&o.db.once("destroyed",(function(){delete s[u]})),o}))}))}))}));return s&&(s[u]=a),a}
|
|
1144
|
+
if(404!==e.status)throw e})).then((function(e){return o.seq=e?e.seq:0,s&&o.db.once("destroyed",(function(){delete s[u]})),o}))}))}))}));return s&&(s[u]=a),a}$n.prototype.add=function(e){return this.promise=this.promise.catch((function(){
|
|
1145
1145
|
// just recover
|
|
1146
|
-
})).then((function(){return e()})),this.promise}
|
|
1146
|
+
})).then((function(){return e()})),this.promise},$n.prototype.finish=function(){return this.promise};var Ln={},In=new $n;function Rn(e){
|
|
1147
1147
|
// can be either 'ddocname/viewname' or just 'viewname'
|
|
1148
1148
|
// (where the ddoc name is the same)
|
|
1149
|
-
return-1===e.indexOf("/")?[e,e]:e.split("/")}function
|
|
1149
|
+
return-1===e.indexOf("/")?[e,e]:e.split("/")}function Mn(e,t){try{e.emit("error",t)}catch(e){C("error","The user's map/reduce function threw an uncaught error.\nYou can debug this error by doing:\nmyDatabase.on('error', function (err) { debugger; });\nPlease double-check your map/reduce function."),C("error",t)
|
|
1150
1150
|
/**
|
|
1151
1151
|
* Returns an "abstract" mapreduce object of the form:
|
|
1152
1152
|
*
|
|
@@ -1172,25 +1172,25 @@ return-1===e.indexOf("/")?[e,e]:e.split("/")}function Rn(e,t){try{e.emit("error"
|
|
|
1172
1172
|
* Throws an error if the ddoc or viewName is not valid.
|
|
1173
1173
|
* This could be a way to communicate to the user that the configuration for the
|
|
1174
1174
|
* indexer is invalid.
|
|
1175
|
-
*/}}var
|
|
1175
|
+
*/}}var Nn=function(e,t){return xn(t)},Kn=function(e,t){return t.length},Un=function(e,t){return{sum:xn(t),min:Math.min.apply(null,t),max:Math.max.apply(null,t),count:t.length,sumsqr:
|
|
1176
1176
|
// no need to implement rereduce=true, because Pouch
|
|
1177
1177
|
// will never call it
|
|
1178
|
-
function(e){for(var t=0,n=0,r=e.length;n<r;n++){var i=e[n];t+=i*i}return t}(t)}},
|
|
1178
|
+
function(e){for(var t=0,n=0,r=e.length;n<r;n++){var i=e[n];t+=i*i}return t}(t)}},Fn=function(e,t,n,r){function u(e,t,n){
|
|
1179
1179
|
// emit an event if there was an error thrown by a map function.
|
|
1180
1180
|
// putting try/catches in a single function also avoids deoptimizations.
|
|
1181
|
-
try{t(n)}catch(t){
|
|
1181
|
+
try{t(n)}catch(t){Mn(e,t)}}function a(e,t,n,r,i){
|
|
1182
1182
|
// same as above, but returning the result or an error. there are two separate
|
|
1183
1183
|
// functions to avoid extra memory allocations since the tryCode() case is used
|
|
1184
1184
|
// for custom map functions (common) vs this function, which is only used for
|
|
1185
1185
|
// custom reduce functions (rare)
|
|
1186
|
-
try{return{output:t(n,r,i)}}catch(t){return
|
|
1186
|
+
try{return{output:t(n,r,i)}}catch(t){return Mn(e,t),{error:t}}}function c(e,t){var n=dt(e.key,t.key);return 0!==n?n:dt(e.value,t.value)}function l(e,t,n){return n=n||0,"number"==typeof t?e.slice(n,t+n):n>0?e.slice(n):e}function d(e){var t=e.value;
|
|
1187
1187
|
// Users can explicitly specify a joined doc _id, or it
|
|
1188
1188
|
// defaults to the doc _id that emitted the key/value.
|
|
1189
|
-
return t&&"object"==typeof t&&t._id||e.id}function h(e){return function(t){return e.include_docs&&e.attachments&&e.binary&&function(e){e.rows.forEach((function(e){var t=e.doc&&e.doc._attachments;t&&Object.keys(t).forEach((function(e){var n=t[e];t[e].data=
|
|
1189
|
+
return t&&"object"==typeof t&&t._id||e.id}function h(e){return function(t){return e.include_docs&&e.attachments&&e.binary&&function(e){e.rows.forEach((function(e){var t=e.doc&&e.doc._attachments;t&&Object.keys(t).forEach((function(e){var n=t[e];t[e].data=ge(n.data,n.content_type)}))}))}(t),t}}function p(e,t,n,r){
|
|
1190
1190
|
// add an http param from opts to params, optionally json-encoded
|
|
1191
1191
|
var i=t[e];void 0!==i&&(r&&(i=encodeURIComponent(JSON.stringify(i))),n.push(e+"="+i))}function v(e){if(void 0!==e){var t=Number(e);
|
|
1192
1192
|
// prevents e.g. '1foo' or '1.1' being coerced to 1
|
|
1193
|
-
return isNaN(t)||t!==parseInt(e,10)?e:t}}function y(e,t){var n=e.descending?"endkey":"startkey",r=e.descending?"startkey":"endkey";if(void 0!==e[n]&&void 0!==e[r]&&
|
|
1193
|
+
return isNaN(t)||t!==parseInt(e,10)?e:t}}function y(e,t){var n=e.descending?"endkey":"startkey",r=e.descending?"startkey":"endkey";if(void 0!==e[n]&&void 0!==e[r]&&dt(e[n],e[r])>0)throw new bn("No rows can match your key range, reverse your start_key and end_key or set {descending : true}");if(t.reduce&&!1!==e.reduce){if(e.include_docs)throw new bn("{include_docs:true} is invalid for reduce");if(e.keys&&e.keys.length>1&&!e.group&&!e.group_level)throw new bn("Multi-key fetches for reduce views must use {group: true}")}["group_level","limit","skip"].forEach((function(t){var n=function(e){if(e){if("number"!=typeof e)return new bn('Invalid value for integer: "'+e+'"');if(e<0)return new bn('Invalid value for positive integer: "'+e+'"')}}(e[t]);if(n)throw n}))}function g(e){return function(t){
|
|
1194
1194
|
/* istanbul ignore else */
|
|
1195
1195
|
if(404===t.status)return e;throw t}}
|
|
1196
1196
|
// returns a promise for a list of docs to update, based on the input docId.
|
|
@@ -1199,21 +1199,21 @@ if(404===t.status)return e;throw t}}
|
|
|
1199
1199
|
function _(e,t,n){var r="_local/doc_"+e,o={_id:r,keys:[]},s=n.get(e),u=s[0];return(function(e){
|
|
1200
1200
|
// only return true if the current change is 1-
|
|
1201
1201
|
// and there are no other leafs
|
|
1202
|
-
return 1===e.length&&/^1-/.test(e[0].rev)}(s[1])?Promise.resolve(o):t.db.get(r).catch(g(o))).then((function(e){return function(e){return e.keys.length?t.db.allDocs({keys:e.keys,include_docs:!0}):Promise.resolve({rows:[]})}(e).then((function(t){return function(e,t){for(var n=[],r=new i,o=0,s=t.rows.length;o<s;o++){var a=t.rows[o].doc;if(a&&(n.push(a),r.add(a._id),a._deleted=!u.has(a._id),!a._deleted)){var c=u.get(a._id);"value"in c&&(a.value=c.value)}}var f=
|
|
1202
|
+
return 1===e.length&&/^1-/.test(e[0].rev)}(s[1])?Promise.resolve(o):t.db.get(r).catch(g(o))).then((function(e){return function(e){return e.keys.length?t.db.allDocs({keys:e.keys,include_docs:!0}):Promise.resolve({rows:[]})}(e).then((function(t){return function(e,t){for(var n=[],r=new i,o=0,s=t.rows.length;o<s;o++){var a=t.rows[o].doc;if(a&&(n.push(a),r.add(a._id),a._deleted=!u.has(a._id),!a._deleted)){var c=u.get(a._id);"value"in c&&(a.value=c.value)}}var f=Pn(u);return f.forEach((function(e){if(!r.has(e)){
|
|
1203
1203
|
// new doc
|
|
1204
|
-
var t={_id:e},i=u.get(e);"value"in i&&(t.value=i.value),n.push(t)}})),e.keys=
|
|
1204
|
+
var t={_id:e},i=u.get(e);"value"in i&&(t.value=i.value),n.push(t)}})),e.keys=Sn(f.concat(e.keys)),n.push(e),n}(e,t)}))}))}
|
|
1205
1205
|
// updates all emitted key/value docs and metaDocs in the mrview database
|
|
1206
1206
|
// for the given batch of documents from the source database
|
|
1207
|
-
function m(e){var t="string"==typeof e?e:e.name,n=
|
|
1207
|
+
function m(e){var t="string"==typeof e?e:e.name,n=Ln[t];return n||(n=Ln[t]=new $n),n}function b(e){return On(m(e),(function(){return function(e){
|
|
1208
1208
|
// bind the emit function once
|
|
1209
1209
|
var t,n;var r=function(e,t){
|
|
1210
1210
|
// for temp_views one can use emit(doc, emit), see #38
|
|
1211
|
-
if("function"==typeof e&&2===e.length){var n=e;return function(e){return n(e,t)}}return
|
|
1211
|
+
if("function"==typeof e&&2===e.length){var n=e;return function(e){return n(e,t)}}return Bn(e.toString(),t)}(e.mapFun,(function(e,r){var i={id:n._id,key:ht(e)};
|
|
1212
1212
|
// Don't explicitly store the value unless it's defined and non-null.
|
|
1213
1213
|
// This saves on storage space, because often people don't use it.
|
|
1214
|
-
null!=r&&(i.value=
|
|
1214
|
+
null!=r&&(i.value=ht(r)),t.push(i)})),i=e.seq||0;function s(t,n){return function(){return function(e,t,n){var r="_local/lastSeq";return e.db.get(r).catch(g({_id:r,seq:0})).then((function(r){var i=Pn(t);return Promise.all(i.map((function(n){return _(n,e,t)}))).then((function(t){var i=ee(t);
|
|
1215
1215
|
// write all docs in a single operation, update the seq once
|
|
1216
|
-
return r.seq=n,i.push(r),e.db.bulkDocs({docs:i})}))}))}(e,t,n)}}var a=new
|
|
1216
|
+
return r.seq=n,i.push(r),e.db.bulkDocs({docs:i})}))}))}(e,t,n)}}var a=new $n;function f(){return e.sourceDB.changes({return_docs:!0,conflicts:!0,include_docs:!0,style:"all_docs",since:i,limit:50}).then(l)}function l(e){var t=e.results;if(t.length){var n=d(t);if(a.add(s(n,i)),!(t.length<50))return f()}}function d(s){for(var a=new o,f=0,l=s.length;f<l;f++){var d=s[f];if("_"!==d.doc._id[0]){t=[],(n=d.doc)._deleted||u(e.sourceDB,r,n),t.sort(c);var p=h(t);a.set(d.doc._id,[p,d.changes])}i=d.seq}return a}function h(e){for(var t,n=new o,r=0,i=e.length;r<i;r++){var s=e[r],u=[s.key,s.id];r>0&&0===dt(s.key,t)&&u.push(r),n.set(pt(u),s),t=s.key}return n}return f().then((function(){return a.finish()})).then((function(){e.seq=i}))}(e)}))()}function w(e,t){return On(m(e),(function(){return function(e,t){var n,r=e.reduceFun&&!1!==t.reduce,i=t.skip||0;function s(t){return t.include_docs=!0,e.db.allDocs(t).then((function(e){return n=e.total_rows,e.rows.map((function(e){
|
|
1217
1217
|
// implicit migration - in older versions of PouchDB,
|
|
1218
1218
|
// we explicitly stored the doc as {id: ..., key: ..., value: ...}
|
|
1219
1219
|
// this is tested in a migration test
|
|
@@ -1223,7 +1223,7 @@ if("value"in e.doc&&"object"==typeof e.doc.value&&null!==e.doc.value){var t=Obje
|
|
|
1223
1223
|
// emitted a value which was an object with these 3 exact keys
|
|
1224
1224
|
if(!(t<n||t>n))return e.doc.value}var r=function(e){
|
|
1225
1225
|
/*eslint no-constant-condition: ["error", { "checkLoops": false }]*/
|
|
1226
|
-
for(var t=[],n=[],r=0;;){var i=e[r++];if("\0"!==i)switch(i){case"1":t.push(null);break;case"2":t.push("1"===e[r]),r++;break;case"3":var o=
|
|
1226
|
+
for(var t=[],n=[],r=0;;){var i=e[r++];if("\0"!==i)switch(i){case"1":t.push(null);break;case"2":t.push("1"===e[r]),r++;break;case"3":var o=vt(e,r);t.push(o.num),r+=o.length;break;case"4":
|
|
1227
1227
|
/*eslint no-constant-condition: ["error", { "checkLoops": false }]*/
|
|
1228
1228
|
for(var s="";;){var u=e[r];if("\0"===u)break;s+=u,r++}
|
|
1229
1229
|
// perform the reverse of the order-preserving replacement
|
|
@@ -1231,21 +1231,21 @@ for(var s="";;){var u=e[r];if("\0"===u)break;s+=u,r++}
|
|
|
1231
1231
|
/* eslint-disable no-control-regex */s=s.replace(/\u0001\u0001/g,"\0").replace(/\u0001\u0002/g,"").replace(/\u0002\u0002/g,""),
|
|
1232
1232
|
/* eslint-enable no-control-regex */
|
|
1233
1233
|
t.push(s);break;case"5":var a={element:[],index:t.length};t.push(a.element),n.push(a);break;case"6":var c={element:{},index:t.length};t.push(c.element),n.push(c);break;
|
|
1234
|
-
/* istanbul ignore next */default:throw new Error("bad collationIndex or unexpectedly reached end of input: "+i)}else{if(1===t.length)return t.pop();
|
|
1234
|
+
/* istanbul ignore next */default:throw new Error("bad collationIndex or unexpectedly reached end of input: "+i)}else{if(1===t.length)return t.pop();yt(t,n)}}}(e.doc._id);return{key:r[0],id:r[1],value:"value"in e.doc?e.doc.value:null}}))}))}function u(s){var u;if(u=r?function(e,t,n){0===n.group_level&&delete n.group_level;var r=n.group||n.group_level,i=function(e){var t=e.toString(),n=function(e){if(/^_sum/.test(e))return Nn;if(/^_count/.test(e))return Kn;if(/^_stats/.test(e))return Un;if(/^_/.test(e))throw new Error(e+" is not a supported reduce function.")}(t);return n||Bn(t)}(e.reduceFun),o=[],s=isNaN(n.group_level)?Number.POSITIVE_INFINITY:n.group_level;t.forEach((function(e){var t=o[o.length-1],n=r?e.key:null;if(
|
|
1235
1235
|
// only set group_level for array keys
|
|
1236
|
-
r&&Array.isArray(n)&&(n=n.slice(0,s)),t&&0===
|
|
1236
|
+
r&&Array.isArray(n)&&(n=n.slice(0,s)),t&&0===dt(t.groupKey,n))return t.keys.push([e.key,e.id]),void t.values.push(e.value);o.push({keys:[[e.key,e.id]],values:[e.value],groupKey:n})})),t=[];for(var u=0,c=o.length;u<c;u++){var f=o[u],d=a(e.sourceDB,i,f.keys,f.values,!1);if(d.error&&d.error instanceof kn)
|
|
1237
1237
|
// CouchDB returns an error if a built-in errors out
|
|
1238
1238
|
throw d.error;t.push({
|
|
1239
1239
|
// CouchDB just sets the value to null if a non-built-in errors out
|
|
1240
1240
|
value:d.error?null:d.output,key:f.groupKey})}
|
|
1241
1241
|
// no total_rows/offset when reducing
|
|
1242
1242
|
return{rows:l(t,n.limit,n.skip)}}(e,s,t):{total_rows:n,offset:i,rows:s}
|
|
1243
|
-
/* istanbul ignore if */,t.update_seq&&(u.update_seq=e.seq),t.include_docs){var c=
|
|
1243
|
+
/* istanbul ignore if */,t.update_seq&&(u.update_seq=e.seq),t.include_docs){var c=Sn(s.map(d));return e.sourceDB.allDocs({keys:c,include_docs:!0,conflicts:t.conflicts,attachments:t.attachments,binary:t.binary}).then((function(e){var t=new o;return e.rows.forEach((function(e){t.set(e.id,e.doc)})),s.forEach((function(e){var n=d(e),r=t.get(n);r&&(e.doc=r)})),u}))}return u}if(void 0===t.keys||t.keys.length||(
|
|
1244
1244
|
// equivalent query
|
|
1245
|
-
t.limit=0,delete t.keys),void 0!==t.keys){var c=t.keys.map((function(e){var n={startkey:
|
|
1246
|
-
/* istanbul ignore if */return t.update_seq&&(n.update_seq=!0),s(n)}));return Promise.all(c).then(
|
|
1245
|
+
t.limit=0,delete t.keys),void 0!==t.keys){var c=t.keys.map((function(e){var n={startkey:pt([e]),endkey:pt([e,{}])};
|
|
1246
|
+
/* istanbul ignore if */return t.update_seq&&(n.update_seq=!0),s(n)}));return Promise.all(c).then(ee).then(u)}// normal query, no 'keys'
|
|
1247
1247
|
var f,h,p={descending:t.descending};
|
|
1248
|
-
/* istanbul ignore if */if(t.update_seq&&(p.update_seq=!0),"start_key"in t&&(f=t.start_key),"startkey"in t&&(f=t.startkey),"end_key"in t&&(h=t.end_key),"endkey"in t&&(h=t.endkey),void 0!==f&&(p.startkey=t.descending?
|
|
1248
|
+
/* istanbul ignore if */if(t.update_seq&&(p.update_seq=!0),"start_key"in t&&(f=t.start_key),"startkey"in t&&(f=t.startkey),"end_key"in t&&(h=t.end_key),"endkey"in t&&(h=t.endkey),void 0!==f&&(p.startkey=t.descending?pt([f,{}]):pt([f])),void 0!==h){var v=!1!==t.inclusive_end;t.descending&&(v=!v),p.endkey=pt(v?[h,{}]:[h])}if(void 0!==t.key){var y=pt([t.key]),g=pt([t.key,{}]);p.descending?(p.endkey=y,p.startkey=g):(p.startkey=y,p.endkey=g)}return r||("number"==typeof t.limit&&(p.limit=t.limit),p.skip=i),s(p).then(u)}(e,t)}))()}function k(t,n,r){
|
|
1249
1249
|
/* istanbul ignore next */
|
|
1250
1250
|
if("function"==typeof t._query)
|
|
1251
1251
|
// custom adapters can define their own api._query
|
|
@@ -1254,7 +1254,7 @@ if("function"==typeof t._query)
|
|
|
1254
1254
|
return function(e,t,n){return new Promise((function(r,i){e._query(t,n,(function(e,t){if(e)return i(e);r(t)}))}))}
|
|
1255
1255
|
// custom adapters can define their own api._viewCleanup
|
|
1256
1256
|
// and override the default behavior
|
|
1257
|
-
/* istanbul ignore next */(t,n,r);if(
|
|
1257
|
+
/* istanbul ignore next */(t,n,r);if(ne(t))return function(e,t,n){
|
|
1258
1258
|
// List of parameters to add to the PUT request
|
|
1259
1259
|
var r,i,o,s=[],u="GET";
|
|
1260
1260
|
// If keys are supplied, issue a POST to circumvent GET query string limits
|
|
@@ -1275,15 +1275,15 @@ a.length+s.length+1<=2e3?
|
|
|
1275
1275
|
s+=("?"===s[0]?"&":"?")+a:(u="POST","string"==typeof t?r={keys:n.keys}:// fun is {map : mapfun}, so append to this
|
|
1276
1276
|
t.keys=n.keys)}
|
|
1277
1277
|
// We are referencing a query defined in the design doc
|
|
1278
|
-
if("string"==typeof t){var c=
|
|
1278
|
+
if("string"==typeof t){var c=Rn(t);return e.fetch("_design/"+c[0]+"/_view/"+c[1]+s,{headers:new tt({"Content-Type":"application/json"}),method:u,body:JSON.stringify(r)}).then((function(e){return i=e.ok,o=e.status,e.json()})).then((function(e){if(!i)throw e.status=o,X(e);
|
|
1279
1279
|
// fail the entire request if the result contains an error
|
|
1280
1280
|
return e.rows.forEach((function(e){
|
|
1281
1281
|
/* istanbul ignore if */
|
|
1282
1282
|
if(e.value&&e.value.error&&"builtin_reduce_error"===e.value.error)throw new Error(e.reason)})),e})).then(h(n))}
|
|
1283
1283
|
// We are using a temporary view, terrible for performance, good for testing
|
|
1284
|
-
return r=r||{},Object.keys(t).forEach((function(e){Array.isArray(t[e])?r[e]=t[e]:r[e]=t[e].toString()})),e.fetch("_temp_view"+s,{headers:new
|
|
1284
|
+
return r=r||{},Object.keys(t).forEach((function(e){Array.isArray(t[e])?r[e]=t[e]:r[e]=t[e].toString()})),e.fetch("_temp_view"+s,{headers:new tt({"Content-Type":"application/json"}),method:"POST",body:JSON.stringify(r)}).then((function(e){return i=e.ok,o=e.status,e.json()})).then((function(e){if(!i)throw e.status=o,X(e);return e})).then(h(n))}(t,n,r);if("string"!=typeof n)
|
|
1285
1285
|
// temp_view
|
|
1286
|
-
return y(r,n),
|
|
1286
|
+
return y(r,n),In.add((function(){return Dn(
|
|
1287
1287
|
/* sourceDB */t,
|
|
1288
1288
|
/* viewName */"temp_view/temp_view",
|
|
1289
1289
|
/* mapFun */n.map,
|
|
@@ -1291,30 +1291,30 @@ return y(r,n),Ln.add((function(){return Tn(
|
|
|
1291
1291
|
/* temporary */!0,
|
|
1292
1292
|
/* localDocName */e).then((function(e){return t=b(e).then((function(){return w(e,r)})),n=function(){return e.db.destroy()},t.then((function(e){return n().then((function(){return e}))}),(function(e){return n().then((function(){throw e}))}));
|
|
1293
1293
|
// Promise finally util similar to Q.finally
|
|
1294
|
-
var t,n}))})),
|
|
1294
|
+
var t,n}))})),In.finish();
|
|
1295
1295
|
// persistent view
|
|
1296
|
-
var i=n,o=
|
|
1296
|
+
var i=n,o=Rn(i),u=o[0],a=o[1];return t.get("_design/"+u).then((function(n){var o=n.views&&n.views[a];if(!o)
|
|
1297
1297
|
// basic validator; it's assumed that every subclass would want this
|
|
1298
|
-
throw new
|
|
1298
|
+
throw new wn("ddoc "+n._id+" has no view named "+a);return function(e,t){var n=e.views&&e.views[t];if("string"!=typeof n.map)throw new wn("ddoc "+e._id+" has no string view named "+t+", instead found object of type: "+typeof n.map)}(n,a),y(r,o),Dn(
|
|
1299
1299
|
/* sourceDB */t,
|
|
1300
1300
|
/* viewName */i,
|
|
1301
1301
|
/* mapFun */o.map,
|
|
1302
1302
|
/* reduceFun */o.reduce,
|
|
1303
1303
|
/* temporary */!1,
|
|
1304
|
-
/* localDocName */e).then((function(e){return"ok"===r.stale||"update_after"===r.stale?("update_after"===r.stale&&s((function(){b(e)})),w(e,r)):b(e).then((function(){return w(e,r)}))}))}))}var j;return{query:function(e,t,n){var r=this;"function"==typeof t&&(n=t,t={}),t=t?function(e){return e.group_level=v(e.group_level),e.limit=v(e.limit),e.skip=v(e.skip),e}(t):{},"function"==typeof e&&(e={map:e});var i=Promise.resolve().then((function(){return k(r,e,t)}));return
|
|
1305
|
-
/* istanbul ignore next */return"function"==typeof t._viewCleanup?function(e){return new Promise((function(t,n){e._viewCleanup((function(e,r){if(e)return n(e);t(r)}))}))}(t):
|
|
1304
|
+
/* localDocName */e).then((function(e){return"ok"===r.stale||"update_after"===r.stale?("update_after"===r.stale&&s((function(){b(e)})),w(e,r)):b(e).then((function(){return w(e,r)}))}))}))}var j;return{query:function(e,t,n){var r=this;"function"==typeof t&&(n=t,t={}),t=t?function(e){return e.group_level=v(e.group_level),e.limit=v(e.limit),e.skip=v(e.skip),e}(t):{},"function"==typeof e&&(e={map:e});var i=Promise.resolve().then((function(){return k(r,e,t)}));return jn(i,n),i},viewCleanup:(j=function(){var t=this;
|
|
1305
|
+
/* istanbul ignore next */return"function"==typeof t._viewCleanup?function(e){return new Promise((function(t,n){e._viewCleanup((function(e,r){if(e)return n(e);t(r)}))}))}(t):ne(t)?function(e){return e.fetch("_view_cleanup",{headers:new tt({"Content-Type":"application/json"}),method:"POST"}).then((function(e){return e.json()}))}(t):function(t){return t.get("_local/"+e).then((function(e){var n=new o;Object.keys(e.views).forEach((function(e){var t=Rn(e),r="_design/"+t[0],o=t[1],s=n.get(r);s||(s=new i,n.set(r,s)),s.add(o)}));var r={keys:Pn(n),include_docs:!0};return t.allDocs(r).then((function(r){var i={};r.rows.forEach((function(t){var r=t.key.substring(8);// cuts off '_design/'
|
|
1306
1306
|
n.get(t.key).forEach((function(n){var o=r+"/"+n;
|
|
1307
1307
|
/* istanbul ignore if */e.views[o]||(
|
|
1308
1308
|
// new format, without slashes, to support PouchDB 2.2.0
|
|
1309
1309
|
// migration test in pouchdb's browser.migration.js verifies this
|
|
1310
1310
|
o=n);var s=Object.keys(e.views[o]),u=t.doc&&t.doc.views&&t.doc.views[n];
|
|
1311
1311
|
// design doc deleted, or view function nonexistent
|
|
1312
|
-
s.forEach((function(e){i[e]=i[e]||u}))}))}));var o=Object.keys(i).filter((function(e){return!i[e]})).map((function(e){return
|
|
1312
|
+
s.forEach((function(e){i[e]=i[e]||u}))}))}));var o=Object.keys(i).filter((function(e){return!i[e]})).map((function(e){return On(m(e),(function(){return new t.constructor(e,t.__opts).destroy()}))()}));return Promise.all(o).then((function(){return{ok:!0}}))}))}),g({ok:!0}))}(t)},f((function(e){var t=e.pop(),n=j.apply(this,e);return"function"==typeof t&&jn(n,t),n})))}}("mrviews"),Jn={query:function(e,t,n){return Fn.query.call(this,e,t,n)},viewCleanup:function(e){return Fn.viewCleanup.call(this,e)}};function Vn(e){return/^1-/.test(e)}function zn(e,t){var n=Object.keys(t._attachments);return Promise.all(n.map((function(n){return e.getAttachment(t._id,n,{rev:t._rev})})))}
|
|
1313
1313
|
// Fetch all the documents from the src as described in the "diffs",
|
|
1314
1314
|
// which is a mapping of docs IDs to revisions. If the state ever
|
|
1315
1315
|
// changes to "cancelled", then the returned promise will be rejected.
|
|
1316
1316
|
// Else it will be resolved with a list of fetched documents.
|
|
1317
|
-
var
|
|
1317
|
+
var Gn="pouchdb";function Qn(e,t,n,r,i){return e.get(t).catch((function(n){if(404===n.status)return"http"!==e.adapter&&"https"!==e.adapter||$(404,"PouchDB is just checking if a remote checkpoint exists."),{session_id:r,_id:t,history:[],replicator:Gn,version:1};throw n})).then((function(o){if(!i.cancelled&&o.last_seq!==n)
|
|
1318
1318
|
// Filter out current entry for this replication
|
|
1319
1319
|
return o.history=(o.history||[]).filter((function(e){return e.session_id!==r})),
|
|
1320
1320
|
// Add the latest checkpoint to history
|
|
@@ -1322,47 +1322,47 @@ o.history.unshift({last_seq:n,session_id:r}),
|
|
|
1322
1322
|
// Just take the last pieces in history, to
|
|
1323
1323
|
// avoid really big checkpoint docs.
|
|
1324
1324
|
// see comment on history size above
|
|
1325
|
-
o.history=o.history.slice(0,5),o.version=1,o.replicator=
|
|
1325
|
+
o.history=o.history.slice(0,5),o.version=1,o.replicator=Gn,o.session_id=r,o.last_seq=n,e.put(o).catch((function(o){if(409===o.status)
|
|
1326
1326
|
// retry; someone is trying to write a checkpoint simultaneously
|
|
1327
|
-
return
|
|
1327
|
+
return Qn(e,t,n,r,i);throw o}));
|
|
1328
1328
|
// if the checkpoint has not changed, do not update
|
|
1329
|
-
}))}function
|
|
1329
|
+
}))}function Wn(e,t,n,r,i){this.src=e,this.target=t,this.id=n,this.returnValue=r,this.opts=i||{}}Wn.prototype.writeCheckpoint=function(e,t){var n=this;return this.updateTarget(e,t).then((function(){return n.updateSource(e,t)}))},Wn.prototype.updateTarget=function(e,t){return this.opts.writeTargetCheckpoint?Qn(this.target,this.id,e,t,this.returnValue):Promise.resolve(!0)},Wn.prototype.updateSource=function(e,t){if(this.opts.writeSourceCheckpoint){var n=this;return Qn(this.src,this.id,e,t,this.returnValue).catch((function(e){if(Zn(e))return n.opts.writeSourceCheckpoint=!1,!0;throw e}))}return Promise.resolve(!0)};var Yn={undefined:function(e,t){
|
|
1330
1330
|
// This is the previous comparison function
|
|
1331
|
-
return 0===
|
|
1331
|
+
return 0===dt(e.last_seq,t.last_seq)?t.last_seq:0
|
|
1332
1332
|
/* istanbul ignore next */},1:function(e,t){
|
|
1333
1333
|
// This is the comparison function ported from CouchDB
|
|
1334
1334
|
// This checkpoint comparison is ported from CouchDBs source
|
|
1335
1335
|
// they come from here:
|
|
1336
1336
|
// https://github.com/apache/couchdb-couch-replicator/blob/master/src/couch_replicator.erl#L863-L906
|
|
1337
|
-
return function(e,t){return e.session_id===t.session_id?{last_seq:e.last_seq,history:e.history}:
|
|
1337
|
+
return function(e,t){return e.session_id===t.session_id?{last_seq:e.last_seq,history:e.history}:Hn(e.history,t.history)}(t,e).last_seq}};function Hn(e,t){
|
|
1338
1338
|
// the erlang loop via function arguments is not so easy to repeat in JS
|
|
1339
1339
|
// therefore, doing this as recursion
|
|
1340
1340
|
var n=e[0],r=e.slice(1),i=t[0],o=t.slice(1);return n&&0!==t.length?
|
|
1341
1341
|
/* istanbul ignore if */
|
|
1342
|
-
|
|
1342
|
+
Xn(n.session_id,t)?{last_seq:n.last_seq,history:e}:Xn(i.session_id,r)?{last_seq:i.last_seq,history:o}:Hn(r,o):{last_seq:0,history:[]}}function Xn(e,t){var n=t[0],r=t.slice(1);return!(!e||0===t.length)&&(e===n.session_id||Xn(e,r))}function Zn(e){return"number"==typeof e.status&&4===Math.floor(e.status/100)}function er(e,t,n,r,i){var o,u,a,c=[],f={seq:0,changes:[],docs:[]},l=!1,d=!1,h=!1,p=0,v=n.continuous||n.live||!1,y=n.batch_size||100,g=n.batches_limit||10,_=!1,m=n.doc_ids,b=n.selector,k=[],j=Ae();// list of batches to be processed
|
|
1343
1343
|
i=i||{ok:!0,start_time:(new Date).toISOString(),docs_read:0,docs_written:0,doc_write_failures:0,errors:[]};var O={};function S(){return a?Promise.resolve():
|
|
1344
1344
|
// Generate a unique id particular to this replication.
|
|
1345
1345
|
// Not guaranteed to align perfectly with CouchDB's rep ids.
|
|
1346
|
-
function(e,t,n){var r=n.doc_ids?n.doc_ids.sort(
|
|
1346
|
+
function(e,t,n){var r=n.doc_ids?n.doc_ids.sort(dt):"",i=n.filter?n.filter.toString():"",o="",s="",u="";
|
|
1347
1347
|
// possibility for checkpoints to be lost here as behaviour of
|
|
1348
1348
|
// JSON.stringify is not stable (see #6226)
|
|
1349
|
-
/* istanbul ignore if */return n.selector&&(u=JSON.stringify(n.selector)),n.filter&&n.query_params&&(o=JSON.stringify(function(e){return Object.keys(e).sort(
|
|
1349
|
+
/* istanbul ignore if */return n.selector&&(u=JSON.stringify(n.selector)),n.filter&&n.query_params&&(o=JSON.stringify(function(e){return Object.keys(e).sort(dt).reduce((function(t,n){return t[n]=e[n],t}),{})}(n.query_params))),n.filter&&"_view"===n.filter&&(s=n.view.toString()),Promise.all([e.id(),t.id()]).then((function(e){var t=e[0]+e[1]+i+s+o+r+u;return new Promise((function(e){Oe(t,e)}))})).then((function(e){return"_local/"+e.replace(/\//g,".").replace(/\+/g,"_")}))}(e,t,n).then((function(i){u=i;var o;o=!1===n.checkpoint?{writeSourceCheckpoint:!1,writeTargetCheckpoint:!1}:"source"===n.checkpoint?{writeSourceCheckpoint:!0,writeTargetCheckpoint:!1}:"target"===n.checkpoint?{writeSourceCheckpoint:!1,writeTargetCheckpoint:!0}:{writeSourceCheckpoint:!0,writeTargetCheckpoint:!0},a=new Wn(e,t,u,r,o)}))}function P(){if(k=[],0!==o.docs.length){var e=o.docs,s={timeout:n.timeout};return t.bulkDocs({docs:e,new_edits:!1},s).then((function(t){
|
|
1350
1350
|
/* istanbul ignore if */
|
|
1351
1351
|
if(r.cancelled)throw $(),new Error("cancelled");
|
|
1352
1352
|
// `res` doesn't include full documents (which live in `docs`), so we create a map of
|
|
1353
1353
|
// (id -> error), and check for errors while iterating over `docs`
|
|
1354
1354
|
var n=Object.create(null);t.forEach((function(e){e.error&&(n[e.id]=e)}));var o=Object.keys(n).length;i.doc_write_failures+=o,i.docs_written+=e.length-o,e.forEach((function(e){var t=n[e._id];if(t){i.errors.push(t);
|
|
1355
1355
|
// Normalize error name. i.e. 'Unauthorized' -> 'unauthorized' (eg Sync Gateway)
|
|
1356
|
-
var o=(t.name||"").toLowerCase();if("unauthorized"!==o&&"forbidden"!==o)throw t;r.emit("denied",
|
|
1356
|
+
var o=(t.name||"").toLowerCase();if("unauthorized"!==o&&"forbidden"!==o)throw t;r.emit("denied",w(t))}else k.push(e)}))}),(function(t){throw i.doc_write_failures+=e.length,t}))}}function A(){if(o.error)throw new Error("There was a problem getting docs.");i.last_seq=p=o.seq;var e=w(i);return k.length&&(e.docs=k,
|
|
1357
1357
|
// Attach 'pending' property if server supports it (CouchDB 2.0+)
|
|
1358
1358
|
/* istanbul ignore if */
|
|
1359
1359
|
"number"==typeof o.pending&&(e.pending=o.pending,delete o.pending),r.emit("change",e)),l=!0,a.writeCheckpoint(o.seq,j).then((function(){
|
|
1360
1360
|
/* istanbul ignore if */
|
|
1361
|
-
if(l=!1,r.cancelled)throw $(),new Error("cancelled");o=void 0,I()})).catch((function(e){throw M(e),e}))}function x(){return function(e,t,n,r){n=
|
|
1361
|
+
if(l=!1,r.cancelled)throw $(),new Error("cancelled");o=void 0,I()})).catch((function(e){throw M(e),e}))}function x(){return function(e,t,n,r){n=w(n);// we do not need to modify this
|
|
1362
1362
|
var i=[],o=!0;function s(t){
|
|
1363
1363
|
// Optimization: fetch gen-1 docs and attachments in
|
|
1364
1364
|
// a single request using _all_docs
|
|
1365
|
-
return e.allDocs({keys:t,include_docs:!0,conflicts:!0}).then((function(e){if(r.cancelled)throw new Error("cancelled");e.rows.forEach((function(e){var t;e.deleted||!e.doc||!
|
|
1365
|
+
return e.allDocs({keys:t,include_docs:!0,conflicts:!0}).then((function(e){if(r.cancelled)throw new Error("cancelled");e.rows.forEach((function(e){var t;e.deleted||!e.doc||!Vn(e.value.rev)||(t=e.doc)._attachments&&Object.keys(t._attachments).length>0||function(e){return e._conflicts&&e._conflicts.length>0}(e.doc)||(
|
|
1366
1366
|
// strip _conflicts array to appease CSG (#5793)
|
|
1367
1367
|
/* istanbul ignore if */
|
|
1368
1368
|
e.doc._conflicts&&delete e.doc._conflicts,
|
|
@@ -1370,31 +1370,31 @@ e.doc._conflicts&&delete e.doc._conflicts,
|
|
|
1370
1370
|
i.push(e.doc),delete n[e.id])}))}))}return Promise.resolve().then((function(){
|
|
1371
1371
|
// filter out the generation 1 docs and get them
|
|
1372
1372
|
// leaving the non-generation one docs to be got otherwise
|
|
1373
|
-
var e=Object.keys(n).filter((function(e){var t=n[e].missing;return 1===t.length&&
|
|
1373
|
+
var e=Object.keys(n).filter((function(e){var t=n[e].missing;return 1===t.length&&Vn(t[0])}));if(e.length>0)return s(e)})).then((function(){var s=function(e){var t=[];return Object.keys(e).forEach((function(n){e[n].missing.forEach((function(e){t.push({id:n,rev:e})}))})),{docs:t,revs:!0,latest:!0}}(n);if(s.docs.length)return e.bulkGet(s).then((function(n){
|
|
1374
1374
|
/* istanbul ignore if */
|
|
1375
1375
|
if(r.cancelled)throw new Error("cancelled");return Promise.all(n.results.map((function(n){return Promise.all(n.docs.map((function(n){var r=n.ok;return n.error&&(
|
|
1376
1376
|
// when AUTO_COMPACTION is set, docs can be returned which look
|
|
1377
1377
|
// like this: {"missing":"1-7c3ac256b693c462af8442f992b83696"}
|
|
1378
|
-
o=!1),r&&r._attachments?function(e,t,n){var r=
|
|
1378
|
+
o=!1),r&&r._attachments?function(e,t,n){var r=ne(t)&&!ne(e),i=Object.keys(n._attachments);return r?e.get(n._id).then((function(r){return Promise.all(i.map((function(i){return function(e,t,n){return!e._attachments||!e._attachments[n]||e._attachments[n].digest!==t._attachments[n].digest}(r,n,i)?t.getAttachment(n._id,i):e.getAttachment(r._id,i)})))})).catch((function(e){
|
|
1379
1379
|
/* istanbul ignore if */
|
|
1380
|
-
if(404!==e.status)throw e;return
|
|
1380
|
+
if(404!==e.status)throw e;return zn(t,n)})):zn(t,n)}(t,e,r).then((function(e){var t=Object.keys(r._attachments);return e.forEach((function(e,n){var i=r._attachments[t[n]];delete i.stub,delete i.length,i.data=e})),r})):r})))}))).then((function(e){i=i.concat(ee(e).filter(Boolean))}))}))})).then((function(){return{ok:o,docs:i}}))}(e,t,o.diffs,r).then((function(e){o.error=!e.ok,e.docs.forEach((function(e){delete o.diffs[e._id],i.docs_read++,o.docs.push(e)}))}))}function q(){var e;r.cancelled||o||(0!==c.length?(o=c.shift(),(e={},o.changes.forEach((function(t){
|
|
1381
1381
|
// Couchbase Sync Gateway emits these, but we can ignore them
|
|
1382
1382
|
/* istanbul ignore if */
|
|
1383
1383
|
"_user/"!==t.id&&(e[t.id]=t.changes.map((function(e){return e.rev})))})),t.revsDiff(e).then((function(e){
|
|
1384
1384
|
/* istanbul ignore if */
|
|
1385
1385
|
if(r.cancelled)throw $(),new Error("cancelled");
|
|
1386
1386
|
// currentBatch.diffs elements are deleted as the documents are written
|
|
1387
|
-
o.diffs=e}))).then(x).then(P).then(A).then(q).catch((function(e){
|
|
1387
|
+
o.diffs=e}))).then(x).then(P).then(A).then(q).catch((function(e){C("batch processing terminated with error",e)}))):E(!0))}function E(e){0!==f.changes.length?(e||d||f.changes.length>=y)&&(c.push(f),f={seq:0,changes:[],docs:[]},"pending"!==r.state&&"stopped"!==r.state||(r.state="active",r.emit("active")),q()):0!==c.length||o||((v&&O.live||d)&&(r.state="pending",r.emit("paused")),d&&$())}function C(e,t){h||(t.message||(t.message=e),i.ok=!1,i.status="aborting",c=[],f={seq:0,changes:[],docs:[]},$(t))}function $(o){if(!(h||r.cancelled&&(i.status="cancelled",l)))if(i.status=i.status||"complete",i.end_time=(new Date).toISOString(),i.last_seq=p,h=!0,o){
|
|
1388
1388
|
// need to extend the error because Firefox considers ".result" read-only
|
|
1389
|
-
(o=
|
|
1389
|
+
(o=H(o)).result=i;
|
|
1390
1390
|
// Normalize error name. i.e. 'Unauthorized' -> 'unauthorized' (eg Sync Gateway)
|
|
1391
1391
|
var s=(o.name||"").toLowerCase();"unauthorized"===s||"forbidden"===s?(r.emit("error",o),r.removeAllListeners()):function(e,t,n,r){if(!1===e.retry)return t.emit("error",n),void t.removeAllListeners();
|
|
1392
|
-
/* istanbul ignore if */if("function"!=typeof e.back_off_function&&(e.back_off_function=
|
|
1392
|
+
/* istanbul ignore if */if("function"!=typeof e.back_off_function&&(e.back_off_function=B),t.emit("requestError",n),"active"===t.state||"pending"===t.state){t.emit("paused",n),t.state="stopped";var i=function(){e.current_back_off=0};t.once("paused",(function(){t.removeListener("active",i)})),t.once("active",i)}e.current_back_off=e.current_back_off||0,e.current_back_off=e.back_off_function(e.current_back_off),setTimeout(r,e.current_back_off)}(n,r,o,(function(){er(e,t,n,r)}))}else r.emit("complete",i),r.removeAllListeners();
|
|
1393
1393
|
/* istanbul ignore if */}function T(e,t,i){
|
|
1394
1394
|
/* istanbul ignore if */
|
|
1395
1395
|
if(r.cancelled)return $();
|
|
1396
1396
|
// Attach 'pending' property if server supports it (CouchDB 2.0+)
|
|
1397
|
-
/* istanbul ignore if */"number"==typeof t&&(f.pending=t),
|
|
1397
|
+
/* istanbul ignore if */"number"==typeof t&&(f.pending=t),Z(n)(e)&&(f.seq=e.seq||i,f.changes.push(e),s((function(){E(0===c.length&&O.live)})))}function D(e){
|
|
1398
1398
|
/* istanbul ignore if */
|
|
1399
1399
|
if(_=!1,r.cancelled)return $();
|
|
1400
1400
|
// if no results were returned then we're done,
|
|
@@ -1403,30 +1403,30 @@ if(e.results.length>0)O.since=e.results[e.results.length-1].seq,I(),E(!0);else{v
|
|
|
1403
1403
|
// update the checkpoint so we start from the right seq next time
|
|
1404
1404
|
o||0!==e.results.length?t():(l=!0,a.writeCheckpoint(e.last_seq,j).then((function(){l=!1,i.last_seq=p=e.last_seq,t()})).catch(M))}}function L(e){
|
|
1405
1405
|
/* istanbul ignore if */
|
|
1406
|
-
if(_=!1,r.cancelled)return $();
|
|
1406
|
+
if(_=!1,r.cancelled)return $();C("changes rejected",e)}function I(){if(!_&&!d&&c.length<g){_=!0,r._changes&&(// remove old changes() and listeners
|
|
1407
1407
|
r.removeListener("cancel",r._abortChanges),r._changes.cancel()),r.once("cancel",i);var t=e.changes(O).on("change",T);t.then(o,o),t.then(D).catch(L),n.retry&&(
|
|
1408
1408
|
// save for later so we can cancel if necessary
|
|
1409
1409
|
r._changes=t,r._abortChanges=i)}function i(){t.cancel()}function o(){r.removeListener("cancel",i)}}function R(){S().then((function(){
|
|
1410
1410
|
/* istanbul ignore if */
|
|
1411
|
-
if(!r.cancelled)return a.getCheckpoint().then((function(e){O={since:p=e,limit:y,batch_size:y,style:"all_docs",doc_ids:m,selector:
|
|
1411
|
+
if(!r.cancelled)return a.getCheckpoint().then((function(e){O={since:p=e,limit:y,batch_size:y,style:"all_docs",doc_ids:m,selector:b,return_docs:!0},n.filter&&("string"!=typeof n.filter?
|
|
1412
1412
|
// required for the client-side filter in onChange
|
|
1413
1413
|
O.include_docs=!0:// ddoc filter
|
|
1414
|
-
O.filter=n.filter),"heartbeat"in n&&(O.heartbeat=n.heartbeat),"timeout"in n&&(O.timeout=n.timeout),n.query_params&&(O.query_params=n.query_params),n.view&&(O.view=n.view),I()}));$()})).catch((function(e){
|
|
1415
|
-
/* istanbul ignore next */function M(e){l=!1,
|
|
1414
|
+
O.filter=n.filter),"heartbeat"in n&&(O.heartbeat=n.heartbeat),"timeout"in n&&(O.timeout=n.timeout),n.query_params&&(O.query_params=n.query_params),n.view&&(O.view=n.view),I()}));$()})).catch((function(e){C("getCheckpoint rejected with ",e)}))}
|
|
1415
|
+
/* istanbul ignore next */function M(e){l=!1,C("writeCheckpoint completed with error",e)}
|
|
1416
1416
|
/* istanbul ignore if */r.ready(e,t),r.cancelled?// cancelled immediately
|
|
1417
1417
|
$():(r._addedListeners||(r.once("cancel",$),"function"==typeof n.complete&&(r.once("error",n.complete),r.once("complete",(function(e){n.complete(null,e)}))),r._addedListeners=!0),void 0===n.since?R():S().then((function(){return l=!0,a.writeCheckpoint(n.since,j)})).then((function(){l=!1,
|
|
1418
1418
|
/* istanbul ignore if */
|
|
1419
1419
|
r.cancelled?$():(p=n.since,R())})).catch(M))}
|
|
1420
1420
|
// We create a basic promise so the caller can cancel the replication possibly
|
|
1421
1421
|
// before we have actually started listening to changes etc
|
|
1422
|
-
function
|
|
1422
|
+
function tr(){d.call(this),this.cancelled=!1,this.state="pending";var e=this,t=new Promise((function(t,n){e.once("complete",t),e.once("error",n)}));e.then=function(e,n){return t.then(e,n)},e.catch=function(e){return t.catch(e)},
|
|
1423
1423
|
// As we allow error handling via "error" event as well,
|
|
1424
1424
|
// put a stub in here so that rejecting never throws UnhandledError.
|
|
1425
|
-
e.catch((function(){}))}function
|
|
1425
|
+
e.catch((function(){}))}function nr(e,t){var n=t.PouchConstructor;return"string"==typeof e?new n(e,t):e}function rr(e,t,n,r){if("function"==typeof n&&(r=n,n={}),void 0===n&&(n={}),n.doc_ids&&!Array.isArray(n.doc_ids))throw H(z,"`doc_ids` filter parameter is not a list.");n.complete=r,(n=w(n)).continuous=n.continuous||n.live,n.retry="retry"in n&&n.retry,
|
|
1426
1426
|
/*jshint validthis:true */
|
|
1427
|
-
n.PouchConstructor=n.PouchConstructor||this;var i=new
|
|
1427
|
+
n.PouchConstructor=n.PouchConstructor||this;var i=new tr(n);return er(nr(e,n),nr(t,n),n,i),i}function ir(e,t,n,r){return"function"==typeof n&&(r=n,n={}),void 0===n&&(n={}),
|
|
1428
1428
|
/*jshint validthis:true */
|
|
1429
|
-
(n=
|
|
1429
|
+
(n=w(n)).PouchConstructor=n.PouchConstructor||this,new or(e=nr(e,n),t=nr(t,n),n,r)}function or(e,t,n,r){var i=this;this.canceled=!1;var o=n.push?T({},n,n.push):n,s=n.pull?T({},n,n.pull):n;function u(e){i.emit("change",{direction:"pull",change:e})}function a(e){i.emit("change",{direction:"push",change:e})}function c(e){i.emit("denied",{direction:"push",doc:e})}function f(e){i.emit("denied",{direction:"pull",doc:e})}function l(){i.pushPaused=!0,
|
|
1430
1430
|
/* istanbul ignore if */
|
|
1431
1431
|
i.pullPaused&&i.emit("paused")}function d(){i.pullPaused=!0,
|
|
1432
1432
|
/* istanbul ignore if */
|
|
@@ -1434,7 +1434,7 @@ i.pushPaused&&i.emit("paused")}function h(){i.pushPaused=!1,
|
|
|
1434
1434
|
/* istanbul ignore if */
|
|
1435
1435
|
i.pullPaused&&i.emit("active",{direction:"push"})}function p(){i.pullPaused=!1,
|
|
1436
1436
|
/* istanbul ignore if */
|
|
1437
|
-
i.pushPaused&&i.emit("active",{direction:"pull"})}this.push=
|
|
1437
|
+
i.pushPaused&&i.emit("active",{direction:"pull"})}this.push=rr(e,t,o),this.pull=rr(t,e,s),this.pushPaused=!0,this.pullPaused=!0;var v={};function y(e){// type is 'push' or 'pull'
|
|
1438
1438
|
return function(t,n){("change"===t&&(n===u||n===a)||"denied"===t&&(n===f||n===c)||"paused"===t&&(n===d||n===l)||"active"===t&&(n===p||n===h))&&(t in v||(v[t]={}),v[t][e]=!0,2===Object.keys(v[t]).length&&
|
|
1439
1439
|
// both push and pull have asked to be removed
|
|
1440
1440
|
i.removeAllListeners(t))}}function g(e,t,n){-1==e.listeners(t).indexOf(n)&&e.on(t,n)}n.live&&(this.push.on("complete",i.pull.cancel.bind(i.pull)),this.pull.on("complete",i.push.cancel.bind(i.push))),this.on("newListener",(function(e){"change"===e?(g(i.pull,"change",u),g(i.push,"change",a)):"denied"===e?(g(i.pull,"denied",f),g(i.push,"denied",c)):"active"===e?(g(i.pull,"active",p),g(i.push,"active",h)):"paused"===e&&(g(i.pull,"paused",d),g(i.push,"paused",l))})),this.on("removeListener",(function(e){"change"===e?(i.pull.removeListener("change",u),i.push.removeListener("change",a)):"denied"===e?(i.pull.removeListener("denied",f),i.push.removeListener("denied",c)):"active"===e?(i.pull.removeListener("active",p),i.push.removeListener("active",h)):"paused"===e&&(i.pull.removeListener("paused",d),i.push.removeListener("paused",l))})),this.pull.on("removeListener",y("pull")),this.push.on("removeListener",y("push"));var _=Promise.all([this.push,this.pull]).then((function(e){var t={push:e[0],pull:e[1]};return i.emit("complete",t),r&&r(null,t),i.removeAllListeners(),t}),(function(e){if(i.cancel(),r?
|
|
@@ -1446,15 +1446,15 @@ r(e):
|
|
|
1446
1446
|
// due to 'error' being a special event in EventEmitters
|
|
1447
1447
|
i.emit("error",e),i.removeAllListeners(),r)
|
|
1448
1448
|
// no sense throwing if we're already emitting an 'error' event
|
|
1449
|
-
throw e}));this.then=function(e,t){return _.then(e,t)},this.catch=function(e){return _.catch(e)}}
|
|
1449
|
+
throw e}));this.then=function(e,t){return _.then(e,t)},this.catch=function(e){return _.catch(e)}}Wn.prototype.getCheckpoint=function(){var e=this;return e.opts&&e.opts.writeSourceCheckpoint&&!e.opts.writeTargetCheckpoint?e.src.get(e.id).then((function(e){return e.last_seq||0})).catch((function(e){
|
|
1450
1450
|
/* istanbul ignore if */
|
|
1451
1451
|
if(404!==e.status)throw e;return 0})):e.target.get(e.id).then((function(t){return e.opts&&e.opts.writeTargetCheckpoint&&!e.opts.writeSourceCheckpoint?t.last_seq||0:e.src.get(e.id).then((function(e){
|
|
1452
1452
|
// Since we can't migrate an old version doc to a new one
|
|
1453
1453
|
// (no session id), we just go with the lowest seq in this case
|
|
1454
1454
|
/* istanbul ignore if */
|
|
1455
|
-
return t.version!==e.version?0:(n=t.version?t.version.toString():"undefined")in
|
|
1456
|
-
/* istanbul ignore next */;var n}),(function(n){if(404===n.status&&t.last_seq)return e.src.put({_id:e.id,last_seq:0}).then((function(){return 0}),(function(n){return
|
|
1457
|
-
/* istanbul ignore next */}));throw n}))})).catch((function(e){if(404!==e.status)throw e;return 0}))},l(
|
|
1455
|
+
return t.version!==e.version?0:(n=t.version?t.version.toString():"undefined")in Yn?Yn[n](t,e):0
|
|
1456
|
+
/* istanbul ignore next */;var n}),(function(n){if(404===n.status&&t.last_seq)return e.src.put({_id:e.id,last_seq:0}).then((function(){return 0}),(function(n){return Zn(n)?(e.opts.writeSourceCheckpoint=!1,t.last_seq):0
|
|
1457
|
+
/* istanbul ignore next */}));throw n}))})).catch((function(e){if(404!==e.status)throw e;return 0}))},l(tr,d),tr.prototype.cancel=function(){this.cancelled=!0,this.state="cancelled",this.emit("cancel")},tr.prototype.ready=function(e,t){var n=this;function r(){n.cancel()}n._readyCalled||(n._readyCalled=!0,e.once("destroyed",r),t.once("destroyed",r),n.once("complete",(function(){e.removeListener("destroyed",r),t.removeListener("destroyed",r)})))},l(or,d),or.prototype.cancel=function(){this.canceled||(this.canceled=!0,this.push.cancel(),this.pull.cancel())},Xe.plugin((function(e){e.adapter("idb",fn,!0)})).plugin((function(e){e.adapter("http",mn,!1),e.adapter("https",mn,!1)})).plugin(Jn).plugin((function(e){e.replicate=rr,e.sync=ir,Object.defineProperty(e.prototype,"replicate",{get:function(){var e=this;return void 0===this.replicateMethods&&(this.replicateMethods={from:function(t,n,r){return e.constructor.replicate(t,e,n,r)},to:function(t,n,r){return e.constructor.replicate(e,t,n,r)}}),this.replicateMethods}}),e.prototype.sync=function(e,t,n){return this.constructor.sync(this,e,t,n)}})),t.exports=Xe}).call(this)}).call(this,e("_process"))},{_process:22,argsarray:1,events:3,immediate:4,inherits:11,"spark-md5":23,uuid:13,vuvuzela:24}],11:[function(e,t,n){"function"==typeof Object.create?
|
|
1458
1458
|
// implementation from standard node.js 'util' module
|
|
1459
1459
|
t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:
|
|
1460
1460
|
// old school shim for old browsers
|
|
@@ -1521,7 +1521,7 @@ e[t>>5]|=128<<t%32,e[r(t)-1]=t;let n=1732584193,o=-271733879,f=-1732584194,l=271
|
|
|
1521
1521
|
const r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),i=new Uint8Array(16)},{}],16:[function(e,t,n){"use strict";
|
|
1522
1522
|
// Adapted from Chris Veness' SHA1 code at
|
|
1523
1523
|
// http://www.movable-type.co.uk/scripts/sha1.html
|
|
1524
|
-
function r(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r
|
|
1524
|
+
function r(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function i(e,t){return e<<t|e>>>32-t}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));// UTF8 escape
|
|
1525
1525
|
e=[];for(let n=0;n<t.length;++n)e.push(t.charCodeAt(n))}e.push(128);const o=e.length/4+2,s=Math.ceil(o/16),u=new Array(s);for(let t=0;t<s;++t){const n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=e[64*t+4*r]<<24|e[64*t+4*r+1]<<16|e[64*t+4*r+2]<<8|e[64*t+4*r+3];u[t]=n}u[s-1][14]=8*(e.length-1)/Math.pow(2,32),u[s-1][14]=Math.floor(u[s-1][14]),u[s-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<s;++e){const o=new Uint32Array(80);for(let t=0;t<16;++t)o[t]=u[e][t];for(let e=16;e<80;++e)o[e]=i(o[e-3]^o[e-8]^o[e-14]^o[e-16],1);let s=n[0],a=n[1],c=n[2],f=n[3],l=n[4];for(let e=0;e<80;++e){const n=Math.floor(e/20),u=i(s,5)+r(n,a,c,f)+l+t[n]+o[e]>>>0;l=f,f=c,c=i(a,30)>>>0,a=s,s=u}n[0]=n[0]+s>>>0,n[1]=n[1]+a>>>0,n[2]=n[2]+c>>>0,n[3]=n[3]+f>>>0,n[4]=n[4]+l>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}},{}],17:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=o(e("./rng.js")),i=o(e("./bytesToUuid.js"));function o(e){return e&&e.__esModule?e:{default:e}}
|
|
1526
1526
|
// **`v1()` - Generate time-based UUID**
|
|
1527
1527
|
// Inspired by https://github.com/LiosK/UUID.js
|