recce-nightly 1.7.0.20250608__py3-none-any.whl → 1.7.0.20250610__py3-none-any.whl
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.
Potentially problematic release.
This version of recce-nightly might be problematic. Click here for more details.
- recce/VERSION +1 -1
- recce/cli.py +144 -6
- recce/data/404.html +2 -2
- recce/data/_next/static/chunks/402-8636abe5d238aff6.js +9 -0
- recce/data/_next/static/chunks/711-e33b196232addaf6.js +1 -0
- recce/data/_next/static/chunks/app/{layout-c76e6ca2ce9857e9.js → layout-85508f342aee398d.js} +1 -1
- recce/data/_next/static/chunks/app/page-495342d47790789d.js +1 -0
- recce/data/_next/static/chunks/webpack-741f2f465598ee9c.js +1 -0
- recce/data/index.html +2 -2
- recce/data/index.txt +3 -3
- recce/util/recce_cloud.py +15 -5
- {recce_nightly-1.7.0.20250608.dist-info → recce_nightly-1.7.0.20250610.dist-info}/METADATA +11 -11
- {recce_nightly-1.7.0.20250608.dist-info → recce_nightly-1.7.0.20250610.dist-info}/RECORD +20 -21
- tests/test_cli.py +6 -8
- recce/data/_next/static/chunks/316-9e0164c48e40d69b.js +0 -9
- recce/data/_next/static/chunks/6ef81909-694dc38134099299.js +0 -1
- recce/data/_next/static/chunks/711-3014d4c850eeba80.js +0 -1
- recce/data/_next/static/chunks/app/page-e0d6a05d923c9e17.js +0 -1
- recce/data/_next/static/chunks/webpack-8442f6926a7a34ce.js +0 -1
- /recce/data/_next/static/{jCVil-Iv5VJuxce34zdSo → 5LpcdU-p3dp7cy9CD0QlA}/_buildManifest.js +0 -0
- /recce/data/_next/static/{jCVil-Iv5VJuxce34zdSo → 5LpcdU-p3dp7cy9CD0QlA}/_ssgManifest.js +0 -0
- {recce_nightly-1.7.0.20250608.dist-info → recce_nightly-1.7.0.20250610.dist-info}/WHEEL +0 -0
- {recce_nightly-1.7.0.20250608.dist-info → recce_nightly-1.7.0.20250610.dist-info}/entry_points.txt +0 -0
- {recce_nightly-1.7.0.20250608.dist-info → recce_nightly-1.7.0.20250610.dist-info}/licenses/LICENSE +0 -0
- {recce_nightly-1.7.0.20250608.dist-info → recce_nightly-1.7.0.20250610.dist-info}/top_level.txt +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[455],{77918:function(e,t,s){let r,i,n,o,l,a,h,u;s.d(t,{kv:function(){return m}});var c,p=s(81503).Buffer,f=s(79294),d=((c=d||{})[c.Document=0]="Document",c[c.DocumentType=1]="DocumentType",c[c.Element=2]="Element",c[c.Text=3]="Text",c[c.CDATA=4]="CDATA",c[c.Comment=5]="Comment",c);function m(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?t.toLowerCase():null}RegExp(/(max|min)-device-(width|height)/.source,"g");var g={exports:{}},w=String,y=function(){return{isColorSupported:!1,reset:w,bold:w,dim:w,italic:w,underline:w,inverse:w,hidden:w,strikethrough:w,black:w,red:w,green:w,yellow:w,blue:w,magenta:w,cyan:w,white:w,gray:w,bgBlack:w,bgRed:w,bgGreen:w,bgYellow:w,bgBlue:w,bgMagenta:w,bgCyan:w,bgWhite:w}};g.exports=y(),g.exports.createColors=y;var b=g.exports;let x=function(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),v=class e extends Error{constructor(t,s,r,i,n,o){super(t),this.name="CssSyntaxError",this.reason=t,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),void 0!==s&&void 0!==r&&("number"==typeof s?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){let t,s;if(!this.source)return"";let r=this.source;null==e&&(e=b.isColorSupported),x&&e&&(r=x(r));let i=r.split(/\r?\n/),n=Math.max(this.line-3,0),o=Math.min(this.line+2,i.length),l=String(o).length;if(e){let{bold:e,gray:r,red:i}=b.createColors(!0);t=t=>e(i(t)),s=e=>r(e)}else t=s=e=>e;return i.slice(n,o).map((e,r)=>{let i=n+1+r,o=" "+(" "+i).slice(-l)+" | ";if(i===this.line){let r=s(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return t(">")+s(o)+e+"\n "+r+t("^")}return" "+s(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};v.default=v;var k={};k.isClean=Symbol("isClean"),k.my=Symbol("my");let O={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1},C=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let i=(e.raws.between||"")+(t?";":"");this.builder(s+r+i,e)}}beforeAfter(e,t){let s;s="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,i=0;for(;r&&"root"!==r.type;)i+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<i;e++)s+=t}return s}block(e,t){let s,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let i=e.nodes[r],n=this.raw(i,"before");n&&this.builder(n),this.stringify(i,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&void 0!==(r=e.raws[t]))return r;let i=e.parent;if("before"===s&&(!i||"root"===i.type&&i.first===e||i&&"document"===i.type))return"";if(!i)return O[s];let n=e.root();if(n.rawCache||(n.rawCache={}),void 0!==n.rawCache[s])return n.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{var o;let i="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[i]?r=this[i](n,e):n.walk(e=>{if(void 0!==(r=e.raws[t]))return!1})}return void 0===r&&(r=O[s]),n.rawCache[s]=r,r}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(e=>{if(void 0!==e.raws.before)return(s=e.raws.before).includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return(s=e.raws.before).includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return(t=s.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}rawIndent(e){let t;return e.raws.indent?e.raws.indent:(e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.raws.before.split("\n");return t=(t=e[e.length-1]).replace(/\S/g,""),!1}}),t)}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};function S(e,t){new C(t).stringify(e)}C.default=C,S.default=S;let{isClean:P,my:R}=k,E=class{constructor(e={}){for(let t in this.raws={},this[P]=!1,this[R]=!0,e)if("nodes"===t)for(let s of(this.nodes=[],e[t]))"function"==typeof s.clone?this.append(s.clone()):this.append(s);else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=function e(t,s){let r=new t.constructor;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||"proxyCache"===i)continue;let n=t[i],o=typeof n;"parent"===i&&"object"===o?s&&(r[i]=s):"source"===i?r[i]=n:Array.isArray(n)?r[i]=n.map(t=>e(t,r)):("object"===o&&null!==n&&(n=e(n)),r[i]=n)}return r}(this);for(let s in e)t[s]=e[s];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new v(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>e[t]===s||(e[t]=s,("prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0)}}markDirty(){if(this[P]){this[P]=!1;let e=this;for(;e=e.parent;)e[P]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,i=this.source.start.line;for(let t=0;t<e;t++)"\n"===s[t]?(r=1,i+=1):r+=1;return{column:r,line:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},s=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),i=r.indexOf(e.word);-1!==i&&(t=this.positionInside(i,r),s=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return new C().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||"parent"===e||"proxyCache"===e)continue;let r=this[e];if(Array.isArray(r))s[e]=r.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof r&&r.toJSON)s[e]=r.toJSON(null,t);else if("source"===e){let n=t.get(r.input);null==n&&(n=i,t.set(r.input,i),i++),s[e]={end:r.end,inputId:n,start:r.start}}else s[e]=r}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=S){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s){let r={node:this};for(let e in s)r[e]=s[e];return e.warn(t,r)}get proxyOf(){return this}};E.default=E;let A=E,M=class extends A{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};M.default=M;let{SourceMapConsumer:I,SourceMapGenerator:U}=x,{existsSync:F,readFileSync:j}=x,{dirname:z,join:D}=x,L=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=z(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new I(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e)){var t;return t=e.substr(RegExp.lastMatch.length),p?p.from(t,"base64").toString():window.atob(t)}throw Error("Unsupported source map encoding "+e.match(/data:application\/json;([^,]+),/)[1])}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=z(e),F(e))return this.mapFile=e,j(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"==typeof t){let s=t(e);if(s){let e=this.loadFile(s);if(!e)throw Error("Unable to load previous source map: "+s.toString());return e}}else if(t instanceof I)return U.fromSourceMap(t).toString();else if(t instanceof U)return t.toString();else if(this.isMap(t))return JSON.stringify(t);else throw Error("Unsupported previous source map format: "+t.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let t=this.annotation;return e&&(t=D(z(e),t)),this.loadFile(t)}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};L.default=L;let{SourceMapConsumer:_,SourceMapGenerator:B}=x,{fileURLToPath:T,pathToFileURL:N}=x,{isAbsolute:$,resolve:W}=x,{nanoid:V}={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(s=t)=>{let r="",i=s;for(;i--;)r+=e[Math.random()*e.length|0];return r}},J=Symbol("fromOffsetCache"),G=!!(_&&B),Y=!!(W&&$),Z=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\uFEFF"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Y||/^\w+:\/\//.test(t.from)||$(t.from)?this.file=t.from:this.file=W(t.from)),Y&&G){let e=new L(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+V(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let i,n,o;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,s=r.col}else t=e.line,s=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);n=e.line,o=e.col}else n=r.line,o=r.column}else if(!s){let e=this.fromOffset(t);t=e.line,s=e.col}let l=this.origin(t,s,n,o);return(i=l?new v(e,void 0===l.endLine?l.line:{column:l.column,line:l.line},void 0===l.endLine?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,r.plugin):new v(e,void 0===n?t:{column:s,line:t},void 0===n?s:{column:o,line:n},this.css,this.file,r.plugin)).input={column:s,endColumn:o,endLine:n,line:t,source:this.css},this.file&&(N&&(i.input.url=N(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,s;if(this[J])s=this[J];else{let e=this.css.split("\n");s=Array(e.length);let t=0;for(let r=0,i=e.length;r<i;r++)s[r]=t,t+=e[r].length+1;this[J]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let t,i=s.length-2;for(;r<i;)if(e<s[t=r+(i-r>>1)])i=t-1;else if(e>=s[t+1])r=t+1;else{r=t;break}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:W(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){let i,n;if(!this.map)return!1;let o=this.map.consumer(),l=o.originalPositionFor({column:t,line:e});if(!l.source)return!1;"number"==typeof s&&(i=o.originalPositionFor({column:r,line:s})),n=$(l.source)?N(l.source):new URL(l.source,this.map.consumer().sourceRoot||N(this.map.mapFile));let a={column:l.column,endColumn:i&&i.column,endLine:i&&i.line,line:l.line,url:n.toString()};if("file:"===n.protocol){if(T)a.file=T(n);else throw Error("file: protocol is not available in this PostCSS build")}let h=o.sourceContentFor(l.source);return h&&(a.source=h),a}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};Z.default=Z,x&&x.registerInput&&x.registerInput(Z);let{SourceMapConsumer:q,SourceMapGenerator:H}=x,{dirname:K,relative:Q,resolve:X,sep:ee}=x,{pathToFileURL:et}=x,es=!!(q&&H),er=!!(K&&X&&Q&&ee),ei=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,s=this.toUrl(this.path(e.file)),r=e.root||K(e.file);!1===this.mapOpts.sourcesContent?(t=new q(e.text)).sourcesContent&&(t.sourcesContent=null):t=e.consumer(),this.map.applySourceMap(t,s,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation){if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}}generate(){if(this.clearAnnotation(),er&&es&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=H.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new H({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return(this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline())?[this.css]:[this.css,this.map]}generateString(){let e,t;this.css="",this.map=new H({file:this.outputFile(),ignoreInvalidMapping:!0});let s=1,r=1,i="<no source>",n={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,l,a)=>{if(this.css+=o,l&&"end"!==a&&(n.generated.line=s,n.generated.column=r-1,l.source&&l.source.start?(n.source=this.sourcePath(l),n.original.line=l.source.start.line,n.original.column=l.source.start.column-1):(n.source=i,n.original.line=1,n.original.column=0),this.map.addMapping(n)),(e=o.match(/\n/g))?(s+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=o.length,l&&"start"!==a){let e=l.parent||{raws:{}};(!("decl"===l.type||"atrule"===l.type&&!l.nodes)||l!==e.last||e.raws.semicolon)&&(l.source&&l.source.end?(n.source=this.sourcePath(l),n.original.line=l.source.end.line,n.original.column=l.source.end.column-1,n.generated.line=s,n.generated.column=r-2):(n.source=i,n.original.line=1,n.original.column=0,n.generated.line=s,n.generated.column=r-1),this.map.addMapping(n))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?K(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=K(X(s,this.mapOpts.annotation)));let r=Q(s,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps){if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Z(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return p?p.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(et){let t=et(e).toString();return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===ee&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}},en=E,eo=class extends en{constructor(e){super(e),this.type="comment"}};eo.default=eo;let{isClean:el,my:ea}=k,eh=E,eu=class e extends eh{append(...e){for(let t of e)for(let e of this.normalize(t,this.last))this.proxyOf.nodes.push(e);return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){let t,s;if(!this.proxyOf.nodes)return;let r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(s=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){if("proxyOf"===t)return e;if(!e[t])return e[t];if("each"===t||"string"==typeof t&&t.startsWith("walk"))return(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e));if("every"===t||"some"===t)return s=>e[t]((e,...t)=>s(e.toProxy(),...t));if("root"===t)return()=>e.root().toProxy();if("nodes"===t)return e.nodes.map(e=>e.toProxy());if("first"===t||"last"===t)return e[t].toProxy();else return e[t]},set:(e,t,s)=>e[t]===s||(e[t]=s,("name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let s,r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();for(let t of(r=this.index(e),i))this.proxyOf.nodes.splice(r+1,0,t);for(let e in this.indexes)r<(s=this.indexes[e])&&(this.indexes[e]=s+i.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),i=0===r&&"prepend",n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();for(let t of(r=this.index(e),n))this.proxyOf.nodes.splice(r,0,t);for(let e in this.indexes)r<=(s=this.indexes[e])&&(this.indexes[e]=s+n.length);return this.markDirty(),this}normalize(t,s){if("string"==typeof t)t=function e(t){return t.map(t=>(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(r(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t))for(let e of t=t.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if("root"===t.type&&"document"!==this.type)for(let e of t=t.nodes.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new M(t)]}else if(t.selector)t=[new i(t)];else if(t.name)t=[new n(t)];else if(t.text)t=[new eo(t)];else throw Error("Unknown node type in node creation");return t.map(t=>(t[ea]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[el]&&function e(t){if(t[el]=!1,t.proxyOf.nodes)for(let s of t.proxyOf.nodes)e(s)}(t),void 0===t.raws.before&&s&&void 0!==s.raws.before&&(t.raws.before=s.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){for(let t of e=e.reverse()){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;for(let s in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[s])>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{(!t.props||t.props.includes(r.prop))&&(!t.fast||r.value.includes(t.fast))&&(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};eu.registerParse=e=>{r=e},eu.registerRule=e=>{i=e},eu.registerAtRule=e=>{n=e},eu.registerRoot=e=>{o=e},eu.default=eu,eu.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,n.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,M.prototype):"comment"===e.type?Object.setPrototypeOf(e,eo.prototype):"root"===e.type&&Object.setPrototypeOf(e,o.prototype),e[ea]=!0,e.nodes&&e.nodes.forEach(e=>{eu.rebuild(e)})};let ec=eu,ep=class extends ec{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new l(new a,this,e).stringify()}};ep.registerLazyResult=e=>{l=e},ep.registerProcessor=e=>{a=e},ep.default=ep;let ef=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};ef.default=ef;let ed=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){!t.plugin&&this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let s=new ef(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};ed.default=ed;let em=/[\t\n\f\r "#'()/;[\\\]{}]/g,eg=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ew=/.[\r\n"'(/\\]/,ey=/[\da-f]/i,eb=eu,ex=class extends eb{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};ex.default=ex,eb.registerAtRule(ex);let ev=eu,ek=class extends ev{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t){if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before}return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new h(new u,this,e).stringify()}};ek.registerLazyResult=e=>{h=e},ek.registerProcessor=e=>{u=e},ek.default=ek,ev.registerRoot(ek);let eO={comma:e=>eO.split(e,[","],!0),space:e=>eO.split(e,[" ","\n"," "]),split(e,t,s){let r=[],i="",n=!1,o=0,l=!1,a="",h=!1;for(let s of e)h?h=!1:"\\"===s?h=!0:l?s===a&&(l=!1):'"'===s||"'"===s?(l=!0,a=s):"("===s?o+=1:")"===s?o>0&&(o-=1):0===o&&t.includes(s)&&(n=!0),n?(""!==i&&r.push(i.trim()),i="",n=!1):i+=s;return(s||""!==i)&&r.push(i.trim()),r}};eO.default=eO;let eC=eu,eS=class extends eC{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return eO.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};eS.default=eS,eC.registerRule(eS);let eP=function(e,t={}){let s,r,i,n,o,l,a,h,u,c,p=e.css.valueOf(),f=t.ignoreErrors,d=p.length,m=0,g=[],w=[];function y(t){throw e.error("Unclosed "+t,m)}return{back:function(e){w.push(e)},endOfFile:function(){return 0===w.length&&m>=d},nextToken:function(e){if(w.length)return w.pop();if(m>=d)return;let t=!!e&&e.ignoreUnclosed;switch(s=p.charCodeAt(m)){case 10:case 32:case 9:case 13:case 12:r=m;do r+=1,s=p.charCodeAt(r);while(32===s||10===s||9===s||13===s||12===s);c=["space",p.slice(m,r)],m=r-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(s);c=[e,e,m];break}case 40:if(h=g.length?g.pop()[1]:"",u=p.charCodeAt(m+1),"url"===h&&39!==u&&34!==u&&32!==u&&10!==u&&9!==u&&12!==u&&13!==u){r=m;do{if(l=!1,-1===(r=p.indexOf(")",r+1))){if(f||t){r=m;break}y("bracket")}for(a=r;92===p.charCodeAt(a-1);)a-=1,l=!l}while(l);c=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),n=p.slice(m,r+1),-1===r||ew.test(n)?c=["(","(",m]:(c=["brackets",n,m,r],m=r);break;case 39:case 34:i=39===s?"'":'"',r=m;do{if(l=!1,-1===(r=p.indexOf(i,r+1))){if(f||t){r=m+1;break}y("string")}for(a=r;92===p.charCodeAt(a-1);)a-=1,l=!l}while(l);c=["string",p.slice(m,r+1),m,r],m=r;break;case 64:em.lastIndex=m+1,em.test(p),r=0===em.lastIndex?p.length-1:em.lastIndex-2,c=["at-word",p.slice(m,r+1),m,r],m=r;break;case 92:for(r=m,o=!0;92===p.charCodeAt(r+1);)r+=1,o=!o;if(s=p.charCodeAt(r+1),o&&47!==s&&32!==s&&10!==s&&9!==s&&13!==s&&12!==s&&(r+=1,ey.test(p.charAt(r)))){for(;ey.test(p.charAt(r+1));)r+=1;32===p.charCodeAt(r+1)&&(r+=1)}c=["word",p.slice(m,r+1),m,r],m=r;break;default:47===s&&42===p.charCodeAt(m+1)?(0===(r=p.indexOf("*/",m+2)+1)&&(f||t?r=p.length:y("comment")),c=["comment",p.slice(m,r+1),m,r]):(eg.lastIndex=m+1,eg.test(p),r=0===eg.lastIndex?p.length-1:eg.lastIndex-2,c=["word",p.slice(m,r+1),m,r],g.push(c)),m=r}return m++,c},position:function(){return m}}},eR={empty:!0,space:!0},eE=class{constructor(e){this.input=e,this.root=new ek,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,s,r,i=new ex;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);let n=!1,o=!1,l=[],a=[];for(;!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?a.push("("===t?")":"]"):"{"===t&&a.length>0?a.push("}"):t===a[a.length-1]&&a.pop(),0===a.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(l.length>0){for(r=l.length-1,s=l[r];s&&"space"===s[0];)s=l[--r];s&&(i.source.end=this.getPosition(s[3]||s[2]),i.source.end.offset++)}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(i.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(i,"params",l),n&&(e=l[l.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),o&&(i.nodes=[],this.current=i)}checkMissedSemicolon(e){let t,s=this.colon(e);if(!1===s)return;let r=0;for(let i=s-1;i>=0&&("space"===(t=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===t[0]?t[3]+1:t[2])}colon(e){let t,s,r=0;for(let[i,n]of e.entries()){if("("===(t=n[0])&&(r+=1),")"===t&&(r-=1),0===r&&":"===t){if(s){if("word"===s[0]&&"progid"===s[1])continue;return i}this.doubleColon(n)}s=n}return!1}comment(e){let t=new eo;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=eP(this.input)}decl(e,t){let s,r,i=new M;this.init(i,e[0][2]);let n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),i.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;i.prop+=e.shift()[1]}for(i.raws.between="";e.length;){if(":"===(s=e.shift())[0]){i.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),i.raws.between+=s[1]}("_"===i.prop[0]||"*"===i.prop[0])&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let o=[];for(;e.length&&("space"===(r=e[0][0])||"comment"===r);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if("!important"===(s=e[t])[1].toLowerCase()){i.important=!0;let s=this.stringFrom(e,t);" !important"!==(s=this.spacesFromEnd(e)+s)&&(i.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),r="";for(let e=t;e>0;e--){let t=s[e][0];if(0===r.trim().indexOf("!")&&"space"!==t)break;r=s.pop()[1]+r}0===r.trim().indexOf("!")&&(i.important=!0,i.raws.important=r,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(i.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(i,"value",o.concat(e),t),i.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new eS;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,i=null,n=[],o=e[1].startsWith("--"),l=[],a=e;for(;a;){if(s=a[0],l.push(a),"("===s||"["===s)i||(i=a),n.push("("===s?")":"]");else if(o&&r&&"{"===s)i||(i=a),n.push("}");else if(0===n.length){if(";"===s){if(r){this.decl(l,o);return}break}if("{"===s){this.rule(l);return}if("}"===s){this.tokenizer.back(l.pop()),t=!0;break}":"===s&&(r=!0)}else s===n[n.length-1]&&(n.pop(),0===n.length&&(i=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(i),t&&r){if(!o)for(;l.length&&("space"===(a=l[l.length-1][0])||"comment"===a);)this.tokenizer.back(l.pop());this.decl(l,o)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let i,n,o,l;let a=s.length,h="",u=!0;for(let e=0;e<a;e+=1)"space"!==(n=(i=s[e])[0])||e!==a-1||r?"comment"===n?(l=s[e-1]?s[e-1][0]:"empty",o=s[e+1]?s[e+1][0]:"empty",eR[l]||eR[o]?u=!1:","===h.slice(-1)?u=!1:h+=i[1]):h+=i[1]:u=!1;if(!u){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:h}}e[t]=h}rule(e){e.pop();let t=new eS;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t;let s="";for(;e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t;let s="";for(;e.length&&("space"===(t=e[0][0])||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t="";for(;e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};function eA(e,t){let s=new eE(new Z(e,t));try{s.parse()}catch(e){throw e}return s.root}eA.default=eA,eu.registerParse(eA);let{isClean:eM,my:eI}=k,eU={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},eF={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},ej={Once:!0,postcssPlugin:!0,prepare:!0};function ez(e){return"object"==typeof e&&"function"==typeof e.then}function eD(e){let t=!1,s=eU[e.type];return("decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append)?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function eL(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:eD(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function e_(e){return e[eM]=!1,e.nodes&&e.nodes.forEach(e=>e_(e)),e}let eB={},eT=class e{constructor(t,s,r){let i;if(this.stringified=!1,this.processed=!1,"object"==typeof s&&null!==s&&("root"===s.type||"document"===s.type))i=e_(s);else if(s instanceof e||s instanceof ed)i=e_(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let e=eA;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{i=e(s,r)}catch(e){this.processed=!0,this.error=e}i&&!i[eI]&&eu.rebuild(i)}this.result=new ed(t,i,r),this.helpers={...eB,postcss:eB,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?s.postcssVersion:(e.plugin=s.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!eF[s]&&/^[A-Z]/.test(s))throw Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ej[s]){if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],s=this.runOnRoot(t);if(ez(s))try{await s}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[eM];){e[eM]=!0;let t=[eL(e)];for(;t.length>0;){let e=this.visitTick(t);if(ez(e))try{await e}catch(s){let e=t[t.length-1].node;throw this.handleError(s,e)}}}if(this.listeners.OnceExit)for(let[t,s]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>s(e,this.helpers));await Promise.all(t)}else await s(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));if(ez(t[0]))return Promise.all(t);return t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=S;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new ei(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(ez(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[eM];)e[eM]=!0,this.walkSync(e);if(this.listeners.OnceExit){if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[s,r]of e){let e;this.result.lastPlugin=s;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(ez(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent){e.pop();return}if(r.length>0&&t.visitorIndex<r.length){let[e,i]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return i(s.toProxy(),this.helpers)}catch(e){throw this.handleError(e,s)}}if(0!==t.iterator){let r,i=t.iterator;for(;r=s.nodes[s.indexes[i]];)if(s.indexes[i]+=1,!r[eM]){r[eM]=!0,e.push(eL(r));return}t.iterator=0,delete s.indexes[i]}let i=t.events;for(;t.eventIndex<i.length;){let e=i[t.eventIndex];if(t.eventIndex+=1,0===e){s.nodes&&s.nodes.length&&(s[eM]=!0,t.iterator=s.getIterator());return}if(this.listeners[e]){t.visitors=this.listeners[e];return}}e.pop()}walkSync(e){for(let t of(e[eM]=!0,eD(e)))if(0===t)e.nodes&&e.each(e=>{e[eM]||this.walkSync(e)});else{let s=this.listeners[t];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};eT.registerPostcss=e=>{eB=e},eT.default=eT,ek.registerLazyResult(eT),ep.registerLazyResult(eT);let eN=class{constructor(e,t,s){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0,this.result=new ed(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let n=new ei(S,r,this._opts,t);if(n.isMap()){let[e,t]=n.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){let e;if(this._root)return this._root;try{e=eA(this._css,this._opts)}catch(e){this.error=e}if(!this.error)return this._root=e,e;throw this.error}get[Symbol.toStringTag](){return"NoWorkResult"}};eN.default=eN;let e$=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else if("object"==typeof s&&(s.parse||s.stringify));else throw Error(s+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new eT(this,e,t):new eN(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};function eW(e,t){if(Array.isArray(e))return e.map(e=>eW(e));let{inputs:s,...r}=e;if(s)for(let e of(t=[],s)){let s={...e,__proto__:Z.prototype};s.map&&(s.map={...s.map,__proto__:L.prototype}),t.push(s)}if(r.nodes&&(r.nodes=e.nodes.map(e=>eW(e,t))),r.source){let{inputId:e,...s}=r.source;r.source=s,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new ek(r);if("decl"===r.type)return new M(r);if("rule"===r.type)return new eS(r);if("comment"===r.type)return new eo(r);if("atrule"===r.type)return new ex(r);throw Error("Unknown node type: "+e.type)}function eV(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new e$(e)}e$.default=e$,ek.registerProcessor(e$),ep.registerProcessor(e$),eW.default=eW,eV.plugin=function(e,t){let s,r=!1;function i(...s){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),f.env.LANG&&f.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...s);return n.postcssPlugin=e,n.postcssVersion=new e$().version,n}return Object.defineProperty(i,"postcss",{get:()=>(s||(s=i()),s)}),i.process=function(e,t,s){return eV([i(s)]).process(e,t)},i},eV.stringify=S,eV.parse=eA,eV.fromJSON=eW,eV.list=eO,eV.comment=e=>new eo(e),eV.atRule=e=>new ex(e),eV.decl=e=>new M(e),eV.rule=e=>new eS(e),eV.root=e=>new ek(e),eV.document=e=>new ep(e),eV.CssSyntaxError=v,eV.Declaration=M,eV.Container=eu,eV.Processor=e$,eV.Document=ep,eV.Comment=eo,eV.Warning=ef,eV.AtRule=ex,eV.Result=ed,eV.Input=Z,eV.Rule=eS,eV.Root=ek,eV.Node=E,eT.registerPostcss(eV),eV.default=eV;let eJ=eV&&eV.__esModule&&Object.prototype.hasOwnProperty.call(eV,"default")?eV.default:eV;eJ.stringify,eJ.fromJSON,eJ.plugin,eJ.parse,eJ.list,eJ.document,eJ.comment,eJ.atRule,eJ.rule,eJ.decl,eJ.root,eJ.CssSyntaxError,eJ.Declaration,eJ.Container,eJ.Processor,eJ.Document,eJ.Comment,eJ.Warning,eJ.AtRule,eJ.Result,eJ.Input,eJ.Rule,eJ.Root,eJ.Node}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[711],{61527:function(e,n,t){"use strict";t.d(n,{W:function(){return u},o:function(){return s}});var l=t(20130);t(7903);var r=t(23113),i=t(43906),o=t(51895),a=t(55169);let s=(0,i.G)((e,n)=>{let{...t}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(r.ZP,{ref:n,...t})})});function u(e){let{emptyMessage:n}=e;return(0,l.jsx)(o.k,{h:"35px",alignItems:"center",justifyContent:"center",bg:"gray.100",style:{textAlign:"center",gridColumn:"1/-1"},children:(0,l.jsxs)(a.x,{fontWeight:"600",children:[" ",null!=n?n:"No rows"]})})}},12700:function(e,n,t){"use strict";t.d(n,{d:function(){return m},r:function(){return h}});var l=t(20130),r=t(28561),i=t(22488),o=t(49151),a=t(15615),s=t(51560);function u(e){let n=e.trim().toUpperCase();return!!["CHAR","VARCHAR","TINYTEXT","TEXT","MEDIUMTEXT","LONGTEXT","NCHAR","NVARCHAR","VARCHAR2","NVARCHAR2","CLOB","NCLOB","VARCHAR(MAX)","XML","JSON"].includes(n)||/^(VARCHAR|NVARCHAR|VARCHAR2|NVARCHAR2|CHAR|NCHAR)\(\d+\)$/.test(n)}function c(e){return["BOOLEAN","TINYINT(1)","BIT","NUMBER(1)","BOOL"].includes(e.toUpperCase())}function d(e){return["DATE","DATETIME","TIMESTAMP","TIME","YEAR","DATETIME2","SMALLDATETIME","DATETIMEOFFSET","INTERVAL","TIMESTAMPTZ","TIMETZ","TIMESTAMP WITH TIME ZONE","TIMESTAMP WITH LOCAL TIME ZONE","TIMESTAMP_LTZ","TIMESTAMP_NTZ","TIMESTAMP_TZ"].includes(e.toUpperCase())}function m(e){return!u(e)&&!c(e)&&!d(e)}function h(e){let{params:n,onParamsChanged:t,setIsReadyToExecute:m}=e,{columns:h,isLoading:f,error:v}=(0,s.ZP)(n.model),p=h.filter(e=>!u(e.type)&&!c(e.type)&&!d(e.type));return f?(0,l.jsx)(r.x,{children:"Loading..."}):0===h.length||v?(0,l.jsx)(r.x,{children:"Error: Please provide the 'catalog.json' to list column candidates"}):(0,l.jsx)(r.x,{m:"16px",children:(0,l.jsxs)(i.NI,{children:[(0,l.jsx)(o.l,{children:"Pick a column to show Histogram Diff"}),(0,l.jsx)(a.P,{placeholder:0!==p.length?"Select column":"No numeric column is available",isDisabled:0===p.length,value:n.column_name,onChange:e=>{var l,r;let i=e.target.value;m(!!i);let o=null!==(r=null===(l=p.find(e=>e.name===i))||void 0===l?void 0:l.type)&&void 0!==r?r:"";t({...n,column_name:i,column_type:o})},children:p.map(e=>(0,l.jsxs)("option",{value:e.name,children:[e.name," : ",e.type]},e.name))})]})})}},93804:function(e,n,t){"use strict";function l(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,l=new Set,r={},i=(e,t)=>{if(!(t<0)&&(null==r[e]||!(r[e]>=t))){for(let l of(r[e]=t,n(e)))i(l,t-1);l.add(e)}};for(let n of e)i(n,t);return l}function r(){for(var e=arguments.length,n=Array(e),t=0;t<e;t++)n[t]=arguments[t];let l=new Set;return n.forEach(e=>{e.forEach(e=>{l.add(e)})}),l}t.d(n,{E$:function(){return l},G0:function(){return r}})},58484:function(e,n,t){"use strict";t.d(n,{O$:function(){return a},Te:function(){return d},WU:function(){return s},_e:function(){return c},bK:function(){return h},cr:function(){return u},lc:function(){return m}});var l=t(25788),r=t(93804),i=t(32139),o=t.n(i);let a=20;function s(e,n,t){var l,i,o,a,s,u,c,d,m;let h={},f={},v=(e,n)=>({id:e,name:e,data:{},from:n,parents:{},children:{}});for(let[n,t]of Object.entries(e.nodes))h[n]=v(n,"base"),t&&(h[n].data.base=t,h[n].name=t.name,h[n].resourceType=t.resource_type,h[n].packageName=t.package_name);for(let[e,t]of Object.entries(n.nodes))h[e]?h[e].from="both":h[e]=v(e,"current"),t&&(h[e].data.current=n.nodes[e],h[e].name=t.name,h[e].resourceType=t.resource_type,h[e].packageName=t.package_name);for(let[n,t]of Object.entries(e.parent_map))for(let e of t){let t=h[n],l=h[e],r="".concat(e,"_").concat(n);if(!t||!l)continue;f[r]={id:r,from:"base",parent:l,child:t};let i=f[r];t.parents[e]=i,l.children[n]=i}for(let[e,t]of Object.entries(n.parent_map))for(let n of t){let t=h[e],l=h[n],r="".concat(n,"_").concat(e);if(!t||!l)continue;f[r]?f[r].from="both":f[r]={id:r,from:"current",parent:l,child:t};let i=f[r];t.parents[n]=i,l.children[e]=i}let p=[],x=[],g=[];for(let[e,n]of Object.entries(h))if(t){let r=t[e];r&&(n.changeStatus=r.change_status,r.change&&(n.change={category:r.change.category,columns:r.change.columns}),p.push(e),(null==r?void 0:null===(l=r.change)||void 0===l?void 0:l.category)==="non_breaking"?x.push(e):g.push(e))}else if("base"===n.from)n.changeStatus="removed",p.push(n.id);else if("current"===n.from)n.changeStatus="added",p.push(n.id);else{let t=null===(o=n.data.base)||void 0===o?void 0:null===(i=o.checksum)||void 0===i?void 0:i.checksum,l=null===(s=n.data.current)||void 0===s?void 0:null===(a=s.checksum)||void 0===a?void 0:a.checksum;t&&l&&t!==l&&(n.changeStatus="modified",p.push(n.id),g.push(e))}for(let[e,n]of Object.entries(f))"base"===n.from?n.changeStatus="removed":"current"===n.from&&(n.changeStatus="added");let y=(0,r.G0)(new Set(p),(0,r.E$)(g,e=>void 0===h[e]?[]:Object.keys(h[e].children)));return{nodes:h,edges:f,modifiedSet:p,nonBreakingSet:new Set(x),impactedSet:y,manifestMetadata:{base:null!==(u=e.manifest_metadata)&&void 0!==u?u:void 0,current:null!==(c=n.manifest_metadata)&&void 0!==c?c:void 0},catalogMetadata:{base:null!==(d=e.catalog_metadata)&&void 0!==d?d:void 0,current:null!==(m=n.catalog_metadata)&&void 0!==m?m:void 0}}}function u(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;return(0,r.E$)(n,n=>void 0===e.nodes[n]?[]:Object.keys(e.nodes[n].parents),t)}function c(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;return(0,r.E$)(n,n=>void 0===e.nodes[n]?[]:Object.keys(e.nodes[n].children),t)}function d(e,n,t){let l={},i={};for(let[n,t]of Object.entries(e)){var o,a,s,u,c,d;for(let e of null!==(s=null===(o=t.depends_on)||void 0===o?void 0:o.nodes)&&void 0!==s?s:[])n in i||(i[n]=[]),i[n].push(e),e in l||(l[e]=[]),l[e].push(n);for(let e of null!==(u=null===(a=t.depends_on)||void 0===a?void 0:a.columns)&&void 0!==u?u:[]){let t="".concat(e.node,"_").concat(e.column);n in i||(i[n]=[]),i[n].push(t),t in l||(l[t]=[]),l[t].push(n)}for(let[e,r]of Object.entries(null!==(c=t.columns)&&void 0!==c?c:{})){let t="".concat(n,"_").concat(e);for(let e of null!==(d=r.depends_on)&&void 0!==d?d:[]){let n="".concat(e.node,"_").concat(e.column);t in i||(i[t]=[]),i[t].push(n),n in l||(l[n]=[]),l[n].push(t)}}}let m="".concat(n,"_").concat(t),h=(0,r.E$)([m],e=>e in l?l[e]:[]),f=(0,r.E$)([m],e=>e in i?i[e]:[]);return(0,r.G0)(h,f)}function m(e,n){let t=[],r=[],{selectedNodes:i,columnLevelLineage:o,cll:s,breakingChangeEnabled:u}=null!=n?n:{},c={};function m(e){return"base"===e?0:"current"===e?2:1}function f(e,n){let t=m(e.from),l=m(n.from);return t<l?-1:t>l?1:0}let v=void 0!==i?new Set(i):void 0;for(let n of Object.values(e.nodes).sort(f)){var p,x,g,y,j,b,_,w,C,k,S,R,M,E;if(v&&!v.has(n.id))continue;let e=new Set,i=0;if(o){let u=null==s?void 0:null===(x=s.current)||void 0===x?void 0:null===(p=x.nodes)||void 0===p?void 0:p[n.id],c=null!==(y=null==u?void 0:null===(g=u.depends_on)||void 0===g?void 0:g.columns)&&void 0!==y?y:[],m=null!=s?d(s.current.nodes,o.node,o.column):new Set;for(let e of c){let t="".concat(e.node,"_").concat(e.column),l=n.id;m.has(t)&&m.has(l)&&r.push({id:"m2c_".concat(t,"_").concat(l),source:t,target:l,style:{zIndex:9999}})}for(let o of Object.values(null!==(j=null==u?void 0:u.columns)&&void 0!==j?j:{})){let s="".concat(n.id,"_").concat(o.name);if(m.has(s)){for(let e of(t.push({id:s,position:{x:10,y:70+i*a},parentId:n.id,extent:"parent",draggable:!1,data:{node:n,column:o.name,type:o.type,transformationType:o.transformation_type},style:{zIndex:9999},type:"customColumnNode",targetPosition:l.Ly.Left,sourcePosition:l.Ly.Right}),null!==(b=o.depends_on)&&void 0!==b?b:[])){let n="".concat(e.node,"_").concat(e.column);m.has(n)&&r.push({id:"".concat(n,"_").concat(s),source:n,target:s,style:{zIndex:9999}})}i++,e.add(o.name)}}}else if(u&&n.change)for(let[r,o]of Object.entries(null!==(_=n.change.columns)&&void 0!==_?_:{})){let s="".concat(n.id,"_").concat(r),u=null!==(E=null===(k=n.data.current)||void 0===k?void 0:null===(C=k.columns)||void 0===C?void 0:null===(w=C[r])||void 0===w?void 0:w.type)&&void 0!==E?E:null===(M=n.data.base)||void 0===M?void 0:null===(R=M.columns)||void 0===R?void 0:null===(S=R[r])||void 0===S?void 0:S.type;t.push({id:s,position:{x:10,y:70+i*a},parentId:n.id,extent:"parent",draggable:!1,data:{node:n,column:r,type:u,changeStatus:o},style:{zIndex:9999},type:"customColumnNode",targetPosition:l.Ly.Left,sourcePosition:l.Ly.Right}),i++,e.add(r)}c[n.id]=e;let m=60;i>0&&(m+=20+i*a),t.push({id:n.id,position:{x:0,y:0},width:300,height:m,data:{...n},type:"customNode",targetPosition:l.Ly.Left,sourcePosition:l.Ly.Right})}for(let n of Object.values(e.edges).sort(f))(!v||v.has(n.parent.id)&&v.has(n.child.id))&&r.push({id:n.id,type:"customEdge",source:n.parent.id,target:n.child.id,data:n});return h(t,r),[t,r,c]}let h=function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"LR",l=new(o()).graphlib.Graph;l.setDefaultEdgeLabel(()=>({})),l.setGraph({rankdir:t,ranksep:50,nodesep:30}),e.forEach(e=>{"customNode"===e.type&&l.setNode(e.id,{width:e.width,height:e.height})}),n.forEach(e=>{l.setEdge(e.source,e.target)}),o().layout(l),e.forEach(e=>{var n,t;if("customNode"!==e.type)return;let r=null!==(n=e.width)&&void 0!==n?n:300,i=null!==(t=e.height)&&void 0!==t?t:60,o=l.node(e.id);return e.position={x:o.x-r/2,y:o.y-i/2},e})}},98164:function(e,n,t){"use strict";function l(e,n){if(e<n){let t=(n-e)/e*100;return"+".concat(t>=.1?t.toFixed(1):" <0.1 ","%")}if(!(e>n))return"0 %";{let t=(e-n)/e*100;return"-".concat(t>=.1?t.toFixed(1):" <0.1 ","%")}}t.d(n,{T:function(){return l}})},7873:function(e,n,t){"use strict";t.d(n,{N:function(){return eQ}});var l=t(63646),r=t(12700),i=t(20130),o=t(51895),a=t(55182),s=t(31198),u=t(28561),c=t(43906),d=t(70458),m=t(78352);function h(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US",t=arguments.length>2?arguments[2]:void 0;return"number"!=typeof e?e:new Intl.NumberFormat(n,t).format(e)}function f(e){let n=e>0&&e<=.001,t=e<1&&e>=.999,l=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;return h(n,"en-US",{style:"percent",minimumFractionDigits:1})};if(n){let e=l(.001);return"<".concat(e)}if(t){let e=l(.999);return">".concat(e)}return l()}function v(e){if("number"!=typeof e)return e;{let n=Math.abs(e),t=n>=.01,l=n>=1e6,r=n>=1e9,i=n>=1e15;if(i||n>=1e12)return new Intl.NumberFormat("en-US",{style:"unit",unit:"liter",unitDisplay:"narrow",maximumFractionDigits:i?0:2}).format(e/1e12).replace("L","T");if(r||l||n>=1e3){let n={base:r?1e9:l?1e6:1e3,unit:r?"B":l?"M":"K"};return new Intl.NumberFormat("en-US",{style:"unit",unit:"liter",unitDisplay:"narrow",maximumFractionDigits:1}).format(e/n.base).replace("L",n.unit)}return n>=1?new Intl.NumberFormat("en-US",{maximumFractionDigits:2}).format(e):new Intl.NumberFormat("en-US",{maximumFractionDigits:t?3:2,notation:t||0===n?"standard":"scientific"}).format(e)}}let p="#63B3ED",x="#F6AD55",g="".concat(p,"A5"),y="".concat(x,"A5");function j(e){let{color:n}=e;return(0,i.jsx)(u.x,{display:"inline-block",w:"10px",h:"10px",bgColor:n,mr:"2",borderRadius:"sm"})}function b(e){let{data:n,hideAxis:t=!1,animation:l=!1}=e;d.kL.register(d.ZL,d.RM,d.f$,d.uw,d.Dx,d.De,d.u);let r=function(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],{...t}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{title:l,datasets:r,type:i,samples:o=0,binEdges:a}=e,[s,u]=r,c="datetime"===i;return{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{reverse:!0},title:{display:!0,text:l,font:{size:20}},tooltip:{mode:"index",intersect:!1,callbacks:{title(e){let[{dataIndex:n,datasetIndex:t}]=e,l=w(a,n);return"".concat(c?"Date Range":"string"===i?"Text Length":"Value Range","\n").concat(l)},label(e){let{datasetIndex:n,dataIndex:t,dataset:{label:l}}=e,r=0===n?u.counts:s.counts,i=f(r[t]/o),a=r[t];return"".concat(l,": ").concat(a," (").concat(i,")")}}}},scales:function(e){let{datasets:n,min:t=0,max:l=0,type:r,binEdges:i}=e,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],[a,s]=n,u=Math.max(...s.counts,...a.counts),c=i.map((e,n)=>w(i,n)).slice(0,-1);return{x:"datetime"===r?{display:!o,type:"timeseries",min:t,max:l,adapters:{date:{}},time:{minUnit:"day"},grid:{display:!1},ticks:{minRotation:30,maxRotation:30,maxTicksLimit:8}}:{display:!o,type:"category",grid:{display:!1},ticks:{callback:(e,n)=>c[n]},stacked:!0},y:{display:!o,type:"linear",max:u,border:{dash:[2,2]},grid:{color:"lightgray"},ticks:{maxTicksLimit:8,callback:function(e,n){return v(e)}},beginAtZero:!0}}}(e,n),...t}}(n,t,{animation:l}),o=function(e){let{datasets:n,type:t,binEdges:l}=e,[r,i]=n,o=_(t,l,"Current",g,i),a=_(t,l,"Base",y,r);return{labels:l.map((e,n)=>w(l,n)).slice(0,-1),datasets:[o,a]}}(n);return(0,i.jsx)(m.kL,{type:"bar",options:r,data:o,plugins:[]})}function _(e,n,t,l,r){let{counts:i=[]}=r;return{label:t,data:"datetime"===e?i.map((e,t)=>({x:n[t],y:e})):i,backgroundColor:l,borderColor:l,hoverBackgroundColor:l,borderWidth:0,categoryPercentage:1,barPercentage:1,xAxisID:"x"}}function w(e,n){let t=e[n],l=e[n+1],r=v(t),i=v(l);return"".concat(r," - ").concat(i)}let C=(0,c.G)((e,n)=>{let{backgroundColor:t="white",blockSize:l,children:r,...o}=e;return(0,i.jsx)(u.x,{ref:n,...o,overflowY:"auto",overflowX:"hidden",children:(0,i.jsx)(u.x,{backgroundColor:t,height:"100%",blockSize:l,children:r})})}),k=(0,c.G)(function(e,n){var t,l,r,c,d,m,h;let{run:f}=e,v=f.params,p=null===(t=f.result)||void 0===t?void 0:t.base,x=null===(l=f.result)||void 0===l?void 0:l.current,g=null===(r=f.result)||void 0===r?void 0:r.min,y=null===(c=f.result)||void 0===c?void 0:c.max,j=null===(d=f.result)||void 0===d?void 0:d.bin_edges;return p&&x?(0,i.jsx)(o.k,{direction:"column",height:"100%",children:(0,i.jsx)(C,{ref:n,height:"100%",children:(0,i.jsxs)(a.U,{children:[(0,i.jsx)(s.L,{}),(0,i.jsx)(u.x,{w:"80%",h:"35vh",m:"4",children:(0,i.jsx)(b,{data:{title:"Model ".concat(v.model,".").concat(v.column_name),type:null!==(h=null===(m=f.params)||void 0===m?void 0:m.column_type)&&void 0!==h?h:"",datasets:[p,x],min:g,max:y,samples:p.total,binEdges:j}})}),(0,i.jsx)(s.L,{})]})})}):(0,i.jsx)("div",{children:"Loading..."})});var S=t(50537),R=t(61527),M=t(66703),E=t(23113),O=t(35813),T=t.n(O);t(26372);var N=t(5845),I=t(91504),A=t(76421),P=t(71676),L=t(72669),F=t(12353),z=t(31319),D=t(55169),U=t(84924),W=t(36055),V=t(93166),q=t(64126);let H=e=>{let{value:n,colorScheme:t,grayOut:l,noCopy:r,fontSize:a}=e,{onCopy:s,hasCopied:c}=(0,q.V)(n),[d,m]=(0,M.useState)(!1);return(0,i.jsxs)(o.k,{p:"2px 5px",minWidth:"30px",maxWidth:"200px",overflow:"hidden",textOverflow:"ellipsis",color:"".concat(t,".800"),backgroundColor:"".concat(t,".100"),alignItems:"center",gap:"2px",rounded:"md",fontSize:a,flexShrink:r?"0":"inherit",onMouseEnter:()=>{m(!0)},onMouseLeave:()=>{m(!1)},children:[(0,i.jsx)(u.x,{overflow:"hidden",textOverflow:"ellipsis",color:l?"gray":"inherit",children:n}),(0,i.jsx)(()=>r||l?(0,i.jsx)(i.Fragment,{}):c?(0,i.jsx)(i.Fragment,{children:"Copied"}):d?(0,i.jsx)(P.h,{"aria-label":"Copy",icon:(0,i.jsx)(V.T,{boxSize:"10px"}),size:"xs",minW:"10px",h:"10px",variant:"unstyled",onClick:s,display:"flex",alignItems:"center",justifyContent:"center"}):(0,i.jsx)(i.Fragment,{}),{})]})};function B(e,n){return[{value:"Show raw value",onClick:()=>{n({[e]:"raw"})}},{value:"Show 2 decimal points",onClick:()=>{n({[e]:2})}},{value:"Show 4 decimal points",onClick:()=>{n({[e]:4})}},{value:"Show 6 decimal points",onClick:()=>{n({[e]:6})}},{value:"Show as percentage",onClick:()=>{n({[e]:"percent"})}}]}function K(e,n){let t=[];for(let l of n){let n=e.findIndex(e=>e.name===l);if(n<0)throw Error("Column ".concat(l," not found"));t.push(n)}return t}function J(e,n,t){let l={};if(0===n.length)return JSON.stringify({_index:t._index});for(let r of n)l[e[r].name]=t[r];return JSON.stringify(l)}function Z(e){var n,t;let{name:l,columnStatus:r,onPrimaryKeyChange:a,onPinnedColumnsChange:s,columnType:c,onColumnsRenderModeChanged:d,...m}=e,h=null!==(n=m.primaryKeys)&&void 0!==n?n:[],f=null!==(t=m.pinnedColumns)&&void 0!==t?t:[],v=h.includes(l),p=f.includes(l),x=[];return(d&&(x=B(l,d)),"index"===l)?(0,i.jsx)(i.Fragment,{}):(0,i.jsxs)(o.k,{alignItems:"center",gap:"10px",className:"grid-header",children:[v&&(0,i.jsx)(N.J,{as:U.MhP}),(0,i.jsx)(u.x,{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:l}),"added"!==r&&"removed"!==r&&a&&(0,i.jsx)(N.J,{className:v?"close-icon":"key-icon",display:v?"block":"none",cursor:"pointer",as:v?U.ven:U.MhP,onClick:v?()=>{let e=h.filter(e=>e!==l);a&&a(e)}:()=>{let e=[...h.filter(e=>"index"!==e),l];a&&a(e)}}),!v&&s&&(0,i.jsx)(N.J,{className:p?"unpin-icon":"pin-icon",display:p?"block":"none",cursor:"pointer",as:p?U.$kI:U.oJP,onClick:p?()=>{let e=f.filter(e=>e!==l);s&&s(e)}:()=>{let e=[...f,l];s&&s(e)}}),!v&&"number"===c&&(0,i.jsxs)(I.v,{children:[(0,i.jsx)(A.j,{as:P.h,"aria-label":"Options",icon:(0,i.jsx)(U.D_A,{}),variant:"unstyled",className:"!size-4 !min-w-4"}),(0,i.jsx)(L.h,{children:(0,i.jsx)(F.q,{children:x.map(e=>(0,i.jsx)(z.s,{onClick:e.onClick,children:e.value},e.value))})})]})]})}let G=function(e,n,t){let l,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"raw";if(!Object.hasOwn(e,n))return["-",!0];let i=e[n],o=!1;return"boolean"==typeof i?l=i.toString():""===i?(l="(empty)",o=!0):null==i?(l="(null)",o=!0):l="number"==typeof i?String(i):t&&"number"===t?function(e,n){let t;let l="en-US";return null!=(t="number"==typeof n?h(e,l,{maximumFractionDigits:n,minimumFractionDigits:n}):"percent"===n?h(e,l,{style:"percent",maximumFractionDigits:2}):String(e))?t:""}(parseFloat(i),r):String(i),[l,o]},Q=e=>{let{row:n,column:t}=e,{columnType:l,columnRenderMode:r}=t,[o,a]=G(n,t.key,l,r);return(0,i.jsx)(D.x,{style:{color:a?"gray":"inherit"},children:o})},$=e=>{let{row:n,column:t}=e,{columnType:l,columnRenderMode:r}=t,a="base__".concat(t.key),s="current__".concat(t.key);if(!Object.hasOwn(n,a)&&!Object.hasOwn(n,s))return"-";let u=Object.hasOwn(n,a),c=Object.hasOwn(n,s),[d,m]=G(n,"base__".concat(t.key),l,r),[h,f]=G(n,"current__".concat(t.key),l,r);return n[a]===n[s]?(0,i.jsx)(D.x,{style:{color:f?"gray":"inherit"},children:h}):(0,i.jsxs)(o.k,{gap:"5px",alignItems:"center",lineHeight:"normal",height:"100%",children:[u&&(0,i.jsx)(H,{value:d,colorScheme:"red",grayOut:m}),c&&(0,i.jsx)(H,{value:h,colorScheme:"green",grayOut:f})]})};function X(e,n,t){var l,r,o,a,s;let u=null!=e?e:{columns:[],data:[]},c=null!=n?n:{columns:[],data:[]},d=null!==(l=null==t?void 0:t.primaryKeys)&&void 0!==l?l:[],m=null!==(r=null==t?void 0:t.pinnedColumns)&&void 0!==r?r:[],h=null!==(o=null==t?void 0:t.changedOnly)&&void 0!==o&&o,f=null!==(a=null==t?void 0:t.displayMode)&&void 0!==a?a:"side_by_side",v=null!==(s=null==t?void 0:t.columnsRenderMode)&&void 0!==s?s:{},p=[],x=function(e,n){let t={};return Object.entries((0,W.Z)(e.columns.map(e=>e.name),n.columns.map(e=>e.name))).map(l=>{var r,i;let[o,a]=l;t[o]={status:a,baseColumnIndex:e.columns.findIndex(e=>e.name===o),currentColumnIndex:n.columns.findIndex(e=>e.name===o),colType:null!==(i=null===(r=e.columns.find(e=>e.name===o))||void 0===r?void 0:r.type)&&void 0!==i?i:"unknown"}}),t}(u,c),g={},y={},j=!1,b=!1;if(0===d.length)u.data.forEach((e,n)=>{e._index=n+1,g[JSON.stringify({_index:n+1})]=e}),c.data.forEach((e,n)=>{e._index=n+1,y[JSON.stringify({_index:n+1})]=e});else{let e=K(u.columns,d);u.data.forEach((n,t)=>{let l=J(u.columns,e,n);l in g&&(j=!0),g[l]=n}),e=K(c.columns,d),c.data.forEach((n,t)=>{let l=J(c.columns,e,n);l in y&&(b=!0),y[l]=n})}let _=(0,W.Z)(Object.keys(g),Object.keys(y)),w={added:0,removed:0,modified:0},C=Object.entries(_).map(e=>{let[n,t]=e,l=g[n],r=y[n],i=JSON.parse(n);if(l&&u.columns.forEach((e,n)=>{d.includes(e.name)||(i["base__".concat(e.name)]=l[n])}),r&&c.columns.forEach((e,n)=>{d.includes(e.name)||(i["current__".concat(e.name)]=r[n])}),l){if(r){for(let[e,n]of Object.entries(x))"index"===e||d.includes(e)||n.baseColumnIndex<0||n.currentColumnIndex<0||T().isEqual(l[n.baseColumnIndex],r[n.currentColumnIndex])||(i.__status="modified",n.status="modified");"modified"===i.__status&&w.modified++}else i.__status="removed",w.removed++}else i.__status="added",w.added++;return i});h&&(C=C.filter(e=>"added"===e.__status||"removed"===e.__status||"modified"===e.__status));let k=function(e,n,l){var r,o;let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"raw",s="added"===n?"diff-header-added":"removed"===n?"diff-header-removed":void 0;return"inline"===f?{headerCellClass:s,name:(0,i.jsx)(Z,{name:e,columnStatus:n,columnType:l,...t}),key:e,renderCell:$,columnType:l,columnRenderMode:a}:{headerCellClass:s,name:(0,i.jsx)(Z,{name:e,columnStatus:n,columnType:l,...t}),children:[{key:"base__".concat(e),name:null!==(r=null==t?void 0:t.baseTitle)&&void 0!==r?r:"Base",renderEditCell:E.Ug,headerCellClass:s,cellClass:t=>{let l=t.__status;if("removed"===l)return"diff-cell-removed";if("added"===l)return"diff-cell-added";if("added"===n);else if("removed"===n);else if(!T().isEqual(t["base__".concat(e)],t["current__".concat(e)]))return"diff-cell-removed"},renderCell:Q,columnType:l,columnRenderMode:a},{key:"current__".concat(e),name:null!==(o=null==t?void 0:t.currentTitle)&&void 0!==o?o:"Current",renderEditCell:E.Ug,headerCellClass:s,cellClass:t=>{let l=t.__status;if("removed"===l)return"diff-cell-removed";if("added"===l)return"diff-cell-added";if("added"===n);else if("removed"===n);else if(!T().isEqual(t["base__".concat(e)],t["current__".concat(e)]))return"diff-cell-added"},renderCell:Q,columnType:l,columnRenderMode:a}]}};return 0===d.length?p.push({key:"_index",width:50,maxWidth:100,name:"",cellClass:"index-column"}):d.forEach(e=>{var n;let l=null!==(n=x[e].status)&&void 0!==n?n:"",r=x[e].colType;p.push({key:e,name:(0,i.jsx)(Z,{name:e,columnStatus:l,columnType:r,...t}),frozen:!0,cellClass:e=>{if(e.__status)return"diff-header-".concat(e.__status)},renderCell:Q,columnType:r,columnRenderMode:v[e]})}),m.forEach(e=>{var n;let t=null!==(n=x[e].status)&&void 0!==n?n:"",l=x[e].colType;"index"===e||d.includes(e)||p.push(k(e,t,l,v[e]))}),Object.entries(x).forEach(e=>{var n;let[t,l]=e,r=null!==(n=l.status)&&void 0!==n?n:"",i=x[t].colType;"index"===t||d.includes(t)||m.includes(t)||h&&w.modified>0&&"added"!==r&&"removed"!==r&&"modified"!==r||p.push(k(t,r,i,v[t]))}),{columns:p,rows:C,invalidPKeyBase:j,invalidPKeyCurrent:b}}var Y=t(32165),ee=t(40613);let en=e=>{let{warnings:n,children:t}=e;return(0,i.jsxs)(o.k,{borderBottom:"1px solid lightgray",justifyContent:"flex-end",gap:"5px",alignItems:"center",px:"10px",bg:n&&n.length>0?"orange.100":"inherit",children:[(0,i.jsx)(ee.g,{alignItems:"flex-start",spacing:0,children:null==n?void 0:n.map((e,n)=>(0,i.jsxs)(u.x,{children:[(0,i.jsx)(Y.a,{color:"orange.600"})," ",e]},n))}),(0,i.jsx)(s.L,{minHeight:"32px"}),t]})};var et=t(30566),el=t(19736);let er=e=>{let{value:n,onChange:t,textOn:l,textOff:r}=e;return(0,i.jsxs)(et.h,{isAttached:!0,variant:"outline",borderRadius:"full",size:"xs",children:[(0,i.jsx)(el.z,{onClick:()=>{t(!1)},color:n?"gray.400":"black",bg:n?"gray.50":"white",children:null!=r?r:"Off"}),(0,i.jsx)(el.z,{onClick:()=>{t(!0)},color:n?"black":"gray.400",bg:n?"white":"gray.50",children:null!=l?l:"On"})]})},ei=e=>{let{displayMode:n,onDisplayModeChanged:t}=e;return(0,i.jsxs)(i.Fragment,{children:["inline"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(H,{value:"Base",colorScheme:"red",grayOut:!1,fontSize:"10pt",noCopy:!0}),(0,i.jsx)(H,{value:"Current",colorScheme:"green",grayOut:!1,fontSize:"10pt",noCopy:!0})]}),(0,i.jsx)(er,{value:"side_by_side"===n,onChange:e=>{t(e?"side_by_side":"inline")},textOff:"Inline",textOn:"Side by side"})]})};function eo(e){let{name:n,pinnedColumns:t=[],onPinnedColumnsChange:l=()=>{},columnType:r,onColumnsRenderModeChanged:a}=e,s=[];a&&(s=B(n,a));let c=t.includes(n);return(0,i.jsxs)(o.k,{className:"grid-header",alignItems:"center",children:[(0,i.jsx)(u.x,{flex:1,children:n}),(0,i.jsx)(N.J,{className:c?"unpin-icon":"pin-icon",display:c?"block":"none",cursor:"pointer",as:c?U.$kI:U.oJP,onClick:c?()=>{l(t.filter(e=>e!==n))}:()=>{l([...t,n])}}),"number"===r&&(0,i.jsxs)(I.v,{children:[(0,i.jsx)(A.j,{as:P.h,"aria-label":"Options",icon:(0,i.jsx)(U.D_A,{}),variant:"unstyled",className:"!size-4 !min-w-4"}),(0,i.jsx)(L.h,{children:(0,i.jsx)(F.q,{children:s.map(e=>(0,i.jsx)(z.s,{onClick:e.onClick,children:e.value},e.value))})})]})]})}function ea(e,n){var t,l,r;let o=[],a=null!==(t=n.primaryKeys)&&void 0!==t?t:[],s=null!==(l=n.pinnedColumns)&&void 0!==l?l:[],u=null!==(r=n.columnsRenderMode)&&void 0!==r?r:{},c={};e.columns.forEach(e=>{c[e.name]={colType:e.type}});let d=function(e,t,l){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"raw";return{key:String(e),name:(0,i.jsx)(eo,{name:t,...n,columnType:l}),width:"auto",renderCell:Q,columnType:l,columnRenderMode:r}},m=function(e,t,l){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"raw";return{key:String(e),name:(0,i.jsx)(Z,{name:t,columnStatus:"",columnType:l,...n}),width:"auto",frozen:!0,renderCell:Q,columnType:l,columnRenderMode:r}};return a.length>0?a.forEach(n=>{let t=T().findIndex(e.columns,e=>e.name===n),l=c[n].colType;o.push(m(t,n,l,u[n]))}):o.push({key:"_index",name:"",width:50,cellClass:"index-column"}),s.forEach(n=>{let t=c[n].colType,l=T().findIndex(e.columns,e=>e.name===n);l<0||o.push(d(l,n,t,u[n]))}),e.columns.forEach((e,n)=>{let{name:t}=e;if(a.includes(t)||s.includes(t))return;let l=c[t].colType;o.push(d(n,t,l,u[t]))}),e.data.forEach((e,n)=>{e._index=n+1}),{columns:o,rows:e.data}}t(7903);let es=(0,c.G)((e,n)=>{var t;let{run:l,viewOptions:r,onViewOptionsChanged:a,onAddToChecklist:c}=e,d=(0,M.useMemo)(()=>{var e;return null!==(e=null==r?void 0:r.pinned_columns)&&void 0!==e?e:[]},[r]),m=(0,M.useMemo)(()=>{var e;return null!==(e=null==r?void 0:r.columnsRenderMode)&&void 0!==e?e:{}},[r]),h=l.result,f=(0,M.useMemo)(()=>h?ea(h,{pinnedColumns:d,onPinnedColumnsChange:e=>{a&&a({...r,pinned_columns:e})},columnsRenderMode:m,onColumnsRenderModeChanged:e=>{var n;let t={...null!==(n=null==r?void 0:r.columnsRenderMode)&&void 0!==n?n:{},...e};a&&a({...r,columnsRenderMode:t})}}):{rows:[],columns:[]},[h,d,r,a,m]);if(0===f.columns.length)return(0,i.jsx)(S.M,{height:"100%",children:"No data"});let v=h&&null!==(t=h.limit)&&void 0!==t?t:0,p=v>0&&(null==h?void 0:h.more)?"Warning: Displayed results are limited to ".concat(v.toLocaleString()," records. To ensure complete data retrieval, consider applying a LIMIT or WHERE clause to constrain the result set."):null,x=null!=c?c:p;return(0,i.jsxs)(o.k,{direction:"column",backgroundColor:"rgb(249, 249, 249)",height:"100%",children:[x&&(0,i.jsxs)(o.k,{borderBottom:"1px solid lightgray",alignItems:"center",gap:"5px",px:"10px",bg:p?"orange.100":"inherit",children:[p&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Y.a,{color:"orange.600",alignSelf:"center"})," ",(0,i.jsx)(u.x,{children:p})]}),(0,i.jsx)(s.L,{minHeight:"32px"}),c&&(0,i.jsx)(el.z,{marginBlock:"5px",size:"sm",colorScheme:"blue",onClick:()=>{c(l)},children:"Add to Checklist"})]}),(0,i.jsx)(R.o,{ref:n,style:{blockSize:"auto",maxHeight:"100%",overflow:"auto"},columns:f.columns,rows:f.rows,renderers:{noRowsFallback:(0,i.jsx)(R.W,{})},defaultColumnOptions:{resizable:!0,maxWidth:800,minWidth:35},className:"rdg-light",enableScreenshot:!0})]})}),eu=(0,c.G)((e,n)=>{var t,l,r;let{run:a,viewOptions:s,onViewOptionsChanged:u}=e,c=a.result,d=(0,M.useMemo)(()=>{var e;return null!==(e=null==s?void 0:s.pinned_columns)&&void 0!==e?e:[]},[s]),m=(0,M.useMemo)(()=>{var e;return null!==(e=null==s?void 0:s.display_mode)&&void 0!==e?e:"inline"},[s]),h=(0,M.useMemo)(()=>{var e;return null!==(e=null==s?void 0:s.columnsRenderMode)&&void 0!==e?e:{}},[s]),f=(null!==(l=null==c?void 0:null===(t=c.current)||void 0===t?void 0:t.columns)&&void 0!==l?l:[]).find(e=>"column_name"===e.name.toLowerCase()),v=null!==(r=null==f?void 0:f.name)&&void 0!==r?r:"column_name",p=(0,M.useMemo)(()=>X(null==c?void 0:c.base,null==c?void 0:c.current,{primaryKeys:[v],pinnedColumns:d,onPinnedColumnsChange:e=>{u&&u({...s,pinned_columns:e})},displayMode:m,columnsRenderMode:h,onColumnsRenderModeChanged:e=>{var n;let t={...null!==(n=null==s?void 0:s.columnsRenderMode)&&void 0!==n?n:{},...e};u&&u({...s,columnsRenderMode:t})}}),[c,v,d,m,s,u,h]);return 0===p.columns.length?(0,i.jsx)(S.M,{height:"100%",children:"No data"}):(0,i.jsxs)(o.k,{direction:"column",backgroundColor:"rgb(249, 249, 249)",height:"100%",children:[(0,i.jsx)(en,{run:a,children:(0,i.jsx)(ei,{displayMode:m,onDisplayModeChanged:e=>{u&&u({...s,display_mode:e})}})}),(0,i.jsx)(R.o,{ref:n,style:{blockSize:"auto",maxHeight:"100%",overflow:"auto"},columns:p.columns,rows:p.rows,defaultColumnOptions:{resizable:!0,maxWidth:800,minWidth:35},className:"rdg-light",enableScreenshot:!0})]})}),ec=(0,c.G)((e,n)=>{var t,l,r;let{run:a,viewOptions:s,onViewOptionsChanged:u}=e,c=a.result,d=null==c?void 0:c.current,m=(0,M.useMemo)(()=>{var e;return null!==(e=null==s?void 0:s.pinned_columns)&&void 0!==e?e:[]},[s]),h=(0,M.useMemo)(()=>{var e;return null!==(e=null==s?void 0:s.columnsRenderMode)&&void 0!==e?e:{}},[s]),f=(null!==(l=null==c?void 0:null===(t=c.current)||void 0===t?void 0:t.columns)&&void 0!==l?l:[]).find(e=>"column_name"===e.name.toLowerCase()),v=null!==(r=null==f?void 0:f.name)&&void 0!==r?r:"column_name",p=(0,M.useMemo)(()=>d?ea(d,{primaryKeys:[v],pinnedColumns:m,onPinnedColumnsChange:e=>{u&&u({...s,pinned_columns:e})},columnsRenderMode:h,onColumnsRenderModeChanged:e=>{var n;let t={...null!==(n=null==s?void 0:s.columnsRenderMode)&&void 0!==n?n:{},...e};u&&u({...s,columnsRenderMode:t})}}):{columns:[],rows:[]},[d,m,v,s,u,h]);return 0===p.columns.length?(0,i.jsx)(S.M,{height:"100%",children:"No data"}):(0,i.jsx)(o.k,{direction:"column",backgroundColor:"rgb(249, 249, 249)",height:"100%",children:(0,i.jsx)(R.o,{ref:n,style:{blockSize:"auto",maxHeight:"100%",overflow:"auto"},columns:p.columns,rows:p.rows,defaultColumnOptions:{resizable:!0,maxWidth:800,minWidth:35},className:"rdg-light",enableScreenshot:!0})})});function ed(e){var n,t;let{name:l,columnStatus:r,onPrimaryKeyChange:a,onPinnedColumnsChange:s,columnType:c,onColumnsRenderModeChanged:d,...m}=e,h=null!==(n=m.primaryKeys)&&void 0!==n?n:[],f=null!==(t=m.pinnedColumns)&&void 0!==t?t:[],v=h.includes(l),p=f.includes(l),x=[];return(d&&(x=B(l,d)),"index"===l)?(0,i.jsx)(i.Fragment,{}):(0,i.jsxs)(o.k,{alignItems:"center",gap:"10px",className:"grid-header",children:[v&&(0,i.jsx)(N.J,{as:U.MhP}),(0,i.jsx)(u.x,{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:l}),!v&&s&&(0,i.jsx)(N.J,{className:p?"unpin-icon":"pin-icon",display:p?"block":"none",cursor:"pointer",as:p?U.$kI:U.oJP,onClick:p?()=>{let e=f.filter(e=>e!==l);s&&s(e)}:()=>{let e=[...f,l];s&&s(e)}}),!v&&"number"===c&&(0,i.jsxs)(I.v,{children:[(0,i.jsx)(A.j,{as:P.h,"aria-label":"Options",icon:(0,i.jsx)(U.D_A,{}),variant:"unstyled",className:"!size-4 !min-w-4"}),(0,i.jsx)(L.h,{children:(0,i.jsx)(F.q,{children:x.map(e=>(0,i.jsx)(z.s,{onClick:e.onClick,children:e.value},e.value))})})]})]})}function em(e,n,t){var l,r,o,a;let s=null!==(l=null==t?void 0:t.pinnedColumns)&&void 0!==l?l:[],u=null!==(r=null==t?void 0:t.changedOnly)&&void 0!==r&&r,c=null!==(o=null==t?void 0:t.displayMode)&&void 0!==o?o:"inline",d=null!==(a=null==t?void 0:t.columnsRenderMode)&&void 0!==a?a:{},m=[],h=function(e){let n={};return e.columns.map((e,t)=>{n[e.name]={index:t,colType:e.type}}),n}(e),f={},v={};if(0===n.length)throw Error("Primary keys are required");let p=function(e,n){let t=[];for(let l of n){let n=e.findIndex(e=>e.name===l);if(n<0)throw Error("Column ".concat(l," not found"));t.push(n)}return t}(e.columns,n),x=(h.in_a||h.IN_A).index,g=(h.in_b||h.IN_B).index;e.data.forEach((n,t)=>{let l=function(e,n,t){let l={};if(0===n.length)return JSON.stringify({_index:t._index});for(let r of n)l[e[r].name]=t[r];return JSON.stringify(l)}(e.columns,p,n);n[x]&&(f[l]=n),n[g]&&(v[l]=n)});let y=(0,W.Z)(Object.keys(f),Object.keys(v)),j={added:0,removed:0,modified:0},b=Object.entries(y).map(t=>{let[l,r]=t,i=f[l],o=v[l],a=JSON.parse(l);if(i&&e.columns.forEach((e,t)=>{n.includes(e.name)||(a["base__".concat(e.name)]=i[t])}),o&&e.columns.forEach((e,t)=>{n.includes(e.name)||(a["current__".concat(e.name)]=o[t])}),i){if(o)for(let[e,t]of Object.entries(h))!("index"===e||n.includes(e))&&(T().isEqual(i[t.index],o[t.index])||(a.__status="modified",t.status="modified"));else a.__status="removed",j.removed++}else a.__status="added",j.added++;return"modified"===a.__status&&j.modified++,a});u&&(b=b.filter(e=>"added"===e.__status||"removed"===e.__status||"modified"===e.__status));let _=function(e,l,r){var o,a;let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"raw",u="added"===l?"diff-header-added":"removed"===l?"diff-header-removed":void 0;return"inline"===c?{headerCellClass:u,name:(0,i.jsx)(ed,{name:e,columnStatus:l,primaryKeys:n,columnType:r,...t}),key:e,renderCell:$,columnType:r,columnRenderMode:s}:{headerCellClass:u,name:(0,i.jsx)(ed,{name:e,columnStatus:l,primaryKeys:n,columnType:r,...t}),children:[{key:"base__".concat(e),name:null!==(o=null==t?void 0:t.baseTitle)&&void 0!==o?o:"Base",renderEditCell:E.Ug,headerCellClass:u,cellClass:n=>{let t=n.__status;if("removed"===t)return"diff-cell-removed";if("added"===t)return"diff-cell-added";if("added"===l);else if("removed"===l);else if(!T().isEqual(n["base__".concat(e)],n["current__".concat(e)]))return"diff-cell-removed"},renderCell:Q,columnType:r,columnRenderMode:s},{key:"current__".concat(e),name:null!==(a=null==t?void 0:t.currentTitle)&&void 0!==a?a:"Current",renderEditCell:E.Ug,headerCellClass:u,cellClass:n=>{let t=n.__status;if("removed"===t)return"diff-cell-removed";if("added"===t)return"diff-cell-added";if("added"===l);else if("removed"===l);else if(!T().isEqual(n["base__".concat(e)],n["current__".concat(e)]))return"diff-cell-added"},renderCell:Q,columnType:r,columnRenderMode:s}]}};return n.forEach(e=>{var l;let r=null!==(l=h[e].status)&&void 0!==l?l:"",o=h[e].colType;m.push({key:e,name:(0,i.jsx)(ed,{name:e,columnStatus:r,primaryKeys:n,columnType:"unknown",...t}),frozen:!0,cellClass:e=>{if(e.__status)return"diff-header-".concat(e.__status)},renderCell:Q,columnType:o,columnRenderMode:d[e]})}),s.forEach(e=>{var t;let l=null!==(t=h[e].status)&&void 0!==t?t:"",r=h[e].colType;n.includes(e)||m.push(_(e,l,r,d[e]))}),Object.entries(h).forEach(e=>{var t;let[l,r]=e,i=null!==(t=r.status)&&void 0!==t?t:"";"in_a"===l||"in_b"===l||n.includes(l)||s.includes(l)||u&&j.modified>0&&"added"!==i&&"removed"!==i&&"modified"!==i||m.push(_(l,i,r.colType,d[l]))}),{columns:m,rows:b}}var eh=t(70549);let ef=e=>{let{changedOnly:n,onChange:t}=e;return(0,i.jsx)(eh.X,{size:"xs",isChecked:n,onChange:()=>{t()},children:"Changed only"})},ev=(e,n)=>{var t,l,r,a,s,u,c;let{run:d,onAddToChecklist:m,viewOptions:h,onViewOptionsChanged:f,baseTitle:v,currentTitle:p}=e,x=(0,M.useMemo)(()=>{var e;return null!==(e=null==h?void 0:h.primary_keys)&&void 0!==e?e:[]},[h]),g=(0,M.useMemo)(()=>{var e;return null!==(e=null==h?void 0:h.changed_only)&&void 0!==e&&e},[h]),y=(0,M.useMemo)(()=>{var e;return null!==(e=null==h?void 0:h.pinned_columns)&&void 0!==e?e:[]},[h]),j=(0,M.useMemo)(()=>{var e;return null!==(e=null==h?void 0:h.display_mode)&&void 0!==e?e:"inline"},[h]),b=(0,M.useMemo)(()=>{var e;return null!==(e=null==h?void 0:h.columnsRenderMode)&&void 0!==e?e:{}},[h]),_=(0,M.useMemo)(()=>{var e,n;return X(null===(e=d.result)||void 0===e?void 0:e.base,null===(n=d.result)||void 0===n?void 0:n.current,{changedOnly:g,primaryKeys:x,onPrimaryKeyChange:e=>{f&&f({...h,primary_keys:e})},pinnedColumns:y,onPinnedColumnsChange:e=>{f&&f({...h,pinned_columns:e})},columnsRenderMode:b,onColumnsRenderModeChanged:e=>{var n;let t={...null!==(n=null==h?void 0:h.columnsRenderMode)&&void 0!==n?n:{},...e};f&&f({...h,columnsRenderMode:t})},baseTitle:v,currentTitle:p,displayMode:j})},[d,h,g,x,y,j,f,v,p,b]),w=(0,M.useMemo)(()=>{let e=x.join(", ");return _.invalidPKeyBase&&_.invalidPKeyCurrent?"Warning: The primary key '".concat(e,"' is not unique in the base and current environments"):_.invalidPKeyBase?"Warning: The primary key '".concat(e,"' is not unique in the base environment"):_.invalidPKeyCurrent?"Warning: The primary key '".concat(e,"' is not unique in the current environment"):void 0},[_.invalidPKeyBase,_.invalidPKeyCurrent,x]),C=null!==(c=null===(l=d.result)||void 0===l?void 0:null===(t=l.current)||void 0===t?void 0:t.limit)&&void 0!==c?c:0,k=C>0&&((null===(a=d.result)||void 0===a?void 0:null===(r=a.current)||void 0===r?void 0:r.more)||(null===(u=d.result)||void 0===u?void 0:null===(s=u.base)||void 0===s?void 0:s.more))?"Warning: Displayed results are limited to ".concat(C.toLocaleString()," records. To ensure complete data retrieval, consider applying a LIMIT or WHERE clause to constrain the result set."):null,E=[];return(w&&E.push(w),k&&E.push(k),0===_.columns.length)?(0,i.jsx)(S.M,{height:"100%",children:"No data"}):(0,i.jsxs)(o.k,{direction:"column",backgroundColor:"rgb(249, 249, 249)",height:"100%",children:[(0,i.jsxs)(en,{run:d,viewOptions:h,onViewOptionsChanged:f,warnings:E,children:[(0,i.jsx)(ei,{displayMode:j,onDisplayModeChanged:e=>{f&&f({...h,display_mode:e})}}),(0,i.jsx)(ef,{changedOnly:null==h?void 0:h.changed_only,onChange:()=>{let e=!(null==h?void 0:h.changed_only);f&&f({...h,changed_only:e})}})]}),(0,i.jsx)(R.o,{ref:n,style:{blockSize:"auto",maxHeight:"100%",overflow:"auto"},columns:_.columns,rows:_.rows,renderers:{noRowsFallback:(0,i.jsx)(R.W,{emptyMessage:"No mismatched rows"})},defaultColumnOptions:{resizable:!0,maxWidth:800,minWidth:35},className:"rdg-light",enableScreenshot:!0})]})},ep=(e,n)=>{var t,l,r,a,s;let{run:u,viewOptions:c,onViewOptionsChanged:d,baseTitle:m,currentTitle:h}=e,f=(0,M.useMemo)(()=>{var e;return null!==(e=null==c?void 0:c.changed_only)&&void 0!==e&&e},[c]),v=(0,M.useMemo)(()=>{var e;return null!==(e=null==c?void 0:c.pinned_columns)&&void 0!==e?e:[]},[c]),p=(0,M.useMemo)(()=>{var e;return null!==(e=null==c?void 0:c.display_mode)&&void 0!==e?e:"inline"},[c]),x=(0,M.useMemo)(()=>{var e;return null!==(e=null==c?void 0:c.columnsRenderMode)&&void 0!==e?e:{}},[c]),g=(0,M.useMemo)(()=>{var e,n;if(!(null===(e=u.result)||void 0===e?void 0:e.diff)||!(null===(n=u.params)||void 0===n?void 0:n.primary_keys))return{columns:[],rows:[]};let t=u.params.primary_keys;return em(u.result.diff,t,{changedOnly:f,pinnedColumns:v,onPinnedColumnsChange:e=>{d&&d({...c,pinned_columns:e})},baseTitle:m,currentTitle:h,displayMode:p,columnsRenderMode:x,onColumnsRenderModeChanged:e=>{var n;let t={...null!==(n=null==c?void 0:c.columnsRenderMode)&&void 0!==n?n:{},...e};d&&d({...c,columnsRenderMode:t})}})},[u,c,f,v,p,d,m,h,x]),y=null!==(s=null===(l=u.result)||void 0===l?void 0:null===(t=l.diff)||void 0===t?void 0:t.limit)&&void 0!==s?s:0,j=y>0&&(null===(a=u.result)||void 0===a?void 0:null===(r=a.diff)||void 0===r?void 0:r.more)?"Warning: Displayed results are limited to ".concat(y.toLocaleString()," records. To ensure complete data retrieval, consider applying a LIMIT or WHERE clause to constrain the result set."):null,b=[];return(j&&b.push(j),0===g.columns.length)?(0,i.jsx)(S.M,{height:"100%",children:"No data"}):f&&0===g.rows.length?(0,i.jsxs)(o.k,{direction:"column",backgroundColor:"rgb(249, 249, 249)",height:"100%",children:[(0,i.jsx)(en,{run:u,viewOptions:c,onViewOptionsChanged:d,warnings:b}),(0,i.jsx)(S.M,{height:"100%",children:"No change"})]}):(0,i.jsxs)(o.k,{direction:"column",backgroundColor:"rgb(249, 249, 249)",height:"100%",children:[(0,i.jsxs)(en,{run:u,viewOptions:c,onViewOptionsChanged:d,warnings:b,children:[(0,i.jsx)(ei,{displayMode:p,onDisplayModeChanged:e=>{d&&d({...c,display_mode:e})}}),(0,i.jsx)(ef,{changedOnly:null==c?void 0:c.changed_only,onChange:()=>{let e=!(null==c?void 0:c.changed_only);d&&d({...c,changed_only:e})}})]}),(0,i.jsx)(R.o,{ref:n,style:{blockSize:"auto",maxHeight:"100%",overflow:"auto"},columns:g.columns,rows:g.rows,renderers:{noRowsFallback:(0,i.jsx)(R.W,{emptyMessage:"No mismatched rows"})},defaultColumnOptions:{resizable:!0,maxWidth:800,minWidth:35},className:"rdg-light",enableScreenshot:!0})]})},ex=(0,c.G)((e,n)=>{var t;let l,r;if(e.run.params&&e.run.params.current_model&&(l="Original",r="Editor"),(null===(t=e.run.result)||void 0===t?void 0:t.diff)!=null){let t=(0,c.G)(ep);return(0,i.jsx)(t,{...e,ref:n,baseTitle:l,currentTitle:r})}{let t=(0,c.G)(ev);return(0,i.jsx)(t,{...e,ref:n,baseTitle:l,currentTitle:r})}});var eg=t(98164),ey=t(54483),ej=t.n(ey);let eb=(0,c.G)(function(e,n){var t,l;let{run:r}=e;function a(e){if(e.base===e.current);else if(e.base<e.current||"N/A"===e.base)return"column-body-added";else if(e.base>e.current||"N/A"===e.current)return"column-body-removed";return"column-body-normal"}let s=null!==(t=r.result)&&void 0!==t?t:{},u=Object.keys(null!==(l=r.result)&&void 0!==l?l:{}).map(e=>{let n=s[e],t=ej()(n.base)?n.base:null,l=ej()(n.curr)?n.curr:null,r="=";return null!==t&&null!==l?r=t!==l?(0,eg.T)(t,l):"=":t===l?r="N/A":null===t?r="Added":null===l&&(r="Removed"),{name:e,base:null===t?"N/A":Number(t),current:null===l?"N/A":Number(l),delta:r}});return 0===u.length?(0,i.jsx)(S.M,{bg:"rgb(249,249,249)",height:"100%",children:"No nodes matched"}):(0,i.jsx)(o.k,{direction:"column",children:Object.keys(s).length>0&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(R.o,{ref:n,style:{blockSize:"auto",maxHeight:"100%",overflow:"auto",fontSize:"10pt",borderWidth:1},columns:[{key:"name",name:"Name",cellClass:a},{key:"base",name:"Base Rows",cellClass:a},{key:"current",name:"Current Rows",cellClass:a},{key:"delta",name:"Delta",cellClass:a}],rows:u,renderers:{noRowsFallback:(0,i.jsx)(R.W,{})},className:"rdg-light",enableScreenshot:!0})})})}),e_=(0,c.G)(function(e,n){var t,l;let{run:r}=e,a=null!==(t=r.result)&&void 0!==t?t:{},s=Object.keys(null!==(l=r.result)&&void 0!==l?l:{}).map(e=>{let n=a[e],t=ej()(n.curr)?n.curr:null;return{name:e,current:null===t?"N/A":Number(t)}});return 0===s.length?(0,i.jsx)(S.M,{bg:"rgb(249,249,249)",height:"100%",children:"No nodes matched"}):(0,i.jsx)(o.k,{direction:"column",children:Object.keys(a).length>0&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(R.o,{ref:n,style:{blockSize:"auto",maxHeight:"100%",overflow:"auto",fontSize:"10pt",borderWidth:1},columns:[{key:"name",name:"Name"},{key:"current",name:"Row Count"}],rows:s,renderers:{noRowsFallback:(0,i.jsx)(R.W,{})},className:"rdg-light",enableScreenshot:!0})})})});var ew=t(22488),eC=t(49151),ek=t(15615),eS=t(51560),eR=t(41450),eM=t(90545),eE=t(81145),eO=t(38622);let eT="#63B3ED";function eN(e,n){let t=n?10:e.counts.length,l=e.counts.slice(0,t),r=e.valids-l.reduce((e,n)=>e+n,0);return e.values.slice(0,t).concat([r]).map((n,t)=>{var i;let o;let a=t===l.length,s=a?r:l[t],u=!1;return a?(o="(others)",u=!0):null==n?(o="(null)",u=!0):"string"==typeof n&&0===n.length?(o="(empty)",u=!0):o=String(n),{isLastItemOthers:a,isSpecialLabel:u,label:o,count:s,displayCount:v(s),displayRatio:null!==(i=f(s/e.valids))&&void 0!==i?i:"N/A"}})}function eI(e){let{base:n,current:t,children:l}=e;return(0,i.jsx)(eE.u,{label:(0,i.jsxs)(u.x,{children:[(0,i.jsxs)(D.x,{children:[(0,i.jsx)(j,{color:p}),"Current: ",t.count," (",t.displayRatio,")"]}),(0,i.jsxs)(D.x,{children:[(0,i.jsx)(j,{color:x}),"Base: ",n.count," (",n.displayRatio,")"]})]}),placement:"auto",hasArrow:!0,children:l})}function eA(e){let{topKDiff:n,isDisplayTopTen:t}=e,l=eN(n.current,t),r=eN(n.base,t);return(0,i.jsxs)(u.x,{w:"100%",px:20,py:4,children:[(0,i.jsxs)(o.k,{alignItems:"center",direction:"row",children:[(0,i.jsx)(s.L,{}),(0,i.jsxs)(D.x,{as:"h3",size:"sm",p:"2",color:"gray",children:[(0,i.jsx)(j,{color:x})," Base"]}),(0,i.jsxs)(D.x,{as:"h3",size:"sm",p:"2",color:"gray",children:[(0,i.jsx)(j,{color:p})," Current"]}),(0,i.jsx)(s.L,{})]}),l.map((e,t)=>{let l=r[t];return e.isLastItemOthers&&0===e.count&&0===l.count?(0,i.jsx)(i.Fragment,{}):(0,i.jsxs)(M.Fragment,{children:[(0,i.jsx)(eI,{base:l,current:e,children:(0,i.jsxs)(o.k,{alignItems:"center",width:"100%",_hover:{bg:"blackAlpha.300"},px:4,children:[(0,i.jsx)(D.x,{noOfLines:1,width:"10em",fontSize:"sm",color:e.isSpecialLabel?"gray.400":"inherit",children:e.label}),(0,i.jsxs)(o.k,{width:"70%",direction:"column",children:[(0,i.jsxs)(o.k,{height:"1em",children:[(0,i.jsx)(eP,{topkCount:e.count,topkLabel:e.label,valids:n.current.valids,color:p}),(0,i.jsx)(D.x,{ml:5,mr:2,fontSize:"sm",width:"6em",children:e.displayCount}),(0,i.jsx)(D.x,{color:"gray.400",fontSize:"sm",width:"4em",children:e.displayRatio})]}),(0,i.jsxs)(o.k,{height:"1em",children:[(0,i.jsx)(eP,{topkCount:l.count,topkLabel:l.label,valids:n.base.valids,color:x}),(0,i.jsx)(D.x,{ml:5,mr:2,fontSize:"sm",width:"6em",children:l.displayCount}),(0,i.jsx)(D.x,{color:"gray.400",fontSize:"sm",width:"4em",children:l.displayRatio})]})]})]})}),(0,i.jsx)(eO.i,{})]},t)})]})}function eP(e){let{topkCount:n,topkLabel:t,valids:l,animation:r=!1,color:o=eT}=e;d.kL.register(d.uw,d.ZL,d.f$);let a=function(e,n){let{...t}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{responsive:!0,maintainAspectRatio:!1,indexAxis:"y",scales:{x:{display:!1,max:n,grid:{display:!1}},y:{display:!1}},plugins:{tooltip:{enabled:!1}},...t}}(n,l,{animation:r}),s=function(e){let{topkLabel:n,topkCount:t,color:l=eT}=e;return{labels:[n],datasets:[{indexAxis:"y",data:[t],backgroundColor:l,hoverBackgroundColor:l,borderWidth:0,borderColor:l,barPercentage:1,categoryPercentage:.6}]}}({topkCount:n,topkLabel:t,color:o});return(0,i.jsx)(m.$Q,{data:s,options:a,plugins:[]})}let eL=(0,c.G)((e,n)=>{let{run:t}=e,[l,r]=(0,M.useState)(!0),u=t.result,c=t.params,d=u.base,m=u.current;return(0,i.jsxs)(o.k,{direction:"column",height:"100%",children:[(0,i.jsxs)(C,{ref:n,blockSize:"auto",children:[(0,i.jsxs)(eR.X,{as:"h1",size:"md",paddingTop:4,textAlign:"center",color:"gray.600",children:["Model ",c.model,".",c.column_name]}),(0,i.jsxs)(a.U,{children:[(0,i.jsx)(s.L,{}),(0,i.jsx)(eA,{topKDiff:u,valids:m.valids||0,isDisplayTopTen:l}),(0,i.jsx)(s.L,{})]})]}),(0,i.jsx)(s.L,{}),(d.values.length>10||m.values.length>10)&&(0,i.jsx)(o.k,{p:5,justify:"start",children:(0,i.jsx)(eM.r,{onClick:()=>{r(e=>!e)},textColor:"blue.500",children:l?"View More Items":"View Only Top-10"})})]})}),eF=(0,c.G)((e,n)=>{var t,l,r;let{run:a,onAddToChecklist:s,viewOptions:u,onViewOptionsChanged:c}=e,d=(0,M.useMemo)(()=>{var e;return null!==(e=null==u?void 0:u.changed_only)&&void 0!==e&&e},[u]),m=(0,M.useMemo)(()=>{var e;return null!==(e=null==u?void 0:u.pinned_columns)&&void 0!==e?e:[]},[u]),h=(0,M.useMemo)(()=>{var e;return null!==(e=null==u?void 0:u.display_mode)&&void 0!==e?e:"inline"},[u]),f=(0,M.useMemo)(()=>{var e;return null!==(e=null==u?void 0:u.columnsRenderMode)&&void 0!==e?e:{}},[u]),v=(0,M.useMemo)(()=>{var e;if(!a.result||!(null===(e=a.params)||void 0===e?void 0:e.primary_key))return{columns:[],rows:[]};let n=a.params.primary_key,t=Array.isArray(n)?n:[n];return em(a.result,t,{changedOnly:d,pinnedColumns:m,onPinnedColumnsChange:e=>{c&&c({...u,pinned_columns:e})},columnsRenderMode:f,onColumnsRenderModeChanged:e=>{var n;let t={...null!==(n=null==u?void 0:u.columnsRenderMode)&&void 0!==n?n:{},...e};c&&c({...u,columnsRenderMode:t})},displayMode:h})},[a,u,d,m,h,c,f]),p=null!==(r=null===(t=a.result)||void 0===t?void 0:t.limit)&&void 0!==r?r:0,x=p>0&&(null===(l=a.result)||void 0===l?void 0:l.more)?"Warning: Displayed results are limited to ".concat(p.toLocaleString()," records. To ensure complete data retrieval, consider applying a LIMIT or WHERE clause to constrain the result set."):null,g=[];return(x&&g.push(x),0===v.columns.length)?(0,i.jsx)(S.M,{height:"100%",children:"No data"}):d&&0===v.rows.length?(0,i.jsxs)(o.k,{direction:"column",backgroundColor:"rgb(249, 249, 249)",height:"100%",children:[(0,i.jsx)(en,{run:a,viewOptions:u,onViewOptionsChanged:c,warnings:g}),(0,i.jsx)(S.M,{height:"100%",children:"No change"}),";"]}):(0,i.jsxs)(o.k,{direction:"column",backgroundColor:"rgb(249, 249, 249)",height:"100%",children:[(0,i.jsxs)(en,{run:a,viewOptions:u,onViewOptionsChanged:c,warnings:g,children:[(0,i.jsx)(ei,{displayMode:h,onDisplayModeChanged:e=>{c&&c({...u,display_mode:e})}}),(0,i.jsx)(ef,{changedOnly:null==u?void 0:u.changed_only,onChange:()=>{let e=!(null==u?void 0:u.changed_only);c&&c({...u,changed_only:e})}})]}),(0,i.jsx)(R.o,{ref:n,style:{blockSize:"auto",maxHeight:"100%",overflow:"auto"},columns:v.columns,rows:v.rows,renderers:{noRowsFallback:(0,i.jsx)(R.W,{emptyMessage:"No mismatched rows"})},defaultColumnOptions:{resizable:!0,maxWidth:800,minWidth:35},className:"rdg-light",enableScreenshot:!0})]})});var ez=t(87452),eD=t(70627);function eU(e){var n;let{params:t,onParamsChanged:l,setIsReadyToExecute:r}=e,[o,a]=(0,M.useState)(!t.columns||0===t.columns.length),s=t.model,c=t.primary_key,{columns:d,primaryKey:m,isLoading:h,error:f}=(0,eS.ZP)(t.model);(0,M.useEffect)(()=>{!c&&m&&l({...t,primary_key:m})},[c,m,t,l]),(0,M.useEffect)(()=>{r(!!c&&!!s)},[c,s,r]);let v=d.map(e=>e.name),p=Array.isArray(c)?c:c?[c]:void 0;return h?(0,i.jsx)(u.x,{children:"Loading..."}):0===v.length||f?(0,i.jsx)(u.x,{children:"Error: Please provide the 'catalog.json' to list column candidates"}):(0,i.jsxs)(ee.g,{gap:5,m:"8px 24px",paddingBottom:"200px",children:[(0,i.jsxs)(ew.NI,{children:[(0,i.jsx)(eC.l,{children:"Model"}),(0,i.jsx)(ez.I,{isReadOnly:!0,value:t.model})]}),(0,i.jsxs)(ew.NI,{children:[(0,i.jsx)(eC.l,{children:"Primary key"}),(0,i.jsx)(eD.Ph,{placeholder:"Select primary key",isMulti:!0,closeMenuOnSelect:!1,options:v.map(e=>({label:e,value:e})),value:(null!=p?p:[]).map(e=>({label:e,value:e})),onChange:e=>{l({...t,primary_key:1==e.length?e[0].value:e.map(e=>e.value)})}})]}),(0,i.jsxs)(ew.NI,{children:[(0,i.jsx)(eC.l,{children:"Columns"}),(0,i.jsx)(eh.X,{marginBottom:"10px",isChecked:o,onChange:e=>{a(e.target.checked),l({...t,columns:void 0})},children:"All columns"}),!o&&(0,i.jsx)(eD.Ph,{isMulti:!0,closeMenuOnSelect:!1,options:v.map(e=>({label:e,value:e})),value:(null!==(n=t.columns)&&void 0!==n?n:[]).map(e=>({label:e,value:e})),onChange:e=>{let n;let r=e.map(e=>e.value);n=0===r.length?void 0:r,l({...t,columns:n})}})]})]})}var eW=t(64871),eV=t(8232),eq=t(49491);function eH(e){let{params:n,column:t}=e,{runAction:l}=(0,eV.$q)(),{readOnly:r}=(0,eq.$)(),a=(e,t)=>{l("value_diff_detail",{...n,...e},t)};return(0,i.jsxs)(o.k,{children:[(0,i.jsx)(u.x,{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:t}),(0,i.jsx)(s.L,{}),(0,i.jsx)(I.v,{isLazy:!0,children:e=>{let{isOpen:n}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(A.j,{className:"row-context-menu",visibility:n?"visible":"hidden",width:n?"auto":"0px",minWidth:n?"auto":"0px",as:P.h,icon:(0,i.jsx)(N.J,{as:U.D_A}),variant:"unstyled",size:"sm",isDisabled:r}),(0,i.jsx)(L.h,{children:(0,i.jsx)(F.q,{lineHeight:"20px",children:(0,i.jsxs)(eW.k,{title:"Action",as:u.x,fontSize:"8pt",children:[(0,i.jsx)(z.s,{fontSize:"10pt",onClick:()=>{a({},{showForm:!0})},children:"Show mismatched values..."}),(0,i.jsxs)(z.s,{fontSize:"10pt",onClick:()=>{a({columns:[t]},{showForm:!1})},children:["Show mismatched values for '",t,"'"]})]})})})]})}})]})}let eB=(0,c.G)(function(e,n){let{run:t}=e,l=t.result,r=t.params,a=e=>{let n=e[2];return null!=n&&n<1?"diff-cell-modified":""},s=Array.isArray(r.primary_key)?r.primary_key:[r.primary_key],c=[{key:"__is_pk__",name:"",width:30,maxWidth:30,renderCell:e=>{let{row:n}=e;return(0,i.jsx)(S.M,{height:"100%",children:s.includes(String(n[0]))&&(0,i.jsx)(N.J,{as:U.MhP})})}},{key:"0",name:"Column",resizable:!0,renderCell:e=>{let{row:n,column:t}=e;return(0,i.jsx)(eH,{column:String(n[t.key]),params:r})},cellClass:"cell-show-context-menu"},{key:"1",name:"Matched",resizable:!0,cellClass:a},{key:"2",name:"Matched %",resizable:!0,renderCell:e=>{let{column:n,row:t}=e,l=t[n.key];return(0,i.jsx)(u.x,{textAlign:"end",children:null!=l?"".concat((100*l).toFixed(2)," %"):"N/A"})},cellClass:a}];return(0,i.jsxs)(o.k,{direction:"column",gap:"5px",pt:"5px",height:"100%",children:[(0,i.jsxs)(u.x,{px:"16px",children:["Model: ",r.model,", ",l.summary.total," total (",l.summary.total-l.summary.added-l.summary.removed," common,"," ",l.summary.added," added, ",l.summary.removed," removed)"]}),(0,i.jsx)(R.o,{ref:n,style:{blockSize:"auto",maxHeight:"100%",overflow:"auto",borderBlock:"1px solid lightgray"},columns:c,rows:l.data.data,renderers:{noRowsFallback:(0,i.jsx)(R.W,{})},defaultColumnOptions:{resizable:!0},className:"rdg-light",enableScreenshot:!0})]})});var eK=t(23799),eJ=t(68566);function eZ(e){var n;let{params:t,onParamsChanged:l,setIsReadyToExecute:r}=e,[o,a]=(0,M.useState)(!t.columns||0===t.columns.length),s=t.model,{columns:c,isLoading:d,error:m}=(0,eS.ZP)(t.model);(0,M.useEffect)(()=>{r(!!s)},[s,r]);let h=c.map(e=>e.name);return d?(0,i.jsx)(u.x,{children:"Loading..."}):0===h.length||m?(0,i.jsx)(u.x,{children:"Error: Please provide the 'catalog.json' to list column candidates"}):(0,i.jsxs)(ee.g,{gap:5,m:"8px 24px",paddingBottom:"200px",children:[(0,i.jsxs)(ew.NI,{children:[(0,i.jsx)(eC.l,{children:"Model"}),(0,i.jsx)(ez.I,{isReadOnly:!0,value:t.model})]}),(0,i.jsxs)(ew.NI,{children:[(0,i.jsx)(eC.l,{children:"Columns"}),(0,i.jsx)(eh.X,{marginBottom:"10px",isChecked:o,onChange:e=>{a(e.target.checked),l({...t,columns:void 0})},children:"All columns"}),!o&&(0,i.jsx)(eD.Ph,{isMulti:!0,closeMenuOnSelect:!1,options:h.map(e=>({label:e,value:e})),value:(null!==(n=t.columns)&&void 0!==n?n:[]).map(e=>({label:e,value:e})),onChange:e=>{let n;let r=e.map(e=>e.value);n=0===r.length?void 0:r,l({...t,columns:n})}})]})]})}let eG={lineage_diff:{title:"Lineage Diff",icon:l.Ks7},schema_diff:{title:"Schema Diff",icon:eJ.C8A},query:{title:"Query",icon:l.r2i,RunResultView:es},query_base:{title:"Query Base",icon:l.r2i,RunResultView:es},query_diff:{title:"Query Diff",icon:l.r2i,RunResultView:ex},row_count:{title:"Row Count",icon:eJ.QUK,RunResultView:e_},row_count_diff:{title:"Row Count Diff",icon:eJ.QUK,RunResultView:eb},profile:{title:"Profile",icon:l.KA6,RunResultView:ec,RunForm:eZ},profile_diff:{title:"Profile Diff",icon:l.KA6,RunResultView:eu,RunForm:eZ},value_diff:{title:"Value Diff",icon:l.pRi,RunResultView:eB,RunForm:eU},value_diff_detail:{title:"Value Diff Detail",icon:l.pRi,RunResultView:eF,RunForm:eU},top_k_diff:{title:"Top-K Diff",icon:eK.Pkc,RunResultView:eL,RunForm:function(e){let{params:n,onParamsChanged:t,setIsReadyToExecute:l}=e,{columns:r,isLoading:o,error:a}=(0,eS.ZP)(n.model),s=r.map(e=>e.name);return((0,M.useEffect)(()=>{l(!!n.column_name)},[n,l]),o)?(0,i.jsx)(u.x,{children:"Loading..."}):0===s.length||a?(0,i.jsx)(u.x,{children:"Error: Please provide the 'catalog.json' to list column candidates"}):(0,i.jsx)(u.x,{m:"16px",children:(0,i.jsxs)(ew.NI,{children:[(0,i.jsx)(eC.l,{children:"Pick a column to show top-k"}),(0,i.jsx)(ek.P,{placeholder:"Select column",value:n.column_name,onChange:e=>{let l=e.target.value;t({...n,column_name:l})},children:s.map(e=>(0,i.jsx)("option",{value:e,children:e},e))})]})})}},histogram_diff:{title:"Histogram Diff",icon:l.dku,RunResultView:k,RunForm:r.r},sandbox:{title:"Sandbox",icon:l.iQd}},eQ=e=>eG[e]},86406:function(e,n,t){"use strict";t.d(n,{U:function(){return o},f:function(){return a}});var l=t(71923),r=t(48858),i=t(82729);let o=l.default.create({baseURL:r.U}),a=new i.S},37393:function(e,n,t){"use strict";t.d(n,{V:function(){return l}});let l={rowCount:e=>["row_count",e],lineage:()=>["lineage"],checks:()=>["checks","list"],check:e=>["checks",e],runs:()=>["runs"],run:e=>["runs",e],runsAggregated:()=>["runs_aggregated"],flag:()=>["flag"],instanceInfo:()=>["instance_info"]}},2768:function(e,n,t){"use strict";t.d(n,{bV:function(){return i},yG:function(){return r}});var l=t(86406);async function r(){return(await l.U.get("/api/flag")).data}async function i(){try{await l.U.post("/api/relaunch-hint/completed")}catch(e){}}},28291:function(e,n,t){"use strict";t.d(n,{L6:function(){return r},xx:function(){return i}});var l=t(86406);async function r(){return(await l.U.get("/api/info")).data}async function i(e){return(await l.U.get("/api/model/".concat(e))).data}},9001:function(e,n,t){"use strict";t.d(n,{Eg:function(){return a},Qp:function(){return o},g9:function(){return i},i7:function(){return d},rf:function(){return s},sw:function(){return c},v1:function(){return u}});var l=t(86406),r=t(33015);async function i(e,n,t){let i=(null==t?void 0:t.trackProps)?{...t.trackProps}:{};return(0,r.rM)()&&(i.breaking_change_analysis=!0),(await l.U.post("/api/runs",{type:e,params:n,nowait:null==t?void 0:t.nowait,track_props:i})).data}async function o(e,n){return(await l.U.get("/api/runs/".concat(e,"/wait"),{params:{timeout:n}})).data}async function a(e){return await l.U.post("/api/runs/".concat(e,"/cancel"))}async function s(e,n){return(await l.U.post("/api/checks/".concat(e,"/run"),{nowait:null==n?void 0:n.nowait})).data}async function u(e,n,t){return(await l.U.post("/api/runs/search",{type:e,params:n,limit:t})).data}async function c(){return(await l.U.get("/api/runs")).data}async function d(){return(await l.U.post("/api/runs/aggregate",{})).data}},74416:function(e,n,t){"use strict";t.d(n,{PQ:function(){return o},V5:function(){return s},gr:function(){return d},mB:function(){return c},po:function(){return i},tw:function(){return u},xq:function(){return a}});var l=t(41181),r=t(86406);async function i(e){return(await r.U.post("/api/save-as",e)).data}async function o(e){return(await r.U.post("/api/rename",e)).data}async function a(){return(await r.U.post("/api/export")).data}async function s(e,n){let t=new FormData;return t.append("file",e),t.append("checks_only",(!!n).toString()),(await r.U.post("/api/import",t)).data}async function u(){return 208===(await r.U.get("/api/sync")).status}async function c(e){try{let n=await r.U.post("/api/sync",e);if(202===n.status)return{status:"accepted"};if(208===n.status)return{status:"syncing"}}catch(e){if((0,l.IZ)(e)&&e.response&&409===e.response.status)return{status:"conflict"}}throw Error("Failed to sync state")}async function d(){return(await r.U.post("/api/share")).data}},33015:function(e,n,t){"use strict";t.d(n,{B2:function(){return s},BA:function(){return c},FF:function(){return u},JY:function(){return i},Je:function(){return h},KB:function(){return v},P6:function(){return d},U8:function(){return a},lH:function(){return x},nO:function(){return g},oq:function(){return o},rM:function(){return f},v4:function(){return p}});var l=t(4874),r=t(8536);function i(){let e=function(e){let n=document.cookie.match("(^|;)\\s*"+e+"\\s*=\\s*([^;]+)");return n?n.pop():""}("recce_user_id"),n="b1ea2155354b7e1e41981715f16599f2";if(e&&n)try{let t=(0,r.k)();l.IH(t),l.S1(n,e,{autocapture:!0})}catch(e){console.error(e)}}function o(e){l.j("[Web] multi_nodes_action",e)}function a(e){l.j("[Web] history_action",e)}function s(e){l.j("[Experiment] preview_change",e)}function u(e){l.j("[Experiment] preview_change",e)}function c(e){l.j("[Experiment] single_environment",e)}function d(e){l.j("[Experiment] recommend_preset_check",e)}let m=!1;function h(e){l.j("[Experiment] breaking_change_analysis",e),m=e.enabled}function f(){return m}function v(e){l.j("Column level lineage",e)}function p(e){l.j("share_state",e)}function x(e){l.j("state_action",e)}function g(e){l.j("[Click] copy_to_clipboard",e)}},48858:function(e,n,t){"use strict";t.d(n,{U:function(){return i},n:function(){return a}});var l=t(79294);let r=l.env.NEXT_PUBLIC_API_URL;null!=r||(r=window.location.origin);let i=r,o=l.env.NEXT_PUBLIC_CLOUD_WEB_URL;null!=o||(o="https://cloud.datarecce.io");let a=o},82860:function(e,n,t){"use strict";t.d(n,{cP:function(){return N},kJ:function(){return I},P:function(){return A}});var l=t(20130),r=t(58484),i=t(20519),o=t(25290),a=t(66703),s=t(37393),u=t(28291),c=t(55261),d=t(85071),m=t(32850),h=t(36198),f=t(81845),v=t(58407),p=t(38029),x=t(55169),g=t(61608),y=t(19736),j=t(48858),b=t(51036),_=t.n(b),w=t(9001),C=t(2768),k=t(8227),S=t(33015),R=t(44277),M=t(55763);function E(e){let{connect:n}=e;return(0,l.jsxs)(f.h,{children:[(0,l.jsx)(v.x,{children:"Server Disconnected"}),(0,l.jsx)(p.f,{children:(0,l.jsx)(x.x,{children:"The server connection has been lost. Please restart the Recce server and try again."})}),(0,l.jsx)(g.m,{children:(0,l.jsx)(y.z,{colorScheme:"blue",onClick:()=>{n()},children:"Retry"})})]})}function O(e){let{shareUrl:n}=e;return(0,l.jsxs)(f.h,{children:[(0,l.jsx)(v.x,{children:"Share Instance Expired"}),(0,l.jsx)(p.f,{children:(0,l.jsx)(x.x,{children:"This Share Instance has expired. Please restart the share instance."})}),(0,l.jsx)(g.m,{children:(0,l.jsx)(M.default,{href:n,passHref:!0,children:(0,l.jsx)(y.z,{colorScheme:"blue",children:"Restart"})})})]})}let T=(0,a.createContext)({isActionAvailable:()=>!0});function N(e){var n,t;let{children:b}=e,M=(0,o.a)({queryKey:s.V.lineage(),queryFn:u.L6}),N=(0,o.a)({queryKey:s.V.runsAggregated(),queryFn:w.i7}),I=(0,a.useMemo)(()=>{var e;let n=null===(e=M.data)||void 0===e?void 0:e.lineage;if((null==n?void 0:n.base)&&n.current)return(0,r.WU)(n.base,n.current,n.diff)},[M.data]),A=null===(n=M.error)||void 0===n?void 0:n.message,{state_metadata:P,lineage:L,sqlmesh:F,demo:z,review_mode:D,cloud_mode:U,file_mode:W,filename:V,adapter_type:q,git:H,pull_request:B,support_tasks:K}=null!==(t=M.data)&&void 0!==t?t:{},J=null==L?void 0:L.base.manifest_metadata,Z=null==L?void 0:L.current.manifest_metadata,{connectionStatus:G,connect:Q,envStatus:$}=function(){let e=(0,c.p)(),n=(0,a.useRef)({ws:void 0,status:"pending"}),[t,l]=(0,a.useState)("pending"),[r,o]=(0,a.useState)(void 0);n.current.status=t;let u=(0,i.NL)(),d=()=>{u.invalidateQueries({queryKey:s.V.lineage()}),u.invalidateQueries({queryKey:s.V.checks()}),u.invalidateQueries({queryKey:s.V.runs()})},m=()=>{let t=new WebSocket("".concat(j.U.replace(/(http)(s)?:\/\//,"ws$2://"),"/api/ws"));n.current.ws=t,t.onopen=()=>{t.send("ping")},t.onmessage=t=>{if("pong"===t.data){"disconnected"===n.current.status&&d(),l("connected");return}try{let n=JSON.parse(t.data);if("refresh"===n.command){let{eventType:t,srcPath:l}=n.event,[r,i]=l.split("/").slice(-2),o=_().parse(i).name,a="".concat(r,"-").concat(o,"-").concat(t);e.isActive(a)||e({id:a,description:"Detected ".concat(r," ").concat(o," ").concat(t),status:"info",variant:"left-accent",position:"bottom-right",duration:5e3,isClosable:!0}),d()}else if("relaunch"===n.command)o("relaunch");else{let{id:t,title:l,description:r,status:i,position:o,duration:a}=n.event;e({id:t||"broadcast",title:l,description:r,status:null!=i?i:"info",variant:"left-accent",position:null!=o?o:"bottom-right",duration:null!=a?a:5e3,isClosable:!0})}}catch(e){console.error(e)}},t.onerror=e=>{console.error(e)},t.onclose=()=>{l(e=>"connected"===e?"disconnected":e),n.current.ws=void 0}};return(0,a.useEffect)(()=>{let e=n.current;return m(),()=>{e.ws&&e.ws.close()}},[]),{connectionStatus:t,connect:m,envStatus:r}}(),{data:X,isLoading:Y}=(0,k.P)(),{data:ee}=(0,R.e)(),{onClose:en}=(0,d.q)(),[et,el]=(0,a.useState)(!1),er=(0,i.NL)(),ei=(0,a.useCallback)(e=>{if(K){var n;return null===(n=K[e])||void 0===n||n}return!0},[K]);(0,a.useEffect)(()=>{Y||("relaunch"===$&&(null==X?void 0:X.single_env_onboarding)&&X.show_relaunch_hint?(el(!0),(0,S.BA)({action:"target_base_added"})):el(!1))},[X,$,Y]);let{share_url:eo}=null!=ee?ee:{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(T.Provider,{value:{lineageGraph:I,retchLineageGraph:()=>{N.refetch()},envInfo:{stateMetadata:P,adapterType:q,git:H,pullRequest:B,dbt:{base:J,current:Z},sqlmesh:F},reviewMode:D,cloudMode:U,fileMode:W,fileName:V,isDemoSite:z,error:A,supportTasks:K,isActionAvailable:ei,isLoading:M.isLoading,runsAggregated:N.data,refetchRunsAggregated:()=>{N.refetch()}},children:b}),(0,l.jsxs)(m.u_,{isOpen:"disconnected"===G,onClose:()=>{},isCentered:!0,children:[(0,l.jsx)(h.Z,{}),eo?(0,l.jsx)(O,{shareUrl:eo}):(0,l.jsx)(E,{connect:Q})]}),(null==X?void 0:X.single_env_onboarding)&&(0,l.jsxs)(m.u_,{isOpen:et,onClose:()=>{en(),(0,C.bV)(),er.invalidateQueries({queryKey:s.V.flag()})},isCentered:!0,children:[(0,l.jsx)(h.Z,{}),(0,l.jsxs)(f.h,{children:[(0,l.jsx)(v.x,{children:"Target-base Added"}),(0,l.jsx)(p.f,{children:(0,l.jsx)(x.x,{children:"Please restart the Recce server."})}),(0,l.jsx)(g.m,{children:(0,l.jsx)(y.z,{colorScheme:"blue",onClick:()=>{en(),(0,C.bV)(),er.invalidateQueries({queryKey:s.V.flag()})},children:"Got it!"})})]})]})]})}let I=()=>(0,a.useContext)(T),A=()=>{let{runsAggregated:e,refetchRunsAggregated:n}=I();return[e,n]}},8232:function(e,n,t){"use strict";t.d(n,{Q2:function(){return k},$q:function(){return S}});var l=t(20130),r=t(66703),i=t(32850),o=t(36198),a=t(81845),s=t(58407),u=t(60667),c=t(38029),d=t(28561),m=t(61608),h=t(51895),f=t(19736);let v=e=>{let{isOpen:n,onClose:t,onExecute:v,type:p,title:x,params:g,RunForm:y}=e,[j,b]=(0,r.useState)(g),[_,w]=(0,r.useState)(!1);return(0,l.jsxs)(i.u_,{isOpen:n,onClose:t,size:"6xl",scrollBehavior:"inside",children:[(0,l.jsx)(o.Z,{}),(0,l.jsxs)(a.h,{overflowY:"auto",height:"75%",minHeight:"400px",children:[(0,l.jsx)(s.x,{children:x}),(0,l.jsx)(u.o,{}),(0,l.jsx)(c.f,{p:"0px",h:"100%",overflow:"auto",borderY:"1px solid lightgray",children:(0,l.jsx)(d.x,{style:{contain:"layout"},children:y&&(0,l.jsx)(y,{params:j,onParamsChanged:b,setIsReadyToExecute:w})})}),(0,l.jsx)(m.m,{children:(0,l.jsx)(h.k,{gap:"10px",children:(0,l.jsx)(f.z,{isDisabled:!_,colorScheme:"blue",onClick:()=>{v(p,j)},children:"Execute"})})})]})]})};var p=t(85071),x=t(55261),g=t(99201),y=t(9001),j=t(7873),b=t(20519),_=t(37393);let w=(0,r.createContext)({runAction:()=>{},showRunId:e=>{},isRunResultOpen:!1,closeRunResult:()=>{},isHistoryOpen:!1,closeHistory:()=>{},showHistory:()=>{},clearRunResult:()=>{}}),C=e=>{let[n]=(0,g.TH)();(0,r.useEffect)(()=>{e()},[e,n])};function k(e){var n;let{children:t}=e,[i,o]=(0,r.useState)(),{isOpen:a,onOpen:s,onClose:u}=(0,p.q)(),{isOpen:c,onOpen:d,onClose:m}=(0,p.q)(),{isOpen:h,onOpen:f,onClose:k}=(0,p.q)(),S=(0,x.p)(),[R,M]=(0,r.useState)(),[E,O]=(0,g.TH)(),T=(0,b.NL)(),N=(0,r.useCallback)(async(e,n)=>{M(e),d(),!1!==n&&await T.invalidateQueries({queryKey:_.V.runs()})},[M,d,T]),I=(0,r.useCallback)(()=>{M(void 0),m()},[m,M]),A=(0,r.useCallback)(async(e,n,t)=>{try{let l;let r=new Date().getTime().toString();if(null==t?void 0:t.showLast){let t=await (0,y.v1)(e,n,1);1===t.length&&(l=t[0])}let i=(0,j.N)(e);if(void 0===i)throw Error("Unknown run type: ".concat(e));let{title:a,RunResultView:u,RunForm:c}=i;if(void 0===u)throw Error("Run type ".concat(e," does not have a result view"));if(void 0!=c&&(null==t?void 0:t.showForm))o({session:r,title:a,type:e,params:n,lastRun:l,options:t,RunForm:c}),s();else{let{run_id:l}=await (0,y.g9)(e,n,{nowait:!0,trackProps:null==t?void 0:t.trackProps});await N(l),await T.invalidateQueries({queryKey:_.V.runs()}),E.startsWith("/lineage")&&O("/lineage")}}catch(e){S({title:"Failed to submit a run",description:e instanceof Error?e.message:void 0,position:"bottom-right",status:"error",duration:5e3,isClosable:!0})}},[o,s,N,S,E,O,T]);C(u);let P=async(e,n)=>{try{var t;u();let{run_id:l}=await (0,y.g9)(e,n,{nowait:!0,trackProps:null==i?void 0:null===(t=i.options)||void 0===t?void 0:t.trackProps});await N(l)}catch(e){S({title:"Failed to submit a run",description:e instanceof Error?e.message:void 0,position:"bottom-right",status:"error",duration:5e3,isClosable:!0})}};return(0,l.jsxs)(w.Provider,{value:{runAction:A,runId:R,showRunId:N,isRunResultOpen:c,closeRunResult:m,isHistoryOpen:h,closeHistory:k,showHistory:f,clearRunResult:I},children:[i&&(0,l.jsx)(v,{isOpen:a,onClose:u,onExecute:P,title:i.title,type:i.type,params:i.params,initialRun:i.lastRun,RunForm:(null===(n=i.options)||void 0===n?void 0:n.showForm)&&i.RunForm?i.RunForm:void 0},i.session),t]})}let S=()=>(0,r.useContext)(w)},9259:function(e,n,t){"use strict";t.d(n,{L:function(){return o},p:function(){return a}});var l=t(20130),r=t(66703);let i=(0,r.createContext)({latestSelectedCheckId:"",setLatestSelectedCheckId:()=>{}});function o(e){let{children:n}=e,[t,o]=r.useState("");return(0,l.jsx)(i.Provider,{value:{setLatestSelectedCheckId:o,latestSelectedCheckId:t},children:n})}let a=()=>(0,r.useContext)(i)},49491:function(e,n,t){"use strict";t.d(n,{$:function(){return s},o:function(){return a}});var l=t(20130),r=t(66703),i=t(44277);let o=(0,r.createContext)({readOnly:!1,singleEnv:!1,authed:!1,lifetimeExpiredAt:void 0});function a(e){let{children:n}=e,{data:t,isLoading:a}=(0,i.e)(),[s,u]=(0,r.useState)(!1),[c,d]=(0,r.useState)(!1),[m,h]=(0,r.useState)(!1),[f,v]=(0,r.useState)();return(0,r.useEffect)(()=>{!a&&t&&(u(t.read_only),d(t.single_env),h(t.authed),t.lifetime_expired_at&&(v(new Date(t.lifetime_expired_at)),console.log("lifetime expired at",t.lifetime_expired_at)))},[t,a]),(0,l.jsx)(o.Provider,{value:{readOnly:s,singleEnv:c,authed:m,lifetimeExpiredAt:f},children:n})}let s=()=>(0,r.useContext)(o)},39219:function(e,n,t){"use strict";t.d(n,{Z8:function(){return a},nw:function(){return i},rV:function(){return s},y3:function(){return c}});var l=t(20130),r=t(66703);let i='select * from {{ ref("mymodel") }}',o=(0,r.createContext)({sqlQuery:i,setSqlQuery:()=>{},primaryKeys:void 0,setPrimaryKeys:()=>{},isCustomQueries:!1,setCustomQueries:()=>{},baseSqlQuery:i,setBaseSqlQuery:()=>{}});function a(e){let{children:n}=e,[t,a]=r.useState(i),[s,u]=r.useState(i),[c,d]=r.useState(!1),[m,h]=r.useState();return(0,l.jsx)(o.Provider,{value:{setSqlQuery:a,sqlQuery:t,setPrimaryKeys:h,primaryKeys:m,isCustomQueries:c,setCustomQueries:d,baseSqlQuery:s,setBaseSqlQuery:u},children:n})}let s=()=>(0,r.useContext)(o),u=(0,r.createContext)({isNodesFetching:[],setIsNodesFetching:()=>{}});function c(e){let{children:n}=e,[t,i]=r.useState([]);return(0,l.jsx)(u.Provider,{value:{isNodesFetching:t,setIsNodesFetching:i},children:n})}},52144:function(e,n,t){"use strict";t.d(n,{k:function(){return a},z:function(){return s}});var l=t(20130),r=t(66703),i=t(74416);let o=(0,r.createContext)(void 0);function a(e){let{children:n}=e,[t,a]=(0,r.useState)(),[s,u]=(0,r.useState)(!1),[c,d]=(0,r.useState)(),m=async()=>{u(!0),d(void 0),a(void 0);try{let e=await (0,i.gr)();if("success"!==e.status){d(e.message);return}a(e.share_url)}catch(e){d(e.message)}finally{u(!1)}};return(0,l.jsx)(o.Provider,{value:{shareUrl:t,isLoading:s,error:c,handleShareClick:m},children:n})}let s=()=>{let e=(0,r.useContext)(o);if(!e)throw Error("useRecceShareStateContext must be used within a RecceShareStateContextProvider");return e}},51560:function(e,n,t){"use strict";var l=t(66703),r=t(28291),i=t(82860),o=t(35813),a=t.n(o);function s(e,n){let t=[];return e.forEach(e=>{t.some(n=>n.name===e.name)||t.push(e)}),n.forEach(e=>{t.some(n=>n.name===e.name)||t.push(e)}),t}n.ZP=e=>{var n;let{lineageGraph:t}=(0,i.kJ)(),[o,u]=(0,l.useState)([]),[c,d]=(0,l.useState)(),[m,h]=(0,l.useState)(!0),[f,v]=(0,l.useState)(null),p=a().find(null==t?void 0:t.nodes,{name:e}),x=(0,l.useMemo)(()=>p?function(e){function n(e){return(null==e?void 0:e.columns)?Object.values(e.columns):[]}return s(n(e.data.base),n(e.data.current))}(p):[],[p]),g=p?null===(n=p.data.current)||void 0===n?void 0:n.primary_key:void 0,y=(0,l.useCallback)(async()=>{try{let e=(await (0,r.xx)(null==p?void 0:p.id)).model;if(!e.base.columns||!e.current.columns){u([]);return}d(e.current.primary_key);let n=Object.values(e.base.columns),t=Object.values(e.current.columns);u(s(n,t))}catch(e){v(e)}},[null==p?void 0:p.id]);return(0,l.useEffect)(()=>{x.length>0?(u(x),d(g)):(null==p?void 0:p.id)===void 0?u([]):y().catch(e=>{}),h(!1)},[y,null==p?void 0:p.id,x,g]),{columns:o,primaryKey:c,isLoading:m,error:f}}},44277:function(e,n,t){"use strict";t.d(n,{e:function(){return a}});var l=t(25290),r=t(37393),i=t(86406);async function o(){return(await i.U.get("/api/instance-info")).data}let a=()=>(0,l.a)({queryKey:r.V.instanceInfo(),queryFn:o})},8227:function(e,n,t){"use strict";t.d(n,{P:function(){return o}});var l=t(25290),r=t(2768),i=t(37393);let o=()=>(0,l.a)({queryKey:i.V.flag(),queryFn:r.yG})},36055:function(e,n,t){"use strict";function l(e,n){let t=[...e],l=[...n],r=[];for(;t.length>0&&l.length>0;)if(r.includes(t[0]))t.shift();else if(r.includes(l[0]))l.shift();else if(t[0]===l[0])r.push(t[0]),t.shift(),l.shift();else if(l.includes(t[0])){let e=l.indexOf(t[0]);for(let n=0;n<e;n++)r.includes(l[n])||r.push(l[n]);r.push(t[0]),t.shift(),l.splice(0,e+1)}else r.push(t[0]),t.shift();return t.forEach(e=>{r.includes(e)||r.push(e)}),l.forEach(e=>{r.includes(e)||r.push(e)}),r}function r(e,n){let t=l(e,n),r={};for(let l of t)e.includes(l)?n.includes(l)?r[l]=void 0:r[l]="removed":r[l]="added";let i={};e.forEach((e,n)=>{i[e]=n});let o=-1;for(let e of t){let n=i[e];null!=n&&(n>o?o=n:r[e]="reordered")}return r}t.d(n,{Z:function(){return r},_:function(){return l}})},26372:function(){}}]);
|