PWA Open Source Licenses

PWA Open Source Licenses

Out of date, to be updated

The following NPM packages may be included in this product:

  • call-bind@1.0.2

  • get-intrinsic@1.1.1

These packages each contain the following license and notice below:

MIT License

Copyright (c) 2020 Jordan Harband

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


The following NPM package may be included in this product:

  • clone@2.1.2

This package contains the following license and notice below:

Copyright © 2011-2015 Paul Vorbach paul@vorba.ch

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


The following NPM package may be included in this product:

  • core-js@3.9.0

This package contains the following license and notice below:

Copyright (c) 2014-2021 Denis Pushkarev

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


The following NPM package may be included in this product:

  • crypto-js@3.3.0

This package contains the following license and notice below:

License

The MIT License (MIT)

Copyright (c) 2009-2013 Jeff Mott
Copyright (c) 2013-2016 Evan Vosberg

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


The following NPM package may be included in this product:

  • deep-equal@1.1.1

This package contains the following license and notice below:

MIT License

Copyright (c) 2012, 2013, 2014 James Halliday mail@substack.net, 2009 Thomas Robinson <http://280north.com >

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


The following NPM package may be included in this product:

  • deepmerge@4.2.2

This package contains the following license and notice below:

The MIT License (MIT)

Copyright (c) 2012 James Halliday, Josh Duff, and other contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


The following NPM package may be included in this product:

  • define-properties@1.1.3

This package contains the following license and notice below:

The MIT License (MIT)

Copyright (C) 2015 Jordan Harband

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


The following NPM package may be included in this product:

  • dexie-export-import@1.0.0

This package contains the following license and notice below:

Export and Import IndexedDB Database

Export / Import IndexedDB <---> Blob

This module extends 'dexie' module with new methods for importing / exporting databases to / from blobs.

Install

npm install dexie npm install dexie-export-import

Usage

Here's the basic usage. There's a lot you can do by supplying optional [options] arguments. The available options are described later on in this README (See Typescript interfaces below).

NOTE: Typescript users using dexie@2.x will get compilation errors if using the static import method Dexie.import().

import Dexie from "dexie"; import "dexie-export-import"; // // Import from Blob or File to Dexie instance: // const db = await Dexie.import(blob, [options]); // // Export to Blob // const blob = await db.export([options]); // // Import from Blob or File to existing Dexie instance // await db.import(blob, [options]);

Sample

Here's a working sample on CodePen. It uses downloadjs to deliver the blob as a "file download" to the user. For receiving an import file, it uses a drop area where you can drop your JSON file. Click the Console tab in the bottom to see what progressCallbacks receive.

Even though this sample doesn't show it, blobs can also be sent or retrieved to/from a server, using the fetch API.

