diff --git a/.github/fabricbot.json b/.github/fabricbot.json index dd4a25c756..1dfbf0f9d3 100644 --- a/.github/fabricbot.json +++ b/.github/fabricbot.json @@ -48,9 +48,7 @@ } ], "eventType": "issue", - "eventNames": [ - "issue_comment" - ] + "eventNames": ["issue_comment"] }, "id": "CIypIJG15L" }, @@ -92,10 +90,7 @@ } ], "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ] + "eventNames": ["issues", "project_card"] }, "id": "tfFb5MZkEN" }, @@ -109,206 +104,31 @@ "frequency": [ { "weekDay": 0, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] + "hours": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] }, { "weekDay": 1, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] + "hours": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] }, { "weekDay": 2, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] + "hours": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] }, { "weekDay": 3, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] + "hours": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] }, { "weekDay": 4, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] + "hours": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] }, { "weekDay": 5, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] + "hours": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] }, { "weekDay": 6, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] + "hours": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] } ], "searchTerms": [ @@ -358,206 +178,31 @@ "frequency": [ { "weekDay": 0, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] + "hours": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] }, { "weekDay": 1, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] + "hours": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] }, { "weekDay": 2, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] + "hours": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] }, { "weekDay": 3, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] + "hours": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] }, { "weekDay": 4, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] + "hours": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] }, { "weekDay": 5, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] + "hours": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] }, { "weekDay": 6, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] + "hours": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] } ], "searchTerms": [ @@ -615,206 +260,31 @@ "frequency": [ { "weekDay": 0, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] + "hours": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] }, { "weekDay": 1, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] + "hours": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] }, { "weekDay": 2, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] + "hours": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] }, { "weekDay": 3, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] + "hours": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] }, { "weekDay": 4, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] + "hours": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] }, { "weekDay": 5, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] + "hours": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] }, { "weekDay": 6, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] + "hours": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] } ], "searchTerms": [ @@ -861,9 +331,7 @@ "version": "1.0", "config": { "eventType": "issue", - "eventNames": [ - "issue_comment" - ], + "eventNames": ["issue_comment"], "conditions": { "operator": "and", "operands": [ @@ -983,9 +451,7 @@ ] }, "eventType": "issue", - "eventNames": [ - "issue_comment" - ], + "eventNames": ["issue_comment"], "taskName": "For issues closed due to inactivity, re-open an issue if issue author posts a reply within 7 days.", "actions": [ { @@ -1062,9 +528,7 @@ ] }, "eventType": "issue", - "eventNames": [ - "issue_comment" - ], + "eventNames": ["issue_comment"], "taskName": "For issues closed with no activity over 7 days, ask non-contributor to consider opening a new issue instead.", "actions": [ { @@ -1086,66 +550,31 @@ "frequency": [ { "weekDay": 0, - "hours": [ - 0, - 6, - 12, - 18 - ] + "hours": [0, 6, 12, 18] }, { "weekDay": 1, - "hours": [ - 0, - 6, - 12, - 18 - ] + "hours": [0, 6, 12, 18] }, { "weekDay": 2, - "hours": [ - 0, - 6, - 12, - 18 - ] + "hours": [0, 6, 12, 18] }, { "weekDay": 3, - "hours": [ - 0, - 6, - 12, - 18 - ] + "hours": [0, 6, 12, 18] }, { "weekDay": 4, - "hours": [ - 0, - 6, - 12, - 18 - ] + "hours": [0, 6, 12, 18] }, { "weekDay": 5, - "hours": [ - 0, - 6, - 12, - 18 - ] + "hours": [0, 6, 12, 18] }, { "weekDay": 6, - "hours": [ - 0, - 6, - 12, - 18 - ] + "hours": [0, 6, 12, 18] } ], "searchTerms": [ @@ -1213,9 +642,7 @@ } ], "eventType": "pull_request", - "eventNames": [ - "pull_request_review" - ] + "eventNames": ["pull_request_review"] }, "id": "UoZhI9Xa_b" }, @@ -1265,11 +692,7 @@ } ], "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ] + "eventNames": ["pull_request", "issues", "project_card"] }, "id": "OBnWQyDvQP" }, @@ -1308,9 +731,7 @@ } ], "eventType": "pull_request", - "eventNames": [ - "issue_comment" - ] + "eventNames": ["issue_comment"] }, "id": "-vTgwlrBFi" }, @@ -1349,9 +770,7 @@ } ], "eventType": "pull_request", - "eventNames": [ - "pull_request_review" - ] + "eventNames": ["pull_request_review"] }, "id": "n0PmRx-B7j" }, @@ -1393,11 +812,7 @@ } ], "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ] + "eventNames": ["pull_request", "issues", "project_card"] }, "id": "wnHBiGRhLL" }, @@ -1428,9 +843,7 @@ } ], "eventType": "pull_request", - "eventNames": [ - "issue_comment" - ] + "eventNames": ["issue_comment"] }, "id": "zQ4HFBl0o8" }, @@ -1461,9 +874,7 @@ } ], "eventType": "pull_request", - "eventNames": [ - "pull_request_review" - ] + "eventNames": ["pull_request_review"] }, "id": "8Zyb0OGTkn" }, @@ -1477,66 +888,31 @@ "frequency": [ { "weekDay": 0, - "hours": [ - 4, - 10, - 16, - 22 - ] + "hours": [4, 10, 16, 22] }, { "weekDay": 1, - "hours": [ - 4, - 10, - 16, - 22 - ] + "hours": [4, 10, 16, 22] }, { "weekDay": 2, - "hours": [ - 4, - 10, - 16, - 22 - ] + "hours": [4, 10, 16, 22] }, { "weekDay": 3, - "hours": [ - 4, - 10, - 16, - 22 - ] + "hours": [4, 10, 16, 22] }, { "weekDay": 4, - "hours": [ - 4, - 10, - 16, - 22 - ] + "hours": [4, 10, 16, 22] }, { "weekDay": 5, - "hours": [ - 4, - 10, - 16, - 22 - ] + "hours": [4, 10, 16, 22] }, { "weekDay": 6, - "hours": [ - 4, - 10, - 16, - 22 - ] + "hours": [4, 10, 16, 22] } ], "searchTerms": [ @@ -1586,66 +962,31 @@ "frequency": [ { "weekDay": 0, - "hours": [ - 5, - 11, - 17, - 23 - ] + "hours": [5, 11, 17, 23] }, { "weekDay": 1, - "hours": [ - 5, - 11, - 17, - 23 - ] + "hours": [5, 11, 17, 23] }, { "weekDay": 2, - "hours": [ - 5, - 11, - 17, - 23 - ] + "hours": [5, 11, 17, 23] }, { "weekDay": 3, - "hours": [ - 5, - 11, - 17, - 23 - ] + "hours": [5, 11, 17, 23] }, { "weekDay": 4, - "hours": [ - 5, - 11, - 17, - 23 - ] + "hours": [5, 11, 17, 23] }, { "weekDay": 5, - "hours": [ - 5, - 11, - 17, - 23 - ] + "hours": [5, 11, 17, 23] }, { "weekDay": 6, - "hours": [ - 5, - 11, - 17, - 23 - ] + "hours": [5, 11, 17, 23] } ], "searchTerms": [ @@ -1734,10 +1075,7 @@ ] }, "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], + "eventNames": ["issues", "project_card"], "taskName": "Add \"work-in Progress\" label when moved to In progress column in the project", "actions": [ { @@ -1792,10 +1130,7 @@ ] }, "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], + "eventNames": ["issues", "project_card"], "taskName": "Add Blocked label when moved to blocked column in the project", "actions": [ { @@ -1862,10 +1197,7 @@ ] }, "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], + "eventNames": ["issues", "project_card"], "taskName": "Add needs triage label with welcome message", "actions": [ { @@ -1907,10 +1239,7 @@ ] }, "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], + "eventNames": ["issues", "project_card"], "taskName": "Add Completed label when moved to Done column in the project", "actions": [ { @@ -1964,10 +1293,7 @@ ] }, "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], + "eventNames": ["issues", "project_card"], "taskName": "Add Needs Triage label when moved to Need Triage column in the project", "actions": [ { @@ -2021,10 +1347,7 @@ ] }, "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], + "eventNames": ["issues", "project_card"], "taskName": "Add In Review label when moved to To do column in the project", "actions": [ { @@ -2073,10 +1396,7 @@ "operands": [] }, "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], + "eventNames": ["issues", "project_card"], "taskName": "Add Completed label when moved to Completed column in the project" } }, @@ -2092,10 +1412,7 @@ "operands": [] }, "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], + "eventNames": ["issues", "project_card"], "taskName": "Add Completed label when moved to Completed column in the project" } }, @@ -2111,10 +1428,7 @@ "operands": [] }, "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ] + "eventNames": ["issues", "project_card"] } }, { @@ -2129,10 +1443,7 @@ "operands": [] }, "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], + "eventNames": ["issues", "project_card"], "taskName": "Add Completed label when moved to Completed column in the project" } }, @@ -2148,10 +1459,7 @@ "operands": [] }, "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], + "eventNames": ["issues", "project_card"], "taskName": "Add Completed label when moved to Completed column in the project" } }, @@ -2198,10 +1506,7 @@ ] }, "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], + "eventNames": ["issues", "project_card"], "taskName": "Add needs triage label to new issues", "actions": [ { @@ -2257,10 +1562,7 @@ ] }, "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], + "eventNames": ["issues", "project_card"], "taskName": "Add needs triage label to new issues", "actions": [ { @@ -2316,10 +1618,7 @@ ] }, "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], + "eventNames": ["issues", "project_card"], "taskName": "Add needs triage label to new issues", "actions": [ { @@ -2375,10 +1674,7 @@ ] }, "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], + "eventNames": ["issues", "project_card"], "taskName": "Add needs triage label to new issues", "actions": [ { @@ -2434,10 +1730,7 @@ ] }, "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], + "eventNames": ["issues", "project_card"], "taskName": "Add needs triage label to new issues", "actions": [ { @@ -2469,11 +1762,7 @@ ] }, "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ], + "eventNames": ["pull_request", "issues", "project_card"], "actions": [ { "name": "addReply", diff --git a/.github/policies/branch-protection.yml b/.github/policies/branch-protection.yml index 8f2258c180..b422fb7132 100644 --- a/.github/policies/branch-protection.yml +++ b/.github/policies/branch-protection.yml @@ -6,26 +6,26 @@ description: Organization branch protection policy for Microsoft Graph Toolkit r resource: repository configuration: branchProtectionRules: - - branchNamePattern: next/* - requiredApprovingReviewsCount: - min: 1 - # Must have a CODEOWNER approve for the PR to be merged. - requireCodeOwnersReview: true - - # Dismiss stale pull request approvals when new commits are pushed - dismissStaleReviews: true - - # Require conversation resolution before merging. Address all concerns, and resolve in the GitHub PR UI. - requiresConversationResolution: true + - branchNamePattern: next/* + requiredApprovingReviewsCount: + min: 1 + # Must have a CODEOWNER approve for the PR to be merged. + requireCodeOwnersReview: true - # Require status checks to pass before merging. TODO: this value should be true, we should work to support this. - # Used with the requiredStatusChecks setting to specify which checks must pass for the PR to be merged. - requiresStrictStatusChecks: true + # Dismiss stale pull request approvals when new commits are pushed + dismissStaleReviews: true - requiredStatusChecks: - - GitOps/AdvancedSecurity - - license/cla - - check-build-matrix - - # TODO: all commits should be signed. We need to get everyone signing their commits. - requiresCommitSignatures: false + # Require conversation resolution before merging. Address all concerns, and resolve in the GitHub PR UI. + requiresConversationResolution: true + + # Require status checks to pass before merging. TODO: this value should be true, we should work to support this. + # Used with the requiredStatusChecks setting to specify which checks must pass for the PR to be merged. + requiresStrictStatusChecks: true + + requiredStatusChecks: + - GitOps/AdvancedSecurity + - license/cla + - check-build-matrix + + # TODO: all commits should be signed. We need to get everyone signing their commits. + requiresCommitSignatures: false diff --git a/.github/workflows/project-automation.yml b/.github/workflows/project-automation.yml index 428aadf46b..f1408d369d 100644 --- a/.github/workflows/project-automation.yml +++ b/.github/workflows/project-automation.yml @@ -32,8 +32,8 @@ jobs: }' -f org=$PROJECT_ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json echo 'PROJECT_ID='$(jq '.data.organization.projectNext.id' project_data.json) >> $GITHUB_ENV - - - name: Add issue to project + + - name: Add issue to project env: GITHUB_TOKEN: ${{ secrets.PROJECT_ACCESS_TOKEN }} ISSUE_ID: ${{ github.event.issue.node_id }} @@ -43,4 +43,4 @@ jobs: addProjectNextItem(input: {projectId: $project, contentId: $issue}) { projectNextItem { id } } - }' -f project=$PROJECT_ID -f issue=$ISSUE_ID \ No newline at end of file + }' -f project=$PROJECT_ID -f issue=$ISSUE_ID diff --git a/.vscode/launch.json b/.vscode/launch.json index aa5d14456f..41619e2ae0 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,7 @@ "version": "0.2.0", "configurations": [ { - "type": "edge", + "type": "msedge", "request": "launch", "name": "Launch Edge Canary against localhost", "url": "http://localhost:3000", @@ -13,7 +13,7 @@ "version": "canary" }, { - "type": "edge", + "type": "msedge", "request": "launch", "name": "Launch Edge Dev against localhost", "url": "http://localhost:3000", @@ -28,6 +28,14 @@ "console": "integratedTerminal", "internalConsoleOptions": "neverOpen", "port": 9229 + }, + { + "name": "Tests debug (Edge)", + "request": "launch", + "type": "msedge", + "url": "http://localhost:8000/", + "webRoot": "${workspaceRoot}", + "sourceMaps": true } ] } diff --git a/assets/workbox-dae083bf.js b/assets/workbox-dae083bf.js index 6ed0c7ade9..99b53de717 100644 --- a/assets/workbox-dae083bf.js +++ b/assets/workbox-dae083bf.js @@ -1,2 +1,644 @@ -define(["exports"], (function (t) { "use strict"; try { self["workbox:core:6.4.1"] && _() } catch (t) { } const e = (t, ...e) => { let s = t; return e.length > 0 && (s += ` :: ${JSON.stringify(e)}`), s }; class s extends Error { constructor(t, s) { super(e(t, s)), this.name = t, this.details = s } } try { self["workbox:routing:6.4.1"] && _() } catch (t) { } const n = t => t && "object" == typeof t ? t : { handle: t }; class i { constructor(t, e, s = "GET") { this.handler = n(e), this.match = t, this.method = s } setCatchHandler(t) { this.catchHandler = n(t) } } class r extends i { constructor(t, e, s) { super((({ url: e }) => { const s = t.exec(e.href); if (s && (e.origin === location.origin || 0 === s.index)) return s.slice(1) }), e, s) } } class o { constructor() { this.t = new Map, this.i = new Map } get routes() { return this.t } addFetchListener() { self.addEventListener("fetch", (t => { const { request: e } = t, s = this.handleRequest({ request: e, event: t }); s && t.respondWith(s) })) } addCacheListener() { self.addEventListener("message", (t => { if (t.data && "CACHE_URLS" === t.data.type) { const { payload: e } = t.data, s = Promise.all(e.urlsToCache.map((e => { "string" == typeof e && (e = [e]); const s = new Request(...e); return this.handleRequest({ request: s, event: t }) }))); t.waitUntil(s), t.ports && t.ports[0] && s.then((() => t.ports[0].postMessage(!0))) } })) } handleRequest({ request: t, event: e }) { const s = new URL(t.url, location.href); if (!s.protocol.startsWith("http")) return; const n = s.origin === location.origin, { params: i, route: r } = this.findMatchingRoute({ event: e, request: t, sameOrigin: n, url: s }); let o = r && r.handler; const a = t.method; if (!o && this.i.has(a) && (o = this.i.get(a)), !o) return; let c; try { c = o.handle({ url: s, request: t, event: e, params: i }) } catch (t) { c = Promise.reject(t) } const h = r && r.catchHandler; return c instanceof Promise && (this.o || h) && (c = c.catch((async n => { if (h) try { return await h.handle({ url: s, request: t, event: e, params: i }) } catch (t) { t instanceof Error && (n = t) } if (this.o) return this.o.handle({ url: s, request: t, event: e }); throw n }))), c } findMatchingRoute({ url: t, sameOrigin: e, request: s, event: n }) { const i = this.t.get(s.method) || []; for (const r of i) { let i; const o = r.match({ url: t, sameOrigin: e, request: s, event: n }); if (o) return i = o, (Array.isArray(i) && 0 === i.length || o.constructor === Object && 0 === Object.keys(o).length || "boolean" == typeof o) && (i = void 0), { route: r, params: i } } return {} } setDefaultHandler(t, e = "GET") { this.i.set(e, n(t)) } setCatchHandler(t) { this.o = n(t) } registerRoute(t) { this.t.has(t.method) || this.t.set(t.method, []), this.t.get(t.method).push(t) } unregisterRoute(t) { if (!this.t.has(t.method)) throw new s("unregister-route-but-not-found-with-method", { method: t.method }); const e = this.t.get(t.method).indexOf(t); if (!(e > -1)) throw new s("unregister-route-route-not-registered"); this.t.get(t.method).splice(e, 1) } } let a; const c = { googleAnalytics: "googleAnalytics", precache: "precache-v2", prefix: "workbox", runtime: "runtime", suffix: "undefined" != typeof registration ? registration.scope : "" }, h = t => [c.prefix, t, c.suffix].filter((t => t && t.length > 0)).join("-"), u = t => t || h(c.precache), l = t => t || h(c.runtime); function f(t, e) { const s = e(); return t.waitUntil(s), s } try { self["workbox:precaching:6.4.1"] && _() } catch (t) { } function w(t) { if (!t) throw new s("add-to-cache-list-unexpected-type", { entry: t }); if ("string" == typeof t) { const e = new URL(t, location.href); return { cacheKey: e.href, url: e.href } } const { revision: e, url: n } = t; if (!n) throw new s("add-to-cache-list-unexpected-type", { entry: t }); if (!e) { const t = new URL(n, location.href); return { cacheKey: t.href, url: t.href } } const i = new URL(n, location.href), r = new URL(n, location.href); return i.searchParams.set("__WB_REVISION__", e), { cacheKey: i.href, url: r.href } } class d { constructor() { this.updatedURLs = [], this.notUpdatedURLs = [], this.handlerWillStart = async ({ request: t, state: e }) => { e && (e.originalRequest = t) }, this.cachedResponseWillBeUsed = async ({ event: t, state: e, cachedResponse: s }) => { if ("install" === t.type && e && e.originalRequest && e.originalRequest instanceof Request) { const t = e.originalRequest.url; s ? this.notUpdatedURLs.push(t) : this.updatedURLs.push(t) } return s } } } class p { constructor({ precacheController: t }) { this.cacheKeyWillBeUsed = async ({ request: t, params: e }) => { const s = (null == e ? void 0 : e.cacheKey) || this.h.getCacheKeyForURL(t.url); return s ? new Request(s, { headers: t.headers }) : t }, this.h = t } } let y; async function g(t, e) { let n = null; if (t.url) { n = new URL(t.url).origin } if (n !== self.location.origin) throw new s("cross-origin-copy-response", { origin: n }); const i = t.clone(), r = { headers: new Headers(i.headers), status: i.status, statusText: i.statusText }, o = e ? e(r) : r, a = function () { if (void 0 === y) { const t = new Response(""); if ("body" in t) try { new Response(t.body), y = !0 } catch (t) { y = !1 } y = !1 } return y }() ? i.body : await i.blob(); return new Response(a, o) } function R(t, e) { const s = new URL(t); for (const t of e) s.searchParams.delete(t); return s.href } class m { constructor() { this.promise = new Promise(((t, e) => { this.resolve = t, this.reject = e })) } } const v = new Set; try { self["workbox:strategies:6.4.1"] && _() } catch (t) { } function q(t) { return "string" == typeof t ? new Request(t) : t } class U { constructor(t, e) { this.u = {}, Object.assign(this, e), this.event = e.event, this.l = t, this.p = new m, this.g = [], this.R = [...t.plugins], this.m = new Map; for (const t of this.R) this.m.set(t, {}); this.event.waitUntil(this.p.promise) } async fetch(t) { const { event: e } = this; let n = q(t); if ("navigate" === n.mode && e instanceof FetchEvent && e.preloadResponse) { const t = await e.preloadResponse; if (t) return t } const i = this.hasCallback("fetchDidFail") ? n.clone() : null; try { for (const t of this.iterateCallbacks("requestWillFetch")) n = await t({ request: n.clone(), event: e }) } catch (t) { if (t instanceof Error) throw new s("plugin-error-request-will-fetch", { thrownErrorMessage: t.message }) } const r = n.clone(); try { let t; t = await fetch(n, "navigate" === n.mode ? void 0 : this.l.fetchOptions); for (const s of this.iterateCallbacks("fetchDidSucceed")) t = await s({ event: e, request: r, response: t }); return t } catch (t) { throw i && await this.runCallbacks("fetchDidFail", { error: t, event: e, originalRequest: i.clone(), request: r.clone() }), t } } async fetchAndCachePut(t) { const e = await this.fetch(t), s = e.clone(); return this.waitUntil(this.cachePut(t, s)), e } async cacheMatch(t) { const e = q(t); let s; const { cacheName: n, matchOptions: i } = this.l, r = await this.getCacheKey(e, "read"), o = Object.assign(Object.assign({}, i), { cacheName: n }); s = await caches.match(r, o); for (const t of this.iterateCallbacks("cachedResponseWillBeUsed")) s = await t({ cacheName: n, matchOptions: i, cachedResponse: s, request: r, event: this.event }) || void 0; return s } async cachePut(t, e) { const n = q(t); var i; await (i = 0, new Promise((t => setTimeout(t, i)))); const r = await this.getCacheKey(n, "write"); if (!e) throw new s("cache-put-with-no-response", { url: (o = r.url, new URL(String(o), location.href).href.replace(new RegExp(`^${location.origin}`), "")) }); var o; const a = await this.v(e); if (!a) return !1; const { cacheName: c, matchOptions: h } = this.l, u = await self.caches.open(c), l = this.hasCallback("cacheDidUpdate"), f = l ? await async function (t, e, s, n) { const i = R(e.url, s); if (e.url === i) return t.match(e, n); const r = Object.assign(Object.assign({}, n), { ignoreSearch: !0 }), o = await t.keys(e, r); for (const e of o) if (i === R(e.url, s)) return t.match(e, n) }(u, r.clone(), ["__WB_REVISION__"], h) : null; try { await u.put(r, l ? a.clone() : a) } catch (t) { if (t instanceof Error) throw "QuotaExceededError" === t.name && await async function () { for (const t of v) await t() }(), t } for (const t of this.iterateCallbacks("cacheDidUpdate")) await t({ cacheName: c, oldResponse: f, newResponse: a.clone(), request: r, event: this.event }); return !0 } async getCacheKey(t, e) { const s = `${t.url} | ${e}`; if (!this.u[s]) { let n = t; for (const t of this.iterateCallbacks("cacheKeyWillBeUsed")) n = q(await t({ mode: e, request: n, event: this.event, params: this.params })); this.u[s] = n } return this.u[s] } hasCallback(t) { for (const e of this.l.plugins) if (t in e) return !0; return !1 } async runCallbacks(t, e) { for (const s of this.iterateCallbacks(t)) await s(e) } *iterateCallbacks(t) { for (const e of this.l.plugins) if ("function" == typeof e[t]) { const s = this.m.get(e), n = n => { const i = Object.assign(Object.assign({}, n), { state: s }); return e[t](i) }; yield n } } waitUntil(t) { return this.g.push(t), t } async doneWaiting() { let t; for (; t = this.g.shift();)await t } destroy() { this.p.resolve(null) } async v(t) { let e = t, s = !1; for (const t of this.iterateCallbacks("cacheWillUpdate")) if (e = await t({ request: this.request, response: e, event: this.event }) || void 0, s = !0, !e) break; return s || e && 200 !== e.status && (e = void 0), e } } class L extends class { constructor(t = {}) { this.cacheName = l(t.cacheName), this.plugins = t.plugins || [], this.fetchOptions = t.fetchOptions, this.matchOptions = t.matchOptions } handle(t) { const [e] = this.handleAll(t); return e } handleAll(t) { t instanceof FetchEvent && (t = { event: t, request: t.request }); const e = t.event, s = "string" == typeof t.request ? new Request(t.request) : t.request, n = "params" in t ? t.params : void 0, i = new U(this, { event: e, request: s, params: n }), r = this.q(i, s, e); return [r, this.U(r, i, s, e)] } async q(t, e, n) { let i; await t.runCallbacks("handlerWillStart", { event: n, request: e }); try { if (i = await this.L(e, t), !i || "error" === i.type) throw new s("no-response", { url: e.url }) } catch (s) { if (s instanceof Error) for (const r of t.iterateCallbacks("handlerDidError")) if (i = await r({ error: s, event: n, request: e }), i) break; if (!i) throw s } for (const s of t.iterateCallbacks("handlerWillRespond")) i = await s({ event: n, request: e, response: i }); return i } async U(t, e, s, n) { let i, r; try { i = await t } catch (r) { } try { await e.runCallbacks("handlerDidRespond", { event: n, request: s, response: i }), await e.doneWaiting() } catch (t) { t instanceof Error && (r = t) } if (await e.runCallbacks("handlerDidComplete", { event: n, request: s, response: i, error: r }), e.destroy(), r) throw r } }{ constructor(t = {}) { t.cacheName = u(t.cacheName), super(t), this._ = !1 !== t.fallbackToNetwork, this.plugins.push(L.copyRedirectedCacheableResponsesPlugin) } async L(t, e) { const s = await e.cacheMatch(t); return s || (e.event && "install" === e.event.type ? await this.C(t, e) : await this.O(t, e)) } async O(t, e) { let n; const i = e.params || {}; if (!this._) throw new s("missing-precache-entry", { cacheName: this.cacheName, url: t.url }); { const s = i.integrity, r = t.integrity, o = !r || r === s; n = await e.fetch(new Request(t, { integrity: r || s })), s && o && (this.N(), await e.cachePut(t, n.clone())) } return n } async C(t, e) { this.N(); const n = await e.fetch(t); if (!await e.cachePut(t, n.clone())) throw new s("bad-precaching-response", { url: t.url, status: n.status }); return n } N() { let t = null, e = 0; for (const [s, n] of this.plugins.entries()) n !== L.copyRedirectedCacheableResponsesPlugin && (n === L.defaultPrecacheCacheabilityPlugin && (t = s), n.cacheWillUpdate && e++); 0 === e ? this.plugins.push(L.defaultPrecacheCacheabilityPlugin) : e > 1 && null !== t && this.plugins.splice(t, 1) } } L.defaultPrecacheCacheabilityPlugin = { cacheWillUpdate: async ({ response: t }) => !t || t.status >= 400 ? null : t }, L.copyRedirectedCacheableResponsesPlugin = { cacheWillUpdate: async ({ response: t }) => t.redirected ? await g(t) : t }; class b { constructor({ cacheName: t, plugins: e = [], fallbackToNetwork: s = !0 } = {}) { this.k = new Map, this.K = new Map, this.T = new Map, this.l = new L({ cacheName: u(t), plugins: [...e, new p({ precacheController: this })], fallbackToNetwork: s }), this.install = this.install.bind(this), this.activate = this.activate.bind(this) } get strategy() { return this.l } precache(t) { this.addToCacheList(t), this.W || (self.addEventListener("install", this.install), self.addEventListener("activate", this.activate), this.W = !0) } addToCacheList(t) { const e = []; for (const n of t) { "string" == typeof n ? e.push(n) : n && void 0 === n.revision && e.push(n.url); const { cacheKey: t, url: i } = w(n), r = "string" != typeof n && n.revision ? "reload" : "default"; if (this.k.has(i) && this.k.get(i) !== t) throw new s("add-to-cache-list-conflicting-entries", { firstEntry: this.k.get(i), secondEntry: t }); if ("string" != typeof n && n.integrity) { if (this.T.has(t) && this.T.get(t) !== n.integrity) throw new s("add-to-cache-list-conflicting-integrities", { url: i }); this.T.set(t, n.integrity) } if (this.k.set(i, t), this.K.set(i, r), e.length > 0) { const t = `Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`; console.warn(t) } } } install(t) { return f(t, (async () => { const e = new d; this.strategy.plugins.push(e); for (const [e, s] of this.k) { const n = this.T.get(s), i = this.K.get(e), r = new Request(e, { integrity: n, cache: i, credentials: "same-origin" }); await Promise.all(this.strategy.handleAll({ params: { cacheKey: s }, request: r, event: t })) } const { updatedURLs: s, notUpdatedURLs: n } = e; return { updatedURLs: s, notUpdatedURLs: n } })) } activate(t) { return f(t, (async () => { const t = await self.caches.open(this.strategy.cacheName), e = await t.keys(), s = new Set(this.k.values()), n = []; for (const i of e) s.has(i.url) || (await t.delete(i), n.push(i.url)); return { deletedURLs: n } })) } getURLsToCacheKeys() { return this.k } getCachedURLs() { return [...this.k.keys()] } getCacheKeyForURL(t) { const e = new URL(t, location.href); return this.k.get(e.href) } getIntegrityForCacheKey(t) { return this.T.get(t) } async matchPrecache(t) { const e = t instanceof Request ? t.url : t, s = this.getCacheKeyForURL(e); if (s) { return (await self.caches.open(this.strategy.cacheName)).match(s) } } createHandlerBoundToURL(t) { const e = this.getCacheKeyForURL(t); if (!e) throw new s("non-precached-url", { url: t }); return s => (s.request = new Request(t), s.params = Object.assign({ cacheKey: e }, s.params), this.strategy.handle(s)) } } let C; const E = () => (C || (C = new b), C); class O extends i { constructor(t, e) { super((({ request: s }) => { const n = t.getURLsToCacheKeys(); for (const i of function* (t, { ignoreURLParametersMatching: e = [/^utm_/, /^fbclid$/], directoryIndex: s = "index.html", cleanURLs: n = !0, urlManipulation: i } = {}) { const r = new URL(t, location.href); r.hash = "", yield r.href; const o = function (t, e = []) { for (const s of [...t.searchParams.keys()]) e.some((t => t.test(s))) && t.searchParams.delete(s); return t }(r, e); if (yield o.href, s && o.pathname.endsWith("/")) { const t = new URL(o.href); t.pathname += s, yield t.href } if (n) { const t = new URL(o.href); t.pathname += ".html", yield t.href } if (i) { const t = i({ url: r }); for (const e of t) yield e.href } }(s.url, e)) { const e = n.get(i); if (e) { return { cacheKey: e, integrity: t.getIntegrityForCacheKey(e) } } } }), t.strategy) } } function x(t) { const e = E(); !function (t, e, n) { let c; if ("string" == typeof t) { const s = new URL(t, location.href); c = new i((({ url: t }) => t.href === s.href), e, n) } else if (t instanceof RegExp) c = new r(t, e, n); else if ("function" == typeof t) c = new i(t, e, n); else { if (!(t instanceof i)) throw new s("unsupported-route-type", { moduleName: "workbox-routing", funcName: "registerRoute", paramName: "capture" }); c = t } (a || (a = new o, a.addFetchListener(), a.addCacheListener()), a).registerRoute(c) }(new O(e, t)) } t.precacheAndRoute = function (t, e) { !function (t) { E().precache(t) }(t), x(e) } })); +define(['exports'], function (t) { + 'use strict'; + try { + self['workbox:core:6.4.1'] && _(); + } catch (t) {} + const e = (t, ...e) => { + let s = t; + return e.length > 0 && (s += ` :: ${JSON.stringify(e)}`), s; + }; + class s extends Error { + constructor(t, s) { + super(e(t, s)), (this.name = t), (this.details = s); + } + } + try { + self['workbox:routing:6.4.1'] && _(); + } catch (t) {} + const n = t => (t && 'object' == typeof t ? t : { handle: t }); + class i { + constructor(t, e, s = 'GET') { + (this.handler = n(e)), (this.match = t), (this.method = s); + } + setCatchHandler(t) { + this.catchHandler = n(t); + } + } + class r extends i { + constructor(t, e, s) { + super( + ({ url: e }) => { + const s = t.exec(e.href); + if (s && (e.origin === location.origin || 0 === s.index)) return s.slice(1); + }, + e, + s + ); + } + } + class o { + constructor() { + (this.t = new Map()), (this.i = new Map()); + } + get routes() { + return this.t; + } + addFetchListener() { + self.addEventListener('fetch', t => { + const { request: e } = t, + s = this.handleRequest({ request: e, event: t }); + s && t.respondWith(s); + }); + } + addCacheListener() { + self.addEventListener('message', t => { + if (t.data && 'CACHE_URLS' === t.data.type) { + const { payload: e } = t.data, + s = Promise.all( + e.urlsToCache.map(e => { + 'string' == typeof e && (e = [e]); + const s = new Request(...e); + return this.handleRequest({ request: s, event: t }); + }) + ); + t.waitUntil(s), t.ports && t.ports[0] && s.then(() => t.ports[0].postMessage(!0)); + } + }); + } + handleRequest({ request: t, event: e }) { + const s = new URL(t.url, location.href); + if (!s.protocol.startsWith('http')) return; + const n = s.origin === location.origin, + { params: i, route: r } = this.findMatchingRoute({ event: e, request: t, sameOrigin: n, url: s }); + let o = r && r.handler; + const a = t.method; + if ((!o && this.i.has(a) && (o = this.i.get(a)), !o)) return; + let c; + try { + c = o.handle({ url: s, request: t, event: e, params: i }); + } catch (t) { + c = Promise.reject(t); + } + const h = r && r.catchHandler; + return ( + c instanceof Promise && + (this.o || h) && + (c = c.catch(async n => { + if (h) + try { + return await h.handle({ url: s, request: t, event: e, params: i }); + } catch (t) { + t instanceof Error && (n = t); + } + if (this.o) return this.o.handle({ url: s, request: t, event: e }); + throw n; + })), + c + ); + } + findMatchingRoute({ url: t, sameOrigin: e, request: s, event: n }) { + const i = this.t.get(s.method) || []; + for (const r of i) { + let i; + const o = r.match({ url: t, sameOrigin: e, request: s, event: n }); + if (o) + return ( + (i = o), + ((Array.isArray(i) && 0 === i.length) || + (o.constructor === Object && 0 === Object.keys(o).length) || + 'boolean' == typeof o) && + (i = void 0), + { route: r, params: i } + ); + } + return {}; + } + setDefaultHandler(t, e = 'GET') { + this.i.set(e, n(t)); + } + setCatchHandler(t) { + this.o = n(t); + } + registerRoute(t) { + this.t.has(t.method) || this.t.set(t.method, []), this.t.get(t.method).push(t); + } + unregisterRoute(t) { + if (!this.t.has(t.method)) throw new s('unregister-route-but-not-found-with-method', { method: t.method }); + const e = this.t.get(t.method).indexOf(t); + if (!(e > -1)) throw new s('unregister-route-route-not-registered'); + this.t.get(t.method).splice(e, 1); + } + } + let a; + const c = { + googleAnalytics: 'googleAnalytics', + precache: 'precache-v2', + prefix: 'workbox', + runtime: 'runtime', + suffix: 'undefined' != typeof registration ? registration.scope : '' + }, + h = t => [c.prefix, t, c.suffix].filter(t => t && t.length > 0).join('-'), + u = t => t || h(c.precache), + l = t => t || h(c.runtime); + function f(t, e) { + const s = e(); + return t.waitUntil(s), s; + } + try { + self['workbox:precaching:6.4.1'] && _(); + } catch (t) {} + function w(t) { + if (!t) throw new s('add-to-cache-list-unexpected-type', { entry: t }); + if ('string' == typeof t) { + const e = new URL(t, location.href); + return { cacheKey: e.href, url: e.href }; + } + const { revision: e, url: n } = t; + if (!n) throw new s('add-to-cache-list-unexpected-type', { entry: t }); + if (!e) { + const t = new URL(n, location.href); + return { cacheKey: t.href, url: t.href }; + } + const i = new URL(n, location.href), + r = new URL(n, location.href); + return i.searchParams.set('__WB_REVISION__', e), { cacheKey: i.href, url: r.href }; + } + class d { + constructor() { + (this.updatedURLs = []), + (this.notUpdatedURLs = []), + (this.handlerWillStart = async ({ request: t, state: e }) => { + e && (e.originalRequest = t); + }), + (this.cachedResponseWillBeUsed = async ({ event: t, state: e, cachedResponse: s }) => { + if ('install' === t.type && e && e.originalRequest && e.originalRequest instanceof Request) { + const t = e.originalRequest.url; + s ? this.notUpdatedURLs.push(t) : this.updatedURLs.push(t); + } + return s; + }); + } + } + class p { + constructor({ precacheController: t }) { + (this.cacheKeyWillBeUsed = async ({ request: t, params: e }) => { + const s = (null == e ? void 0 : e.cacheKey) || this.h.getCacheKeyForURL(t.url); + return s ? new Request(s, { headers: t.headers }) : t; + }), + (this.h = t); + } + } + let y; + async function g(t, e) { + let n = null; + if (t.url) { + n = new URL(t.url).origin; + } + if (n !== self.location.origin) throw new s('cross-origin-copy-response', { origin: n }); + const i = t.clone(), + r = { headers: new Headers(i.headers), status: i.status, statusText: i.statusText }, + o = e ? e(r) : r, + a = (function () { + if (void 0 === y) { + const t = new Response(''); + if ('body' in t) + try { + new Response(t.body), (y = !0); + } catch (t) { + y = !1; + } + y = !1; + } + return y; + })() + ? i.body + : await i.blob(); + return new Response(a, o); + } + function R(t, e) { + const s = new URL(t); + for (const t of e) s.searchParams.delete(t); + return s.href; + } + class m { + constructor() { + this.promise = new Promise((t, e) => { + (this.resolve = t), (this.reject = e); + }); + } + } + const v = new Set(); + try { + self['workbox:strategies:6.4.1'] && _(); + } catch (t) {} + function q(t) { + return 'string' == typeof t ? new Request(t) : t; + } + class U { + constructor(t, e) { + (this.u = {}), + Object.assign(this, e), + (this.event = e.event), + (this.l = t), + (this.p = new m()), + (this.g = []), + (this.R = [...t.plugins]), + (this.m = new Map()); + for (const t of this.R) this.m.set(t, {}); + this.event.waitUntil(this.p.promise); + } + async fetch(t) { + const { event: e } = this; + let n = q(t); + if ('navigate' === n.mode && e instanceof FetchEvent && e.preloadResponse) { + const t = await e.preloadResponse; + if (t) return t; + } + const i = this.hasCallback('fetchDidFail') ? n.clone() : null; + try { + for (const t of this.iterateCallbacks('requestWillFetch')) n = await t({ request: n.clone(), event: e }); + } catch (t) { + if (t instanceof Error) throw new s('plugin-error-request-will-fetch', { thrownErrorMessage: t.message }); + } + const r = n.clone(); + try { + let t; + t = await fetch(n, 'navigate' === n.mode ? void 0 : this.l.fetchOptions); + for (const s of this.iterateCallbacks('fetchDidSucceed')) t = await s({ event: e, request: r, response: t }); + return t; + } catch (t) { + throw ( + (i && + (await this.runCallbacks('fetchDidFail', { + error: t, + event: e, + originalRequest: i.clone(), + request: r.clone() + })), + t) + ); + } + } + async fetchAndCachePut(t) { + const e = await this.fetch(t), + s = e.clone(); + return this.waitUntil(this.cachePut(t, s)), e; + } + async cacheMatch(t) { + const e = q(t); + let s; + const { cacheName: n, matchOptions: i } = this.l, + r = await this.getCacheKey(e, 'read'), + o = Object.assign(Object.assign({}, i), { cacheName: n }); + s = await caches.match(r, o); + for (const t of this.iterateCallbacks('cachedResponseWillBeUsed')) + s = (await t({ cacheName: n, matchOptions: i, cachedResponse: s, request: r, event: this.event })) || void 0; + return s; + } + async cachePut(t, e) { + const n = q(t); + var i; + await ((i = 0), new Promise(t => setTimeout(t, i))); + const r = await this.getCacheKey(n, 'write'); + if (!e) + throw new s('cache-put-with-no-response', { + url: ((o = r.url), new URL(String(o), location.href).href.replace(new RegExp(`^${location.origin}`), '')) + }); + var o; + const a = await this.v(e); + if (!a) return !1; + const { cacheName: c, matchOptions: h } = this.l, + u = await self.caches.open(c), + l = this.hasCallback('cacheDidUpdate'), + f = l + ? await (async function (t, e, s, n) { + const i = R(e.url, s); + if (e.url === i) return t.match(e, n); + const r = Object.assign(Object.assign({}, n), { ignoreSearch: !0 }), + o = await t.keys(e, r); + for (const e of o) if (i === R(e.url, s)) return t.match(e, n); + })(u, r.clone(), ['__WB_REVISION__'], h) + : null; + try { + await u.put(r, l ? a.clone() : a); + } catch (t) { + if (t instanceof Error) + throw ( + ('QuotaExceededError' === t.name && + (await (async function () { + for (const t of v) await t(); + })()), + t) + ); + } + for (const t of this.iterateCallbacks('cacheDidUpdate')) + await t({ cacheName: c, oldResponse: f, newResponse: a.clone(), request: r, event: this.event }); + return !0; + } + async getCacheKey(t, e) { + const s = `${t.url} | ${e}`; + if (!this.u[s]) { + let n = t; + for (const t of this.iterateCallbacks('cacheKeyWillBeUsed')) + n = q(await t({ mode: e, request: n, event: this.event, params: this.params })); + this.u[s] = n; + } + return this.u[s]; + } + hasCallback(t) { + for (const e of this.l.plugins) if (t in e) return !0; + return !1; + } + async runCallbacks(t, e) { + for (const s of this.iterateCallbacks(t)) await s(e); + } + *iterateCallbacks(t) { + for (const e of this.l.plugins) + if ('function' == typeof e[t]) { + const s = this.m.get(e), + n = n => { + const i = Object.assign(Object.assign({}, n), { state: s }); + return e[t](i); + }; + yield n; + } + } + waitUntil(t) { + return this.g.push(t), t; + } + async doneWaiting() { + let t; + for (; (t = this.g.shift()); ) await t; + } + destroy() { + this.p.resolve(null); + } + async v(t) { + let e = t, + s = !1; + for (const t of this.iterateCallbacks('cacheWillUpdate')) + if (((e = (await t({ request: this.request, response: e, event: this.event })) || void 0), (s = !0), !e)) break; + return s || (e && 200 !== e.status && (e = void 0)), e; + } + } + class L extends class { + constructor(t = {}) { + (this.cacheName = l(t.cacheName)), + (this.plugins = t.plugins || []), + (this.fetchOptions = t.fetchOptions), + (this.matchOptions = t.matchOptions); + } + handle(t) { + const [e] = this.handleAll(t); + return e; + } + handleAll(t) { + t instanceof FetchEvent && (t = { event: t, request: t.request }); + const e = t.event, + s = 'string' == typeof t.request ? new Request(t.request) : t.request, + n = 'params' in t ? t.params : void 0, + i = new U(this, { event: e, request: s, params: n }), + r = this.q(i, s, e); + return [r, this.U(r, i, s, e)]; + } + async q(t, e, n) { + let i; + await t.runCallbacks('handlerWillStart', { event: n, request: e }); + try { + if (((i = await this.L(e, t)), !i || 'error' === i.type)) throw new s('no-response', { url: e.url }); + } catch (s) { + if (s instanceof Error) + for (const r of t.iterateCallbacks('handlerDidError')) + if (((i = await r({ error: s, event: n, request: e })), i)) break; + if (!i) throw s; + } + for (const s of t.iterateCallbacks('handlerWillRespond')) i = await s({ event: n, request: e, response: i }); + return i; + } + async U(t, e, s, n) { + let i, r; + try { + i = await t; + } catch (r) {} + try { + await e.runCallbacks('handlerDidRespond', { event: n, request: s, response: i }), await e.doneWaiting(); + } catch (t) { + t instanceof Error && (r = t); + } + if ((await e.runCallbacks('handlerDidComplete', { event: n, request: s, response: i, error: r }), e.destroy(), r)) + throw r; + } + } { + constructor(t = {}) { + (t.cacheName = u(t.cacheName)), + super(t), + (this._ = !1 !== t.fallbackToNetwork), + this.plugins.push(L.copyRedirectedCacheableResponsesPlugin); + } + async L(t, e) { + const s = await e.cacheMatch(t); + return s || (e.event && 'install' === e.event.type ? await this.C(t, e) : await this.O(t, e)); + } + async O(t, e) { + let n; + const i = e.params || {}; + if (!this._) throw new s('missing-precache-entry', { cacheName: this.cacheName, url: t.url }); + { + const s = i.integrity, + r = t.integrity, + o = !r || r === s; + (n = await e.fetch(new Request(t, { integrity: r || s }))), + s && o && (this.N(), await e.cachePut(t, n.clone())); + } + return n; + } + async C(t, e) { + this.N(); + const n = await e.fetch(t); + if (!(await e.cachePut(t, n.clone()))) throw new s('bad-precaching-response', { url: t.url, status: n.status }); + return n; + } + N() { + let t = null, + e = 0; + for (const [s, n] of this.plugins.entries()) + n !== L.copyRedirectedCacheableResponsesPlugin && + (n === L.defaultPrecacheCacheabilityPlugin && (t = s), n.cacheWillUpdate && e++); + 0 === e + ? this.plugins.push(L.defaultPrecacheCacheabilityPlugin) + : e > 1 && null !== t && this.plugins.splice(t, 1); + } + } + (L.defaultPrecacheCacheabilityPlugin = { + cacheWillUpdate: async ({ response: t }) => (!t || t.status >= 400 ? null : t) + }), + (L.copyRedirectedCacheableResponsesPlugin = { + cacheWillUpdate: async ({ response: t }) => (t.redirected ? await g(t) : t) + }); + class b { + constructor({ cacheName: t, plugins: e = [], fallbackToNetwork: s = !0 } = {}) { + (this.k = new Map()), + (this.K = new Map()), + (this.T = new Map()), + (this.l = new L({ + cacheName: u(t), + plugins: [...e, new p({ precacheController: this })], + fallbackToNetwork: s + })), + (this.install = this.install.bind(this)), + (this.activate = this.activate.bind(this)); + } + get strategy() { + return this.l; + } + precache(t) { + this.addToCacheList(t), + this.W || + (self.addEventListener('install', this.install), + self.addEventListener('activate', this.activate), + (this.W = !0)); + } + addToCacheList(t) { + const e = []; + for (const n of t) { + 'string' == typeof n ? e.push(n) : n && void 0 === n.revision && e.push(n.url); + const { cacheKey: t, url: i } = w(n), + r = 'string' != typeof n && n.revision ? 'reload' : 'default'; + if (this.k.has(i) && this.k.get(i) !== t) + throw new s('add-to-cache-list-conflicting-entries', { firstEntry: this.k.get(i), secondEntry: t }); + if ('string' != typeof n && n.integrity) { + if (this.T.has(t) && this.T.get(t) !== n.integrity) + throw new s('add-to-cache-list-conflicting-integrities', { url: i }); + this.T.set(t, n.integrity); + } + if ((this.k.set(i, t), this.K.set(i, r), e.length > 0)) { + const t = `Workbox is precaching URLs without revision info: ${e.join( + ', ' + )}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`; + console.warn(t); + } + } + } + install(t) { + return f(t, async () => { + const e = new d(); + this.strategy.plugins.push(e); + for (const [e, s] of this.k) { + const n = this.T.get(s), + i = this.K.get(e), + r = new Request(e, { integrity: n, cache: i, credentials: 'same-origin' }); + await Promise.all(this.strategy.handleAll({ params: { cacheKey: s }, request: r, event: t })); + } + const { updatedURLs: s, notUpdatedURLs: n } = e; + return { updatedURLs: s, notUpdatedURLs: n }; + }); + } + activate(t) { + return f(t, async () => { + const t = await self.caches.open(this.strategy.cacheName), + e = await t.keys(), + s = new Set(this.k.values()), + n = []; + for (const i of e) s.has(i.url) || (await t.delete(i), n.push(i.url)); + return { deletedURLs: n }; + }); + } + getURLsToCacheKeys() { + return this.k; + } + getCachedURLs() { + return [...this.k.keys()]; + } + getCacheKeyForURL(t) { + const e = new URL(t, location.href); + return this.k.get(e.href); + } + getIntegrityForCacheKey(t) { + return this.T.get(t); + } + async matchPrecache(t) { + const e = t instanceof Request ? t.url : t, + s = this.getCacheKeyForURL(e); + if (s) { + return (await self.caches.open(this.strategy.cacheName)).match(s); + } + } + createHandlerBoundToURL(t) { + const e = this.getCacheKeyForURL(t); + if (!e) throw new s('non-precached-url', { url: t }); + return s => ( + (s.request = new Request(t)), (s.params = Object.assign({ cacheKey: e }, s.params)), this.strategy.handle(s) + ); + } + } + let C; + const E = () => (C || (C = new b()), C); + class O extends i { + constructor(t, e) { + super(({ request: s }) => { + const n = t.getURLsToCacheKeys(); + for (const i of (function* ( + t, + { + ignoreURLParametersMatching: e = [/^utm_/, /^fbclid$/], + directoryIndex: s = 'index.html', + cleanURLs: n = !0, + urlManipulation: i + } = {} + ) { + const r = new URL(t, location.href); + (r.hash = ''), yield r.href; + const o = (function (t, e = []) { + for (const s of [...t.searchParams.keys()]) e.some(t => t.test(s)) && t.searchParams.delete(s); + return t; + })(r, e); + if ((yield o.href, s && o.pathname.endsWith('/'))) { + const t = new URL(o.href); + (t.pathname += s), yield t.href; + } + if (n) { + const t = new URL(o.href); + (t.pathname += '.html'), yield t.href; + } + if (i) { + const t = i({ url: r }); + for (const e of t) yield e.href; + } + })(s.url, e)) { + const e = n.get(i); + if (e) { + return { cacheKey: e, integrity: t.getIntegrityForCacheKey(e) }; + } + } + }, t.strategy); + } + } + function x(t) { + const e = E(); + !(function (t, e, n) { + let c; + if ('string' == typeof t) { + const s = new URL(t, location.href); + c = new i(({ url: t }) => t.href === s.href, e, n); + } else if (t instanceof RegExp) c = new r(t, e, n); + else if ('function' == typeof t) c = new i(t, e, n); + else { + if (!(t instanceof i)) + throw new s('unsupported-route-type', { + moduleName: 'workbox-routing', + funcName: 'registerRoute', + paramName: 'capture' + }); + c = t; + } + (a || ((a = new o()), a.addFetchListener(), a.addCacheListener()), a).registerRoute(c); + })(new O(e, t)); + } + t.precacheAndRoute = function (t, e) { + !(function (t) { + E().precache(t); + })(t), + x(e); + }; +}); //# sourceMappingURL=workbox-dae083bf.js.map diff --git a/gulpfile.js b/gulpfile.js index 6b4c8047df..eb2e49a5f9 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -39,7 +39,7 @@ export const PACKAGE_VERSION = '[VERSION]'; function runSass() { return ( gulp - .src('src/**/!(shared)*.scss') + .src(['src/**/!(shared)*.scss', '!src/styles/tailwind-styles.css']) .pipe(sass()) .pipe(cleanCSS()) // replacement to make office-ui-fabric-core icons work with lit-element @@ -60,6 +60,15 @@ function runSass() { ); } +function tailwind() { + return gulp + .src(['src/**/tailwind-styles.css']) + .pipe(gap.prependText(scssFileHeader)) + .pipe(gap.appendText(scssFileFooter)) + .pipe(rename({ extname: '-css.ts' })) + .pipe(gulp.dest('src/')); +} + function setLicense() { return gulp .src(['packages/**/src/**/*.{ts,js,scss}', '!packages/**/generated/**/*'], { base: './' }) @@ -73,11 +82,13 @@ function setVersion() { fs.writeFileSync('./src/utils/version.ts', versionFile.replace('[VERSION]', pkg.version)); } -gulp.task('sass', runSass); +gulp.task('sass', gulp.series(tailwind, runSass)); +gulp.task('tailwind', tailwind); gulp.task('setLicense', setLicense); gulp.task('setVersion', async () => setVersion()); gulp.task('watchSass', () => { + tailwind(); runSass(); - return gulp.watch('src/**/*.scss', gulp.series('sass')); + return gulp.watch('src/**/*.{scss,css}', gulp.series('sass')); }); diff --git a/index.html b/index.html index 46809e09be..2a013e3eca 100644 --- a/index.html +++ b/index.html @@ -31,44 +31,44 @@