pushfeedback 0.1.83 → 0.1.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/canvas-editor_3.cjs.entry.js +440 -44
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pushfeedback.cjs.js +1 -1
- package/dist/collection/components/canvas-editor/canvas-editor.js +173 -15
- package/dist/collection/components/feedback-button/feedback-button.css +45 -1
- package/dist/collection/components/feedback-button/feedback-button.js +98 -8
- package/dist/collection/components/feedback-modal/feedback-modal.css +6 -0
- package/dist/collection/components/feedback-modal/feedback-modal.js +351 -20
- package/dist/collection/utils/sanitize-html.js +90 -0
- package/dist/components/canvas-editor2.js +139 -15
- package/dist/components/feedback-button.js +30 -8
- package/dist/components/feedback-modal2.js +286 -21
- package/dist/esm/canvas-editor_3.entry.js +440 -44
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pushfeedback.js +1 -1
- package/dist/pushfeedback/p-17acbd1c.entry.js +1 -0
- package/dist/pushfeedback/pushfeedback.esm.js +1 -1
- package/dist/types/components/canvas-editor/canvas-editor.d.ts +7 -0
- package/dist/types/components/feedback-button/feedback-button.d.ts +16 -0
- package/dist/types/components/feedback-modal/feedback-modal.d.ts +33 -0
- package/dist/types/components.d.ts +48 -0
- package/dist/types/utils/sanitize-html.d.ts +8 -0
- package/package.json +2 -1
- package/dist/pushfeedback/p-1338beed.entry.js +0 -1
|
@@ -12,8 +12,10 @@ export namespace Components {
|
|
|
12
12
|
"canvasEditorCancelText": string;
|
|
13
13
|
"canvasEditorSaveText": string;
|
|
14
14
|
"canvasEditorTitle": string;
|
|
15
|
+
"clickOutsideClose": boolean;
|
|
15
16
|
"editTextButtonText": string;
|
|
16
17
|
"editTextPromptText": string;
|
|
18
|
+
"escapeClose": boolean;
|
|
17
19
|
"existingScreenshot": string;
|
|
18
20
|
"screenshotAttachedText": string;
|
|
19
21
|
"screenshotButtonText": string;
|
|
@@ -28,12 +30,21 @@ export namespace Components {
|
|
|
28
30
|
"sizeLabelText": string;
|
|
29
31
|
}
|
|
30
32
|
interface FeedbackButton {
|
|
33
|
+
/**
|
|
34
|
+
* Optional API key sent with feedback submissions, for projects that require one. Sent as `Authorization: Api-Key <key>` on the feedback POST request only, never on the public config request. Only use keys scoped to `feedback:submit`: like any credential used by an embedded widget, the value is part of the page and readable by any script running on it, so it provides server-side scoping and traceability rather than client-side secrecy. Intended for internal or access-controlled pages.
|
|
35
|
+
*/
|
|
36
|
+
"apiKey": string;
|
|
37
|
+
/**
|
|
38
|
+
* Position of the button on the page. Valid values: `default`, `bottom-right`, `bottom-left`, `top-right`, `top-left`, `center-right` (vertical tab on the right edge) and `center-left` (vertical tab on the left edge). Any other value behaves like `default`.
|
|
39
|
+
*/
|
|
31
40
|
"buttonPosition": string;
|
|
32
41
|
"buttonStyle": string;
|
|
42
|
+
"clickOutsideClose": boolean;
|
|
33
43
|
"customFont": boolean;
|
|
34
44
|
"emailAddress": string;
|
|
35
45
|
"emailPlaceholder": string;
|
|
36
46
|
"errorMessage": string;
|
|
47
|
+
"errorMessage401": string;
|
|
37
48
|
"errorMessage403": string;
|
|
38
49
|
"errorMessage404": string;
|
|
39
50
|
"fetchData": boolean;
|
|
@@ -44,6 +55,7 @@ export namespace Components {
|
|
|
44
55
|
"hidePrivacyPolicy": boolean;
|
|
45
56
|
"hideRating": boolean;
|
|
46
57
|
"hideScreenshotButton": boolean;
|
|
58
|
+
"historyClose": boolean;
|
|
47
59
|
"isEmailRequired": boolean;
|
|
48
60
|
"messagePlaceholder": string;
|
|
49
61
|
"metadata": string;
|
|
@@ -81,13 +93,21 @@ export namespace Components {
|
|
|
81
93
|
"successMessage": string;
|
|
82
94
|
}
|
|
83
95
|
interface FeedbackModal {
|
|
96
|
+
/**
|
|
97
|
+
* Optional API key sent with feedback submissions, for projects that require one. Sent as `Authorization: Api-Key <key>` on the feedback POST request only, never on the public config request. Only use keys scoped to `feedback:submit`: like any credential used by an embedded widget, the value is part of the page and readable by any script running on it, so it provides server-side scoping and traceability rather than client-side secrecy. Intended for internal or access-controlled pages.
|
|
98
|
+
*/
|
|
99
|
+
"apiKey": string;
|
|
100
|
+
"clickOutsideClose": boolean;
|
|
101
|
+
"closeButtonLabel": string;
|
|
84
102
|
"customFont": boolean;
|
|
85
103
|
"emailAddress": string;
|
|
86
104
|
"emailPlaceholder": string;
|
|
87
105
|
"embedded": boolean;
|
|
88
106
|
"errorMessage": string;
|
|
107
|
+
"errorMessage401": string;
|
|
89
108
|
"errorMessage403": string;
|
|
90
109
|
"errorMessage404": string;
|
|
110
|
+
"escapeClose": boolean;
|
|
91
111
|
"fetchData": boolean;
|
|
92
112
|
"footerText": string;
|
|
93
113
|
"hasSelectedElement": boolean;
|
|
@@ -95,6 +115,7 @@ export namespace Components {
|
|
|
95
115
|
"hidePrivacyPolicy": boolean;
|
|
96
116
|
"hideRating": boolean;
|
|
97
117
|
"hideScreenshotButton": boolean;
|
|
118
|
+
"historyClose": boolean;
|
|
98
119
|
"isEmailRequired": boolean;
|
|
99
120
|
"messagePlaceholder": string;
|
|
100
121
|
"metadata": '';
|
|
@@ -107,7 +128,10 @@ export namespace Components {
|
|
|
107
128
|
"project": string;
|
|
108
129
|
"rating": number;
|
|
109
130
|
"ratingMode": string;
|
|
131
|
+
"ratingNegativeLabel": string;
|
|
110
132
|
"ratingPlaceholder": string;
|
|
133
|
+
"ratingPositiveLabel": string;
|
|
134
|
+
"ratingStarLabel": string;
|
|
111
135
|
"ratingStarsPlaceholder": string;
|
|
112
136
|
"recaptchaText": string;
|
|
113
137
|
"screenshotAttachedText": string;
|
|
@@ -178,8 +202,10 @@ declare namespace LocalJSX {
|
|
|
178
202
|
"canvasEditorCancelText"?: string;
|
|
179
203
|
"canvasEditorSaveText"?: string;
|
|
180
204
|
"canvasEditorTitle"?: string;
|
|
205
|
+
"clickOutsideClose"?: boolean;
|
|
181
206
|
"editTextButtonText"?: string;
|
|
182
207
|
"editTextPromptText"?: string;
|
|
208
|
+
"escapeClose"?: boolean;
|
|
183
209
|
"existingScreenshot"?: string;
|
|
184
210
|
"onScreenshotCancelled"?: (event: CanvasEditorCustomEvent<void>) => void;
|
|
185
211
|
"onScreenshotFailed"?: (event: CanvasEditorCustomEvent<{ error: string }>) => void;
|
|
@@ -197,12 +223,21 @@ declare namespace LocalJSX {
|
|
|
197
223
|
"sizeLabelText"?: string;
|
|
198
224
|
}
|
|
199
225
|
interface FeedbackButton {
|
|
226
|
+
/**
|
|
227
|
+
* Optional API key sent with feedback submissions, for projects that require one. Sent as `Authorization: Api-Key <key>` on the feedback POST request only, never on the public config request. Only use keys scoped to `feedback:submit`: like any credential used by an embedded widget, the value is part of the page and readable by any script running on it, so it provides server-side scoping and traceability rather than client-side secrecy. Intended for internal or access-controlled pages.
|
|
228
|
+
*/
|
|
229
|
+
"apiKey"?: string;
|
|
230
|
+
/**
|
|
231
|
+
* Position of the button on the page. Valid values: `default`, `bottom-right`, `bottom-left`, `top-right`, `top-left`, `center-right` (vertical tab on the right edge) and `center-left` (vertical tab on the left edge). Any other value behaves like `default`.
|
|
232
|
+
*/
|
|
200
233
|
"buttonPosition"?: string;
|
|
201
234
|
"buttonStyle"?: string;
|
|
235
|
+
"clickOutsideClose"?: boolean;
|
|
202
236
|
"customFont"?: boolean;
|
|
203
237
|
"emailAddress"?: string;
|
|
204
238
|
"emailPlaceholder"?: string;
|
|
205
239
|
"errorMessage"?: string;
|
|
240
|
+
"errorMessage401"?: string;
|
|
206
241
|
"errorMessage403"?: string;
|
|
207
242
|
"errorMessage404"?: string;
|
|
208
243
|
"fetchData"?: boolean;
|
|
@@ -213,6 +248,7 @@ declare namespace LocalJSX {
|
|
|
213
248
|
"hidePrivacyPolicy"?: boolean;
|
|
214
249
|
"hideRating"?: boolean;
|
|
215
250
|
"hideScreenshotButton"?: boolean;
|
|
251
|
+
"historyClose"?: boolean;
|
|
216
252
|
"isEmailRequired"?: boolean;
|
|
217
253
|
"messagePlaceholder"?: string;
|
|
218
254
|
"metadata"?: string;
|
|
@@ -252,13 +288,21 @@ declare namespace LocalJSX {
|
|
|
252
288
|
"successMessage"?: string;
|
|
253
289
|
}
|
|
254
290
|
interface FeedbackModal {
|
|
291
|
+
/**
|
|
292
|
+
* Optional API key sent with feedback submissions, for projects that require one. Sent as `Authorization: Api-Key <key>` on the feedback POST request only, never on the public config request. Only use keys scoped to `feedback:submit`: like any credential used by an embedded widget, the value is part of the page and readable by any script running on it, so it provides server-side scoping and traceability rather than client-side secrecy. Intended for internal or access-controlled pages.
|
|
293
|
+
*/
|
|
294
|
+
"apiKey"?: string;
|
|
295
|
+
"clickOutsideClose"?: boolean;
|
|
296
|
+
"closeButtonLabel"?: string;
|
|
255
297
|
"customFont"?: boolean;
|
|
256
298
|
"emailAddress"?: string;
|
|
257
299
|
"emailPlaceholder"?: string;
|
|
258
300
|
"embedded"?: boolean;
|
|
259
301
|
"errorMessage"?: string;
|
|
302
|
+
"errorMessage401"?: string;
|
|
260
303
|
"errorMessage403"?: string;
|
|
261
304
|
"errorMessage404"?: string;
|
|
305
|
+
"escapeClose"?: boolean;
|
|
262
306
|
"fetchData"?: boolean;
|
|
263
307
|
"footerText"?: string;
|
|
264
308
|
"hasSelectedElement"?: boolean;
|
|
@@ -266,6 +310,7 @@ declare namespace LocalJSX {
|
|
|
266
310
|
"hidePrivacyPolicy"?: boolean;
|
|
267
311
|
"hideRating"?: boolean;
|
|
268
312
|
"hideScreenshotButton"?: boolean;
|
|
313
|
+
"historyClose"?: boolean;
|
|
269
314
|
"isEmailRequired"?: boolean;
|
|
270
315
|
"messagePlaceholder"?: string;
|
|
271
316
|
"metadata"?: '';
|
|
@@ -279,7 +324,10 @@ declare namespace LocalJSX {
|
|
|
279
324
|
"project"?: string;
|
|
280
325
|
"rating"?: number;
|
|
281
326
|
"ratingMode"?: string;
|
|
327
|
+
"ratingNegativeLabel"?: string;
|
|
282
328
|
"ratingPlaceholder"?: string;
|
|
329
|
+
"ratingPositiveLabel"?: string;
|
|
330
|
+
"ratingStarLabel"?: string;
|
|
283
331
|
"ratingStarsPlaceholder"?: string;
|
|
284
332
|
"recaptchaText"?: string;
|
|
285
333
|
"screenshotAttachedText"?: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sanitizes a fragment of HTML for use with innerHTML.
|
|
3
|
+
*
|
|
4
|
+
* Prefers the browser's native Element.setHTML() where available, which parses
|
|
5
|
+
* without executing. Otherwise parses in an inert document (no scripts run, no
|
|
6
|
+
* images or other subresources are fetched) and scrubs the result.
|
|
7
|
+
*/
|
|
8
|
+
export declare function sanitizeHtml(html: string): string;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "pushfeedback",
|
|
3
3
|
"author": "TechDocs Studio <info@techdocs.studio>",
|
|
4
4
|
"homepage": "https://pushfeedback.com/",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.85",
|
|
6
6
|
"description": "Feedback widget for websites.",
|
|
7
7
|
"main": "dist/index.cjs.js",
|
|
8
8
|
"module": "dist/index.js",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
],
|
|
23
23
|
"scripts": {
|
|
24
24
|
"build": "stencil build --docs",
|
|
25
|
+
"prepublishOnly": "stencil build --docs",
|
|
25
26
|
"start": "stencil build --dev --watch --serve",
|
|
26
27
|
"test": "stencil test --spec --e2e",
|
|
27
28
|
"test.watch": "stencil test --spec --e2e --watchAll",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as o,H as a,g as i}from"./p-af2a1f7f.js";const s=class{constructor(o){t(this,o),this.screenshotReady=e(this,"screenshotReady",7),this.screenshotCancelled=e(this,"screenshotCancelled",7),this.screenshotFailed=e(this,"screenshotFailed",7),this.handleWindowResize=()=>{this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((()=>{this.showCanvasEditor&&this.originalImageData&&this.initializeCanvas()}),250)},this.openScreenShot=async()=>{this.takingScreenshot=!0,this.annotations=[],this.currentAnnotation=null,this.isDrawing=!1,this.hoveredAnnotation=null,this.hideAllFeedbackElements();try{await new Promise((t=>setTimeout(t,100)));const t=await this.captureViewportScreenshot();this.originalImageData=t,this.takingScreenshot=!1,this.showCanvasEditor=!0,this.showAllFeedbackElements(),setTimeout((()=>{this.initializeCanvas()}),100)}catch(t){console.error("Failed to capture screenshot:",t),this.takingScreenshot=!1,this.showAllFeedbackElements(),this.handleScreenshotError(t)}},this.hideAllFeedbackElements=()=>{document.querySelectorAll("feedback-button, feedback-modal").forEach((t=>{t.style.visibility="hidden"}))},this.showAllFeedbackElements=()=>{document.querySelectorAll("feedback-button, feedback-modal").forEach((t=>{t.style.visibility="visible"}))},this.handleScreenshotError=t=>{let e=this.screenshotErrorGeneral;"NotAllowedError"===t.name?e+=" "+this.screenshotErrorPermission:"NotSupportedError"===t.name?e+=" "+this.screenshotErrorNotSupported:"NotFoundError"===t.name?e+=" "+this.screenshotErrorNotFound:"AbortError"===t.name?e+=" "+this.screenshotErrorCancelled:t.message&&t.message.includes("not supported")?e+=" "+this.screenshotErrorBrowserNotSupported:e+=" "+this.screenshotErrorUnexpected,this.screenshotFailed.emit({error:e})},this.closeCanvasEditor=()=>{this.showCanvasEditor=!1,this.screenshotCancelled.emit()},this.saveAnnotations=()=>{if(this.canvasRef){const t=this.canvasRef.toDataURL("image/png");this.screenshotReady.emit({screenshot:t})}this.showCanvasEditor=!1},this.initializeCanvas=()=>{if(!this.canvasRef||!this.originalImageData)return;this.canvasContext=this.canvasRef.getContext("2d");const t=new Image;t.onload=()=>{this.canvasRef.width=t.width,this.canvasRef.height=t.height;const e=window.innerWidth>1920?1.5:window.innerWidth>1200?1.2:1,o=Math.min((this.canvasRef.parentElement.clientWidth-48)/t.width,(this.canvasRef.parentElement.clientHeight-48)/t.height,e),a=t.height*o;this.canvasRef.style.width=t.width*o+"px",this.canvasRef.style.height=`${a}px`,this.canvasContext.drawImage(t,0,0),this.redrawAnnotations()},t.src=this.originalImageData},this.redrawAnnotations=()=>{if(!this.canvasContext)return;const t=new Image;t.onload=()=>{this.canvasContext.clearRect(0,0,this.canvasRef.width,this.canvasRef.height),this.canvasContext.drawImage(t,0,0),this.annotations.forEach((t=>{this.drawAnnotation(t)}))},t.src=this.originalImageData},this.drawAnnotation=t=>{if(this.canvasContext)switch(this.canvasContext.strokeStyle=t.color,this.canvasContext.lineWidth=t.lineWidth,this.canvasContext.lineCap="round",this.canvasContext.lineJoin="round",t.type){case"rectangle":this.canvasContext.strokeRect(t.startX,t.startY,t.width,t.height),this.selectedAnnotation===t&&this.drawSelectionIndicator(t),this.hoveredAnnotation===t&&this.drawRectangleResizeHandles(t);break;case"line":this.canvasContext.beginPath(),this.canvasContext.moveTo(t.startX,t.startY),this.canvasContext.lineTo(t.endX,t.endY),this.canvasContext.stroke(),this.selectedAnnotation===t&&this.drawSelectionIndicator(t),this.hoveredAnnotation===t&&this.drawLineResizeHandles(t);break;case"arrow":this.drawArrow(t.startX,t.startY,t.endX,t.endY),this.selectedAnnotation===t&&this.drawSelectionIndicator(t),this.hoveredAnnotation===t&&this.drawLineResizeHandles(t);break;case"text":{const e=t.fontSize||24;this.canvasContext.fillStyle=t.color,this.canvasContext.font=`${e}px Arial`,this.canvasContext.fillText(t.text,t.x,t.y),this.selectedAnnotation===t&&this.drawTextSelectionIndicator(t);break}}},this.drawSelectionIndicator=t=>{if(!this.canvasContext)return;const e=this.canvasContext.strokeStyle,o=this.canvasContext.lineWidth;switch(this.canvasContext.strokeStyle="#0070F4",this.canvasContext.lineWidth=2,this.canvasContext.setLineDash([5,5]),t.type){case"rectangle":this.canvasContext.strokeRect(t.startX-2,t.startY-2,t.width+4,t.height+4);break;case"line":case"arrow":this.canvasContext.beginPath(),this.canvasContext.moveTo(t.startX,t.startY),this.canvasContext.lineTo(t.endX,t.endY),this.canvasContext.stroke()}this.canvasContext.setLineDash([]),this.canvasContext.strokeStyle=e,this.canvasContext.lineWidth=o},this.drawTextSelectionIndicator=t=>{if(!this.canvasContext)return;const e=t.fontSize||24,o=this.getTextWidth(t.text,e),a=this.canvasContext.strokeStyle,i=this.canvasContext.lineWidth;this.canvasContext.strokeStyle="#0070F4",this.canvasContext.lineWidth=2,this.canvasContext.setLineDash([3,3]),this.canvasContext.strokeRect(t.x-4,t.y-e-4,o+8,e+8),this.canvasContext.setLineDash([]),this.canvasContext.strokeStyle=a,this.canvasContext.lineWidth=i},this.drawArrow=(t,e,o,a)=>{const i=Math.atan2(a-e,o-t);this.canvasContext.beginPath(),this.canvasContext.moveTo(t,e),this.canvasContext.lineTo(o,a),this.canvasContext.stroke(),this.canvasContext.beginPath(),this.canvasContext.moveTo(o,a),this.canvasContext.lineTo(o-15*Math.cos(i-Math.PI/6),a-15*Math.sin(i-Math.PI/6)),this.canvasContext.moveTo(o,a),this.canvasContext.lineTo(o-15*Math.cos(i+Math.PI/6),a-15*Math.sin(i+Math.PI/6)),this.canvasContext.stroke()},this.undoLastAnnotation=()=>{this.annotations=this.annotations.slice(0,-1),this.redrawAnnotations()},this.deleteSelectedAnnotation=()=>{if(this.selectedAnnotation){const t=this.annotations.findIndex((t=>t===this.selectedAnnotation));-1!==t&&(this.annotations=this.annotations.filter(((e,o)=>o!==t)),this.selectedAnnotation=null,this.redrawAnnotations())}},this.handleColorSlotClick=t=>{this.editingColorIndex===t?(this.canvasDrawingColor=this.defaultColors[t],this.showColorPicker=!1,this.editingColorIndex=-1):(this.editingColorIndex=t,this.showColorPicker=!0,this.canvasDrawingColor=this.defaultColors[t])},this.updateColorSlot=t=>{this.editingColorIndex>=0&&this.editingColorIndex<this.defaultColors.length&&(this.defaultColors[this.editingColorIndex]=t,this.canvasDrawingColor=t,this.showColorPicker=!1,this.editingColorIndex=-1,this.defaultColors=[...this.defaultColors])},this.handleColorPickerInput=t=>{t.stopPropagation();const e=t.target.value;this.editingColorIndex>=0&&this.editingColorIndex<this.defaultColors.length&&(this.defaultColors[this.editingColorIndex]=e,this.canvasDrawingColor=e,this.defaultColors=[...this.defaultColors])},this.handleColorPickerClick=t=>{t.stopPropagation()},this.closeColorPicker=()=>{this.showColorPicker=!1,this.editingColorIndex=-1},this.getTextWidth=(t,e)=>{if(!this.canvasContext)return t.length*e*.6;const o=this.canvasContext.font;this.canvasContext.font=`${e}px Arial`;const a=this.canvasContext.measureText(t).width;return this.canvasContext.font=o,a},this.isPointInResizeHandle=(t,e,o)=>{switch(o.type){case"rectangle":{const a=o.startX+o.width,i=o.startY+o.height;return t>=a-4&&t<=a+4&&e>=i-4&&e<=i+4}case"line":case"arrow":{const a=[{x:o.startX,y:o.startY,point:"start"},{x:o.endX,y:o.endY,point:"end"}];for(const o of a)if(t>=o.x-4&&t<=o.x+4&&e>=o.y-4&&e<=o.y+4)return o.point;return!1}default:return!1}},this.drawRectangleResizeHandles=t=>{if(!this.canvasContext||"rectangle"!==t.type)return;const e=t.startX+t.width,o=t.startY+t.height;this.canvasContext.fillStyle="#0070F4",this.canvasContext.strokeStyle="#ffffff",this.canvasContext.lineWidth=2,this.canvasContext.fillRect(e-4,o-4,8,8),this.canvasContext.strokeRect(e-4,o-4,8,8)},this.drawLineResizeHandles=t=>{if(!this.canvasContext||"line"!==t.type&&"arrow"!==t.type)return;const e=[{x:t.startX,y:t.startY},{x:t.endX,y:t.endY}];this.canvasContext.fillStyle="#0070F4",this.canvasContext.strokeStyle="#ffffff",this.canvasContext.lineWidth=2,e.forEach((t=>{this.canvasContext.fillRect(t.x-4,t.y-4,8,8),this.canvasContext.strokeRect(t.x-4,t.y-4,8,8)}))},this.startResize=(t,e,o)=>{this.isResizing=!0,this.resizingAnnotation=t,this.resizeHandle=e,this.dragStartPos=o,"rectangle"===t.type&&(this.resizeStartDimensions={width:t.width,height:t.height})},this.handleResize=t=>{if(!this.resizingAnnotation||!this.dragStartPos)return;const e=this.resizingAnnotation,o=this.annotations.findIndex((t=>t===e));if(-1===o)return;const a=Object.assign({},e);switch(e.type){case"rectangle":{const e=t.y-this.dragStartPos.y;a.width=Math.max(10,this.resizeStartDimensions.width+(t.x-this.dragStartPos.x)),a.height=Math.max(10,this.resizeStartDimensions.height+e);break}case"line":case"arrow":"start"===this.resizeHandle?(a.startX=t.x,a.startY=t.y):"end"===this.resizeHandle&&(a.endX=t.x,a.endY=t.y)}this.annotations[o]=a,this.resizingAnnotation=a,this.redrawAnnotations()},this.startTextEditing=t=>{const e=prompt(this.editTextPromptText,t.text);if(null!==e&&e.trim()){const o=this.annotations.findIndex((e=>e===t));-1!==o&&(this.annotations[o]=Object.assign(Object.assign({},t),{text:e.trim()}),this.selectedAnnotation=this.annotations[o],this.redrawAnnotations())}},this.updateSelectedTextSize=t=>{if(this.selectedAnnotation&&"text"===this.selectedAnnotation.type){const e=this.annotations.findIndex((t=>t===this.selectedAnnotation));-1!==e&&(this.annotations[e]=Object.assign(Object.assign({},this.selectedAnnotation),{fontSize:Math.max(8,Math.min(72,t))}),this.selectedAnnotation=this.annotations[e],this.redrawAnnotations())}},this.updateSelectedBorderWidth=t=>{if(this.selectedAnnotation&&["rectangle","line","arrow"].includes(this.selectedAnnotation.type)){const e=this.annotations.findIndex((t=>t===this.selectedAnnotation));-1!==e&&(this.annotations[e]=Object.assign(Object.assign({},this.selectedAnnotation),{lineWidth:Math.max(1,Math.min(20,t))}),this.selectedAnnotation=this.annotations[e],this.redrawAnnotations())}},this.handleCanvasMouseDown=t=>{if(!this.canvasRef)return;if(window.innerWidth<=768)return;this.showColorPicker&&this.closeColorPicker();const e=this.getCanvasCoordinates(t),o=this.findAnnotationAt(e.x,e.y);if(o){if(this.selectedAnnotation=o.annotation,"text"!==o.annotation.type){const t=this.isPointInResizeHandle(e.x,e.y,o.annotation);if(t)return this.startResize(o.annotation,t,e),void(this.canvasRef.style.cursor="nw-resize")}if("text"===o.annotation.type&&2===t.detail)return void this.startTextEditing(o.annotation);if(!this.isDrawing)return this.isDragging=!0,this.draggedAnnotation=o.annotation,this.dragStartPos=e,void(this.canvasRef.style.cursor="grabbing")}else this.selectedAnnotation=null;if(this.isDrawing=!0,"text"===this.canvasDrawingTool){const t=prompt(this.editTextPromptText);t&&(this.annotations=[...this.annotations,{type:"text",x:e.x,y:e.y,text:t,color:this.canvasDrawingColor,fontSize:this.canvasTextSize}],this.redrawAnnotations()),this.isDrawing=!1}else this.currentAnnotation={type:this.canvasDrawingTool,startX:e.x,startY:e.y,color:this.canvasDrawingColor,lineWidth:this.canvasLineWidth}},this.handleCanvasMouseMove=t=>{if(!this.canvasRef)return;if(window.innerWidth<=768)return;const e=this.getCanvasCoordinates(t);if(this.isResizing&&this.resizingAnnotation)return void this.handleResize(e);if(this.isDragging&&this.draggedAnnotation&&this.dragStartPos){const t=e.x-this.dragStartPos.x,o=e.y-this.dragStartPos.y,a=Object.assign({},this.draggedAnnotation);switch(a.type){case"rectangle":a.startX+=t,a.startY+=o;break;case"line":case"arrow":a.startX+=t,a.startY+=o,a.endX+=t,a.endY+=o;break;case"text":a.x+=t,a.y+=o}const i=this.annotations.findIndex((t=>t===this.draggedAnnotation));return-1!==i&&(this.annotations[i]=a,this.draggedAnnotation=a),this.dragStartPos=e,void this.redrawAnnotations()}if(this.isDrawing&&this.currentAnnotation)return"rectangle"===this.canvasDrawingTool?(this.currentAnnotation.width=e.x-this.currentAnnotation.startX,this.currentAnnotation.height=e.y-this.currentAnnotation.startY):(this.currentAnnotation.endX=e.x,this.currentAnnotation.endY=e.y),this.redrawAnnotations(),void this.drawAnnotation(this.currentAnnotation);const o=this.findAnnotationAt(e.x,e.y);if(o){if("text"!==o.annotation.type&&this.isPointInResizeHandle(e.x,e.y,o.annotation))return this.canvasRef.style.cursor="nw-resize",this.hoveredAnnotation=o.annotation,void this.redrawAnnotations();this.canvasRef.style.cursor="grab",this.hoveredAnnotation!==o.annotation&&(this.hoveredAnnotation=o.annotation,this.redrawAnnotations())}else this.canvasRef.style.cursor="crosshair",this.hoveredAnnotation&&(this.hoveredAnnotation=null,this.redrawAnnotations())},this.handleCanvasMouseUp=()=>{if(!(window.innerWidth<=768))return this.isResizing?(this.isResizing=!1,this.resizingAnnotation=null,this.dragStartPos=null,this.resizeHandle=!1,this.resizeStartDimensions=null,void(this.canvasRef&&(this.canvasRef.style.cursor="crosshair"))):this.isDragging?(this.isDragging=!1,this.draggedAnnotation=null,this.dragStartPos=null,void(this.canvasRef&&(this.canvasRef.style.cursor="crosshair"))):void(this.isDrawing&&this.currentAnnotation&&(this.isDrawing=!1,this.annotations=[...this.annotations,this.currentAnnotation],this.currentAnnotation=null,this.redrawAnnotations()))},this.getCanvasCoordinates=t=>{if(!this.canvasRef)return{x:0,y:0};const e=this.canvasRef.getBoundingClientRect();return{x:this.canvasRef.width/e.width*(t.clientX-e.left),y:this.canvasRef.height/e.height*(t.clientY-e.top)}},this.findAnnotationAt=(t,e)=>{for(let o=this.annotations.length-1;o>=0;o--){const a=this.annotations[o];if(this.isPointInAnnotation(t,e,a))return{annotation:a,index:o}}return null},this.isPointInAnnotation=(t,e,o)=>{const a=10;switch(o.type){case"rectangle":{const i=Math.min(o.startX,o.startX+o.width),s=Math.max(o.startX,o.startX+o.width),r=Math.min(o.startY,o.startY+o.height),n=Math.max(o.startY,o.startY+o.height);return t>=i-a&&t<=s+a&&e>=r-a&&e<=n+a}case"line":case"arrow":{const i=o.endY-o.startY,s=o.startX-o.endX;return Math.abs(i*t+s*e+(o.endX*o.startY-o.startX*o.endY))/Math.sqrt(i*i+s*s)<=a}case"text":{const i=o.fontSize||24,s=this.getTextWidth(o.text,i);return t>=o.x-a&&t<=o.x+s+a&&e>=o.y-i-a&&e<=o.y+a}default:return!1}},this.canvasEditorTitle="Edit screenshot",this.canvasEditorCancelText="Cancel",this.canvasEditorSaveText="Save",this.screenshotTakingText="Taking screenshot...",this.screenshotAttachedText="Screenshot attached",this.screenshotButtonText="Add a screenshot",this.autoStartScreenshot=!1,this.existingScreenshot="",this.editTextButtonText="Edit Text",this.sizeLabelText="Size:",this.borderLabelText="Border:",this.editTextPromptText="Edit text:",this.screenshotErrorGeneral="Failed to capture screenshot.",this.screenshotErrorPermission="Permission denied. Please allow screen sharing to take screenshots.",this.screenshotErrorNotSupported="Screen capture is not supported in this browser.",this.screenshotErrorNotFound="No screen sources available for capture.",this.screenshotErrorCancelled="Screenshot capture was cancelled.",this.screenshotErrorBrowserNotSupported="Your browser does not support screen capture. Please use a browser like Chrome, Firefox, or Safari on desktop.",this.screenshotErrorUnexpected="An unexpected error occurred. Please try again.",this.takingScreenshot=!1,this.showCanvasEditor=!1,this.canvasDrawingTool="rectangle",this.canvasDrawingColor="#ff0000",this.canvasLineWidth=3,this.canvasTextSize=24,this.isDrawing=!1,this.annotations=[],this.currentAnnotation=null,this.isDragging=!1,this.draggedAnnotation=null,this.dragStartPos=null,this.showColorPicker=!1,this.editingColorIndex=-1,this.selectedAnnotation=null,this.isResizing=!1,this.resizingAnnotation=null,this.resizeStartSize=24,this.resizeStartDimensions=null,this.hoveredAnnotation=null,this.resizeHandle=!1,this.defaultColors=["#ff0000","#00ff00","#0000ff","#000000"]}componentDidLoad(){this.autoStartScreenshot?(this.showCanvasEditor=!0,setTimeout((()=>{this.openScreenShot()}),100)):this.existingScreenshot&&(this.originalImageData=this.existingScreenshot,this.showCanvasEditor=!0,setTimeout((()=>{this.initializeCanvas()}),100)),this.handleWindowResize=this.handleWindowResize.bind(this),window.addEventListener("resize",this.handleWindowResize)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize)}async captureViewportScreenshot(){try{if(!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia)throw new Error("Screen Capture API is not supported in this browser");const t=await navigator.mediaDevices.getDisplayMedia({video:{mediaSource:"screen",width:{ideal:window.innerWidth},height:{ideal:window.innerHeight}},audio:!1,preferCurrentTab:!0}),e=document.createElement("video");return e.srcObject=t,e.autoplay=!0,e.muted=!0,new Promise(((o,a)=>{e.onloadedmetadata=()=>{e.play(),setTimeout((()=>{try{const a=document.createElement("canvas");a.width=e.videoWidth,a.height=e.videoHeight,a.getContext("2d").drawImage(e,0,0),t.getTracks().forEach((t=>t.stop()));const i=a.toDataURL("image/png");console.log("Screenshot captured successfully using Screen Capture API"),o(i)}catch(e){t.getTracks().forEach((t=>t.stop())),a(e)}}),100)},e.onerror=()=>{t.getTracks().forEach((t=>t.stop())),a(new Error("Failed to load video for screenshot capture"))}}))}catch(t){throw console.error("Screen capture failed:",t),t}}render(){var t,e,a,i,s,r;return o("div",{class:"canvas-editor-wrapper"},this.showCanvasEditor&&o("div",{class:"canvas-editor-overlay",part:"overlay"},o("div",{class:"canvas-editor-modal",part:"modal"},o("div",{class:"canvas-editor-header",part:"header"},o("div",{class:"canvas-editor-title",part:"title"},o("h3",null,this.canvasEditorTitle)),o("div",{class:"canvas-editor-toolbar",part:"toolbar"},o("div",{class:"toolbar-section"},o("div",{class:"tool-group"},o("button",{class:"tool-btn "+("rectangle"===this.canvasDrawingTool?"active":""),part:"tool-button",onClick:()=>this.canvasDrawingTool="rectangle",title:"Rectangle"},o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-square"},o("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}))),o("button",{class:"tool-btn "+("line"===this.canvasDrawingTool?"active":""),part:"tool-button",onClick:()=>this.canvasDrawingTool="line",title:"Line"},o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-minus"},o("path",{d:"M5 12h14"}))),o("button",{class:"tool-btn "+("arrow"===this.canvasDrawingTool?"active":""),part:"tool-button",onClick:()=>this.canvasDrawingTool="arrow",title:"Arrow"},o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-move-up-right"},o("path",{d:"M13 5H19V11"}),o("path",{d:"M19 5L5 19"}))),o("button",{class:"tool-btn "+("text"===this.canvasDrawingTool?"active":""),part:"tool-button",onClick:()=>this.canvasDrawingTool="text",title:"Text"},o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-type"},o("path",{d:"M12 4v16"}),o("path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2"}),o("path",{d:"M9 20h6"}))),o("div",{class:"toolbar-divider"}),o("button",{class:"tool-btn undo-btn",part:"tool-button",onClick:this.undoLastAnnotation,disabled:0===this.annotations.length,title:"Undo"},o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-undo"},o("path",{d:"M3 7v6h6"}),o("path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13"}))),this.selectedAnnotation&&o("button",{class:"tool-btn delete-btn",part:"tool-button",onClick:this.deleteSelectedAnnotation,title:"Delete"},o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-trash-2"},o("path",{d:"M3 6h18"}),o("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),o("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"}),o("line",{x1:"10",x2:"10",y1:"11",y2:"17"}),o("line",{x1:"14",x2:"14",y1:"11",y2:"17"}))))),o("div",{class:"toolbar-section"},o("div",{class:"color-palette"},this.defaultColors.map(((t,e)=>o("div",{class:"color-slot-wrapper"},o("button",{class:`color-btn ${this.canvasDrawingColor===t?"active":""} ${this.editingColorIndex===e?"editing":""}`,style:{backgroundColor:t},onClick:()=>this.handleColorSlotClick(e),title:`Color ${e+1} - Click to customize`},this.editingColorIndex===e&&o("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"white","stroke-width":"2"},o("path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}))),this.editingColorIndex===e&&this.showColorPicker&&o("div",{class:"color-picker-dropdown"},o("input",{type:"color",value:t,onInput:t=>this.handleColorPickerInput(t),onClick:t=>this.handleColorPickerClick(t)}))))))),(this.selectedAnnotation||this.canvasDrawingTool)&&o("div",{class:"toolbar-section selected-annotation-controls"},("text"===(null===(t=this.selectedAnnotation)||void 0===t?void 0:t.type)||!this.selectedAnnotation&&"text"===this.canvasDrawingTool)&&o("div",{class:"text-controls"},o("div",{class:"font-size-control"},o("label",null,this.sizeLabelText),o("input",{type:"range",min:"8",max:"72",value:(null===(e=this.selectedAnnotation)||void 0===e?void 0:e.fontSize)||this.canvasTextSize,onInput:t=>{const e=parseInt(t.target.value);this.selectedAnnotation?this.updateSelectedTextSize(e):this.canvasTextSize=e},class:"size-slider"}),o("span",{class:"size-value"},(null===(a=this.selectedAnnotation)||void 0===a?void 0:a.fontSize)||this.canvasTextSize,"px")),this.selectedAnnotation&&o("button",{class:"action-btn small",onClick:()=>this.startTextEditing(this.selectedAnnotation)},this.editTextButtonText)),(["rectangle","line","arrow"].includes(null===(i=this.selectedAnnotation)||void 0===i?void 0:i.type)||!this.selectedAnnotation&&["rectangle","line","arrow"].includes(this.canvasDrawingTool))&&o("div",{class:"shape-controls"},o("div",{class:"border-width-control"},o("label",null,this.borderLabelText),o("input",{type:"range",min:"1",max:"20",value:(null===(s=this.selectedAnnotation)||void 0===s?void 0:s.lineWidth)||this.canvasLineWidth,onInput:t=>{const e=parseInt(t.target.value);this.selectedAnnotation?this.updateSelectedBorderWidth(e):this.canvasLineWidth=e},class:"size-slider"}),o("span",{class:"size-value"},(null===(r=this.selectedAnnotation)||void 0===r?void 0:r.lineWidth)||this.canvasLineWidth,"px")))),o("div",{class:"toolbar-section"},o("button",{class:"action-btn secondary",part:"cancel-button",onClick:this.closeCanvasEditor},this.canvasEditorCancelText),o("button",{class:"action-btn primary",part:"save-button",onClick:this.saveAnnotations},this.canvasEditorSaveText))),o("div",{class:"canvas-editor-content",part:"content"},o("canvas",{ref:t=>this.canvasRef=t,class:"annotation-canvas",part:"canvas",onMouseDown:this.handleCanvasMouseDown,onMouseMove:this.handleCanvasMouseMove,onMouseUp:this.handleCanvasMouseUp,onMouseLeave:this.handleCanvasMouseUp}))))))}};s.style=":host{display:block}.canvas-editor-wrapper{position:relative}.canvas-editor-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background:rgba(0, 0, 0, 0.8);display:flex;align-items:center;justify-content:center;z-index:9999}.canvas-editor-modal{width:95vw;height:95vh;max-width:none;max-height:none;background:var(--feedback-canvas-editor-bg-color, #ffffff);border-radius:12px;border:1px solid rgba(0, 0, 0, 0.08);display:flex;flex-direction:column;overflow:hidden;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.02),\n 0 8px 16px rgba(0, 0, 0, 0.08),\n 0 16px 32px rgba(0, 0, 0, 0.08),\n 0 32px 64px rgba(0, 0, 0, 0.06)}.canvas-editor-header{background:var(--feedback-canvas-editor-header-bg-color, #fafafa);border-bottom:1px solid rgba(0, 0, 0, 0.06);padding:16px 20px;display:flex;flex-direction:column;gap:16px}.canvas-editor-title h3{margin:0;font-size:18px;font-weight:600;color:var(--feedback-canvas-editor-tool-text-color, #1a1a1a);letter-spacing:-0.02em}.canvas-editor-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:16px}.toolbar-section{display:flex;align-items:center;gap:8px}.tool-group{display:flex;align-items:center;gap:4px}.tool-btn{width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:var(--feedback-canvas-editor-tool-bg-color, #ffffff);border:1.5px solid rgba(0, 0, 0, 0.08);border-radius:8px;cursor:pointer;transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);padding:0;box-shadow:0 1px 2px rgba(0, 0, 0, 0.04)}.tool-btn svg{width:18px;height:18px;color:var(--feedback-canvas-editor-tool-text-color, #333)}.tool-btn:hover:not(:disabled){background:var(--feedback-canvas-editor-tool-bg-hover, #f5f5f5);border-color:rgba(0, 0, 0, 0.12);transform:translateY(-1px);box-shadow:0 2px 4px rgba(0, 0, 0, 0.08)}.tool-btn.active,.tool-btn.active:hover{background:var(--feedback-canvas-editor-tool-bg-active, #0070f4);color:var(--feedback-canvas-editor-tool-text-active, #ffffff);border-color:var(--feedback-canvas-editor-tool-bg-active, #0070f4);box-shadow:0 2px 8px rgba(0, 112, 244, 0.3)}.tool-btn.active svg{color:var(--feedback-canvas-editor-tool-text-active, #ffffff)}.tool-btn:disabled{opacity:0.4;cursor:not-allowed;color:var(--feedback-canvas-editor-tool-text-color, #333)}.toolbar-divider{width:1px;height:24px;background:var(--feedback-canvas-editor-divider-color, #e0e0e0);margin:0 4px}.undo-btn,.delete-btn{background:var(--feedback-canvas-editor-tool-bg-color, #ffffff) !important;border:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0) !important}.undo-btn:hover:not(:disabled),.delete-btn:hover:not(:disabled){background:var(--feedback-canvas-editor-tool-bg-hover, #f0f0f0) !important}.undo-btn:disabled,.delete-btn:disabled{opacity:0.3;cursor:not-allowed}.delete-btn:hover:not(:disabled){background:#fee !important;border-color:#fcc !important}.delete-btn:hover:not(:disabled) svg{color:#c53030}.color-palette{display:flex;align-items:center;gap:6px}.color-slot-wrapper{position:relative;display:flex;align-items:center}.color-btn{width:32px;height:32px;border-radius:8px;border:2px solid transparent;cursor:pointer;transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);display:flex;align-items:center;justify-content:center;background:var(--feedback-canvas-editor-tool-bg-color, #ffffff);border:2px solid rgba(0, 0, 0, 0.08);box-shadow:0 1px 2px rgba(0, 0, 0, 0.04)}.color-btn:hover{transform:translateY(-2px) scale(1.05);box-shadow:0 4px 8px rgba(0, 0, 0, 0.12)}.color-btn.active{border-color:var(--feedback-primary-color, #0070f4);box-shadow:0 0 0 2px rgba(0, 112, 244, 0.2)}.color-btn.editing{border-color:var(--feedback-primary-color, #0070f4)}.color-picker-dropdown{position:absolute;top:100%;left:0;z-index:1000;margin-top:4px;background:var(--feedback-canvas-editor-tool-bg-color, #ffffff);border:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0);border-radius:6px;padding:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1)}.color-picker-dropdown input[type=\"color\"]{width:40px;height:40px;border:none;border-radius:4px;cursor:pointer}.size-control{display:flex;align-items:center;gap:8px;background:var(--feedback-canvas-editor-tool-bg-color, #ffffff);border:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0);border-radius:6px;padding:6px 12px}.size-slider{width:80px;height:14px;-webkit-appearance:none;appearance:none;background:transparent;border-radius:2px;outline:none;cursor:pointer;border:none;position:relative}.size-slider::before{content:'';position:absolute;top:50%;left:0;right:0;height:4px;background:rgba(0, 0, 0, 0.15);border-radius:2px;transform:translateY(-50%);pointer-events:none}.size-slider::-webkit-slider-track{width:100%;height:4px;background:transparent;border-radius:2px;border:none}.size-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:14px;height:14px;background:var(--feedback-primary-color, #0070f4);border-radius:50%;cursor:pointer;position:relative;z-index:1}.size-slider::-moz-range-track{width:100%;height:4px;background:transparent;border-radius:2px;border:none}.size-slider::-moz-range-thumb{width:14px;height:14px;background:var(--feedback-primary-color, #0070f4);border-radius:50%;border:none;cursor:pointer}.size-slider::-ms-track{width:100%;height:4px;background:transparent;border-radius:2px;border:none;color:transparent}.size-slider::-ms-thumb{width:14px;height:14px;background:var(--feedback-primary-color, #0070f4);border-radius:50%;border:none;cursor:pointer}.size-value{font-weight:500;color:var(--feedback-canvas-editor-tool-text-color, #333);font-size:12px;min-width:30px}.selected-annotation-controls{border-left:2px solid var(--feedback-canvas-editor-divider-color, #e0e0e0);padding-left:12px;margin-left:8px;min-width:200px}.text-controls{display:flex;flex-direction:row;align-items:center;gap:12px}.font-size-control,.border-width-control{display:flex;align-items:center;gap:6px}.font-size-control label,.border-width-control label{font-size:12px;color:var(--feedback-canvas-editor-tool-text-color, #333);font-weight:500;min-width:35px}.action-btn{display:flex;align-items:center;gap:8px;padding:0 20px;border:1.5px solid rgba(0, 0, 0, 0.08);border-radius:8px;cursor:pointer;font-size:14px;font-weight:500;transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);min-width:80px;justify-content:center;height:40px;box-shadow:0 1px 2px rgba(0, 0, 0, 0.04)}.action-btn.secondary{background:var(--feedback-canvas-editor-tool-bg-color, #ffffff);color:var(--feedback-canvas-editor-tool-text-color, #333);border-color:rgba(0, 0, 0, 0.08)}.action-btn.secondary:hover{background:var(--feedback-canvas-editor-tool-bg-hover, #f5f5f5);border-color:rgba(0, 0, 0, 0.12);transform:translateY(-1px);box-shadow:0 4px 8px rgba(0, 0, 0, 0.08)}.action-btn.primary{background:var(--feedback-primary-color, #0070f4);color:#ffffff;border-color:var(--feedback-primary-color, #0070f4);box-shadow:0 2px 4px rgba(0, 112, 244, 0.2)}.action-btn.primary:hover{background:#0056cc;border-color:#0056cc;transform:translateY(-1px);box-shadow:0 6px 12px rgba(0, 112, 244, 0.3)}.action-btn:active{transform:translateY(0)}.action-btn.small{height:28px;padding:4px 8px;font-size:12px;min-width:65px}.shape-controls{display:flex;flex-direction:column;gap:8px}.canvas-editor-content{flex:1;display:flex;align-items:center;justify-content:center;padding:24px;background:var(--feedback-canvas-editor-content-bg, #f5f5f5);overflow:hidden;min-height:0;min-width:0;position:relative}.canvas-editor-content::-webkit-scrollbar{width:8px;height:8px}.canvas-editor-content::-webkit-scrollbar-track{background:transparent}.canvas-editor-content::-webkit-scrollbar-thumb{background:rgba(0, 0, 0, 0.2);border-radius:4px}.canvas-editor-content::-webkit-scrollbar-thumb:hover{background:rgba(0, 0, 0, 0.3)}.annotation-canvas{max-width:calc(100% - 48px);max-height:calc(100% - 48px);width:auto !important;height:auto !important;cursor:crosshair;border-radius:8px;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.04),\n 0 4px 6px rgba(0, 0, 0, 0.06),\n 0 8px 16px rgba(0, 0, 0, 0.08);background:#ffffff;transition:box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);object-fit:contain;display:block;margin:auto}.annotation-canvas:hover{box-shadow:0 0 0 1px rgba(0, 0, 0, 0.06),\n 0 6px 10px rgba(0, 0, 0, 0.08),\n 0 12px 24px rgba(0, 0, 0, 0.1)}@media screen and (min-width: 1920px){.canvas-editor-modal{width:90vw;height:90vh}.canvas-editor-content{padding:32px}}@media screen and (min-width: 1200px) and (max-width: 1919px){.canvas-editor-modal{width:92vw;height:92vh}.canvas-editor-content{padding:28px}}@media screen and (min-width: 769px) and (max-width: 1199px){.canvas-editor-modal{width:95vw;height:95vh}}@media screen and (max-width: 768px){.canvas-editor-modal{width:100vw;height:100vh;border-radius:0}.canvas-editor-toolbar{flex-direction:column;align-items:stretch;gap:8px}.toolbar-section{justify-content:center}.selected-annotation-controls{border-left:none;border-top:2px solid var(--feedback-canvas-editor-divider-color, #e0e0e0);padding-left:0;padding-top:8px;margin-left:0;margin-top:8px;min-width:auto}.canvas-editor-content{padding:16px}}";const r=class{constructor(o){t(this,o),this.feedbackSent=e(this,"feedbackSent",7),this.feedbackError=e(this,"feedbackError",7),this.buttonPosition="default",this.buttonStyle="default",this.hideIcon=!1,this.hideMobile=!1,this.sessionId="",this.metadata="",this.submit=!1,this.customFont=!1,this.emailAddress="",this.isEmailRequired=!1,this.fetchData=!0,this.hideEmail=!1,this.hidePrivacyPolicy=!0,this.hideRating=!1,this.hideScreenshotButton=!1,this.modalPosition="center",this.project="",this.rating=void 0,this.ratingMode="thumbs",this.emailPlaceholder="Email address (optional)",this.errorMessage="Please try again later.",this.errorMessage403="The request URL does not match the one defined in PushFeedback for this project.",this.errorMessage404="We could not find the provided project id in PushFeedback.",this.footerText="",this.messagePlaceholder="Share your thoughts...",this.modalTitle="Share your feedback",this.modalTitleError="Oops!",this.modalTitleSuccess="Thanks for your feedback!",this.privacyPolicyText="I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.",this.ratingPlaceholder="Was this page helpful?",this.ratingStarsPlaceholder="How would you rate this page?",this.sendButtonText="Send",this.successMessage="",this.recaptchaText='This form is protected by reCAPTCHA and the Google <a href="https://policies.google.com/privacy" target="_blank" rel="noopener noreferrer">Privacy Policy</a> and <a href="https://policies.google.com/terms" target="_blank" rel="noopener noreferrer">Terms of Service</a> apply.',this.screenshotAttachedText="Screenshot attached",this.screenshotButtonText="Add a screenshot",this.screenshotTakingText="Taking screenshot...",this.screenshotEditTextButtonText="Edit text",this.screenshotEditorTitle="Edit screenshot",this.screenshotEditorCancelText="Cancel",this.screenshotEditorSaveText="Save",this.screenshotSizeLabelText="Size:",this.screenshotBorderLabelText="Border:",this.screenshotEditTextPromptText="Edit text:",this.screenshotErrorGeneral="Failed to capture screenshot.",this.screenshotErrorPermission="Permission denied. Please allow screen sharing to take screenshots.",this.screenshotErrorNotSupported="Screen capture is not supported in this browser.",this.screenshotErrorNotFound="No screen sources available for capture.",this.screenshotErrorCancelled="Screenshot capture was cancelled.",this.screenshotErrorBrowserNotSupported="Your browser does not support screen capture. Please use a browser like Chrome, Firefox, or Safari on desktop.",this.screenshotErrorUnexpected="An unexpected error occurred. Please try again."}componentWillLoad(){if(this.sessionId)localStorage.setItem("pushfeedback_sessionid",this.sessionId);else{let t=localStorage.getItem("pushfeedback_sessionid");t||(t=this.generateRandomSessionId(),localStorage.setItem("pushfeedback_sessionid",t),this.sessionId=t)}}componentDidLoad(){if("center-right"===this.buttonPosition){const t=this.el.shadowRoot.querySelector(".feedback-button-content");let e=0;this.isSafariBrowser()&&(e=5),t.style.right=(t.offsetWidth+e)/2*-1+"px"}this.customFont||this.loadInterFont()}connectedCallback(){this.feedbackModal=document.createElement("feedback-modal"),["customFont","emailAddress","fetchData","hideEmail","hidePrivacyPolicy","hideRating","hideScreenshotButton","isEmailRequired","modalPosition","project","rating","ratingMode","screenshotEditorTitle","screenshotEditorCancelText","screenshotEditorSaveText","screenshotEditTextButtonText","screenshotSizeLabelText","screenshotBorderLabelText","screenshotEditTextPromptText","screenshotErrorGeneral","screenshotErrorPermission","screenshotErrorNotSupported","screenshotErrorNotFound","screenshotErrorCancelled","screenshotErrorBrowserNotSupported","screenshotErrorUnexpected","emailPlaceholder","errorMessage","errorMessage403","errorMessage404","footerText","messagePlaceholder","metadata","modalTitle","modalTitleError","modalTitleSuccess","privacyPolicyText","ratingPlaceholder","ratingStarsPlaceholder","screenshotAttachedText","screenshotButtonText","screenshotTakingText","sendButtonText","successMessage","recaptchaText"].forEach((t=>{this.feedbackModal[t]=this[t]})),document.body.appendChild(this.feedbackModal)}disconnectedCallback(){document.body.removeChild(this.feedbackModal)}generateRandomSessionId(t=16){return Math.random().toString(36).substr(2,t)}isSafariBrowser(){return/safari/i.test(navigator.userAgent)&&!/chrome/i.test(navigator.userAgent)}loadInterFont(){const t=document.createElement("link");t.href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap",t.rel="stylesheet",document.head.appendChild(t)}showModal(){this.submit?this.submitRatingFeedback():this.feedbackModal.openModal()}async submitRatingFeedback(){try{let t=null;if(this.feedbackModal.recaptchaEnabled&&(t=await this.feedbackModal.getRecaptchaToken(),!t))return void this.feedbackError.emit({error:{status:500,message:"Failed to verify reCAPTCHA. Please try again."}});const e=Object.assign({url:window.location.href,project:this.project,rating:this.rating||-1,ratingMode:this.ratingMode,message:"",metadata:this.metadata,session:localStorage.getItem("pushfeedback_sessionid")||""},t&&{recaptchaToken:t}),o=await fetch("https://app.pushfeedback.com/api/feedback/",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}});if(201===o.status){const t=Object.assign(Object.assign({},e),{id:await o.json()});this.feedbackSent.emit({feedback:t})}else if(202===o.status){const t={message:"You received a new feedback entry. You've reached the 25 message limit for your current plan. Upgrade to continue receiving feedback.",id:await o.json()};this.feedbackSent.emit({feedback:t})}else{const t=await o.text();this.feedbackError.emit({error:{status:o.status,message:t}})}}catch(t){this.feedbackError.emit({error:{status:500,message:t}})}}render(){return o(a,null,o("a",{class:`feedback-button-content feedback-button-content--${this.buttonStyle} feedback-button-content--${this.buttonPosition} ${this.customFont?"feedback-button-content--custom-font":""} ${this.hideMobile?"feedback-button-content--hide-mobile":""}`,part:"button",onClick:()=>this.showModal()},!this.hideIcon&&"default"!=this.buttonStyle&&o("span",{class:"feedback-button-content-icon",part:"icon"},o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon-edit"},o("path",{d:"M12 20h9"}),o("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"}))),o("slot",null)))}get el(){return i(this)}};r.style=".feedback-button-content{cursor:pointer;max-width:fit-content;letter-spacing:var(--feedback-button-letter-spacing);z-index:var(--feedback-button-z-index);font-family:var(--feedback-font-family)}.feedback-button-content--custom-font{font-family:inherit}.feedback-button-content--light{align-items:center;background-color:var(--feedback-button-light-bg-color);border-radius:var(--feedback-button-border-radius);box-shadow:rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;box-sizing:border-box;color:var(--feedback-button-light-text-color);display:flex;font-size:var(--feedback-button-text-font-size);font-weight:var(--feedback-button-text-font-weight);padding:8px 15px}.feedback-button-content--dark{align-items:center;background-color:var(--feedback-button-dark-bg-color);border-radius:var(--feedback-button-border-radius);box-shadow:rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;box-sizing:border-box;color:var(--feedback-button-dark-text-color);display:flex;font-weight:var(--feedback-button-text-font-weight);font-size:var(--feedback-button-text-font-size);padding:8px 15px}.icon-edit{stroke:var(--feedback-button-light-icon-color)}.feedback-button-content--dark .icon-edit{stroke:var(--feedback-button-dark-icon-color)}.feedback-button-content--bottom-right{bottom:10px;position:fixed;right:10px}.feedback-button-content--center-right{position:fixed;transform:rotate(-90deg) translateY(-50%);top:50%}.feedback-button-content--center-right.feedback-button-content--dark,.feedback-button-content--center-right.feedback-button-content--light{border-radius:4px;border-bottom-left-radius:0px;border-bottom-right-radius:0px}.feedback-button-content-icon{height:16px;margin-right:5px;width:16px}.feedback-button-content--center-right .feedback-button-content-icon{rotate:90deg}@media screen and (max-width: 767px){.feedback-button-content--hide-mobile{display:none}}";const n=class{constructor(o){t(this,o),this.feedbackSent=e(this,"feedbackSent",7),this.feedbackError=e(this,"feedbackError",7),this.onScrollDebounced=()=>{clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout((()=>{document.documentElement.classList.remove("feedback-modal-screenshot-closing"),document.documentElement.style.top="",window.removeEventListener("scroll",this.onScrollDebounced)}),200)},this.handleSubmit=async t=>{if(t.preventDefault(),!this.isEmailRequired||this.formEmail){this.resetOverflow(),this.showScreenshotMode=!1,this.showScreenshotTopBar=!1,this.showModal=!1,this.sending=!0;try{let t=null;if(this.recaptchaEnabled&&(t=await this.getRecaptchaToken(),!t))return this.formSuccess=!1,this.formError=!0,this.formErrorStatus=500,this.sending=!1,void(this.showModal=!0);const e=Object.assign({url:window.location.href,message:this.formMessage,email:this.formEmail,project:this.project,screenshot:this.encodedScreenshot,rating:this.selectedRating,ratingMode:this.ratingMode,metadata:this.metadata,verification:this.formVerification,session:localStorage.getItem("pushfeedback_sessionid")||""},t&&{recaptchaToken:t}),o=await fetch("https://app.pushfeedback.com/api/feedback/",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}});if(201===o.status){const t=Object.assign(Object.assign({},e),{id:await o.json()});this.feedbackSent.emit({feedback:t}),this.formSuccess=!0,this.formError=!1}else if(202===o.status){const t={message:"You received a new feedback entry. You've reached the 25 message limit for your current plan. Upgrade to continue receiving feedback.",id:await o.json()};this.feedbackSent.emit({feedback:t}),this.formSuccess=!0,this.formError=!1}else{const t=await o.text();this.feedbackError.emit({error:{status:o.status,message:t}}),this.formSuccess=!1,this.formError=!0,this.formErrorStatus=o.status}}catch(t){this.feedbackError.emit({error:{status:500,message:t}}),this.formSuccess=!1,this.formError=!0,this.formErrorStatus=500}finally{this.sending=!1,this.showModal=!0}}},this.close=()=>{this.isAnimating=!1,setTimeout((()=>{this.sending=!1,this.showModal=!1,this.showScreenshotMode=!1,this.showScreenshotTopBar=!1,this.hasSelectedElement=!1,this.encodedScreenshot=null,document.querySelectorAll(".feedback-modal-element-selected").forEach((t=>{t.classList.remove("feedback-modal-element-selected")})),this.formSuccess=!1,this.formError=!1,this.formErrorStatus=500,this.formMessage="",this.formEmail="",this.resetOverflow()}),200)},this.handleScreenshotReady=t=>{this.encodedScreenshot=t.detail.screenshot,this.showModal=!0,this.takingScreenshot=!1,this.showCanvasEditor=!1,this.autoStartCapture=!1},this.handleScreenshotCancelled=()=>{this.showModal=!0,this.takingScreenshot=!1,this.showCanvasEditor=!1,this.autoStartCapture=!1},this.handleScreenshotError=t=>{console.error("Screenshot error:",t.detail.error),this.screenshotError=t.detail.error,this.showScreenshotError=!0,this.showModal=!0,this.takingScreenshot=!1,this.showCanvasEditor=!1,this.autoStartCapture=!1,setTimeout((()=>{this.showScreenshotError=!1}),8e3)},this.openScreenShot=()=>{this.showModal=!1,this.takingScreenshot=!0,this.autoStartCapture=!0,this.showCanvasEditor=!0},this.openCanvasEditor=t=>{t&&t.stopPropagation(),this.showModal=!1,this.autoStartCapture=!1,this.showCanvasEditor=!0},this.sending=!1,this.formMessage="",this.formEmail="",this.formSuccess=!1,this.formVerification="",this.formError=!1,this.formErrorStatus=500,this.encodedScreenshot=void 0,this.isPrivacyChecked=!1,this.whitelabel=!1,this.selectedRating=-1,this.overlayVisible=!1,this.isAnimating=!1,this.recaptchaEnabled=!1,this.recaptchaSiteKey=null,this.takingScreenshot=!1,this.showScreenshotError=!1,this.screenshotError="",this.showCanvasEditor=!1,this.autoStartCapture=!1,this.customFont=!1,this.emailAddress="",this.hideEmail=!1,this.isEmailRequired=!1,this.ratingMode="thumbs",this.hasSelectedElement=!1,this.hidePrivacyPolicy=!0,this.hideRating=!1,this.hideScreenshotButton=!1,this.project="",this.showScreenshotMode=!1,this.showScreenshotTopBar=!1,this.showModal=!1,this.rating=void 0,this.metadata=void 0,this.fetchData=!0,this.embedded=!1,this.emailPlaceholder="Email address (optional)",this.errorMessage="Please try again later.",this.errorMessage403="The request URL does not match the one defined in PushFeedback for this project.",this.errorMessage404="We could not find the provided project ID in PushFeedback.",this.messagePlaceholder="Share your thoughts...",this.footerText="",this.modalPosition="center",this.modalTitle="Share your feedback",this.modalTitleError="Oops!",this.modalTitleSuccess="Thanks for your feedback!",this.privacyPolicyText="I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.",this.ratingPlaceholder="Was this page helpful?",this.ratingStarsPlaceholder="How would you rate this page?",this.sendButtonText="Send",this.successMessage="",this.recaptchaText='This form is protected by reCAPTCHA and the Google <a href="https://policies.google.com/privacy" target="_blank" rel="noopener noreferrer">Privacy Policy</a> and <a href="https://policies.google.com/terms" target="_blank" rel="noopener noreferrer">Terms of Service</a> apply.',this.screenshotAttachedText="Screenshot attached",this.screenshotButtonText="Add a screenshot",this.screenshotTakingText="Taking screenshot...",this.screenshotEditTextButtonText="Edit text",this.screenshotEditorTitle="Edit screenshot",this.screenshotEditorCancelText="Cancel",this.screenshotEditorSaveText="Save",this.screenshotSizeLabelText="Size:",this.screenshotBorderLabelText="Border:",this.screenshotEditTextPromptText="Edit text:",this.screenshotErrorGeneral="Failed to capture screenshot.",this.screenshotErrorPermission="Permission denied. Please allow screen sharing to take screenshots.",this.screenshotErrorNotSupported="Screen capture is not supported in this browser.",this.screenshotErrorNotFound="No screen sources available for capture.",this.screenshotErrorCancelled="Screenshot capture was cancelled.",this.screenshotErrorBrowserNotSupported="Your browser does not support screen capture. Please use a browser like Chrome, Firefox, or Safari on desktop.",this.screenshotErrorUnexpected="An unexpected error occurred. Please try again."}componentWillLoad(){this.fetchData&&this.fetchProjectData(),this.formEmail=this.emailAddress,this.rating&&(this.selectedRating=this.rating),"thumbs"==this.ratingMode&&0==this.rating&&(this.selectedRating=5),this.embedded&&(this.showModal=!0)}async fetchProjectData(){try{const t=await fetch("https://app.pushfeedback.com/api/projects/"+this.project+"/"),e=await t.json();this.whitelabel=e.whitelabel,this.recaptchaEnabled=e.recaptcha_enabled||!1,this.recaptchaSiteKey=e.recaptcha_site_key||null,this.recaptchaEnabled&&this.recaptchaSiteKey&&this.loadRecaptchaScript()}catch(t){console.log(t)}}loadRecaptchaScript(){if(document.querySelector('script[src*="google.com/recaptcha"]'))return;const t=document.createElement("script");t.src=`https://www.google.com/recaptcha/api.js?render=${this.recaptchaSiteKey}`,t.async=!0,t.defer=!0,document.head.appendChild(t)}async getRecaptchaToken(){if(!this.recaptchaEnabled||!this.recaptchaSiteKey)return null;try{let t=0;for(;!window.grecaptcha&&t<50;)await new Promise((t=>setTimeout(t,100))),t++;return window.grecaptcha?await new Promise(((t,e)=>{window.grecaptcha.ready((async()=>{try{const e=await window.grecaptcha.execute(this.recaptchaSiteKey,{action:"submit_feedback"});t(e)}catch(t){console.error("reCAPTCHA execution error:",t),e(t)}}))})):(console.error("reCAPTCHA script not loaded"),null)}catch(t){return console.error("reCAPTCHA error:",t),null}}resetOverflow(){document.documentElement.classList.remove("feedback-modal-screenshot-open"),document.documentElement.classList.remove("feedback-modal-screenshot-open--scroll"),document.documentElement.classList.remove("feedback-modal-screenshot-closing")}handleMessageInput(t){this.formMessage=t.target.value}handleEmailInput(t){this.formEmail=t.target.value}handleCheckboxChange(t){this.isPrivacyChecked=t.target.checked}handleVerification(t){this.formVerification=t.target.value}handleRatingChange(t){this.selectedRating=t}render(){return o("div",{class:`feedback-modal-wrapper ${this.customFont?"feedback-modal-wrapper--custom-font":""} ${this.embedded?"feedback-modal-wrapper--embedded":""}`,part:"wrapper"},this.showCanvasEditor&&o("canvas-editor",{ref:t=>this.canvasEditorRef=t,exportparts:"overlay: canvas-editor-overlay, modal: canvas-editor-modal, header: canvas-editor-header, title: canvas-editor-title, toolbar: canvas-editor-toolbar, tool-button: canvas-editor-tool-button, cancel-button: canvas-editor-cancel-button, save-button: canvas-editor-save-button, content: canvas-editor-content, canvas: canvas-editor-canvas","canvas-editor-title":this.screenshotEditorTitle,"canvas-editor-cancel-text":this.screenshotEditorCancelText,"canvas-editor-save-text":this.screenshotEditorSaveText,"screenshot-taking-text":this.screenshotTakingText,"screenshot-attached-text":this.screenshotAttachedText,"screenshot-button-text":this.screenshotButtonText,"auto-start-screenshot":this.autoStartCapture,"existing-screenshot":this.encodedScreenshot||"","edit-text-button-text":this.screenshotEditTextButtonText,"size-label-text":this.screenshotSizeLabelText,"border-label-text":this.screenshotBorderLabelText,"edit-text-prompt-text":this.screenshotEditTextPromptText,"screenshot-error-general":this.screenshotErrorGeneral,"screenshot-error-permission":this.screenshotErrorPermission,"screenshot-error-not-supported":this.screenshotErrorNotSupported,"screenshot-error-not-found":this.screenshotErrorNotFound,"screenshot-error-cancelled":this.screenshotErrorCancelled,"screenshot-error-browser-not-supported":this.screenshotErrorBrowserNotSupported,"screenshot-error-unexpected":this.screenshotErrorUnexpected,onScreenshotReady:this.handleScreenshotReady,onScreenshotCancelled:this.handleScreenshotCancelled,onScreenshotFailed:this.handleScreenshotError}),this.showScreenshotError&&o("div",{class:"screenshot-error-notification"},o("div",{class:"screenshot-error-content"},o("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},o("circle",{cx:"12",cy:"12",r:"10"}),o("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),o("line",{x1:"9",y1:"9",x2:"15",y2:"15"})),o("span",null,this.screenshotError),o("button",{class:"error-close-btn",onClick:()=>this.showScreenshotError=!1,title:"Close"},o("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},o("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))))),this.showModal&&!this.embedded&&o("div",{class:"feedback-overlay "+(this.isAnimating?"feedback-overlay--visible":""),part:"overlay"}),this.showModal&&o("div",{class:`feedback-modal-content feedback-modal-content--${this.modalPosition} ${this.isAnimating?"feedback-modal-content--open":""} ${this.embedded?"feedback-modal-content--embedded":""}`,part:"modal",ref:t=>this.modalContent=t},o("div",{class:"feedback-modal-header "+(this.formSuccess&&!this.successMessage||this.formError&&!this.errorMessage?"feedback-modal-header--no-content":""),part:"header"},o("div",{class:"feedback-modal-header-content"},this.formSuccess||this.formError?o("span",{class:"feedback-modal-title",part:"title"},this.formSuccess?this.modalTitleSuccess:this.modalTitleError):o("div",{class:"feedback-modal-header-text"},o("span",{class:"feedback-modal-title",part:"title"},this.modalTitle),!this.whitelabel&&o("span",{class:"feedback-modal-powered-by",part:"powered-by"},"Powered by"," ",o("a",{target:"_blank",href:"https://pushfeedback.com"},"PushFeedback")))),!this.embedded&&o("button",{class:"feedback-modal-close",part:"close-button",onClick:this.close},o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"#191919","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-x"},o("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o("line",{x1:"6",y1:"6",x2:"18",y2:"18"})))),o("div",{class:"feedback-modal-body",part:"body"},this.formSuccess||this.formError?this.formSuccess&&!this.formError?o("div",{class:"feedback-modal-success"},o("p",{class:"feedback-modal-message",part:"success-message"},this.successMessage)):this.formError&&404==this.formErrorStatus?o("p",{class:"feedback-modal-message",part:"error-message"},this.errorMessage404):this.formError&&403==this.formErrorStatus?o("p",{class:"feedback-modal-message",part:"error-message"},this.errorMessage403):this.formError?o("p",{class:"feedback-modal-message",part:"error-message"},this.errorMessage):o("span",null):o("form",{part:"form",onSubmit:this.handleSubmit},!this.hideRating&&o("div",{class:"feedback-modal-rating",part:"rating"},"thumbs"===this.ratingMode?o("div",{class:"feedback-modal-rating-content"},o("span",{class:"feedback-modal-input-heading",part:"rating-title"},this.ratingPlaceholder),o("div",{class:"feedback-modal-rating-buttons feedback-modal-rating-buttons--thumbs",part:"rating-buttons"},o("button",{title:"Yes",class:"feedback-modal-rating-button feedback-modal-rating-button--positive "+(1===this.selectedRating?"feedback-modal-rating-button--selected":""),part:"rating-button rating-button-positive",onClick:t=>{t.preventDefault(),this.handleRatingChange(1)}},o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#5F6368","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},o("path",{d:"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"}))),o("button",{title:"No",class:"feedback-modal-rating-button feedback-modal-rating-button--negative "+(5===this.selectedRating?"feedback-modal-rating-button--selected":""),part:"rating-button rating-button-negative",onClick:t=>{t.preventDefault(),this.handleRatingChange(5)}},o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#5F6368","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},o("path",{d:"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17"}))))):o("div",{class:"feedback-modal-rating-content"},o("span",{class:"feedback-modal-input-heading",part:"rating-title"},this.ratingStarsPlaceholder),o("div",{class:"feedback-modal-rating-buttons feedback-modal-rating-buttons--stars",part:"rating-buttons"},[1,2,3,4,5].map((t=>o("button",{key:t,class:"feedback-modal-rating-button "+(this.selectedRating>=t?"feedback-modal-rating-button--selected":""),part:"rating-button",onClick:e=>{e.preventDefault(),this.handleRatingChange(t)}},o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"#5F6368","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},o("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"})))))))),o("div",{class:"feedback-modal-text"},o("textarea",{part:"message-input",placeholder:this.messagePlaceholder,value:this.formMessage,onInput:t=>this.handleMessageInput(t)})),!this.hideEmail&&o("div",{class:"feedback-modal-email"},o("input",{part:"email-input",placeholder:this.emailPlaceholder,type:"email",onInput:t=>this.handleEmailInput(t),value:this.formEmail,required:this.isEmailRequired})),o("div",{class:"feedback-verification"},o("input",{type:"text",name:"verification",style:{display:"none"},onInput:t=>this.handleVerification(t),value:this.formVerification})),!this.hidePrivacyPolicy&&o("div",{class:"feedback-modal-privacy",part:"privacy"},o("input",{type:"checkbox",id:"privacyPolicy",onChange:t=>this.handleCheckboxChange(t),required:!0}),o("span",{innerHTML:this.privacyPolicyText})),o("div",{class:"feedback-modal-buttons "+(this.hideScreenshotButton?"single":""),part:"buttons"},!this.hideScreenshotButton&&o("button",{type:"button",class:"feedback-modal-button feedback-modal-button--screenshot "+(this.encodedScreenshot?"feedback-modal-button--active":""),part:"screenshot-button",onClick:this.openScreenShot,disabled:this.sending||this.takingScreenshot},this.encodedScreenshot&&o("div",{class:"screenshot-preview",onClick:this.openCanvasEditor},o("img",{src:this.encodedScreenshot,alt:"Screenshot Preview"})),!this.encodedScreenshot&&!this.takingScreenshot&&o("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24"},o("path",{d:"M680-80v-120H560v-80h120v-120h80v120h120v80H760v120h-80ZM200-200v-200h80v120h120v80H200Zm0-360v-200h200v80H280v120h-80Zm480 0v-120H560v-80h200v200h-80Z"})),this.takingScreenshot&&o("div",{class:"screenshot-loading"},o("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#666","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather-loader"},o("line",{x1:"12",y1:"2",x2:"12",y2:"6"}),o("line",{x1:"12",y1:"18",x2:"12",y2:"22"}),o("line",{x1:"4.93",y1:"4.93",x2:"7.76",y2:"7.76"}),o("line",{x1:"16.24",y1:"16.24",x2:"19.07",y2:"19.07"}),o("line",{x1:"2",y1:"12",x2:"6",y2:"12"}),o("line",{x1:"18",y1:"12",x2:"22",y2:"12"}),o("line",{x1:"4.93",y1:"19.07",x2:"7.76",y2:"16.24"}),o("line",{x1:"16.24",y1:"7.76",x2:"19.07",y2:"4.93"}))),this.takingScreenshot?this.screenshotTakingText:this.encodedScreenshot?this.screenshotAttachedText:this.screenshotButtonText),o("button",{class:"feedback-modal-button feedback-modal-button--submit",part:"submit-button",type:"submit",disabled:this.sending},this.sendButtonText)))),!this.formSuccess&&!this.formError&&(this.recaptchaEnabled||this.footerText)&&o("div",{class:"feedback-modal-footer",part:"footer"},o("div",{class:"feedback-footer-combined"},this.recaptchaEnabled&&o("span",{innerHTML:this.recaptchaText}),this.recaptchaEnabled&&this.footerText&&" ",this.footerText&&o("span",{innerHTML:this.footerText})))))}componentDidRender(){this.showModal&&requestAnimationFrame((()=>{this.overlayVisible=!0}))}async openModal(){this.showModal=!0,requestAnimationFrame((()=>{requestAnimationFrame((()=>{this.isAnimating=!0}))}))}};n.style=".text-center{flex-grow:1;text-align:center}.feedback-modal-wrapper *{font-family:var(--feedback-font-family)}.feedback-modal-wrapper--custom-font *{font-family:inherit}.feedback-modal-wrapper{position:absolute;z-index:var(--feedback-modal-modal-wrapper-z-index)}.feedback-overlay{background-color:var(--feedback-modal-screenshot-bg-color);height:100%;left:0;opacity:0;position:fixed;top:0;width:100%;z-index:var(--feedback-modal-screnshot-z-index);transition:opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}.feedback-overlay--visible{opacity:1}.feedback-modal{display:inline-block;position:relative}.feedback-modal-content{background-color:var(--feedback-modal-content-bg-color);border:1px solid rgba(0, 0, 0, 0.08);border-radius:var(--feedback-modal-content-border-radius);box-shadow:0px 0px 0px 1px rgba(0, 0, 0, 0.02),\n 0px 2px 4px rgba(0, 0, 0, 0.04),\n 0px 8px 16px rgba(0, 0, 0, 0.06),\n 0px 16px 32px rgba(0, 0, 0, 0.04);box-sizing:border-box;color:var(--feedback-modal-content-text-color);display:flex;flex-direction:column;left:50%;max-width:90%;padding:24px;position:fixed;top:50%;transform:translate(-50%, -50%) scale(0.96);opacity:0;width:100%;z-index:var(--feedback-modal-content-z-index);transition:transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1)}.feedback-modal-content--open{transform:translate(-50%, -50%) scale(1);opacity:1}.feedback-modal-header{color:var(--feedback-modal-header-text-color);display:flex;font-size:var(--feedback-modal-header-font-size);font-weight:var(--feedback-modal-header-font-weight);justify-content:space-between;align-items:flex-start;margin-bottom:24px;letter-spacing:-0.01em}.feedback-modal-header-content{flex:1}.feedback-modal-header-text{display:flex;flex-direction:column;gap:6px}.feedback-modal-title{display:block}.feedback-modal-powered-by{display:block;font-size:13px;font-weight:400;color:var(--feedback-color-gray-500);line-height:1.4}.feedback-modal-powered-by a{color:var(--feedback-modal-header-text-color);text-decoration:none;font-weight:500}.feedback-modal-powered-by a:hover{text-decoration:underline}.feedback-modal-header--no-content{margin-bottom:0}.feedback-modal-rating-buttons{width:100%;margin-bottom:24px;display:flex;gap:4px}.feedback-modal-rating-button{padding:0;background-color:transparent;border:transparent;margin-right:8px;cursor:pointer}.feedback-modal-rating-buttons--stars .feedback-modal-rating-button{transition:transform 0.15s ease, opacity 0.15s ease}.feedback-modal-rating-buttons--stars .feedback-modal-rating-button:hover{transform:scale(1.1)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button{border:1.5px solid var(--feedback-modal-button-border-color);border-radius:var(--feedback-modal-button-border-radius);color:var(--feedback-modal-button-text-color);font-size:var(--feedback-modal-button-font-size);font-weight:500;margin-right:12px;justify-content:center;padding:10px 16px;transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);box-shadow:0 1px 2px rgba(0, 0, 0, 0.04)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--positive{background-color:var(--feedback-modal-rating-button-positive-bg-color);border-color:var(--feedback-modal-rating-button-positive-border-color)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--negative{background-color:var(--feedback-modal-rating-button-negative-bg-color);border-color:var(--feedback-modal-rating-button-negative-border-color)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button:hover{transform:translateY(-2px);box-shadow:0 4px 8px rgba(0, 0, 0, 0.12)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button:hover,.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--selected{background-color:var(--feedback-modal-button-bg-color-active);border:1.5px solid var(--feedback-modal-button-border-color-active);color:var(--feedback-modal-button-text-color-active)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button:hover svg,.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--selected svg{stroke:var(--feedback-modal-rating-button-selected-color)}.feedback-modal-rating-buttons svg{stroke:var(--feedback-modal-rating-button-color);cursor:pointer}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--positive svg{stroke:var(--feedback-modal-rating-button-positive-color)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--negative svg{stroke:var(--feedback-modal-rating-button-negative-color)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--positive:hover,.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--positive.feedback-modal-rating-button--selected{background-color:var(--feedback-modal-rating-button-positive-selected-bg-color);border-color:var(--feedback-modal-rating-button-positive-selected-border-color)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--negative:hover,.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--negative.feedback-modal-rating-button--selected{background-color:var(--feedback-modal-rating-button-negative-selected-bg-color);border-color:var(--feedback-modal-rating-button-negative-selected-border-color)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--positive:hover svg,.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--positive.feedback-modal-rating-button--selected svg{stroke:var(--feedback-modal-rating-button-positive-selected-color)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--negative:hover svg,.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--negative.feedback-modal-rating-button--selected svg{stroke:var(--feedback-modal-rating-button-negative-selected-color)}.feedback-modal-rating-buttons--stars .feedback-modal-rating-button--selected svg{fill:var(--feedback-modal-rating-button-stars-selected-color);stroke:var(--feedback-modal-rating-button-stars-selected-color)}.feedback-modal-text textarea{background-color:var(--feedback-modal-input-bg-color);border:1.5px solid var(--feedback-modal-input-border-color);border-radius:var(--feedback-modal-input-border-radius);box-sizing:border-box;color:var(--feedback-modal-input-text-color);font-size:var(--feedback-modal-input-font-size);margin-bottom:20px;height:100px;min-height:100px;padding:12px;resize:vertical;width:100%;transition:border-color 0.2s ease, box-shadow 0.2s ease;line-height:1.5}.feedback-modal-text textarea:hover{border-color:var(--feedback-modal-input-border-color-hover)}.feedback-modal-email input{background-color:var(--feedback-modal-input-bg-color);border:1.5px solid var(--feedback-modal-input-border-color);border-radius:var(--feedback-modal-input-border-radius);box-sizing:border-box;color:var(--feedback-modal-input-text-color);font-size:var(--feedback-modal-input-font-size);margin-bottom:20px;height:44px;padding:12px;width:100%;transition:border-color 0.2s ease, box-shadow 0.2s ease}.feedback-modal-email input:hover{border-color:var(--feedback-modal-input-border-color-hover)}.feedback-modal-text textarea:-webkit-autofill,.feedback-modal-email input:-webkit-autofill,.feedback-modal-email input:-webkit-autofill:hover,.feedback-modal-email input:-webkit-autofill:focus,.feedback-modal-email input:-webkit-autofill:active{-webkit-box-shadow:0 0 0 1000px var(--feedback-modal-input-bg-color) inset !important;-webkit-text-fill-color:var(--feedback-modal-input-text-color) !important;transition:background-color 5000s ease-in-out 0s}.feedback-modal-privacy{font-size:var(--feedback-modal-input-font-size);margin-bottom:20px}.feedback-modal-text textarea:focus,.feedback-modal-email input:focus{border:1.5px solid var(--feedback-modal-input-border-color-focused);outline:none;box-shadow:0 0 0 3px rgba(59, 130, 246, 0.1)}.feedback-modal-buttons{display:flex;flex-direction:column}.feedback-modal-buttons .feedback-modal-button{margin-bottom:20px}.feedback-modal-button{align-items:center;background-color:transparent;border:1.5px solid var(--feedback-modal-button-border-color);border-radius:var(--feedback-modal-button-border-radius);color:var(--feedback-modal-button-text-color);cursor:pointer;display:flex;font-size:var(--feedback-modal-button-font-size);font-weight:500;justify-content:center;min-height:44px;padding:10px 16px;transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);box-shadow:0 1px 2px rgba(0, 0, 0, 0.04)}.feedback-modal-button svg{margin-right:6px}.feedback-modal-button path{fill:var(--feedback-modal-button-icon-color)}.feedback-modal-button:hover path,.feedback-modal-button--active path{fill:var(--feedback-modal-button-icon-color-active)}.feedback-modal-button--submit{background-color:var(--feedback-modal-button-submit-bg-color);border:1.5px solid var(--feedback-modal-button-border-color-active);color:var(--feedback-modal-button-submit-text-color);box-shadow:0 2px 4px rgba(0, 0, 0, 0.1)}.feedback-modal-button:hover,.feedback-modal-button--active{background-color:var(--feedback-modal-button-bg-color-active);border:1.5px solid var(--feedback-modal-button-border-color-active);color:var(--feedback-modal-button-text-color-active);transform:translateY(-1px);box-shadow:0 4px 8px rgba(0, 0, 0, 0.12)}.feedback-modal-button--submit:hover{background-color:var(--feedback-modal-button-submit-bg-color-hover);border:1.5px solid var(--feedback-modal-button-submit-border-color-hover);color:var(--feedback-modal-button-submit-text-color-hover);transform:translateY(-1px);box-shadow:0 6px 12px rgba(0, 0, 0, 0.15)}.feedback-modal-button--submit:active{transform:translateY(0);box-shadow:0 2px 4px rgba(0, 0, 0, 0.1)}.feedback-modal-input-heading{display:block;font-size:14px;font-weight:500;padding-bottom:12px;color:var(--feedback-modal-header-text-color);letter-spacing:-0.01em}.feedback-modal-footer{font-size:12px;text-align:center}.feedback-modal-footer a{color:var(--feedback-modal-footer-link);font-weight:500;text-decoration:none}.feedback-logo,.feedback-footer-text{display:block;text-align:center;margin-top:5px}.feedback-footer-text{margin-top:10px;line-height:1.5}.feedback-footer-combined{display:block;text-align:center;font-size:11px;color:#666;line-height:1.5}.feedback-footer-combined a{color:#666;text-decoration:underline}.feedback-recaptcha-notice{display:block;text-align:center;margin-bottom:10px;font-size:11px;color:#666;line-height:1.4}.feedback-recaptcha-notice a{color:#666;text-decoration:underline}.feedback-modal-close{background-color:var(--feedback-modal-close-bg-color);border:0;border-radius:6px;cursor:pointer;height:32px;width:32px;margin-left:auto;padding:0;display:flex;align-items:center;justify-content:center;transition:all 0.2s ease}.feedback-modal-close:hover{background-color:rgba(0, 0, 0, 0.06);transform:scale(1.05)}.feedback-modal-close:active{transform:scale(0.95)}.feedback-modal-close svg{stroke:var(--feedback-modal-close-color)}.feedback-modal-screenshot{background-color:var(--feedback-modal-screenshot-bg-color);height:100%;left:0;position:fixed;top:0;width:100%;z-index:var(--feedback-modal-screnshot-z-index)}.feedback-modal-screenshot-header{align-items:center;background-color:var(--feedback-modal-screenshot-header-bg-color);border-radius:var(--feedback-modal-content-border-radius);box-shadow:0px 1px 2px 0px rgba(60, 64, 67, .30), 0px 2px 6px 2px rgba(60, 64, 67, .15);box-sizing:border-box;color:var(--feedback-modal-screenshot-header-text-color);cursor:pointer;display:flex;left:50%;top:20px;transform:translateX(-50%);padding:10px;position:fixed;width:max-content;z-index:var(--feedback-modal-screenshot-header-z-index)}.feedback-modal-screenshot-close{height:24px;padding-left:10px;width:24px}.feedback-modal-screenshot-close svg{stroke:var(--feedback-modal-close-color)}.feedback-modal-message{font-size:var(--feedback-modal-message-font-size);margin:0;line-height:1.6;color:var(--feedback-modal-content-text-color)}.feedback-modal-element-hover{background-color:transparent;cursor:pointer;border:1px solid var(--feedback-modal-element-hover-border-color)}.feedback-modal-element-selected{background-color:transparent;border:3px solid var(--feedback-modal-element-selected-border-color) !important;box-shadow:0 0 0 2px rgba(0, 123, 255, 0.3) !important}.screenshot-preview{display:inline-block;width:32px;height:32px;overflow:hidden;border-radius:6px;margin-right:10px;box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);cursor:pointer;transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);border:2px solid rgba(255, 255, 255, 0.8)}.screenshot-preview:hover{transform:scale(1.15);box-shadow:0 4px 8px rgba(0, 0, 0, 0.15)}.screenshot-preview img{width:100%;height:100%;object-fit:cover}.screenshot-loading{display:inline-flex;align-items:center;margin-right:8px}@media screen and (min-width: 768px){.feedback-modal-content{max-width:var(--feedback-modal-content-max-width)}.feedback-modal-content.feedback-modal-content--bottom-right{bottom:var(--feedback-modal-content-position-bottom);left:initial;right:var(--feedback-modal-content-position-right);top:initial;transform:initial}.feedback-modal-content.feedback-modal-content--bottom-left{bottom:var(--feedback-modal-content-position-bottom);left:var(--feedback-modal-content-position-left);top:initial;transform:initial}.feedback-modal-content.feedback-modal-content--top-right{right:var(--feedback-modal-content-position-right);top:var(--feedback-modal-content-position-top);transform:initial}.feedback-modal-content.feedback-modal-content--top-left{left:var(--feedback-modal-content-position-left);top:var(--feedback-modal-content-position-top);transform:initial}.feedback-modal-content.feedback-modal-content--center-left{left:5px;right:auto;top:50%;transform:translateY(-50%)}.feedback-modal-content.feedback-modal-content--center-right{left:auto;right:5px;top:50%;transform:translateY(-50%)}.feedback-modal-content.feedback-modal-content--sidebar-left.feedback-modal-content--open,.feedback-modal-content.feedback-modal-content--sidebar-right.feedback-modal-content--open{transform:translateX(0)}.feedback-modal-content.feedback-modal-content--sidebar-left{max-width:var(--feedback-modal-content-sidebar-max-width);left:0;right:auto;height:100vh;top:0;transform:translateX(-100%);transition:transform 0.5s ease-in-out;border-radius:0}.feedback-modal-content.feedback-modal-content--sidebar-right{max-width:var(--feedback-modal-content-sidebar-max-width);left:auto;right:0;height:100vh;top:0;transform:translateX(100%);transition:transform 0.5s ease-in-out;border-radius:0}.feedback-modal-text textarea{height:150px;min-height:150px}.feedback-modal-content.feedback-modal-content--bottom-right{transform:translateY(20px)}.feedback-modal-content.feedback-modal-content--bottom-right.feedback-modal-content--open{transform:translateY(0)}.feedback-modal-content.feedback-modal-content--bottom-left{transform:translateY(20px)}.feedback-modal-content.feedback-modal-content--bottom-left.feedback-modal-content--open{transform:translateY(0)}.feedback-modal-content.feedback-modal-content--top-right{transform:translateY(-20px)}.feedback-modal-content.feedback-modal-content--top-right.feedback-modal-content--open{transform:translateY(0)}.feedback-modal-content.feedback-modal-content--top-left{transform:translateY(-20px)}.feedback-modal-content.feedback-modal-content--top-left.feedback-modal-content--open{transform:translateY(0)}}@keyframes feather-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.feather-loader{animation:feather-spin 1s linear infinite;display:block}.screenshot-error-notification{position:fixed;top:20px;left:50%;transform:translateX(-50%);z-index:10001;max-width:500px;width:90%;animation:slideDown 0.3s ease-out}@keyframes slideDown{from{opacity:0;transform:translateX(-50%) translateY(-20px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}.screenshot-error-content{background:#fee;border:1.5px solid #fcc;border-radius:10px;padding:14px 18px;display:flex;align-items:center;gap:12px;box-shadow:0 0 0 1px rgba(197, 48, 48, 0.05),\n 0 4px 6px rgba(0, 0, 0, 0.07),\n 0 10px 20px rgba(0, 0, 0, 0.1);color:#c53030}.screenshot-error-content svg:first-child{color:#e53e3e;flex-shrink:0}.screenshot-error-content span{flex:1;font-size:14px;line-height:1.4;font-weight:500}.error-close-btn{background:none;border:none;cursor:pointer;padding:6px;border-radius:6px;color:#c53030;flex-shrink:0;transition:all 0.2s ease;display:flex;align-items:center;justify-content:center}.error-close-btn:hover{background:rgba(197, 48, 48, 0.15);transform:scale(1.1)}.error-close-btn:active{transform:scale(0.95)}@media screen and (max-width: 768px){.feedback-modal-content{width:100vw;height:100dvh;max-width:none;border-radius:0;top:0;left:0;transform:scale(0.95);padding:24px 20px;display:flex;flex-direction:column}.feedback-modal-content--open{transform:scale(1)}.feedback-modal-buttons{display:flex;flex-direction:column;gap:12px}.feedback-modal-button--screenshot{display:none !important}.feedback-modal-button--submit{width:100%}.feedback-modal-text textarea{flex:1;min-height:120px;resize:none}}.feedback-modal-wrapper--embedded{position:relative;z-index:auto;display:block;width:100%}.feedback-modal-content--embedded{position:relative !important;left:auto !important;right:auto !important;top:auto !important;bottom:auto !important;transform:none !important;opacity:1 !important;max-width:100%;margin:0 auto;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1);text-align:left}.feedback-modal-content--embedded.feedback-modal-content--open{transform:none !important}@media screen and (max-width: 768px){.feedback-modal-content--embedded{width:100%;height:auto;border-radius:var(--feedback-modal-content-border-radius);padding:24px}.feedback-modal-content--embedded .feedback-modal-button--screenshot{display:flex !important}}";export{s as canvas_editor,r as feedback_button,n as feedback_modal}
|