Features

  • Export of IndexedDB Database to JSON Blob.

  • Import from Blob back to IndexedDB Database.

  • An import Blob can be retrieved from an URL (using fetch()) or from a user-input file (dropped or browsed to).

  • An export Blob can be either given end-user to be stored in Downloaded Files, or be send to a server over HTTP(S) using fetch().

  • Chunk-wise / Streaming - does not read the entire DB into RAM

  • Progress callback (typically for showing progress bar)

  • Optional filter allows to import/export subset of data

  • Support for all structured clonable exotic types (Date, ArrayBuffer, Blob, etc) except CryptoKeys (which by design cannot be exported)

  • Atomic - import / export within one database transaction (optional)

  • Export speed: Using getAll() in chunks rather than openCursor().

  • Import speed: Using bulkPut() in chunks rather than put().

  • Can well be run from a Web Worker (better speed + doesn't lock GUI).

  • Can also export IndexedDB databases that was not created with Dexie.

Compatibility

Product

Supported versions

Product

Supported versions

dexie

^2.0.4 or ^3.0.0-alpha.5

Safari

^10.1

IE

11

Edge

any version

Chrome

any version

FF

any version

Similar Libraries

indexeddb-export-import

Much smaller in size, but also much lighter than dexie-export-import.

Indexeddb-export-import can be better choice if:

  • your data contains no Dates, ArrayBuffers, TypedArrays or Blobs (only objects, strings, numbers, booleans and arrays).

  • your database is small enough to fit in RAM on your target devices.

Dexie-export-import was build to scale when exporting large databases without consuming much RAM. It does also support importing/exporting exotic types.

Interface

Importing this module will extend Dexie and Dexie.prototype as follows.

Even though this is conceptually a Dexie.js addon, there is no addon instance.

Extended interface is done into Dexie and Dexie.prototype as a side effect when

importing the module.

// // Extend Dexie interface (typescript-wise) // declare module 'dexie' { // Extend methods on db interface Dexie { export(options?: ExportOptions): Promise<Blob>; import(blob: Blob, options?: ImportOptions): Promise<void>; } interface DexieConstructor { import(blob: Blob, options?: StaticImportOptions): Promise<Dexie>; } }

StaticImportOptions and ImportOptions

These are the interfaces of the options optional arguments to Dexie.import() and Dexie.prototype.import(). All options are optional and defaults to undefined (falsy).

export interface StaticImportOptions { noTransaction?: boolean; chunkSizeBytes?: number; // Default: DEFAULT_KILOBYTES_PER_CHUNK ( 1MB ) filter?: (table: string, value: any, key?: any) => boolean; progressCallback?: (progress: ImportProgress) => boolean; } export interface ImportOptions extends StaticImportOptions { acceptMissingTables?: boolean; acceptVersionDiff?: boolean; acceptNameDiff?: boolean; acceptChangedPrimaryKey?: boolean; overwriteValues?: boolean; clearTablesBeforeImport?: boolean; noTransaction?: boolean; chunkSizeBytes?: number; // Default: DEFAULT_KILOBYTES_PER_CHUNK ( 1MB ) filter?: (table: string, value: any, key?: any) => boolean; progressCallback?: (progress: ImportProgress) => boolean; }

ImportProgress

This is the interface sent to the progressCallback.

export interface ImportProgress { totalTables: number; completedTables: number; totalRows: number; completedRows: number; done: boolean; }

ExportOptions

This is the interface of the options optional arguments to Dexie.prototype.export(). All options are optional and defaults to undefined (falsy).

export interface ExportOptions { noTransaction?: boolean; numRowsPerChunk?: number; prettyJson?: boolean; filter?: (table: string, value: any, key?: any) => boolean; progressCallback?: (progress: ExportProgress) => boolean; }

ExportProgress

This is the interface sent to the ExportOptions.progressCallback.

export interface ExportProgress { totalTables: number; completedTables: number; totalRows: number; completedRows: number; done: boolean; }

Defaults

These are the default chunk sizes used when not specified in the options object. We allow quite large chunks, but still not that large (1MB RAM is not much even for a small device).

const DEFAULT_KILOBYTES_PER_CHUNK = 1024; // When importing blob const DEFAULT_ROWS_PER_CHUNK = 2000; // When exporting db

JSON Format

The JSON format is described in the Typescript interface below. This JSON format is streamable as it is generated

in a streaming fashion, and imported also using a streaming fashion. Therefore, it is important that the data come

last in the file.

export interface DexieExportJsonStructure { formatName: 'dexie'; formatVersion: 1; data: { databaseName: string; databaseVersion: number; tables: Array<{ name: string; schema: string; // '++id,name,age' rowCount: number; }>; data: Array<{ // This property must be last (for streaming purpose) tableName: string; inbound: boolean; rows: any[]; // This property must be last (for streaming purpose) }>; } }

Example JSON File

{ "formatName": "dexie", "formatVersion": 1, "data": { "databaseName": "dexie-export-import-basic-tests", "databaseVersion": 1, "tables": [ { "name": "outbound", "schema": "", "rowCount": 2 }, { "name": "inbound", "schema": "++id", "rowCount": 3 } ], "data": [{ "tableName": "outbound", "inbound": false, "rows": [ [ 1, { "foo": "bar" } ], [ 2, { "bar": "foo" } ] ] },{ "tableName": "inbound", "inbound": true, "rows": [ { "id": 1, "date": 1, "fullBlob": { "type": "", "data": "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==" }, "binary": { "buffer": "AQID", "byteOffset": 0, "length": 3 }, "text": "foo", "bool": false, "$types": { "date": "date", "fullBlob": "blob2", "binary": "uint8array2", "binary.buffer": "arraybuffer" } }, { "id": 2, "foo": "bar" }, { "id": 3, "bar": "foo" } ] }] }

Exporting IndexedDB Databases that wasn't generated with Dexie

As Dexie can dynamically open non-Dexie IndexedDB databases, this is not an issue.

Sample provided here:

import Dexie from 'dexie'; import 'dexie-export-import'; async function exportDatabase(databaseName) { const db = await new Dexie(databaseName).open(); const blob = await db.export(); return blob; } async function importDatabase(file) { const db = await Dexie.import(file); return db.backendDB(); }

 

Background / Why

This feature has been asked for a lot:

My simple answer initially was this:

function export(db) { return db.transaction('r', db.tables, ()=>{ return Promise.all( db.tables.map(table => table.toArray() .then(rows => ({table: table.name, rows: rows}))); }); } function import(data, db) { return db.transaction('rw', db.tables, () => { return Promise.all(data.map (t => db.table(t.table).clear() .then(()=>db.table(t.table).bulkAdd(t.rows))); }); }

Looks simple!

But:

  1. The whole database has to fit in RAM. Can be issue on small devices.

  2. If using JSON.stringify() / JSON.parse() on the data, we won't support exotic types (Dates, Blobs, ArrayBuffers, etc)

  3. Not possible to show a progress while importing.

This addon solves these issues, and some more, with the help of some libraries.

Libraries Used

To accomplish a streamable export/import, and allow exotic types, I use the libraries listed below. Note that these libraries are listed as devDependencies because they are bundles using rollupjs - so there's no real dependency from the library user persective.

typeson and typeson-registry

These modules enables something similar as JSON.stringify() / JSON.parse() for exotic or custom types.

clarinet

This module allow to read JSON in a streaming fashion

Streaming JSON

I must admit that I had to do some research before I understood how to accomplish streaming JSON from client-side Javascript (both reading / writing). It is really not obvious that this would even be possible. Looking at the Blob interface, it does not provide any way of either reading or writing in a streamable fashion.

What I found though (after some googling) was that it is indeed possible to do that based on the current DOM platform (including IE11 !).

Reading JSON in Chunks

A File or Blob represents something that can lie on a disk file and not yet be in RAM. So how do we read the first 100 bytes from a Blob without reading it all?

const firstPart = blob.slice(0,100);

Ok, and in the next step we use a FileReader to really read this sliced Blob into memory.

const first100Chars = await readBlob(firstPart); function readBlob(blob: Blob): Promise<string> { return new Promise((resolve, reject) => { const reader = new FileReader(); reader.onabort = ev => reject(new Error("file read aborted")); reader.onerror = ev => reject((ev.target as any).error); reader.onload = ev => resolve((ev.target as any).result); reader.readAsText(blob); }); }

Voila!

But! How can we keep transactions alive when calling this non-indexedDB async call?

I use two different solutions for this:

  1. If we are in a Worker, I use new FileReaderSync() instead of new FileReader().

  2. If in the main thread, I use Dexie.waitFor() to while reading this short elapsed chunk, keeping the transaction alive still.

Ok, fine, but how do we parse the chunk then? Cannot use JSON.parse(firstPart) because it will most defenitely be incomplete.

Clarinet to the rescue. This library can read JSON and callback whenever JSON tokens come in.

Writing JSON in Chunks

Writing JSON is solved more easily. As the BlobBuilder interface was deprecated from the DOM, I firstly found this task impossible. But after digging around, I found that also this SHOULD be possible if browers implement the Blob interface correctly.

Blobs can be constructeed from an array of other Blobs. This is the key.

  1. Let's say we generate 1000 Blobs of 1MB each on a device with 512 MB RAM. If the browser does its job well, it will allow the first 200 blobs or so to reside in RAM. But then, it should start putting the remanding blobs onto temporary files.

  2. We put all these 1000 blobs into an array and generate a final Blob from that array.

And that's pretty much it.


The following NPM package may be included in this product:

  • dexie@3.0.3

This package contains the following license and notice below:

Apache License

Version 2.0, January 2004 <http://www.apache.org/licenses/>

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

  1. Definitions.

    "License" shall mean the terms and conditions for use, reproduction,

    and distribution as defined by Sections 1 through 9 of this document.

    "Licensor" shall mean the copyright owner or entity authorized by

    the copyright owner that is granting the License.

    "Legal Entity" shall mean the union of the acting entity and all

    other entities that control, are controlled by, or are under common

    control with that entity. For the purposes of this definition,

    "control" means (i) the power, direct or indirect, to cause the

    direction or management of such entity, whether by contract or

    otherwise, or (ii) ownership of fifty percent (50%) or more of the

    outstanding shares, or (iii) beneficial ownership of such entity.

    "You" (or "Your") shall mean an individual or Legal Entity

    exercising permissions granted by this License.

    "Source" form shall mean the preferred form for making modifications,

    including but not limited to software source code, documentation

    source, and configuration files.

    "Object" form shall mean any form resulting from mechanical

    transformation or translation of a Source form, including but

    not limited to compiled object code, generated documentation,

    and conversions to other media types.

    "Work" shall mean the work of authorship, whether in Source or

    Object form, made available under the License, as indicated by a

    copyright notice that is included in or attached to the work

    (an example is provided in the Appendix below).

    "Derivative Works" shall mean any work, whether in Source or Object

    form, that is based on (or derived from) the Work and for which the

    editorial revisions, annotations, elaborations, or other modifications

    represent, as a whole, an original work of authorship. For the purposes

    of this License, Derivative Works shall not include works that remain

    separable from, or merely link (or bind by name) to the interfaces of,

    the Work and Derivative Works thereof.

    "Contribution" shall mean any work of authorship, including

    the original version of the Work and any modifications or additions

    to that Work or Derivative Works thereof, that is intentionally

    submitted to Licensor for inclusion in the Work by the copyright owner

    or by an individual or Legal Entity authorized to submit on behalf of

    the copyright owner. For the purposes of this definition, "submitted"

    means any form of electronic, verbal, or written communication sent

    to the Licensor or its representatives, including but not limited to

    communication on electronic mailing lists, source code control systems,

    and issue tracking systems that are managed by, or on behalf of, the

    Licensor for the purpose of discussing and improving the Work, but

    excluding communication that is conspicuously marked or otherwise

    designated in writing by the copyright owner as "Not a Contribution."

    "Contributor" shall mean Licensor and any individual or Legal Entity

    on behalf of whom a Contribution has been received by Licensor and

    subsequently incorporated within the Work.

  2. Grant of Copyright License. Subject to the terms and conditions of

    this License, each Contributor hereby grants to You a perpetual,

    worldwide, non-exclusive, no-charge, royalty-free, irrevocable

    copyright license to reproduce, prepare Derivative Works of,

    publicly display, publicly perform, sublicense, and distribute the

    Work and such Derivative Works in Source or Object form.

  3. Grant of Patent License. Subject to the terms and conditions of

    this License, each Contributor hereby grants to You a perpetual,

    worldwide, non-exclusive, no-charge, royalty-free, irrevocable

    (except as stated in this section) patent license to make, have made,

    use, offer to sell, sell, import, and otherwise transfer the Work,

    where such license applies only to those patent claims licensable

    by such Contributor that are necessarily infringed by their

    Contribution(s) alone or by combination of their Contribution(s)

    with the Work to which such Contribution(s) was submitted. If You

    institute patent litigation against any entity (including a

    cross-claim or counterclaim in a lawsuit) alleging that the Work

    or a Contribution incorporated within the Work constitutes direct

    or contributory patent infringement, then any patent licenses

    granted to You under this License for that Work shall terminate

    as of the date such litigation is filed.

  4. Redistribution. You may reproduce and distribute copies of the

    Work or Derivative Works thereof in any medium, with or without

    modifications, and in Source or Object form, provided that You

    meet the following conditions:

    (a) You must give any other recipients of the Work or

    Derivative Works a copy of this License; and

    (b) You must cause any modified files to carry prominent notices

    stating that You changed the files; and

    (c) You must retain, in the Source form of any Derivative Works

    that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and

    (d) If the Work includes a "NOTICE" text file as part of its

    distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.

    You may add Your own copyright statement to Your modifications and

    may provide additional or different license terms and conditions

    for use, reproduction, or distribution of Your modifications, or

    for any such Derivative Works as a whole, provided Your use,

    reproduction, and distribution of the Work otherwise complies with

    the conditions stated in this License.

  5. Submission of Contributions. Unless You explicitly state otherwise,

    any Contribution intentionally submitted for inclusion in the Work

    by You to the Licensor shall be under the terms and conditions of

    this License, without any additional terms or conditions.

    Notwithstanding the above, nothing herein shall supersede or modify

    the terms of any separate license agreement you may have executed

    with Licensor regarding such Contributions.

  6. Trademarks. This License does not grant permission to use the trade

    names, trademarks, service marks, or product names of the Licensor,

    except as required for reasonable and customary use in describing the

    origin of the Work and reproducing the content of the NOTICE file.

  7. Disclaimer of Warranty. Unless required by applicable law or

    agreed to in writing, Licensor provides the Work (and each

    Contributor provides its Contributions) on an "AS IS" BASIS,

    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or

    implied, including, without limitation, any warranties or conditions

    of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A

    PARTICULAR PURPOSE. You are solely responsible for determining the

    appropriateness of using or redistributing the Work and assume any

    risks associated with Your exercise of permissions under this License.

  8. Limitation of Liability. In no event and under no legal theory,

    whether in tort (including negligence), contract, or otherwise,

    unless required by applicable law (such as deliberate and grossly

    negligent acts) or agreed to in writing, shall any Contributor be

    liable to You for damages, including any direct, indirect, special,

    incidental, or consequential damages of any character arising as a

    result of this License or out of the use or inability to use the

    Work (including but not limited to damages for loss of goodwill,

    work stoppage, computer failure or malfunction, or any and all

    other commercial damages or losses), even if such Contributor

    has been advised of the possibility of such damages.

  9. Accepting Warranty or Additional Liability. While redistributing

    the Work or Derivative Works thereof, You may choose to offer,

    and charge a fee for, acceptance of support, warranty, indemnity,

    or other liability obligations and/or rights consistent with this

    License. However, in accepting such obligations, You may act only

    on Your own behalf and on Your sole responsibility, not on behalf

    of any other Contributor, and only if You agree to indemnify,

    defend, and hold each Contributor harmless for any liability

    incurred by, or claims asserted against, such Contributor by reason

    of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.

Copyright {yyyy} {name of copyright owner}

Licensed under the Apache License, Version 2.0 (the "License");

you may not use this file except in compliance with the License.

You may obtain a copy of the License at

<http://www.apache.org/licenses/LICENSE-2.0>

Unless required by applicable law or agreed to in writing, software

distributed under the License is distributed on an "AS IS" BASIS,

WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and

limitations under the License.


The following NPM package may be included in this product:

  • dompurify@2.2.6

This package contains the following license and notice below:

DOMPurify

Copyright 2015 Mario Heiderich

DOMPurify is free software; you can redistribute it and/or modify it under the

terms of either:

a) the Apache License Version 2.0, or

b) the Mozilla Public License Version 2.0


Licensed under the Apache License, Version 2.0 (the "License");

you may not use this file except in compliance with the License.

You may obtain a copy of the License at

<http://www.apache.org/licenses/LICENSE-2.0> Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Mozilla Public License, version 2.0

  1. Definitions

1.1. “Contributor”

means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software.

1.2. “Contributor Version”

means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor’s Contribution.

1.3. “Contribution”

means Covered Software of a particular Contributor.

1.4. “Covered Software”