diff --git a/.husky/pre-commit b/.husky/pre-commit index d4d3c418f..52007e38b 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -4,9 +4,6 @@ SCRIPT_DIR="$(readlink -f "$(dirname "$0")")" MONOREPO_ROOT="$(readlink -f "$SCRIPT_DIR/../")" -echo "Copying pdf.js" -npm run copy:pdfjs --workspace apps/** - echo "Copying .well-known/ contents" node "$MONOREPO_ROOT/scripts/copy-wellknown.cjs" diff --git a/apps/documentation/package.json b/apps/documentation/package.json index fc06f6547..76def45e1 100644 --- a/apps/documentation/package.json +++ b/apps/documentation/package.json @@ -7,8 +7,7 @@ "build": "next build", "start": "next start -p 3002", "lint:fix": "next lint --fix", - "clean": "rimraf .next && rimraf node_modules", - "copy:pdfjs": "node ../../scripts/copy-pdfjs.cjs" + "clean": "rimraf .next && rimraf node_modules" }, "dependencies": { "@documenso/assets": "*", diff --git a/apps/openpage-api/package.json b/apps/openpage-api/package.json index 1a8816acb..3ceaba3e4 100644 --- a/apps/openpage-api/package.json +++ b/apps/openpage-api/package.json @@ -7,8 +7,7 @@ "build": "next build", "start": "next start", "lint:fix": "next lint --fix", - "clean": "rimraf .next && rimraf node_modules", - "copy:pdfjs": "node ../../scripts/copy-pdfjs.cjs" + "clean": "rimraf .next && rimraf node_modules" }, "dependencies": { "@documenso/prisma": "*", diff --git a/apps/remix/app/components/embed/embed-authentication-required.tsx b/apps/remix/app/components/embed/embed-authentication-required.tsx index 11d672cb4..d86256dce 100644 --- a/apps/remix/app/components/embed/embed-authentication-required.tsx +++ b/apps/remix/app/components/embed/embed-authentication-required.tsx @@ -8,11 +8,17 @@ import { BrandingLogo } from '~/components/general/branding-logo'; export type EmbedAuthenticationRequiredProps = { email?: string; returnTo: string; + isGoogleSSOEnabled?: boolean; + isOIDCSSOEnabled?: boolean; + oidcProviderLabel?: string; }; export const EmbedAuthenticationRequired = ({ email, returnTo, + isGoogleSSOEnabled, + isOIDCSSOEnabled, + oidcProviderLabel, }: EmbedAuthenticationRequiredProps) => { return (
{Object.defineProperty(t,"__esModule",{value:!0});t.Parser=t.Linearization=t.Lexer=void 0;var r=a(2),n=a(4),i=a(3),s=a(8),o=a(17),c=a(19),l=a(20),h=a(22),u=a(23),d=a(26),f=a(29),g=a(31),p=a(32),m=a(33);class Parser{constructor({lexer:e,xref:t,allowStreams:a=!1,recoveryMode:r=!1}){this.lexer=e;this.xref=t;this.allowStreams=a;this.recoveryMode=r;this.imageCache=Object.create(null);this._imageId=0;this.refill()}refill(){this.buf1=this.lexer.getObj();this.buf2=this.lexer.getObj()}shift(){if(this.buf2 instanceof n.Cmd&&"ID"===this.buf2.cmd){this.buf1=this.buf2;this.buf2=null}else{this.buf1=this.buf2;this.buf2=this.lexer.getObj()}}tryShift(){try{this.shift();return!0}catch(e){if(e instanceof i.MissingDataException)throw e;return!1}}getObj(e=null){const t=this.buf1;this.shift();if(t instanceof n.Cmd)switch(t.cmd){case"BI":return this.makeInlineImage(e);case"[":const a=[];for(;!(0,n.isCmd)(this.buf1,"]")&&this.buf1!==n.EOF;)a.push(this.getObj(e));if(this.buf1===n.EOF){if(this.recoveryMode)return a;throw new i.ParserEOFException("End of file inside array.")}this.shift();return a;case"<<":const s=new n.Dict(this.xref);for(;!(0,n.isCmd)(this.buf1,">>")&&this.buf1!==n.EOF;){if(!(this.buf1 instanceof n.Name)){(0,r.info)("Malformed dictionary: key must be a name object");this.shift();continue}const t=this.buf1.name;this.shift();if(this.buf1===n.EOF)break;s.set(t,this.getObj(e))}if(this.buf1===n.EOF){if(this.recoveryMode)return s;throw new i.ParserEOFException("End of file inside dictionary.")}if((0,n.isCmd)(this.buf2,"stream"))return this.allowStreams?this.makeStream(s,e):s;this.shift();return s;default:return t}if(Number.isInteger(t)){if(Number.isInteger(this.buf1)&&(0,n.isCmd)(this.buf2,"R")){const e=n.Ref.get(t,this.buf1);this.shift();this.shift();return e}return t}return"string"==typeof t&&e?e.decryptString(t):t}findDefaultInlineStreamEnd(e){const{knownCommands:t}=this.lexer,a=e.pos;let o,c,l=0;for(;-1!==(o=e.getByte());)if(0===l)l=69===o?1:0;else if(1===l)l=73===o?2:0;else if(32===o||10===o||13===o){c=e.pos;const a=e.peekBytes(15),i=a.length;if(0===i)break;for(let e=0;e127))){l=0;break}}if(2!==l)continue;if(!t){(0,r.warn)("findDefaultInlineStreamEnd - `lexer.knownCommands` is undefined.");continue}const h=new Lexer(new s.Stream(a.slice()),t);h._hexStringWarn=()=>{};let u=0;for(;;){const e=h.getObj();if(e===n.EOF){l=0;break}if(e instanceof n.Cmd){const a=t[e.cmd];if(!a){l=0;break}if(a.variableArgs?u<=a.numArgs:u===a.numArgs)break;u=0}else u++}if(2===l)break}else l=0;if(-1===o){(0,r.warn)("findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker");if(c){(0,r.warn)('... trying to recover by using the last "EI" occurrence.');e.skip(-(e.pos-c))}}let h=4;e.skip(-h);o=e.peekByte();e.skip(h);(0,i.isWhiteSpace)(o)||h--;return e.pos-h-a}findDCTDecodeInlineStreamEnd(e){const t=e.pos;let a,n,i=!1;for(;-1!==(a=e.getByte());)if(255===a){switch(e.getByte()){case 0:break;case 255:e.skip(-1);break;case 217:i=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case 219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:n=e.getUint16();n>2?e.skip(n-2):e.skip(-2)}if(i)break}const s=e.pos-t;if(-1===a){(0,r.warn)("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead.");e.skip(-s);return this.findDefaultInlineStreamEnd(e)}this.inlineStreamSkipEI(e);return s}findASCII85DecodeInlineStreamEnd(e){const t=e.pos;let a;for(;-1!==(a=e.getByte());)if(126===a){const t=e.pos;a=e.peekByte();for(;(0,i.isWhiteSpace)(a);){e.skip();a=e.peekByte()}if(62===a){e.skip();break}if(e.pos>t){const t=e.peekBytes(2);if(69===t[0]&&73===t[1])break}}const n=e.pos-t;if(-1===a){(0,r.warn)("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead.");e.skip(-n);return this.findDefaultInlineStreamEnd(e)}this.inlineStreamSkipEI(e);return n}findASCIIHexDecodeInlineStreamEnd(e){const t=e.pos;let a;for(;-1!==(a=e.getByte())&&62!==a;);const n=e.pos-t;if(-1===a){(0,r.warn)("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead.");e.skip(-n);return this.findDefaultInlineStreamEnd(e)}this.inlineStreamSkipEI(e);return n}inlineStreamSkipEI(e){let t,a=0;for(;-1!==(t=e.getByte());)if(0===a)a=69===t?1:0;else if(1===a)a=73===t?2:0;else if(2===a)break}makeInlineImage(e){const t=this.lexer,a=t.stream,i=Object.create(null);let s;for(;!(0,n.isCmd)(this.buf1,"ID")&&this.buf1!==n.EOF;){if(!(this.buf1 instanceof n.Name))throw new r.FormatError("Dictionary key must be a name object");const t=this.buf1.name;this.shift();if(this.buf1===n.EOF)break;i[t]=this.getObj(e)}-1!==t.beginInlineImagePos&&(s=a.pos-t.beginInlineImagePos);const o=this.xref.fetchIfRef(i.F||i.Filter);let c;if(o instanceof n.Name)c=o.name;else if(Array.isArray(o)){const e=this.xref.fetchIfRef(o[0]);e instanceof n.Name&&(c=e.name)}const l=a.pos;let h,u;switch(c){case"DCT":case"DCTDecode":h=this.findDCTDecodeInlineStreamEnd(a);break;case"A85":case"ASCII85Decode":h=this.findASCII85DecodeInlineStreamEnd(a);break;case"AHx":case"ASCIIHexDecode":h=this.findASCIIHexDecodeInlineStreamEnd(a);break;default:h=this.findDefaultInlineStreamEnd(a)}if(h<1e3&&s>0){const e=a.pos;a.pos=t.beginInlineImagePos;u=function getInlineImageCacheKey(e){const t=[],a=e.length;let r=0;for(;r>15&1;this.clow=this.clow<<1&65535;this.ct--}while(0==(32768&c));this.a=c;e[t]=r<<1|n;return o}}},(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0});t.JpegStream=void 0;var r=a(18),n=a(4),i=a(27),s=a(2);class JpegStream extends r.DecodeStream{constructor(e,t,a){let r;for(;-1!==(r=e.getByte());)if(255===r){e.skip(-1);break}super(t);this.stream=e;this.dict=e.dict;this.maybeLength=t;this.params=a}get bytes(){return(0,s.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(e){}readBlock(){if(this.eof)return;const e={decodeTransform:void 0,colorTransform:void 0},t=this.dict.getArray("D","Decode");if((this.forceRGBA||this.forceRGB)&&Array.isArray(t)){const a=this.dict.get("BPC","BitsPerComponent")||8,r=t.length,n=new Int32Array(r);let i=!1;const s=(1<{Object.defineProperty(t,"__esModule",{value:!0});t.JpegImage=void 0;var r=a(2),n=a(28),i=a(3);class JpegError extends r.BaseException{constructor(e){super(`JPEG error: ${e}`,"JpegError")}}class DNLMarkerError extends r.BaseException{constructor(e,t){super(e,"DNLMarkerError");this.scanLines=t}}class EOIMarkerError extends r.BaseException{constructor(e){super(e,"EOIMarkerError")}}const s=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),o=4017,c=799,l=3406,h=2276,u=1567,d=3784,f=5793,g=2896;function buildHuffmanTable(e,t){let a,r,n=0,i=16;for(;i>0&&!e[i-1];)i--;const s=[{children:[],index:0}];let o,c=s[0];for(a=0;a0;)c=s.pop();c.index++;s.push(c);for(;s.length<=a;){s.push(o={children:[],index:0});c.children[c.index]=o.children;c=o}n++}if(a+10){b--;return m>>b&1}m=e[t++];if(255===m){const r=e[t++];if(r){if(220===r&&d){t+=2;const r=(0,i.readUint16)(e,t);t+=2;if(r>0&&r!==a.scanLines)throw new DNLMarkerError("Found DNL marker (0xFFDC) while parsing scan data",r)}else if(217===r){if(d){const e=x*(8===a.precision?8:0);if(e>0&&Math.round(a.scanLines/e)>=5)throw new DNLMarkerError("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",e)}throw new EOIMarkerError("Found EOI marker (0xFFD9) while parsing scan data")}throw new JpegError(`unexpected marker ${(m<<8|r).toString(16)}`)}}b=7;return m>>>7}function decodeHuffman(e){let t=e;for(;;){t=t[readBit()];switch(typeof t){case"number":return t;case"object":continue}throw new JpegError("invalid huffman sequence")}}function receive(e){let t=0;for(;e>0;){t=t<<1|readBit();e--}return t}function receiveAndExtend(e){if(1===e)return 1===readBit()?1:-1;const t=receive(e);return t>=1<>4==0)for(m=0;m<64;m++){x=s[m];a[x]=e[o++]}else{if(t>>4!=1)throw new JpegError("DQT - invalid table spec");for(m=0;m<64;m++){x=s[m];a[x]=(0,i.readUint16)(e,o);o+=2}}u[15&t]=a}break;case 65472:case 65473:case 65474:if(a)throw new JpegError("Only single frame JPEGs supported");o+=2;a={};a.extended=65473===g;a.progressive=65474===g;a.precision=e[o++];const C=(0,i.readUint16)(e,o);o+=2;a.scanLines=t||C;a.samplesPerLine=(0,i.readUint16)(e,o);o+=2;a.components=[];a.componentIds={};const k=e[o++];let v=0,F=0;for(p=0;p0?Math.min(r.xcb,n.PPx-1):Math.min(r.xcb,n.PPx);n.ycb_=a>0?Math.min(r.ycb,n.PPy-1):Math.min(r.ycb,n.PPy);return n}function buildPrecincts(e,t,a){const r=1<0,o=t+1=0;t--){d[t]=o[a];a=l[a]}}else d[f++]=d[0]}if(n){l[s]=u;c[s]=c[u]+1;o[s]=d[0];s++;h=s+i&s+i-1?h:0|Math.min(Math.log(s+i)/.6931471805599453+1,12)}u=e;g+=f;if(r