' } ]\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\tmetaData: {\r\n\t\t\t\tfileName: file.title || ' ',\r\n\t\t\t\tid: file.id?.toString()\r\n\t\t\t}\r\n\t\t}, {\r\n\t\t\tshowDownloadPDF: false, // If true, a download button appears in the overflow menu on the top bar\r\n\t\t\tshowPrintPDF: false, // If true, then a print PDF option appears in the overflow menu on the top bar\r\n\t\t\tshowFullScreen: true, // If true, a full screen button appears. (Only for `SIZED_CONTAINER` embedMode)\r\n\t\t\t// https://developer.adobe.com/document-services/docs/overview/pdf-embed-api/howtos/#embed-modes\r\n\r\n\t\t\t...viewerConfig\r\n\t\t});\r\n\r\n\t\treturn previewFilePromise;\r\n\t}\r\n}\r\nexport default ViewSDKClient;","import { useEffect } from 'react';\r\n\r\nimport ViewSDKClient from '../ViewSDKClient';\r\n\r\nconst SizedContainer = ({ attributes, clientId, pebAPIKey }) => {\r\n\tuseEffect(() => {\r\n\t\tconst viewSDKClient = new ViewSDKClient();\r\n\r\n\t\tviewSDKClient.ready().then(() => {\r\n\t\t\tviewSDKClient.previewFile(`pebPDFArea-${clientId}`, { embedMode: 'SIZED_CONTAINER' }, attributes, pebAPIKey);\r\n\t\t});\r\n\t}, []);\r\n\r\n\treturn \r\n}\r\nexport default SizedContainer;","import { useEffect } from 'react';\r\n\r\nimport ViewSDKClient from '../ViewSDKClient';\r\n\r\nconst InLine = ({ attributes, clientId, pebAPIKey }) => {\r\n\tuseEffect(() => {\r\n\t\tconst viewSDKClient = new ViewSDKClient();\r\n\r\n\t\tviewSDKClient.ready().then(() => {\r\n\t\t\tviewSDKClient.previewFile(`pebPDFArea-${clientId}`, { embedMode: 'IN_LINE' }, attributes, pebAPIKey);\r\n\t\t});\r\n\t}, []);\r\n\r\n\treturn \r\n}\r\nexport default InLine;","import SizedContainer from './Modes/SizedContainer';\nimport InLine from './Modes/InLine';\n\nconst PDFEmbed = ({ attributes, clientId, pebAPIKey }) => {\n\tconst { config } = attributes;\n\n\treturn \n\t\t{'SIZED_CONTAINER' === config?.embedMode && }\n\n\t\t{'IN_LINE' === config?.embedMode && }\n\t
;\n}\nexport default PDFEmbed;","import { render } from 'react-dom';\n\nimport './style.scss';\nimport Style from './Style';\nimport PDFEmbed from './PDFEmbed';\n\n// PDF Embed\ndocument.addEventListener('DOMContentLoaded', () => {\n\tconst allPDFEmbed = document.querySelectorAll('.wp-block-peb-pdf-embed');\n\tallPDFEmbed.forEach(pdfEmbed => {\n\t\tconst { attributes, pebAPIKey } = JSON.parse(pdfEmbed.dataset.props);\n\t\tconst { cId, file } = attributes;\n\n\t\tpebAPIKey && file?.url && render(<>\n\t\t\t\n\n\t\t\t\n\t\t>, pdfEmbed);\n\n\t\tpdfEmbed?.removeAttribute('data-props');\n\t});\n});"],"names":["ReactDOM","attributes","clientId","alignment","width","height","dangerouslySetInnerHTML","__html","React","ViewSDKClient","this","readyPromise","Promise","resolve","window","AdobeDC","document","addEventListener","adobeDCView","undefined","divId","viewerConfig","pebAPIKey","file","defaultConfig","View","previewFilePromise","previewFile","content","location","url","metaData","fileName","title","id","toString","showDownloadPDF","showPrintPDF","showFullScreen","useEffect","viewSDKClient","ready","then","embedMode","className","config","querySelectorAll","forEach","pdfEmbed","JSON","parse","dataset","props","cId","render","removeAttribute"],"sourceRoot":""}