diff --git a/data_wizard/models.py b/data_wizard/models.py index 47a88b2..d45eece 100644 --- a/data_wizard/models.py +++ b/data_wizard/models.py @@ -22,7 +22,7 @@ class Run(models.Model): content_object = GenericForeignKey() def __str__(self): - return "Run for %s" % self.content_object + return str(self.content_object) def get_absolute_url(self): return reverse('data_wizard:run-detail', kwargs={'pk': self.pk}) diff --git a/data_wizard/rest.py b/data_wizard/rest.py index c35b0d2..c8b40a9 100644 --- a/data_wizard/rest.py +++ b/data_wizard/rest.py @@ -69,6 +69,7 @@ def user_filter(qs, request): 'list', 'detail', 'edit', 'serializers', 'columns', 'ids', 'data', 'auto', 'records', ], + background_sync=False, postsave=( 'datawizard/{{id}}' '{{#current_mode}}/{{current_mode}}{{/current_mode}}' diff --git a/data_wizard/sources/admin.py b/data_wizard/sources/admin.py index 8a4afa4..6e3235b 100644 --- a/data_wizard/sources/admin.py +++ b/data_wizard/sources/admin.py @@ -3,5 +3,15 @@ from data_wizard.admin import ImportActionModelAdmin from .models import FileSource, URLSource -admin.site.register(FileSource, ImportActionModelAdmin) -admin.site.register(URLSource, ImportActionModelAdmin) + +class SourceAdmin(ImportActionModelAdmin): + readonly_fields = ('user',) + + def save_model(self, request, obj, form, change): + if not change: + obj.user = request.user + super().save_model(request, obj, form, change) + + +admin.site.register(FileSource, SourceAdmin) +admin.site.register(URLSource, SourceAdmin) diff --git a/data_wizard/sources/migrations/0002_source_user.py b/data_wizard/sources/migrations/0002_source_user.py new file mode 100644 index 0000000..3e80b7d --- /dev/null +++ b/data_wizard/sources/migrations/0002_source_user.py @@ -0,0 +1,26 @@ +# Generated by Django 3.2.7 on 2021-09-15 23:23 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('sources', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='filesource', + name='user', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='urlsource', + name='user', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL), + ), + ] diff --git a/data_wizard/sources/models.py b/data_wizard/sources/models.py index d702534..dd70d05 100644 --- a/data_wizard/sources/models.py +++ b/data_wizard/sources/models.py @@ -1,16 +1,26 @@ from django.db import models +from django.conf import settings +import os class FileSource(models.Model): + user = models.ForeignKey( + settings.AUTH_USER_MODEL, + null=True, blank=True, on_delete=models.PROTECT, + ) name = models.CharField(max_length=255, null=True, blank=True) file = models.FileField(upload_to='datawizard/') date = models.DateTimeField(auto_now_add=True) def __str__(self): - return self.name or self.file.name + return self.name or os.path.basename(self.file.name) class URLSource(models.Model): + user = models.ForeignKey( + settings.AUTH_USER_MODEL, + null=True, blank=True, on_delete=models.PROTECT, + ) name = models.CharField(max_length=255, null=True, blank=True) url = models.URLField() date = models.DateTimeField(auto_now_add=True) diff --git a/data_wizard/sources/rest.py b/data_wizard/sources/rest.py index 97508af..649bbd7 100644 --- a/data_wizard/sources/rest.py +++ b/data_wizard/sources/rest.py @@ -1,6 +1,36 @@ +from rest_framework import serializers from wq.db import rest +from wq.db.rest.serializers import ModelSerializer from .models import FileSource, URLSource +from ..rest import user_filter -rest.router.register_model(FileSource, fields="__all__") -rest.router.register_model(URLSource, fields="__all__") +class FileSourceSerializer(ModelSerializer): + user = serializers.HiddenField(default=serializers.CurrentUserDefault()) + + class Meta: + model = FileSource + fields = '__all__' + + +class URLSourceSerializer(ModelSerializer): + user = serializers.HiddenField(default=serializers.CurrentUserDefault()) + + class Meta: + model = FileSource + fields = '__all__' + + +rest.router.register_model( + FileSource, + serializer=FileSourceSerializer, + background_sync=False, + filter=user_filter, +) + +rest.router.register_model( + URLSource, + serializer=URLSourceSerializer, + background_sync=False, + filter=user_filter, +) diff --git a/data_wizard/static/app/js/wizard.js b/data_wizard/static/app/js/wizard.js index 80fcf12..dfee5e4 100644 --- a/data_wizard/static/app/js/wizard.js +++ b/data_wizard/static/app/js/wizard.js @@ -1,2 +1,2 @@ -import{modules as e}from"./wq.js";const{react:t}=e,{"@wq/material":n}=e;n.default;const{"prop-types":r}=e;function Center({children:e}){return t.createElement(n.ScrollView,null,t.createElement("div",{style:{flex:1,display:"flex",justifyContent:"center"}},t.createElement("div",{style:{width:"100%",maxWidth:"70em",padding:"1em",boxSizing:"border-box"}},e)))}Center.propTypes={children:r.node};const{"@wq/react":a}=e;function CloseWizard(){const{CancelButton:e,HorizontalView:n,View:r}=a.useComponents(),o=a.useReverse();return t.createElement(n,null,t.createElement(e,{to:o("run_list"),variant:"outlined",color:"secondary"},"Back"),t.createElement(r,null))}a.default;class Progress$1{constructor(e){if(this.config={interval:.5,...e},!this.config.url)throw new Error("No URL specified!")}start(){this._throttle=0,this._throttleCount=0,this._lastProgress=null,this._timer=setInterval((()=>this.update()),1e3*this.config.interval)}stop(){this._timer&&clearInterval(this._timer),delete this._throttle,delete this._throttleCount,delete this._lastProgress,delete this._timer}async update(){if(this._throttleCount0&&this._throttle--)),e.current==e.total&&(this.onComplete(e),t=!0)):(this.onIndeterminate(e),this._throttle++),"SUCCESS"!=e.status||t?"FAILURE"==e.status?this.onFail(e):t||this.onProgress(e):this.onComplete(e),e.location&&this.onNavigate(e)}onIndeterminate(e){this.config.onIndeterminate&&this.config.onIndeterminate(e)}onProgress(e){this.config.onProgress&&this.config.onProgress(e)}onError(e){this.config.onError&&this.config.onError(e)}onComplete(e){this.config.onComplete&&this.config.onComplete(e),this.stop()}onFail(e){this.stop(),this.config.onFail&&this.config.onFail(e)}onNavigate(e){this.config.onNavigate&&this.config.onNavigate(e)}}function useRunInfo(){const e=a.useRenderContext(),t=a.useModel("run",e.id||-1);return{...e,...t}}function useProgress(e){const[n,r]=t.useState(null),[o,i]=t.useState(null),[l,c]=t.useState(null),[u,s]=t.useState(!1),[d,f]=t.useState(null),m=a.useNav();return t.useEffect((()=>{const t=e=>{f(e),(e.error||e.message)&&c(e.error||e.message)},n=new Progress$1({url:e,onIndeterminate:t,onProgress(e){i(e.current/e.total*100),t(e)},onComplete(e){i(100),s(!1),t(e)},onFail(e){i(0),s(!0),t(e)},onError(e){s(!0),c(""+e)},onNavigate(e){m(e.location.slice(1))}});return n.start(),r(n),()=>n.stop()}),[e]),t.useMemo((()=>({progress:n,value:o,status:l,error:u,data:d})),[n,o,l,u,d])}function ContinueForm({children:e,submitLabel:n="Continue"}){const{id:r,label:o}=useRunInfo(),{ScrollView:i,Form:l,Typography:c,SubmitButton:u,HorizontalView:s,View:d}=a.useComponents();return t.createElement(i,null,t.createElement(l,{action:`datawizard/${r}/auto`,method:"POST",backgroundSync:!1},t.createElement(c,{variant:"h5"},o),e,t.createElement(s,null,t.createElement(d,null),t.createElement(u,{icon:"continue"},n))))}function MappingFieldsetArray({label:e,subform:n,children:r}){const{Fieldset:o,Table:i,TableHead:l,TableBody:c,TableRow:u,TableTitle:s}=a.useComponents();return t.createElement(o,{label:e},t.createElement(i,null,t.createElement(l,null,t.createElement(u,null,n.filter((e=>"hidden"!==e.control.appearance)).map((e=>t.createElement(s,{key:e.name},e.label))))),t.createElement(c,null,r)))}function o(){return o=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function l(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t"hidden"!==e.props.control.appearance)).map((e=>t.createElement(r,{key:e.props.name},e))))},MappingFieldsetArray.Fieldset.propTypes={children:r.node};const{"@material-ui/utils":u}=e;function s(e){if("string"!=typeof e)throw new Error(u.formatMuiErrorMessage(7));return e.charAt(0).toUpperCase()+e.slice(1)}const{"@material-ui/core/styles/withStyles":d}=e;var f=d;const{"@material-ui/core/styles/colorManipulator":m}=e,{"@material-ui/styles":p}=e;function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=["xs","sm","md","lg","xl"];function b(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,a=void 0===r?"px":r,l=e.step,c=void 0===l?5:l,u=i(e,["values","unit","step"]);function s(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(a,")")}function d(e,t){var r=g.indexOf(t);return r===g.length-1?s(e):"@media (min-width:".concat("number"==typeof n[e]?n[e]:e).concat(a,") and ")+"(max-width:".concat((-1!==r&&"number"==typeof n[g[r+1]]?n[g[r+1]]:t)-c/100).concat(a,")")}return o({keys:g,values:n,up:s,down:function(e){var t=g.indexOf(e)+1,r=n[g[t]];return t===g.length?s("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-c/100).concat(a,")")},between:d,only:function(e){return d(e,e)},width:function(e){return n[e]}},u)}function y(e,t,n){var r;return o({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),o({paddingLeft:t(2),paddingRight:t(2)},n,h({},e.up("sm"),o({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},h(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),h(r,e.up("sm"),{minHeight:64}),r)},n)}var v={black:"#000",white:"#fff"},E={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},w={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},x={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},C={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},S={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},_={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},R={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function T(e){if(e.type)return e;if("#"===e.charAt(0))return T(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(u.formatMuiErrorMessage(3,e));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function O(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function A(e){var t="hsl"===(e=T(e)).type?T(function(e){var t=(e=T(e)).values,n=t[0],r=t[1]/100,a=t[2]/100,o=r*Math.min(a,1-a),i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return a-o*Math.max(Math.min(t-3,9-t,1),-1)},l="rgb",c=[Math.round(255*i(0)),Math.round(255*i(8)),Math.round(255*i(4))];return"hsla"===e.type&&(l+="a",c.push(t[3])),O({type:l,values:c})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}var M={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:v.white,default:E[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},z={text:{primary:v.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:E[800],default:"#303030"},action:{active:v.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function P(e,t,n,r){var a=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=T(e),t=k(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return O(e)}(e.main,a):"dark"===t&&(e.dark=function(e,t){if(e=T(e),t=k(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return O(e)}(e.main,o)))}function F(e){var t=e.primary,n=void 0===t?{light:w[300],main:w[500],dark:w[700]}:t,r=e.secondary,a=void 0===r?{light:x.A200,main:x.A400,dark:x.A700}:r,l=e.error,c=void 0===l?{light:C[300],main:C[500],dark:C[700]}:l,s=e.warning,d=void 0===s?{light:S[300],main:S[500],dark:S[700]}:s,f=e.info,m=void 0===f?{light:_[300],main:_[500],dark:_[700]}:f,p=e.success,h=void 0===p?{light:R[300],main:R[500],dark:R[700]}:p,g=e.type,b=void 0===g?"light":g,y=e.contrastThreshold,k=void 0===y?3:y,T=e.tonalOffset,O=void 0===T?.2:T,F=i(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function I(e){var t=function(e,t){var n=A(e),r=A(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,z.text.primary)>=k?z.text.primary:M.text.primary;return t}var j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=o({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(u.formatMuiErrorMessage(4,t));if("string"!=typeof e.main)throw new Error(u.formatMuiErrorMessage(5,JSON.stringify(e.main)));return P(e,"light",n,O),P(e,"dark",r,O),e.contrastText||(e.contrastText=I(e.main)),e},L={dark:z,light:M};return u.deepmerge(o({common:v,type:b,primary:j(n),secondary:j(a,"A400","A200","A700"),error:j(c),warning:j(d),info:j(m),success:j(h),grey:E,contrastThreshold:k,getContrastText:I,augmentColor:j,tonalOffset:O},L[b]),F)}function I(e){return Math.round(1e5*e)/1e5}function j(e){return I(e)}var L={textTransform:"uppercase"};function D(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,a=void 0===r?'"Roboto", "Helvetica", "Arial", sans-serif':r,l=n.fontSize,c=void 0===l?14:l,s=n.fontWeightLight,d=void 0===s?300:s,f=n.fontWeightRegular,m=void 0===f?400:f,p=n.fontWeightMedium,h=void 0===p?500:p,g=n.fontWeightBold,b=void 0===g?700:g,y=n.htmlFontSize,v=void 0===y?16:y,E=n.allVariants,w=n.pxToRem,x=i(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),C=c/14,S=w||function(e){return"".concat(e/v*C,"rem")},_=function(e,t,n,r,i){return o({fontFamily:a,fontWeight:e,fontSize:S(t),lineHeight:n},'"Roboto", "Helvetica", "Arial", sans-serif'===a?{letterSpacing:"".concat(I(r/t),"em")}:{},i,E)},R={h1:_(d,96,1.167,-1.5),h2:_(d,60,1.2,-.5),h3:_(m,48,1.167,0),h4:_(m,34,1.235,.25),h5:_(m,24,1.334,0),h6:_(h,20,1.6,.15),subtitle1:_(m,16,1.75,.15),subtitle2:_(h,14,1.57,.1),body1:_(m,16,1.5,.15),body2:_(m,14,1.43,.15),button:_(h,14,1.75,.4,L),caption:_(m,12,1.66,.4),overline:_(m,12,2.66,1,L)};return u.deepmerge(o({htmlFontSize:v,pxToRem:S,round:j,fontFamily:a,fontSize:c,fontWeightLight:d,fontWeightRegular:m,fontWeightMedium:h,fontWeightBold:b},R),x,{clone:!1})}function N(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var W=["none",N(0,2,1,-1,0,1,1,0,0,1,3,0),N(0,3,1,-2,0,2,2,0,0,1,5,0),N(0,3,3,-2,0,3,4,0,0,1,8,0),N(0,2,4,-1,0,4,5,0,0,1,10,0),N(0,3,5,-1,0,5,8,0,0,1,14,0),N(0,3,5,-1,0,6,10,0,0,1,18,0),N(0,4,5,-2,0,7,10,1,0,2,16,1),N(0,5,5,-3,0,8,10,1,0,3,14,2),N(0,5,6,-3,0,9,12,1,0,3,16,2),N(0,6,6,-3,0,10,14,1,0,4,18,3),N(0,6,7,-4,0,11,15,1,0,4,20,3),N(0,7,8,-4,0,12,17,2,0,5,22,4),N(0,7,8,-4,0,13,19,2,0,5,24,4),N(0,7,9,-4,0,14,21,2,0,5,26,4),N(0,8,9,-5,0,15,22,2,0,6,28,5),N(0,8,10,-5,0,16,24,2,0,6,30,5),N(0,8,11,-5,0,17,26,2,0,6,32,5),N(0,9,11,-5,0,18,28,2,0,7,34,6),N(0,9,12,-6,0,19,29,2,0,7,36,6),N(0,10,13,-6,0,20,31,3,0,8,38,7),N(0,10,13,-6,0,21,33,3,0,8,40,7),N(0,10,14,-6,0,22,35,3,0,8,42,7),N(0,11,14,-7,0,23,36,3,0,9,44,8),N(0,11,15,-7,0,24,38,3,0,9,46,8)],V={borderRadius:4};function B(e){var t=e.spacing||8;return"number"==typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"==typeof t?t:function(){}}function U(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=B({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?$.standard:n,a=t.easing,o=void 0===a?H.easeInOut:a,l=t.delay,c=void 0===l?0:l;return i(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:q(r)," ").concat(o," ").concat("string"==typeof c?c:q(c))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},X={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};var J=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,a=void 0===r?{}:r,o=e.palette,l=void 0===o?{}:o,c=e.spacing,s=e.typography,d=void 0===s?{}:s,f=i(e,["breakpoints","mixins","palette","spacing","typography"]),m=F(l),p=b(n),h=U(c),g=u.deepmerge({breakpoints:p,direction:"ltr",mixins:y(p,h,a),overrides:{},palette:m,props:{},shadows:W,typography:D(m,d),spacing:h,shape:V,transitions:K,zIndex:X},f),v=arguments.length,E=new Array(v>1?v-1:0),w=1;wfunction(e){const t=(e||[]).find((e=>e.types)),n=t?t.types:[],r=[];n.forEach((({name:e,choices:t})=>{t.forEach((({id:t,label:n})=>{r.push({name:t,label:n,group:e})}))}));const a=[{type:"repeat",name:"columns",label:"Columns",control:{appearance:"mapping-fieldset-array"},children:[{type:"string",name:"column",label:"Column",control:{appearance:"read-only"}},{type:"select one",name:"type",label:"Type",choices:[{name:"attribute",label:"EAV Column"},{name:"meta",label:"Column/Header"},{name:"instance",label:"FK Value"},{name:"unresolved",label:"Unresolved"},{name:"unknown",label:"Unknown"}],control:{appearance:"hidden"}},{type:"string",name:"name",label:"Spreadsheet Value",control:{appearance:"read-only"}},{type:"select one",name:"mapping",label:"Mapping",choices:r,control:{appearance:"mapping-select"}}]}],o={columns:e.map((({rel_id:e,column:t,type:n,name:r,mapping:a})=>({id:e,column:t,type:n,name:r,mapping:a})))};return[a,o]}(o)),[o]),{ScrollView:c,Typography:u,AutoForm:s,TableRow:d,TableCell:f,ContinueForm:m,MappingFieldsetArray:p}=a.useComponents();return r?t.createElement(c,null,t.createElement(s,{action:`datawizard/${e}/updatecolumns`,method:"POST",backgroundSync:!1,form:i,data:l},t.createElement(u,{variant:"h5"},n),t.createElement(u,{variant:"h6"},"Unknown Columns"),t.createElement(u,null,"This file contains ",r," column",r>1?"s":""," that"," ",r>1?"are":"is"," not yet recognized by this database."))):t.createElement(c,null,t.createElement(m,null,t.createElement(u,{variant:"h6"},"Mapped Columns"),t.createElement(u,null,"The following columns are mapped."),t.createElement(p,{label:i[0].label,subform:i[0].children},l.columns.map((({id:e,column:n,name:r,mapping:a})=>t.createElement(d,{key:e},t.createElement(f,null,n),t.createElement(f,null,r),t.createElement(f,null,a)))))))}function RunDetail(){const{ScrollView:e,Typography:n,Table:r,TableBody:o,TableRow:i,TableCell:l,Link:c,Center:u,ContinueForm:s}=a.useComponents(),d=useRunInfo(),{id:f,label:m,serializer_label:p,record_count:h,last_update:g}=d,b=a.useReverse();return null!==h?t.createElement(u,null,t.createElement(n,{variant:"h5"},m),t.createElement(r,null,t.createElement(o,null,t.createElement(i,null,t.createElement(l,null,"Serializer"),t.createElement(l,null,"function"==typeof p?p.call(d):p)),t.createElement(i,null,t.createElement(l,null,"Records"),t.createElement(l,null,t.createElement(c,{to:b("run_records",f)},h," record",1===h?"":"s"," imported."))),t.createElement(i,null,t.createElement(l,null,"Last Updated"),t.createElement(l,null,new Date(g).toLocaleString()))))):t.createElement(e,null,t.createElement(s,{submitLabel:"Start Import"},t.createElement(n,{variant:"h6"},"Click to start the import wizard.")))}function RunIds(){const{id:e,label:n,result:{unknown_count:r,types:o}}=useRunInfo(),[i,l]=t.useMemo((()=>function(e){const t=[],n={};return e.forEach((({type_id:e,type_label:r,ids:a})=>{const o=e.replace(".","_"),i=(a||[]).find((e=>e.choices)),l=i?i.choices.map((({id:e,label:t})=>({name:e,label:t}))):[];t.push({type:"repeat",name:o,label:`${r} Identifiers`,control:{appearance:"mapping-fieldset-array"},children:[{type:"string",name:"name",label:"Identifier",control:{appearance:"read-only"}},{type:"select one",name:"type",label:"Type",choices:[{name:"mapped",label:"Mapped"},{name:"unknown",label:"Unknown"}],control:{appearance:"hidden"}},{type:"int",name:"count",label:"Occurrences",control:{appearance:"read-only"}},{type:"select one",name:"mapping",label:r,choices:l,control:{appearance:"mapping-select"}}]}),n[o]=a.map((({ident_id:e,value:t,count:n,match:r,unknown:a})=>({id:e,name:t,type:a?"unknown":"resolved",count:n,mapping:r})))})),[t,n]}(o)),[o]),{ScrollView:c,Typography:u,AutoForm:s,TableRow:d,TableCell:f,ContinueForm:m,MappingFieldsetArray:p}=a.useComponents();return r?t.createElement(c,null,t.createElement(s,{action:`datawizard/${e}/updateids`,method:"POST",backgroundSync:!1,form:i,data:l},t.createElement(u,{variant:"h5"},n),t.createElement(u,{variant:"h6"},"Unknown Identifiers"),t.createElement(u,null,"This file contains ",r," identifier",r>1?"s":""," that"," ",r>1?"are":"is"," not yet recognized by this database."))):t.createElement(c,null,t.createElement(m,null,t.createElement(u,{variant:"h6"},"Mapped Identifiers"),t.createElement(u,null,"The following identifiers are mapped."),i.map((({name:e,label:n,children:r})=>t.createElement(p,{key:e,label:n,subform:r},l[e].map((({id:e,name:n,count:r,mapping:a})=>t.createElement(d,{key:e},t.createElement(f,null,n),t.createElement(f,null,r),t.createElement(f,null,a)))))))))}function RunList(){const{Typography:e,Link:n,Table:r,TableHead:o,TableBody:i,TableRow:l,TableTitle:c,TableCell:u,Center:s}=a.useComponents(),{list:d,empty:f}=a.useList(),m=a.useReverse();return t.createElement(s,null,t.createElement(e,{variant:"h4"},"Django Data Wizard"),t.createElement(r,null,t.createElement(o,null,t.createElement(l,null,t.createElement(c,null,"Run"),t.createElement(c,null,"Serializer"),t.createElement(c,null,"Records"),t.createElement(c,null,"Last Update"))),t.createElement(i,null,f&&t.createElement(u,{colspan:4},"No previous runs."),d.map((({id:e,label:r,serializer_label:a,record_count:o,last_update:i})=>t.createElement(l,{key:e},t.createElement(u,null,t.createElement(n,{to:m("run_detail",e)},r)),t.createElement(u,null,a||"-"),t.createElement(u,null,"number"==typeof o?o:o||"-"),t.createElement(u,null,i?new Date(i).toLocaleString():"-")))))))}function RunRecords(){const{Typography:e,Table:n,TableHead:r,TableBody:o,TableRow:i,TableTitle:l,TableCell:c,Center:u,CloseWizard:s}=a.useComponents(),d=useRunInfo(),{label:f,records:m}=d,p=m&&m.length>0;return t.createElement(u,null,t.createElement(e,{variant:"h5"},f),t.createElement(e,{variant:"h6"},"Imported Records"),t.createElement(e,null,"Import Complete!"),t.createElement(n,null,t.createElement(r,null,t.createElement(i,null,t.createElement(l,null,"Row"),t.createElement(l,null,"Record"))),t.createElement(o,null,!p&&t.createElement(c,{colspan:2},"No records imported."),p&&m.map((e=>t.createElement(i,{key:e.row},t.createElement(c,null,e.row),t.createElement(c,null,t.createElement(RecordLink,e))))))),t.createElement(s,null))}function RecordLink({success:e,object_url:n,object_label:r,fail_reason:o}){const{Link:i,Typography:l}=a.useComponents();return e?n?t.createElement(i,{to:n},r):r:t.createElement(l,{color:"error"},o||"Unknown Error")}function RunSerializers(){const{id:e,label:n,serializer:r,serializer_label:o,serializer_choices:i}=useRunInfo(),l=t.useMemo((()=>[{type:"select one",name:"serializer",label:"Select Format",choices:i,control:{appearance:"radio"}}]),[i]),{ScrollView:c,Typography:u,AutoForm:s,ContinueForm:d,Center:f}=a.useComponents();return r?t.createElement(c,null,t.createElement(d,null,t.createElement(u,{variant:"h6"},"Data Format"),t.createElement(u,null,"This dataset will be parsed as “",o,"”."))):i?t.createElement(c,null,t.createElement(s,{action:`datawizard/${e}/updateserializer`,method:"POST",backgroundSync:!1,form:l},t.createElement(u,{variant:"h5"},n),t.createElement(u,{variant:"h6"},"Select a format to continue"))):t.createElement(f,null,t.createElement(u,{variant:"h6",color:"error"},"No serializers registered."),t.createElement(u,null,"See"," ",t.createElement("a",{href:"https://github.com/wq/django-data-wizard#target-model-registration"},"https://github.com/wq/django-data-wizard#target-model-registration")," ","for more information."))}RecordLink.propTypes={success:r.bool,object_url:r.string,object_label:r.string,fail_reason:r.string};var ne=Object.freeze({__proto__:null,RunAuto:RunAuto,RunColumns:RunColumns,RunData:RunAuto,RunDetail:RunDetail,RunIds:RunIds,RunList:RunList,RunRecords:RunRecords,RunSerializers:RunSerializers,SourceDetail:SourceDetail,FilesourceDetail:SourceDetail,UrlsourceDetail:SourceDetail});function re(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}var ae,oe={},ie={exports:{}};(ae=ie).exports=function(e){return e&&e.__esModule?e:{default:e}},ae.exports.default=ae.exports,ae.exports.__esModule=!0;var le={exports:{}},ce={exports:{}};!function(e){function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=t=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),t(n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0}(ce),function(e){var t=ce.exports.default;function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}e.exports=function(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!==t(e)&&"function"!=typeof e)return{default:e};var a=n(r);if(a&&a.has(e))return a.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var c=i?Object.getOwnPropertyDescriptor(e,l):null;c&&(c.get||c.set)?Object.defineProperty(o,l,c):o[l]=e[l]}return o.default=e,a&&a.set(e,o),o},e.exports.default=e.exports,e.exports.__esModule=!0}(le);var ue={};var se=t.forwardRef((function SvgIcon(e,n){var r=e.children,a=e.classes,l=e.className,u=e.color,d=void 0===u?"inherit":u,f=e.component,m=void 0===f?"svg":f,p=e.fontSize,h=void 0===p?"medium":p,g=e.htmlColor,b=e.titleAccess,y=e.viewBox,v=void 0===y?"0 0 24 24":y,E=i(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return t.createElement(m,o({className:c(a.root,l,"inherit"!==d&&a["color".concat(s(d))],"default"!==h&&"medium"!==h&&a["fontSize".concat(s(h))]),focusable:"false",viewBox:v,color:g,"aria-hidden":!b||void 0,role:b?"img":void 0,ref:n},E),r,b?t.createElement("title",null,b):null)}));se.muiName="SvgIcon";var de=f((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(se);function fe(e){return e&&e.ownerDocument||document}function me(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var pe="undefined"!=typeof window?t.useLayoutEffect:t.useEffect;const{"react-dom":he}=e;var ge=!0,be=!1,ye=null,ve={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Ee(e){e.metaKey||e.altKey||e.ctrlKey||(ge=!0)}function we(){ge=!1}function xe(){"hidden"===this.visibilityState&&be&&(ge=!0)}function Ce(e){var t,n,r,a=e.target;try{return a.matches(":focus-visible")}catch(e){}return ge||(n=(t=a).type,!("INPUT"!==(r=t.tagName)||!ve[n]||t.readOnly)||"TEXTAREA"===r&&!t.readOnly||!!t.isContentEditable)}function Se(){be=!0,window.clearTimeout(ye),ye=window.setTimeout((function(){be=!1}),100)}var _e=re(Object.freeze({__proto__:null,capitalize:s,createChainedFunction:function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,a=new Array(r),o=0;othis.update()),1e3*this.config.interval)}stop(){this._timer&&clearInterval(this._timer),delete this._throttle,delete this._throttleCount,delete this._lastProgress,delete this._timer}async update(){if(this._throttleCount0&&this._throttle--)),e.current==e.total&&(this.onComplete(e),t=!0)):(this.onIndeterminate(e),this._throttle++),"SUCCESS"!=e.status||t?"FAILURE"==e.status?this.onFail(e):t||this.onProgress(e):this.onComplete(e),e.location&&this.onNavigate(e)}onIndeterminate(e){this.config.onIndeterminate&&this.config.onIndeterminate(e)}onProgress(e){this.config.onProgress&&this.config.onProgress(e)}onError(e){this.config.onError&&this.config.onError(e)}onComplete(e){this.config.onComplete&&this.config.onComplete(e),this.stop()}onFail(e){this.stop(),this.config.onFail&&this.config.onFail(e)}onNavigate(e){this.stop(),this.config.onNavigate&&this.config.onNavigate(e)}}function useRunInfo(){const e=a.useRenderContext(),t=a.useModel("run",e.id||-1);return{...e,...t}}function useProgress(e){const[n,r]=t.useState(null),[o,i]=t.useState(null),[l,c]=t.useState(null),[u,s]=t.useState(!1),[d,f]=t.useState(null),m=a.useNav(),p=a.useConfig();return t.useEffect((()=>{const t=e=>{f(e),(e.error||e.message)&&c(e.error||e.message)},n=new Progress$1({url:e,onIndeterminate:t,onProgress(e){i(e.current/e.total*100),t(e)},onComplete(e){i(100),s(!1),t(e)},onFail(e){i(0),s(!0),t(e)},onError(e){s(!0),c(""+e)},onNavigate(e){const t=e.location.replace(p.router.base_url+"/","");m(t)}});return n.start(),r(n),()=>n.stop()}),[e]),t.useMemo((()=>({progress:n,value:o,status:l,error:u,data:d})),[n,o,l,u,d])}function ContinueForm({children:e,submitLabel:n="Continue"}){const{id:r,label:o}=useRunInfo(),{ScrollView:i,Form:l,Typography:c,SubmitButton:u,HorizontalView:s,View:d}=a.useComponents();return t.createElement(i,null,t.createElement(l,{action:`datawizard/${r}/auto`,method:"POST",backgroundSync:!1},t.createElement(c,{variant:"h5"},o),e,t.createElement(s,null,t.createElement(d,null),t.createElement(u,{icon:"continue"},n))))}function MappingFieldsetArray({label:e,subform:n,children:r}){const{Fieldset:o,Table:i,TableHead:l,TableBody:c,TableRow:u,TableTitle:s}=a.useComponents();return t.createElement(o,{label:e},t.createElement(i,null,t.createElement(l,null,t.createElement(u,null,n.filter((e=>"hidden"!==e.control.appearance)).map((e=>t.createElement(s,{key:e.name},e.label))))),t.createElement(c,null,r)))}function o(){return o=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function l(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t"hidden"!==e.props.control.appearance)).map((e=>t.createElement(r,{key:e.props.name},e))))},MappingFieldsetArray.Fieldset.propTypes={children:r.node};const{"@material-ui/utils":u}=e;function s(e){if("string"!=typeof e)throw new Error(u.formatMuiErrorMessage(7));return e.charAt(0).toUpperCase()+e.slice(1)}const{"@material-ui/core/styles/withStyles":d}=e;var f=d;const{"@material-ui/core/styles/colorManipulator":m}=e,{"@material-ui/styles":p}=e;function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=["xs","sm","md","lg","xl"];function b(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,a=void 0===r?"px":r,l=e.step,c=void 0===l?5:l,u=i(e,["values","unit","step"]);function s(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(a,")")}function d(e,t){var r=g.indexOf(t);return r===g.length-1?s(e):"@media (min-width:".concat("number"==typeof n[e]?n[e]:e).concat(a,") and ")+"(max-width:".concat((-1!==r&&"number"==typeof n[g[r+1]]?n[g[r+1]]:t)-c/100).concat(a,")")}return o({keys:g,values:n,up:s,down:function(e){var t=g.indexOf(e)+1,r=n[g[t]];return t===g.length?s("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-c/100).concat(a,")")},between:d,only:function(e){return d(e,e)},width:function(e){return n[e]}},u)}function y(e,t,n){var r;return o({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),o({paddingLeft:t(2),paddingRight:t(2)},n,h({},e.up("sm"),o({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},h(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),h(r,e.up("sm"),{minHeight:64}),r)},n)}var v={black:"#000",white:"#fff"},E={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},w={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},x={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},C={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},S={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},_={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},R={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function T(e){if(e.type)return e;if("#"===e.charAt(0))return T(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(u.formatMuiErrorMessage(3,e));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function O(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function A(e){var t="hsl"===(e=T(e)).type?T(function(e){var t=(e=T(e)).values,n=t[0],r=t[1]/100,a=t[2]/100,o=r*Math.min(a,1-a),i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return a-o*Math.max(Math.min(t-3,9-t,1),-1)},l="rgb",c=[Math.round(255*i(0)),Math.round(255*i(8)),Math.round(255*i(4))];return"hsla"===e.type&&(l+="a",c.push(t[3])),O({type:l,values:c})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}var M={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:v.white,default:E[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},z={text:{primary:v.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:E[800],default:"#303030"},action:{active:v.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function P(e,t,n,r){var a=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=T(e),t=k(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return O(e)}(e.main,a):"dark"===t&&(e.dark=function(e,t){if(e=T(e),t=k(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return O(e)}(e.main,o)))}function F(e){var t=e.primary,n=void 0===t?{light:w[300],main:w[500],dark:w[700]}:t,r=e.secondary,a=void 0===r?{light:x.A200,main:x.A400,dark:x.A700}:r,l=e.error,c=void 0===l?{light:C[300],main:C[500],dark:C[700]}:l,s=e.warning,d=void 0===s?{light:S[300],main:S[500],dark:S[700]}:s,f=e.info,m=void 0===f?{light:_[300],main:_[500],dark:_[700]}:f,p=e.success,h=void 0===p?{light:R[300],main:R[500],dark:R[700]}:p,g=e.type,b=void 0===g?"light":g,y=e.contrastThreshold,k=void 0===y?3:y,T=e.tonalOffset,O=void 0===T?.2:T,F=i(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function I(e){var t=function(e,t){var n=A(e),r=A(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,z.text.primary)>=k?z.text.primary:M.text.primary;return t}var j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=o({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(u.formatMuiErrorMessage(4,t));if("string"!=typeof e.main)throw new Error(u.formatMuiErrorMessage(5,JSON.stringify(e.main)));return P(e,"light",n,O),P(e,"dark",r,O),e.contrastText||(e.contrastText=I(e.main)),e},L={dark:z,light:M};return u.deepmerge(o({common:v,type:b,primary:j(n),secondary:j(a,"A400","A200","A700"),error:j(c),warning:j(d),info:j(m),success:j(h),grey:E,contrastThreshold:k,getContrastText:I,augmentColor:j,tonalOffset:O},L[b]),F)}function I(e){return Math.round(1e5*e)/1e5}function j(e){return I(e)}var L={textTransform:"uppercase"};function D(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,a=void 0===r?'"Roboto", "Helvetica", "Arial", sans-serif':r,l=n.fontSize,c=void 0===l?14:l,s=n.fontWeightLight,d=void 0===s?300:s,f=n.fontWeightRegular,m=void 0===f?400:f,p=n.fontWeightMedium,h=void 0===p?500:p,g=n.fontWeightBold,b=void 0===g?700:g,y=n.htmlFontSize,v=void 0===y?16:y,E=n.allVariants,w=n.pxToRem,x=i(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),C=c/14,S=w||function(e){return"".concat(e/v*C,"rem")},_=function(e,t,n,r,i){return o({fontFamily:a,fontWeight:e,fontSize:S(t),lineHeight:n},'"Roboto", "Helvetica", "Arial", sans-serif'===a?{letterSpacing:"".concat(I(r/t),"em")}:{},i,E)},R={h1:_(d,96,1.167,-1.5),h2:_(d,60,1.2,-.5),h3:_(m,48,1.167,0),h4:_(m,34,1.235,.25),h5:_(m,24,1.334,0),h6:_(h,20,1.6,.15),subtitle1:_(m,16,1.75,.15),subtitle2:_(h,14,1.57,.1),body1:_(m,16,1.5,.15),body2:_(m,14,1.43,.15),button:_(h,14,1.75,.4,L),caption:_(m,12,1.66,.4),overline:_(m,12,2.66,1,L)};return u.deepmerge(o({htmlFontSize:v,pxToRem:S,round:j,fontFamily:a,fontSize:c,fontWeightLight:d,fontWeightRegular:m,fontWeightMedium:h,fontWeightBold:b},R),x,{clone:!1})}function N(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var W=["none",N(0,2,1,-1,0,1,1,0,0,1,3,0),N(0,3,1,-2,0,2,2,0,0,1,5,0),N(0,3,3,-2,0,3,4,0,0,1,8,0),N(0,2,4,-1,0,4,5,0,0,1,10,0),N(0,3,5,-1,0,5,8,0,0,1,14,0),N(0,3,5,-1,0,6,10,0,0,1,18,0),N(0,4,5,-2,0,7,10,1,0,2,16,1),N(0,5,5,-3,0,8,10,1,0,3,14,2),N(0,5,6,-3,0,9,12,1,0,3,16,2),N(0,6,6,-3,0,10,14,1,0,4,18,3),N(0,6,7,-4,0,11,15,1,0,4,20,3),N(0,7,8,-4,0,12,17,2,0,5,22,4),N(0,7,8,-4,0,13,19,2,0,5,24,4),N(0,7,9,-4,0,14,21,2,0,5,26,4),N(0,8,9,-5,0,15,22,2,0,6,28,5),N(0,8,10,-5,0,16,24,2,0,6,30,5),N(0,8,11,-5,0,17,26,2,0,6,32,5),N(0,9,11,-5,0,18,28,2,0,7,34,6),N(0,9,12,-6,0,19,29,2,0,7,36,6),N(0,10,13,-6,0,20,31,3,0,8,38,7),N(0,10,13,-6,0,21,33,3,0,8,40,7),N(0,10,14,-6,0,22,35,3,0,8,42,7),N(0,11,14,-7,0,23,36,3,0,9,44,8),N(0,11,15,-7,0,24,38,3,0,9,46,8)],B={borderRadius:4};function V(e){var t=e.spacing||8;return"number"==typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"==typeof t?t:function(){}}function U(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=V({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?$.standard:n,a=t.easing,o=void 0===a?H.easeInOut:a,l=t.delay,c=void 0===l?0:l;return i(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:q(r)," ").concat(o," ").concat("string"==typeof c?c:q(c))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},X={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};var J=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,a=void 0===r?{}:r,o=e.palette,l=void 0===o?{}:o,c=e.spacing,s=e.typography,d=void 0===s?{}:s,f=i(e,["breakpoints","mixins","palette","spacing","typography"]),m=F(l),p=b(n),h=U(c),g=u.deepmerge({breakpoints:p,direction:"ltr",mixins:y(p,h,a),overrides:{},palette:m,props:{},shadows:W,typography:D(m,d),spacing:h,shape:B,transitions:K,zIndex:X},f),v=arguments.length,E=new Array(v>1?v-1:0),w=1;wfunction(e){const t=(e||[]).find((e=>e.types)),n=t?t.types:[],r=[];n.forEach((({name:e,choices:t})=>{t.forEach((({id:t,label:n})=>{r.push({name:t,label:n,group:e})}))}));const a=[{type:"repeat",name:"columns",label:"Columns",control:{appearance:"mapping-fieldset-array"},children:[{type:"string",name:"column",label:"Column",control:{appearance:"read-only"}},{type:"select one",name:"type",label:"Type",choices:[{name:"attribute",label:"EAV Column"},{name:"meta",label:"Column/Header"},{name:"instance",label:"FK Value"},{name:"unresolved",label:"Unresolved"},{name:"unknown",label:"Unknown"}],control:{appearance:"hidden"}},{type:"string",name:"name",label:"Spreadsheet Value",control:{appearance:"read-only"}},{type:"select one",name:"mapping",label:"Mapping",choices:r,control:{appearance:"mapping-select"}}]}],o={columns:e.map((({rel_id:e,column:t,type:n,name:r,mapping:a})=>({id:e,column:t,type:n,name:r,mapping:a})))};return[a,o]}(o)),[o]),{ScrollView:c,Typography:u,AutoForm:s,TableRow:d,TableCell:f,ContinueForm:m,MappingFieldsetArray:p}=a.useComponents();return r?t.createElement(c,null,t.createElement(s,{action:`datawizard/${e}/updatecolumns`,method:"POST",backgroundSync:!1,form:i,data:l},t.createElement(u,{variant:"h5"},n),t.createElement(u,{variant:"h6"},"Unknown Columns"),t.createElement(u,null,"This file contains ",r," column",r>1?"s":""," that"," ",r>1?"are":"is"," not yet recognized by this database."))):t.createElement(c,null,t.createElement(m,null,t.createElement(u,{variant:"h6"},"Mapped Columns"),t.createElement(u,null,"The following columns are mapped."),t.createElement(p,{label:i[0].label,subform:i[0].children},l.columns.map((({id:e,column:n,name:r,mapping:a})=>t.createElement(d,{key:e},t.createElement(f,null,n),t.createElement(f,null,r),t.createElement(f,null,a)))))))}function RunDetail(){const{ScrollView:e,Typography:n,Table:r,TableBody:o,TableRow:i,TableCell:l,Link:c,Center:u,ContinueForm:s}=a.useComponents(),d=useRunInfo(),{id:f,label:m,serializer_label:p,record_count:h,last_update:g}=d,b=a.useReverse();return null!==h?t.createElement(u,null,t.createElement(n,{variant:"h5"},m),t.createElement(r,null,t.createElement(o,null,t.createElement(i,null,t.createElement(l,null,"Serializer"),t.createElement(l,null,"function"==typeof p?p.call(d):p)),t.createElement(i,null,t.createElement(l,null,"Records"),t.createElement(l,null,t.createElement(c,{to:b("run_records",f)},h," record",1===h?"":"s"," imported."))),t.createElement(i,null,t.createElement(l,null,"Last Updated"),t.createElement(l,null,new Date(g).toLocaleString()))))):t.createElement(e,null,t.createElement(s,{submitLabel:"Start Import"},t.createElement(n,{variant:"h6"},"Click to start the import wizard.")))}function RunIds(){const{id:e,label:n,result:{unknown_count:r,types:o}}=useRunInfo(),[i,l]=t.useMemo((()=>function(e){const t=[],n={};return e.forEach((({type_id:e,type_label:r,ids:a})=>{const o=e.replace(".","_"),i=(a||[]).find((e=>e.choices)),l=i?i.choices.map((({id:e,label:t})=>({name:e,label:t}))):[];t.push({type:"repeat",name:o,label:`${r} Identifiers`,control:{appearance:"mapping-fieldset-array"},children:[{type:"string",name:"name",label:"Identifier",control:{appearance:"read-only"}},{type:"select one",name:"type",label:"Type",choices:[{name:"mapped",label:"Mapped"},{name:"unknown",label:"Unknown"}],control:{appearance:"hidden"}},{type:"int",name:"count",label:"Occurrences",control:{appearance:"read-only"}},{type:"select one",name:"mapping",label:r,choices:l,control:{appearance:"mapping-select"}}]}),n[o]=a.map((({ident_id:e,value:t,count:n,match:r,unknown:a})=>({id:e,name:t,type:a?"unknown":"resolved",count:n,mapping:r})))})),[t,n]}(o)),[o]),{ScrollView:c,Typography:u,AutoForm:s,TableRow:d,TableCell:f,ContinueForm:m,MappingFieldsetArray:p}=a.useComponents();return r?t.createElement(c,null,t.createElement(s,{action:`datawizard/${e}/updateids`,method:"POST",backgroundSync:!1,form:i,data:l},t.createElement(u,{variant:"h5"},n),t.createElement(u,{variant:"h6"},"Unknown Identifiers"),t.createElement(u,null,"This file contains ",r," identifier",r>1?"s":""," that"," ",r>1?"are":"is"," not yet recognized by this database."))):t.createElement(c,null,t.createElement(m,null,t.createElement(u,{variant:"h6"},"Mapped Identifiers"),t.createElement(u,null,"The following identifiers are mapped."),i.map((({name:e,label:n,children:r})=>t.createElement(p,{key:e,label:n,subform:r},l[e].map((({id:e,name:n,count:r,mapping:a})=>t.createElement(d,{key:e},t.createElement(f,null,n),t.createElement(f,null,r),t.createElement(f,null,a)))))))))}function RunList(){const{Typography:e,Link:n,Table:r,TableHead:o,TableBody:i,TableRow:l,TableTitle:c,TableCell:u,Center:s}=a.useComponents(),{list:d,empty:f}=a.useList(),m=a.useReverse();return t.createElement(s,null,t.createElement(e,{variant:"h4"},"Django Data Wizard"),t.createElement(r,null,t.createElement(o,null,t.createElement(l,null,t.createElement(c,null,"Run"),t.createElement(c,null,"Serializer"),t.createElement(c,null,"Records"),t.createElement(c,null,"Last Update"))),t.createElement(i,null,f&&t.createElement(u,{colspan:4},"No previous runs."),d.map((({id:e,label:r,serializer_label:a,record_count:o,last_update:i})=>t.createElement(l,{key:e},t.createElement(u,null,t.createElement(n,{to:m("run_detail",e)},r)),t.createElement(u,null,a||"-"),t.createElement(u,null,"number"==typeof o?o:o||"-"),t.createElement(u,null,i?new Date(i).toLocaleString():"-")))))))}function RunRecords(){const{Typography:e,Table:n,TableHead:r,TableBody:o,TableRow:i,TableTitle:l,TableCell:c,Center:u,CloseWizard:s}=a.useComponents(),d=useRunInfo(),{label:f,records:m}=d,p=m&&m.length>0;return t.createElement(u,null,t.createElement(e,{variant:"h5"},f),t.createElement(e,{variant:"h6"},"Imported Records"),t.createElement(e,null,"Import Complete!"),t.createElement(n,null,t.createElement(r,null,t.createElement(i,null,t.createElement(l,null,"Row"),t.createElement(l,null,"Record"))),t.createElement(o,null,!p&&t.createElement(c,{colspan:2},"No records imported."),p&&m.map((e=>t.createElement(i,{key:e.row},t.createElement(c,null,e.row),t.createElement(c,null,t.createElement(RecordLink,e))))))),t.createElement(s,null))}function RecordLink({success:e,object_url:n,object_label:r,fail_reason:o}){const{Link:i,Typography:l}=a.useComponents();return e?n?t.createElement(i,{to:n},r):r:t.createElement(l,{color:"error"},o||"Unknown Error")}function RunSerializers(){const{id:e,label:n,serializer:r,serializer_label:o,serializer_choices:i}=useRunInfo(),l=t.useMemo((()=>[{type:"select one",name:"serializer",label:"Select Format",choices:i,control:{appearance:"radio"}}]),[i]),{ScrollView:c,Typography:u,AutoForm:s,ContinueForm:d,Center:f}=a.useComponents();return r?t.createElement(c,null,t.createElement(d,null,t.createElement(u,{variant:"h6"},"Data Format"),t.createElement(u,null,"This dataset will be parsed as “",o,"”."))):i?t.createElement(c,null,t.createElement(s,{action:`datawizard/${e}/updateserializer`,method:"POST",backgroundSync:!1,form:l},t.createElement(u,{variant:"h5"},n),t.createElement(u,{variant:"h6"},"Select a format to continue"))):t.createElement(f,null,t.createElement(u,{variant:"h6",color:"error"},"No serializers registered."),t.createElement(u,null,"See"," ",t.createElement("a",{href:"https://github.com/wq/django-data-wizard#target-model-registration"},"https://github.com/wq/django-data-wizard#target-model-registration")," ","for more information."))}RecordLink.propTypes={success:r.bool,object_url:r.string,object_label:r.string,fail_reason:r.string};var ne=Object.freeze({__proto__:null,RunAuto:RunAuto,RunColumns:RunColumns,RunData:RunAuto,RunDetail:RunDetail,RunIds:RunIds,RunList:RunList,RunRecords:RunRecords,RunSerializers:RunSerializers,SourceDetail:SourceDetail,FilesourceDetail:SourceDetail,UrlsourceDetail:SourceDetail});function re(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}var ae,oe={},ie={exports:{}};(ae=ie).exports=function(e){return e&&e.__esModule?e:{default:e}},ae.exports.default=ae.exports,ae.exports.__esModule=!0;var le={exports:{}},ce={exports:{}};!function(e){function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=t=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),t(n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0}(ce),function(e){var t=ce.exports.default;function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}e.exports=function(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!==t(e)&&"function"!=typeof e)return{default:e};var a=n(r);if(a&&a.has(e))return a.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var c=i?Object.getOwnPropertyDescriptor(e,l):null;c&&(c.get||c.set)?Object.defineProperty(o,l,c):o[l]=e[l]}return o.default=e,a&&a.set(e,o),o},e.exports.default=e.exports,e.exports.__esModule=!0}(le);var ue={};var se=t.forwardRef((function SvgIcon(e,n){var r=e.children,a=e.classes,l=e.className,u=e.color,d=void 0===u?"inherit":u,f=e.component,m=void 0===f?"svg":f,p=e.fontSize,h=void 0===p?"medium":p,g=e.htmlColor,b=e.titleAccess,y=e.viewBox,v=void 0===y?"0 0 24 24":y,E=i(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return t.createElement(m,o({className:c(a.root,l,"inherit"!==d&&a["color".concat(s(d))],"default"!==h&&"medium"!==h&&a["fontSize".concat(s(h))]),focusable:"false",viewBox:v,color:g,"aria-hidden":!b||void 0,role:b?"img":void 0,ref:n},E),r,b?t.createElement("title",null,b):null)}));se.muiName="SvgIcon";var de=f((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(se);function fe(e){return e&&e.ownerDocument||document}function me(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var pe="undefined"!=typeof window?t.useLayoutEffect:t.useEffect;const{"react-dom":he}=e;var ge=!0,be=!1,ye=null,ve={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Ee(e){e.metaKey||e.altKey||e.ctrlKey||(ge=!0)}function we(){ge=!1}function xe(){"hidden"===this.visibilityState&&be&&(ge=!0)}function Ce(e){var t,n,r,a=e.target;try{return a.matches(":focus-visible")}catch(e){}return ge||(n=(t=a).type,!("INPUT"!==(r=t.tagName)||!ve[n]||t.readOnly)||"TEXTAREA"===r&&!t.readOnly||!!t.isContentEditable)}function Se(){be=!0,window.clearTimeout(ye),ye=window.setTimeout((function(){be=!1}),100)}var _e=re(Object.freeze({__proto__:null,capitalize:s,createChainedFunction:function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,a=new Array(r),o=0;o\n
\n \n {children}\n
\n \n \n );\n}\n\nCenter.propTypes = {\n children: PropTypes.node,\n};\n","import React from 'react';\nimport { useComponents, useReverse } from '@wq/react';\n\nexport default function CloseWizard() {\n const { CancelButton, HorizontalView, View } = useComponents(),\n reverse = useReverse();\n\n return (\n \n \n Back\n \n \n \n );\n}\n","export class Progress {\n constructor(config) {\n this.config = {\n interval: 0.5,\n ...config,\n };\n if (!this.config.url) {\n throw new Error('No URL specified!');\n }\n }\n start() {\n this._throttle = 0;\n this._throttleCount = 0;\n this._lastProgress = null;\n this._timer = setInterval(\n () => this.update(),\n this.config.interval * 1000\n );\n }\n stop() {\n if (this._timer) {\n clearInterval(this._timer);\n }\n delete this._throttle;\n delete this._throttleCount;\n delete this._lastProgress;\n delete this._timer;\n }\n async update() {\n if (this._throttleCount < this._throttle) {\n this._throttleCount += 1;\n return;\n } else {\n this._throttleCount = 0;\n }\n let data;\n try {\n const response = await fetch(this.config.url);\n data = await response.json();\n } catch (e) {\n this.onError(e);\n return;\n }\n\n let done = false;\n if (!data.total) {\n this.onIndeterminate(data);\n this._throttle++;\n } else {\n // Set to progress level\n if (this._lastProgress && data.current < this._lastProgress) {\n // Assume out-of order response; no update\n /* jshint noempty: false */\n } else if (this._lastProgress == data.current) {\n // No change since last check; check less often\n this._throttle++;\n } else {\n // Change since last check; check more often\n this._lastProgress = data.current;\n if (this._throttle > 0) {\n this._throttle--;\n }\n }\n\n if (data.current == data.total) {\n this.onComplete(data);\n done = true;\n }\n }\n\n if (data.status == 'SUCCESS' && !done) {\n this.onComplete(data);\n } else if (data.status == 'FAILURE') {\n this.onFail(data);\n } else if (!done) {\n this.onProgress(data);\n }\n\n if (data.location) {\n this.onNavigate(data);\n }\n }\n\n onIndeterminate(data) {\n if (this.config.onIndeterminate) {\n this.config.onIndeterminate(data);\n }\n }\n\n onProgress(data) {\n if (this.config.onProgress) {\n this.config.onProgress(data);\n }\n }\n\n onError(error) {\n if (this.config.onError) {\n this.config.onError(error);\n }\n }\n\n onComplete(data) {\n if (this.config.onComplete) {\n this.config.onComplete(data);\n }\n this.stop();\n }\n\n onFail(data) {\n this.stop();\n if (this.config.onFail) {\n this.config.onFail(data);\n }\n }\n\n onNavigate(data) {\n if (this.config.onNavigate) {\n this.config.onNavigate(data);\n }\n }\n}\n","import { useState, useEffect, useMemo } from 'react';\nimport { Progress } from '@wq/progress';\nimport { useRenderContext, useModel, useNav } from '@wq/react';\n\nexport function useRunInfo() {\n const context = useRenderContext(),\n instance = useModel('run', context.id || -1);\n return {\n ...context,\n ...instance,\n };\n}\n\nexport function useProgress(url) {\n const [progress, setProgress] = useState(null),\n [value, setValue] = useState(null),\n [status, setStatus] = useState(null),\n [error, setError] = useState(false),\n [data, setData] = useState(null),\n nav = useNav();\n\n useEffect(() => {\n const updateStatus = (data) => {\n setData(data);\n if (data.error || data.message) {\n setStatus(data.error || data.message);\n }\n };\n const progress = new Progress({\n url,\n onIndeterminate: updateStatus,\n onProgress(data) {\n setValue((data.current / data.total) * 100);\n updateStatus(data);\n },\n onComplete(data) {\n setValue(100);\n setError(false);\n updateStatus(data);\n },\n onFail(data) {\n setValue(0);\n setError(true);\n updateStatus(data);\n },\n onError(err) {\n setError(true);\n setStatus('' + err);\n },\n onNavigate(data) {\n nav(data.location.slice(1));\n },\n });\n progress.start();\n setProgress(progress);\n return () => progress.stop();\n }, [url]);\n\n return useMemo(() => {\n return { progress, value, status, error, data };\n }, [progress, value, status, error, data]);\n}\n","import React from 'react';\nimport { useComponents } from '@wq/react';\nimport { useRunInfo } from '../hooks';\nimport PropTypes from 'prop-types';\n\nexport default function ContinueForm({ children, submitLabel = 'Continue' }) {\n const { id, label } = useRunInfo(),\n { ScrollView, Form, Typography, SubmitButton, HorizontalView, View } =\n useComponents();\n return (\n \n \n {label}\n {children}\n \n \n {submitLabel}\n \n \n \n );\n}\n\nContinueForm.propTypes = {\n children: PropTypes.node,\n submitLabel: PropTypes.string,\n};\n","import React from 'react';\nimport { useComponents } from '@wq/react';\nimport PropTypes from 'prop-types';\n\nexport default function MappingFieldsetArray({ label, subform, children }) {\n const { Fieldset, Table, TableHead, TableBody, TableRow, TableTitle } =\n useComponents();\n return (\n
\n \n \n \n {subform\n .filter(\n (field) => field.control.appearance !== 'hidden'\n )\n .map((field) => (\n \n {field.label}\n \n ))}\n \n \n {children}\n
\n
\n );\n}\n\nMappingFieldsetArray.propTypes = {\n label: PropTypes.string,\n subform: PropTypes.arrayOf(PropTypes.object),\n children: PropTypes.node,\n};\n\nMappingFieldsetArray.Fieldset = function Fieldset({ children }) {\n const { TableRow, TableCell } = useComponents();\n return (\n \n {React.Children.toArray(children)\n .filter((child) => child.props.control.appearance !== 'hidden')\n .map((child) => (\n {child}\n ))}\n \n );\n};\nMappingFieldsetArray.Fieldset.propTypes = {\n children: PropTypes.node,\n};\n","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","function toVal(mix) {\n\tvar k, y, str='';\n\n\tif (typeof mix === 'string' || typeof mix === 'number') {\n\t\tstr += mix;\n\t} else if (typeof mix === 'object') {\n\t\tif (Array.isArray(mix)) {\n\t\t\tfor (k=0; k < mix.length; k++) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tif (y = toVal(mix[k])) {\n\t\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\t\tstr += y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor (k in mix) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\tstr += k;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn str;\n}\n\nexport default function () {\n\tvar i=0, tmp, x, str='';\n\twhile (i < arguments.length) {\n\t\tif (tmp = arguments[i++]) {\n\t\t\tif (x = toVal(tmp)) {\n\t\t\t\tstr && (str += ' ');\n\t\t\t\tstr += x\n\t\t\t}\n\t\t}\n\t}\n\treturn str;\n}\n","import { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@material-ui/utils\";\n// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.\n//\n// A strict capitalization should uppercase the first letter of each word a the sentence.\n// We only handle the first word.\nexport default function capitalize(string) {\n if (typeof string !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: capitalize(string) expects a string argument.\" : _formatMuiErrorMessage(7));\n }\n\n return string.charAt(0).toUpperCase() + string.slice(1);\n}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n// Sorted ASC by size. That's important.\n// It can't be configured as it's used statically for propTypes.\nexport var keys = ['xs', 'sm', 'md', 'lg', 'xl']; // Keep in mind that @media is inclusive by the CSS specification.\n\nexport default function createBreakpoints(breakpoints) {\n var _breakpoints$values = breakpoints.values,\n values = _breakpoints$values === void 0 ? {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920\n } : _breakpoints$values,\n _breakpoints$unit = breakpoints.unit,\n unit = _breakpoints$unit === void 0 ? 'px' : _breakpoints$unit,\n _breakpoints$step = breakpoints.step,\n step = _breakpoints$step === void 0 ? 5 : _breakpoints$step,\n other = _objectWithoutProperties(breakpoints, [\"values\", \"unit\", \"step\"]);\n\n function up(key) {\n var value = typeof values[key] === 'number' ? values[key] : key;\n return \"@media (min-width:\".concat(value).concat(unit, \")\");\n }\n\n function down(key) {\n var endIndex = keys.indexOf(key) + 1;\n var upperbound = values[keys[endIndex]];\n\n if (endIndex === keys.length) {\n // xl down applies to all sizes\n return up('xs');\n }\n\n var value = typeof upperbound === 'number' && endIndex > 0 ? upperbound : key;\n return \"@media (max-width:\".concat(value - step / 100).concat(unit, \")\");\n }\n\n function between(start, end) {\n var endIndex = keys.indexOf(end);\n\n if (endIndex === keys.length - 1) {\n return up(start);\n }\n\n return \"@media (min-width:\".concat(typeof values[start] === 'number' ? values[start] : start).concat(unit, \") and \") + \"(max-width:\".concat((endIndex !== -1 && typeof values[keys[endIndex + 1]] === 'number' ? values[keys[endIndex + 1]] : end) - step / 100).concat(unit, \")\");\n }\n\n function only(key) {\n return between(key, key);\n }\n\n var warnedOnce = false;\n\n function width(key) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.warn([\"Material-UI: The `theme.breakpoints.width` utility is deprecated because it's redundant.\", 'Use the `theme.breakpoints.values` instead.'].join('\\n'));\n }\n }\n\n return values[key];\n }\n\n return _extends({\n keys: keys,\n values: values,\n up: up,\n down: down,\n between: between,\n only: only,\n width: width\n }, other);\n}","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nexport default function createMixins(breakpoints, spacing, mixins) {\n var _toolbar;\n\n return _extends({\n gutters: function gutters() {\n var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n console.warn(['Material-UI: theme.mixins.gutters() is deprecated.', 'You can use the source of the mixin directly:', \"\\n paddingLeft: theme.spacing(2),\\n paddingRight: theme.spacing(2),\\n [theme.breakpoints.up('sm')]: {\\n paddingLeft: theme.spacing(3),\\n paddingRight: theme.spacing(3),\\n },\\n \"].join('\\n'));\n return _extends({\n paddingLeft: spacing(2),\n paddingRight: spacing(2)\n }, styles, _defineProperty({}, breakpoints.up('sm'), _extends({\n paddingLeft: spacing(3),\n paddingRight: spacing(3)\n }, styles[breakpoints.up('sm')])));\n },\n toolbar: (_toolbar = {\n minHeight: 56\n }, _defineProperty(_toolbar, \"\".concat(breakpoints.up('xs'), \" and (orientation: landscape)\"), {\n minHeight: 48\n }), _defineProperty(_toolbar, breakpoints.up('sm'), {\n minHeight: 64\n }), _toolbar)\n }, mixins);\n}","var common = {\n black: '#000',\n white: '#fff'\n};\nexport default common;","var grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#d5d5d5',\n A200: '#aaaaaa',\n A400: '#303030',\n A700: '#616161'\n};\nexport default grey;","var indigo = {\n 50: '#e8eaf6',\n 100: '#c5cae9',\n 200: '#9fa8da',\n 300: '#7986cb',\n 400: '#5c6bc0',\n 500: '#3f51b5',\n 600: '#3949ab',\n 700: '#303f9f',\n 800: '#283593',\n 900: '#1a237e',\n A100: '#8c9eff',\n A200: '#536dfe',\n A400: '#3d5afe',\n A700: '#304ffe'\n};\nexport default indigo;","var pink = {\n 50: '#fce4ec',\n 100: '#f8bbd0',\n 200: '#f48fb1',\n 300: '#f06292',\n 400: '#ec407a',\n 500: '#e91e63',\n 600: '#d81b60',\n 700: '#c2185b',\n 800: '#ad1457',\n 900: '#880e4f',\n A100: '#ff80ab',\n A200: '#ff4081',\n A400: '#f50057',\n A700: '#c51162'\n};\nexport default pink;","var red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nexport default red;","var orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nexport default orange;","var blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nexport default blue;","var green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nexport default green;","import { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@material-ui/utils\";\n\n/* eslint-disable no-use-before-define */\n\n/**\n * Returns a number whose value is limited to the given range.\n *\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clamp(value) {\n var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n\n if (process.env.NODE_ENV !== 'production') {\n if (value < min || value > max) {\n console.error(\"Material-UI: The value provided \".concat(value, \" is out of range [\").concat(min, \", \").concat(max, \"].\"));\n }\n }\n\n return Math.min(Math.max(min, value), max);\n}\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n *\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\n\n\nexport function hexToRgb(color) {\n color = color.substr(1);\n var re = new RegExp(\".{1,\".concat(color.length >= 6 ? 2 : 1, \"}\"), 'g');\n var colors = color.match(re);\n\n if (colors && colors[0].length === 1) {\n colors = colors.map(function (n) {\n return n + n;\n });\n }\n\n return colors ? \"rgb\".concat(colors.length === 4 ? 'a' : '', \"(\").concat(colors.map(function (n, index) {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', '), \")\") : '';\n}\n\nfunction intToHex(int) {\n var hex = int.toString(16);\n return hex.length === 1 ? \"0\".concat(hex) : hex;\n}\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n *\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\n\n\nexport function rgbToHex(color) {\n // Idempotent\n if (color.indexOf('#') === 0) {\n return color;\n }\n\n var _decomposeColor = decomposeColor(color),\n values = _decomposeColor.values;\n\n return \"#\".concat(values.map(function (n) {\n return intToHex(n);\n }).join(''));\n}\n/**\n * Converts a color from hsl format to rgb format.\n *\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\n\nexport function hslToRgb(color) {\n color = decomposeColor(color);\n var _color = color,\n values = _color.values;\n var h = values[0];\n var s = values[1] / 100;\n var l = values[2] / 100;\n var a = s * Math.min(l, 1 - l);\n\n var f = function f(n) {\n var k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (n + h / 30) % 12;\n return l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n };\n\n var type = 'rgb';\n var rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n\n return recomposeColor({\n type: type,\n values: rgb\n });\n}\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\n\nexport function decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n\n var marker = color.indexOf('(');\n var type = color.substring(0, marker);\n\n if (['rgb', 'rgba', 'hsl', 'hsla'].indexOf(type) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: Unsupported `\".concat(color, \"` color.\\nWe support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla().\") : _formatMuiErrorMessage(3, color));\n }\n\n var values = color.substring(marker + 1, color.length - 1).split(',');\n values = values.map(function (value) {\n return parseFloat(value);\n });\n return {\n type: type,\n values: values\n };\n}\n/**\n * Converts a color object with type and values to a string.\n *\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\n\nexport function recomposeColor(color) {\n var type = color.type;\n var values = color.values;\n\n if (type.indexOf('rgb') !== -1) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map(function (n, i) {\n return i < 3 ? parseInt(n, 10) : n;\n });\n } else if (type.indexOf('hsl') !== -1) {\n values[1] = \"\".concat(values[1], \"%\");\n values[2] = \"\".concat(values[2], \"%\");\n }\n\n return \"\".concat(type, \"(\").concat(values.join(', '), \")\");\n}\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n *\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\n\nexport function getContrastRatio(foreground, background) {\n var lumA = getLuminance(foreground);\n var lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\n\nexport function getLuminance(color) {\n color = decomposeColor(color);\n var rgb = color.type === 'hsl' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(function (val) {\n val /= 255; // normalized\n\n return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);\n }); // Truncate at 3 digits\n\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nexport function emphasize(color) {\n var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15;\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\nvar warnedOnce = false;\n/**\n * Set the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} value - value to set the alpha channel to in the range 0 -1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n *\n * @deprecated\n * Use `import { alpha } from '@material-ui/core/styles'` instead.\n */\n\nexport function fade(color, value) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: The `fade` color utility was renamed to `alpha` to better describe its functionality.', '', \"You should use `import { alpha } from '@material-ui/core/styles'`\"].join('\\n'));\n }\n }\n\n return alpha(color, value);\n}\n/**\n * Set the absolute transparency of a color.\n * Any existing alpha value is overwritten.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} value - value to set the alpha channel to in the range 0-1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nexport function alpha(color, value) {\n color = decomposeColor(color);\n value = clamp(value);\n\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n\n color.values[3] = value;\n return recomposeColor(color);\n}\n/**\n * Darkens a color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nexport function darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clamp(coefficient);\n\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (var i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n\n return recomposeColor(color);\n}\n/**\n * Lightens a color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nexport function lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clamp(coefficient);\n\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (var i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n }\n\n return recomposeColor(color);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@material-ui/utils\";\nimport { deepmerge } from '@material-ui/utils';\nimport common from '../colors/common';\nimport grey from '../colors/grey';\nimport indigo from '../colors/indigo';\nimport pink from '../colors/pink';\nimport red from '../colors/red';\nimport orange from '../colors/orange';\nimport blue from '../colors/blue';\nimport green from '../colors/green';\nimport { darken, getContrastRatio, lighten } from './colorManipulator';\nexport var light = {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.54)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)',\n // Text hints.\n hint: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: common.white,\n default: grey[50]\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n};\nexport var dark = {\n text: {\n primary: common.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n hint: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: grey[800],\n default: '#303030'\n },\n action: {\n active: common.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n};\n\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n var tonalOffsetLight = tonalOffset.light || tonalOffset;\n var tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = lighten(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = darken(intent.main, tonalOffsetDark);\n }\n }\n}\n\nexport default function createPalette(palette) {\n var _palette$primary = palette.primary,\n primary = _palette$primary === void 0 ? {\n light: indigo[300],\n main: indigo[500],\n dark: indigo[700]\n } : _palette$primary,\n _palette$secondary = palette.secondary,\n secondary = _palette$secondary === void 0 ? {\n light: pink.A200,\n main: pink.A400,\n dark: pink.A700\n } : _palette$secondary,\n _palette$error = palette.error,\n error = _palette$error === void 0 ? {\n light: red[300],\n main: red[500],\n dark: red[700]\n } : _palette$error,\n _palette$warning = palette.warning,\n warning = _palette$warning === void 0 ? {\n light: orange[300],\n main: orange[500],\n dark: orange[700]\n } : _palette$warning,\n _palette$info = palette.info,\n info = _palette$info === void 0 ? {\n light: blue[300],\n main: blue[500],\n dark: blue[700]\n } : _palette$info,\n _palette$success = palette.success,\n success = _palette$success === void 0 ? {\n light: green[300],\n main: green[500],\n dark: green[700]\n } : _palette$success,\n _palette$type = palette.type,\n type = _palette$type === void 0 ? 'light' : _palette$type,\n _palette$contrastThre = palette.contrastThreshold,\n contrastThreshold = _palette$contrastThre === void 0 ? 3 : _palette$contrastThre,\n _palette$tonalOffset = palette.tonalOffset,\n tonalOffset = _palette$tonalOffset === void 0 ? 0.2 : _palette$tonalOffset,\n other = _objectWithoutProperties(palette, [\"primary\", \"secondary\", \"error\", \"warning\", \"info\", \"success\", \"type\", \"contrastThreshold\", \"tonalOffset\"]); // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n\n\n function getContrastText(background) {\n var contrastText = getContrastRatio(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n\n if (process.env.NODE_ENV !== 'production') {\n var contrast = getContrastRatio(background, contrastText);\n\n if (contrast < 3) {\n console.error([\"Material-UI: The contrast ratio of \".concat(contrast, \":1 for \").concat(contrastText, \" on \").concat(background), 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n\n return contrastText;\n }\n\n var augmentColor = function augmentColor(color) {\n var mainShade = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;\n var lightShade = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;\n var darkShade = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 700;\n color = _extends({}, color);\n\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n\n if (!color.main) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\nThe color object needs to have a `main` property or a `\".concat(mainShade, \"` property.\") : _formatMuiErrorMessage(4, mainShade));\n }\n\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\n`color.main` should be a string, but `\".concat(JSON.stringify(color.main), \"` was provided instead.\\n\\nDid you intend to use one of the following approaches?\\n\\nimport {\\xA0green } from \\\"@material-ui/core/colors\\\";\\n\\nconst theme1 = createTheme({ palette: {\\n primary: green,\\n} });\\n\\nconst theme2 = createTheme({ palette: {\\n primary: { main: green[500] },\\n} });\") : _formatMuiErrorMessage(5, JSON.stringify(color.main)));\n }\n\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n\n return color;\n };\n\n var types = {\n dark: dark,\n light: light\n };\n\n if (process.env.NODE_ENV !== 'production') {\n if (!types[type]) {\n console.error(\"Material-UI: The palette type `\".concat(type, \"` is not supported.\"));\n }\n }\n\n var paletteOutput = deepmerge(_extends({\n // A collection of common colors.\n common: common,\n // The palette type, can be light or dark.\n type: type,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor(primary),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor(secondary, 'A400', 'A200', 'A700'),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor(error),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor(warning),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor(info),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor(success),\n // The grey colors.\n grey: grey,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold: contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText: getContrastText,\n // Generate a rich color object.\n augmentColor: augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset: tonalOffset\n }, types[type]), other);\n return paletteOutput;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport { deepmerge } from '@material-ui/utils';\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\n\nvar warnedOnce = false;\n\nfunction roundWithDeprecationWarning(value) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n console.warn(['Material-UI: The `theme.typography.round` helper is deprecated.', 'Head to https://material-ui.com/r/migration-v4/#theme for a migration path.'].join('\\n'));\n warnedOnce = true;\n }\n }\n\n return round(value);\n}\n\nvar caseAllCaps = {\n textTransform: 'uppercase'\n};\nvar defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n/**\n * @see @link{https://material.io/design/typography/the-type-system.html}\n * @see @link{https://material.io/design/typography/understanding-typography.html}\n */\n\nexport default function createTypography(palette, typography) {\n var _ref = typeof typography === 'function' ? typography(palette) : typography,\n _ref$fontFamily = _ref.fontFamily,\n fontFamily = _ref$fontFamily === void 0 ? defaultFontFamily : _ref$fontFamily,\n _ref$fontSize = _ref.fontSize,\n fontSize = _ref$fontSize === void 0 ? 14 : _ref$fontSize,\n _ref$fontWeightLight = _ref.fontWeightLight,\n fontWeightLight = _ref$fontWeightLight === void 0 ? 300 : _ref$fontWeightLight,\n _ref$fontWeightRegula = _ref.fontWeightRegular,\n fontWeightRegular = _ref$fontWeightRegula === void 0 ? 400 : _ref$fontWeightRegula,\n _ref$fontWeightMedium = _ref.fontWeightMedium,\n fontWeightMedium = _ref$fontWeightMedium === void 0 ? 500 : _ref$fontWeightMedium,\n _ref$fontWeightBold = _ref.fontWeightBold,\n fontWeightBold = _ref$fontWeightBold === void 0 ? 700 : _ref$fontWeightBold,\n _ref$htmlFontSize = _ref.htmlFontSize,\n htmlFontSize = _ref$htmlFontSize === void 0 ? 16 : _ref$htmlFontSize,\n allVariants = _ref.allVariants,\n pxToRem2 = _ref.pxToRem,\n other = _objectWithoutProperties(_ref, [\"fontFamily\", \"fontSize\", \"fontWeightLight\", \"fontWeightRegular\", \"fontWeightMedium\", \"fontWeightBold\", \"htmlFontSize\", \"allVariants\", \"pxToRem\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('Material-UI: `fontSize` is required to be a number.');\n }\n\n if (typeof htmlFontSize !== 'number') {\n console.error('Material-UI: `htmlFontSize` is required to be a number.');\n }\n }\n\n var coef = fontSize / 14;\n\n var pxToRem = pxToRem2 || function (size) {\n return \"\".concat(size / htmlFontSize * coef, \"rem\");\n };\n\n var buildVariant = function buildVariant(fontWeight, size, lineHeight, letterSpacing, casing) {\n return _extends({\n fontFamily: fontFamily,\n fontWeight: fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight: lineHeight\n }, fontFamily === defaultFontFamily ? {\n letterSpacing: \"\".concat(round(letterSpacing / size), \"em\")\n } : {}, casing, allVariants);\n };\n\n var variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps)\n };\n return deepmerge(_extends({\n htmlFontSize: htmlFontSize,\n pxToRem: pxToRem,\n round: roundWithDeprecationWarning,\n // TODO v5: remove\n fontFamily: fontFamily,\n fontSize: fontSize,\n fontWeightLight: fontWeightLight,\n fontWeightRegular: fontWeightRegular,\n fontWeightMedium: fontWeightMedium,\n fontWeightBold: fontWeightBold\n }, variants), other, {\n clone: false // No need to clone deep\n\n });\n}","var shadowKeyUmbraOpacity = 0.2;\nvar shadowKeyPenumbraOpacity = 0.14;\nvar shadowAmbientShadowOpacity = 0.12;\n\nfunction createShadow() {\n return [\"\".concat(arguments.length <= 0 ? undefined : arguments[0], \"px \").concat(arguments.length <= 1 ? undefined : arguments[1], \"px \").concat(arguments.length <= 2 ? undefined : arguments[2], \"px \").concat(arguments.length <= 3 ? undefined : arguments[3], \"px rgba(0,0,0,\").concat(shadowKeyUmbraOpacity, \")\"), \"\".concat(arguments.length <= 4 ? undefined : arguments[4], \"px \").concat(arguments.length <= 5 ? undefined : arguments[5], \"px \").concat(arguments.length <= 6 ? undefined : arguments[6], \"px \").concat(arguments.length <= 7 ? undefined : arguments[7], \"px rgba(0,0,0,\").concat(shadowKeyPenumbraOpacity, \")\"), \"\".concat(arguments.length <= 8 ? undefined : arguments[8], \"px \").concat(arguments.length <= 9 ? undefined : arguments[9], \"px \").concat(arguments.length <= 10 ? undefined : arguments[10], \"px \").concat(arguments.length <= 11 ? undefined : arguments[11], \"px rgba(0,0,0,\").concat(shadowAmbientShadowOpacity, \")\")].join(',');\n} // Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\n\n\nvar shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nexport default shadows;","var shape = {\n borderRadius: 4\n};\nexport default shape;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport responsivePropType from './responsivePropType';\nimport { handleBreakpoints } from './breakpoints';\nimport merge from './merge';\nimport memoize from './memoize';\nvar properties = {\n m: 'margin',\n p: 'padding'\n};\nvar directions = {\n t: 'Top',\n r: 'Right',\n b: 'Bottom',\n l: 'Left',\n x: ['Left', 'Right'],\n y: ['Top', 'Bottom']\n};\nvar aliases = {\n marginX: 'mx',\n marginY: 'my',\n paddingX: 'px',\n paddingY: 'py'\n}; // memoize() impact:\n// From 300,000 ops/sec\n// To 350,000 ops/sec\n\nvar getCssProperties = memoize(function (prop) {\n // It's not a shorthand notation.\n if (prop.length > 2) {\n if (aliases[prop]) {\n prop = aliases[prop];\n } else {\n return [prop];\n }\n }\n\n var _prop$split = prop.split(''),\n _prop$split2 = _slicedToArray(_prop$split, 2),\n a = _prop$split2[0],\n b = _prop$split2[1];\n\n var property = properties[a];\n var direction = directions[b] || '';\n return Array.isArray(direction) ? direction.map(function (dir) {\n return property + dir;\n }) : [property + direction];\n});\nvar spacingKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY'];\nexport function createUnarySpacing(theme) {\n var themeSpacing = theme.spacing || 8;\n\n if (typeof themeSpacing === 'number') {\n return function (abs) {\n if (process.env.NODE_ENV !== 'production') {\n if (typeof abs !== 'number') {\n console.error(\"Material-UI: Expected spacing argument to be a number, got \".concat(abs, \".\"));\n }\n }\n\n return themeSpacing * abs;\n };\n }\n\n if (Array.isArray(themeSpacing)) {\n return function (abs) {\n if (process.env.NODE_ENV !== 'production') {\n if (abs > themeSpacing.length - 1) {\n console.error([\"Material-UI: The value provided (\".concat(abs, \") overflows.\"), \"The supported values are: \".concat(JSON.stringify(themeSpacing), \".\"), \"\".concat(abs, \" > \").concat(themeSpacing.length - 1, \", you need to add the missing values.\")].join('\\n'));\n }\n }\n\n return themeSpacing[abs];\n };\n }\n\n if (typeof themeSpacing === 'function') {\n return themeSpacing;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n console.error([\"Material-UI: The `theme.spacing` value (\".concat(themeSpacing, \") is invalid.\"), 'It should be a number, an array or a function.'].join('\\n'));\n }\n\n return function () {\n return undefined;\n };\n}\n\nfunction getValue(transformer, propValue) {\n if (typeof propValue === 'string' || propValue == null) {\n return propValue;\n }\n\n var abs = Math.abs(propValue);\n var transformed = transformer(abs);\n\n if (propValue >= 0) {\n return transformed;\n }\n\n if (typeof transformed === 'number') {\n return -transformed;\n }\n\n return \"-\".concat(transformed);\n}\n\nfunction getStyleFromPropValue(cssProperties, transformer) {\n return function (propValue) {\n return cssProperties.reduce(function (acc, cssProperty) {\n acc[cssProperty] = getValue(transformer, propValue);\n return acc;\n }, {});\n };\n}\n\nfunction spacing(props) {\n var theme = props.theme;\n var transformer = createUnarySpacing(theme);\n return Object.keys(props).map(function (prop) {\n // Using a hash computation over an array iteration could be faster, but with only 28 items,\n // it's doesn't worth the bundle size.\n if (spacingKeys.indexOf(prop) === -1) {\n return null;\n }\n\n var cssProperties = getCssProperties(prop);\n var styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);\n var propValue = props[prop];\n return handleBreakpoints(props, propValue, styleFromPropValue);\n }).reduce(merge, {});\n}\n\nspacing.propTypes = process.env.NODE_ENV !== 'production' ? spacingKeys.reduce(function (obj, key) {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nspacing.filterProps = spacingKeys;\nexport default spacing;","import { createUnarySpacing } from '@material-ui/system';\nvar warnOnce;\nexport default function createSpacing() {\n var spacingInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 8;\n\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n } // Material Design layouts are visually balanced. Most measurements align to an 8dp grid applied, which aligns both spacing and the overall layout.\n // Smaller components, such as icons and type, can align to a 4dp grid.\n // https://material.io/design/layout/understanding-layout.html#usage\n\n\n var transform = createUnarySpacing({\n spacing: spacingInput\n });\n\n var spacing = function spacing() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!(args.length <= 4)) {\n console.error(\"Material-UI: Too many arguments provided, expected between 0 and 4, got \".concat(args.length));\n }\n }\n\n if (args.length === 0) {\n return transform(1);\n }\n\n if (args.length === 1) {\n return transform(args[0]);\n }\n\n return args.map(function (argument) {\n if (typeof argument === 'string') {\n return argument;\n }\n\n var output = transform(argument);\n return typeof output === 'number' ? \"\".concat(output, \"px\") : output;\n }).join(' ');\n }; // Backward compatibility, to remove in v5.\n\n\n Object.defineProperty(spacing, 'unit', {\n get: function get() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnOnce || process.env.NODE_ENV === 'test') {\n console.error(['Material-UI: theme.spacing.unit usage has been deprecated.', 'It will be removed in v5.', 'You can replace `theme.spacing.unit * y` with `theme.spacing(y)`.', '', 'You can use the `https://github.com/mui-org/material-ui/tree/master/packages/material-ui-codemod/README.md#theme-spacing-api` migration helper to make the process smoother.'].join('\\n'));\n }\n\n warnOnce = true;\n }\n\n return spacingInput;\n }\n });\n spacing.mui = true;\n return spacing;\n}","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves\n// to learn the context in which each easing should be used.\nexport var easing = {\n // This is the most common easing curve.\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n // Objects enter the screen at full velocity from off-screen and\n // slowly decelerate to a resting point.\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n // Objects leave the screen at full velocity. They do not decelerate when off-screen.\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n // The sharp curve is used by objects that may return to the screen at any time.\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'\n}; // Follow https://material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations\n// to learn when use what timing\n\nexport var duration = {\n shortest: 150,\n shorter: 200,\n short: 250,\n // most basic recommended timing\n standard: 300,\n // this is to be used in complex animations\n complex: 375,\n // recommended when something is entering screen\n enteringScreen: 225,\n // recommended when something is leaving screen\n leavingScreen: 195\n};\n\nfunction formatMs(milliseconds) {\n return \"\".concat(Math.round(milliseconds), \"ms\");\n}\n/**\n * @param {string|Array} props\n * @param {object} param\n * @param {string} param.prop\n * @param {number} param.duration\n * @param {string} param.easing\n * @param {number} param.delay\n */\n\n\nexport default {\n easing: easing,\n duration: duration,\n create: function create() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['all'];\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var _options$duration = options.duration,\n durationOption = _options$duration === void 0 ? duration.standard : _options$duration,\n _options$easing = options.easing,\n easingOption = _options$easing === void 0 ? easing.easeInOut : _options$easing,\n _options$delay = options.delay,\n delay = _options$delay === void 0 ? 0 : _options$delay,\n other = _objectWithoutProperties(options, [\"duration\", \"easing\", \"delay\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n var isString = function isString(value) {\n return typeof value === 'string';\n };\n\n var isNumber = function isNumber(value) {\n return !isNaN(parseFloat(value));\n };\n\n if (!isString(props) && !Array.isArray(props)) {\n console.error('Material-UI: Argument \"props\" must be a string or Array.');\n }\n\n if (!isNumber(durationOption) && !isString(durationOption)) {\n console.error(\"Material-UI: Argument \\\"duration\\\" must be a number or a string but found \".concat(durationOption, \".\"));\n }\n\n if (!isString(easingOption)) {\n console.error('Material-UI: Argument \"easing\" must be a string.');\n }\n\n if (!isNumber(delay) && !isString(delay)) {\n console.error('Material-UI: Argument \"delay\" must be a number or a string.');\n }\n\n if (Object.keys(other).length !== 0) {\n console.error(\"Material-UI: Unrecognized argument(s) [\".concat(Object.keys(other).join(','), \"].\"));\n }\n }\n\n return (Array.isArray(props) ? props : [props]).map(function (animatedProp) {\n return \"\".concat(animatedProp, \" \").concat(typeof durationOption === 'string' ? durationOption : formatMs(durationOption), \" \").concat(easingOption, \" \").concat(typeof delay === 'string' ? delay : formatMs(delay));\n }).join(',');\n },\n getAutoHeightDuration: function getAutoHeightDuration(height) {\n if (!height) {\n return 0;\n }\n\n var constant = height / 36; // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10\n\n return Math.round((4 + 15 * Math.pow(constant, 0.25) + constant / 5) * 10);\n }\n};","// We need to centralize the zIndex definitions as they work\n// like global values in the browser.\nvar zIndex = {\n mobileStepper: 1000,\n speedDial: 1050,\n appBar: 1100,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500\n};\nexport default zIndex;","import createTheme from './createTheme';\nvar defaultTheme = createTheme();\nexport default defaultTheme;","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport { deepmerge } from '@material-ui/utils';\nimport createBreakpoints from './createBreakpoints';\nimport createMixins from './createMixins';\nimport createPalette from './createPalette';\nimport createTypography from './createTypography';\nimport shadows from './shadows';\nimport shape from './shape';\nimport createSpacing from './createSpacing';\nimport transitions from './transitions';\nimport zIndex from './zIndex';\n\nfunction createTheme() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _options$breakpoints = options.breakpoints,\n breakpointsInput = _options$breakpoints === void 0 ? {} : _options$breakpoints,\n _options$mixins = options.mixins,\n mixinsInput = _options$mixins === void 0 ? {} : _options$mixins,\n _options$palette = options.palette,\n paletteInput = _options$palette === void 0 ? {} : _options$palette,\n spacingInput = options.spacing,\n _options$typography = options.typography,\n typographyInput = _options$typography === void 0 ? {} : _options$typography,\n other = _objectWithoutProperties(options, [\"breakpoints\", \"mixins\", \"palette\", \"spacing\", \"typography\"]);\n\n var palette = createPalette(paletteInput);\n var breakpoints = createBreakpoints(breakpointsInput);\n var spacing = createSpacing(spacingInput);\n var muiTheme = deepmerge({\n breakpoints: breakpoints,\n direction: 'ltr',\n mixins: createMixins(breakpoints, spacing, mixinsInput),\n overrides: {},\n // Inject custom styles\n palette: palette,\n props: {},\n // Provide default props\n shadows: shadows,\n typography: createTypography(palette, typographyInput),\n spacing: spacing,\n shape: shape,\n transitions: transitions,\n zIndex: zIndex\n }, other);\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n muiTheme = args.reduce(function (acc, argument) {\n return deepmerge(acc, argument);\n }, muiTheme);\n\n if (process.env.NODE_ENV !== 'production') {\n var pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected'];\n\n var traverse = function traverse(node, parentKey) {\n var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var key; // eslint-disable-next-line guard-for-in, no-restricted-syntax\n\n for (key in node) {\n var child = node[key];\n\n if (depth === 1) {\n if (key.indexOf('Mui') === 0 && child) {\n traverse(child, key, depth + 1);\n }\n } else if (pseudoClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {\n if (process.env.NODE_ENV !== 'production') {\n console.error([\"Material-UI: The `\".concat(parentKey, \"` component increases \") + \"the CSS specificity of the `\".concat(key, \"` internal state.\"), 'You can not override it like this: ', JSON.stringify(node, null, 2), '', 'Instead, you need to use the $ruleName syntax:', JSON.stringify({\n root: _defineProperty({}, \"&$\".concat(key), child)\n }, null, 2), '', 'https://material-ui.com/r/pseudo-classes-guide'].join('\\n'));\n } // Remove the style to prevent global conflicts.\n\n\n node[key] = {};\n }\n }\n };\n\n traverse(muiTheme.overrides);\n }\n\n return muiTheme;\n}\n\nvar warnedOnce = false;\nexport function createMuiTheme() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@material-ui/core/styles'`\"].join('\\n'));\n }\n }\n\n return createTheme.apply(void 0, arguments);\n}\nexport default createTheme;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport capitalize from '../utils/capitalize';\nimport withStyles from '../styles/withStyles';\nimport { darken, lighten } from '../styles/colorManipulator';\nimport useTheme from '../styles/useTheme';\nvar TRANSITION_DURATION = 4; // seconds\n\nexport var styles = function styles(theme) {\n var getColor = function getColor(color) {\n return theme.palette.type === 'light' ? lighten(color, 0.62) : darken(color, 0.5);\n };\n\n var backgroundPrimary = getColor(theme.palette.primary.main);\n var backgroundSecondary = getColor(theme.palette.secondary.main);\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n overflow: 'hidden',\n height: 4,\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Styles applied to the root and bar2 element if `color=\"primary\"`; bar2 if `variant=\"buffer\"`. */\n colorPrimary: {\n backgroundColor: backgroundPrimary\n },\n\n /* Styles applied to the root and bar2 elements if `color=\"secondary\"`; bar2 if `variant=\"buffer\"`. */\n colorSecondary: {\n backgroundColor: backgroundSecondary\n },\n\n /* Styles applied to the root element if `variant=\"determinate\"`. */\n determinate: {},\n\n /* Styles applied to the root element if `variant=\"indeterminate\"`. */\n indeterminate: {},\n\n /* Styles applied to the root element if `variant=\"buffer\"`. */\n buffer: {\n backgroundColor: 'transparent'\n },\n\n /* Styles applied to the root element if `variant=\"query\"`. */\n query: {\n transform: 'rotate(180deg)'\n },\n\n /* Styles applied to the additional bar element if `variant=\"buffer\"`. */\n dashed: {\n position: 'absolute',\n marginTop: 0,\n height: '100%',\n width: '100%',\n animation: '$buffer 3s infinite linear'\n },\n\n /* Styles applied to the additional bar element if `variant=\"buffer\"` and `color=\"primary\"`. */\n dashedColorPrimary: {\n backgroundImage: \"radial-gradient(\".concat(backgroundPrimary, \" 0%, \").concat(backgroundPrimary, \" 16%, transparent 42%)\"),\n backgroundSize: '10px 10px',\n backgroundPosition: '0 -23px'\n },\n\n /* Styles applied to the additional bar element if `variant=\"buffer\"` and `color=\"secondary\"`. */\n dashedColorSecondary: {\n backgroundImage: \"radial-gradient(\".concat(backgroundSecondary, \" 0%, \").concat(backgroundSecondary, \" 16%, transparent 42%)\"),\n backgroundSize: '10px 10px',\n backgroundPosition: '0 -23px'\n },\n\n /* Styles applied to the layered bar1 and bar2 elements. */\n bar: {\n width: '100%',\n position: 'absolute',\n left: 0,\n bottom: 0,\n top: 0,\n transition: 'transform 0.2s linear',\n transformOrigin: 'left'\n },\n\n /* Styles applied to the bar elements if `color=\"primary\"`; bar2 if `variant` not \"buffer\". */\n barColorPrimary: {\n backgroundColor: theme.palette.primary.main\n },\n\n /* Styles applied to the bar elements if `color=\"secondary\"`; bar2 if `variant` not \"buffer\". */\n barColorSecondary: {\n backgroundColor: theme.palette.secondary.main\n },\n\n /* Styles applied to the bar1 element if `variant=\"indeterminate or query\"`. */\n bar1Indeterminate: {\n width: 'auto',\n animation: '$indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite'\n },\n\n /* Styles applied to the bar1 element if `variant=\"determinate\"`. */\n bar1Determinate: {\n transition: \"transform .\".concat(TRANSITION_DURATION, \"s linear\")\n },\n\n /* Styles applied to the bar1 element if `variant=\"buffer\"`. */\n bar1Buffer: {\n zIndex: 1,\n transition: \"transform .\".concat(TRANSITION_DURATION, \"s linear\")\n },\n\n /* Styles applied to the bar2 element if `variant=\"indeterminate or query\"`. */\n bar2Indeterminate: {\n width: 'auto',\n animation: '$indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite'\n },\n\n /* Styles applied to the bar2 element if `variant=\"buffer\"`. */\n bar2Buffer: {\n transition: \"transform .\".concat(TRANSITION_DURATION, \"s linear\")\n },\n // Legends:\n // || represents the viewport\n // - represents a light background\n // x represents a dark background\n '@keyframes indeterminate1': {\n // |-----|---x-||-----||-----|\n '0%': {\n left: '-35%',\n right: '100%'\n },\n // |-----|-----||-----||xxxx-|\n '60%': {\n left: '100%',\n right: '-90%'\n },\n '100%': {\n left: '100%',\n right: '-90%'\n }\n },\n '@keyframes indeterminate2': {\n // |xxxxx|xxxxx||-----||-----|\n '0%': {\n left: '-200%',\n right: '100%'\n },\n // |-----|-----||-----||-x----|\n '60%': {\n left: '107%',\n right: '-8%'\n },\n '100%': {\n left: '107%',\n right: '-8%'\n }\n },\n '@keyframes buffer': {\n '0%': {\n opacity: 1,\n backgroundPosition: '0 -23px'\n },\n '50%': {\n opacity: 0,\n backgroundPosition: '0 -23px'\n },\n '100%': {\n opacity: 1,\n backgroundPosition: '-200px -23px'\n }\n }\n };\n};\n/**\n * ## ARIA\n *\n * If the progress bar is describing the loading progress of a particular region of a page,\n * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`\n * attribute to `true` on that region until it has finished loading.\n */\n\nvar LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n value = props.value,\n valueBuffer = props.valueBuffer,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'indeterminate' : _props$variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"value\", \"valueBuffer\", \"variant\"]);\n\n var theme = useTheme();\n var rootProps = {};\n var inlineStyles = {\n bar1: {},\n bar2: {}\n };\n\n if (variant === 'determinate' || variant === 'buffer') {\n if (value !== undefined) {\n rootProps['aria-valuenow'] = Math.round(value);\n rootProps['aria-valuemin'] = 0;\n rootProps['aria-valuemax'] = 100;\n var transform = value - 100;\n\n if (theme.direction === 'rtl') {\n transform = -transform;\n }\n\n inlineStyles.bar1.transform = \"translateX(\".concat(transform, \"%)\");\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Material-UI: You need to provide a value prop ' + 'when using the determinate or buffer variant of LinearProgress .');\n }\n }\n\n if (variant === 'buffer') {\n if (valueBuffer !== undefined) {\n var _transform = (valueBuffer || 0) - 100;\n\n if (theme.direction === 'rtl') {\n _transform = -_transform;\n }\n\n inlineStyles.bar2.transform = \"translateX(\".concat(_transform, \"%)\");\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Material-UI: You need to provide a valueBuffer prop ' + 'when using the buffer variant of LinearProgress.');\n }\n }\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[\"color\".concat(capitalize(color))], className, {\n 'determinate': classes.determinate,\n 'indeterminate': classes.indeterminate,\n 'buffer': classes.buffer,\n 'query': classes.query\n }[variant]),\n role: \"progressbar\"\n }, rootProps, {\n ref: ref\n }, other), variant === 'buffer' ? /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.dashed, classes[\"dashedColor\".concat(capitalize(color))])\n }) : null, /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.bar, classes[\"barColor\".concat(capitalize(color))], (variant === 'indeterminate' || variant === 'query') && classes.bar1Indeterminate, {\n 'determinate': classes.bar1Determinate,\n 'buffer': classes.bar1Buffer\n }[variant]),\n style: inlineStyles.bar1\n }), variant === 'determinate' ? null : /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.bar, (variant === 'indeterminate' || variant === 'query') && classes.bar2Indeterminate, variant === 'buffer' ? [classes[\"color\".concat(capitalize(color))], classes.bar2Buffer] : classes[\"barColor\".concat(capitalize(color))]),\n style: inlineStyles.bar2\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? LinearProgress.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The value of the progress indicator for the determinate and buffer variants.\n * Value between 0 and 100.\n */\n value: PropTypes.number,\n\n /**\n * The value for the buffer variant.\n * Value between 0 and 100.\n */\n valueBuffer: PropTypes.number,\n\n /**\n * The variant to use.\n * Use indeterminate or query when there is no progress value.\n */\n variant: PropTypes.oneOf(['buffer', 'determinate', 'indeterminate', 'query'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiLinearProgress'\n})(LinearProgress);","import { useTheme as useThemeWithoutDefault } from '@material-ui/styles';\nimport React from 'react';\nimport defaultTheme from './defaultTheme';\nexport default function useTheme() {\n var theme = useThemeWithoutDefault() || defaultTheme;\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(theme);\n }\n\n return theme;\n}","import React from 'react';\nimport LinearProgress from '@material-ui/core/LinearProgress';\nimport { useComponents } from '@wq/react';\nimport { useProgress } from '../hooks';\nimport PropTypes from 'prop-types';\n\nexport default function Progress({ url }) {\n const { value, error, status } = useProgress(url),\n { Typography, CloseWizard } = useComponents();\n return (\n <>\n \n {status && (\n \n {status}\n \n )}\n {value === 0 && error && }\n \n );\n}\n\nProgress.propTypes = {\n url: PropTypes.string,\n};\n","import React from 'react';\nimport { useField } from 'formik';\nimport { useInputComponents } from '@wq/react';\nimport PropTypes from 'prop-types';\n\nexport default function MappingSelect(props) {\n const { name } = props,\n [, { value: type }] = useField(name.replace('mapping', 'type')),\n { Select, ReadOnly } = useInputComponents();\n\n if (type === 'unknown') {\n return ;\n } else {\n return ;\n }\n}\n\nMappingSelect.propTypes = {\n name: PropTypes.string,\n};\n","import React from 'react';\nimport { useField } from 'formik';\nimport { useComponents } from '@wq/react';\nimport PropTypes from 'prop-types';\n\nexport default function ReadOnly({ name }) {\n const [, { value }] = useField(name),\n { Typography } = useComponents();\n return {value};\n}\n\nReadOnly.propTypes = {\n name: PropTypes.string,\n};\n","import React from 'react';\nimport {\n useRenderContext,\n useRouteInfo,\n useComponents,\n useReverse,\n} from '@wq/react';\n\nexport default function SourceDetail() {\n const reverse = useReverse(),\n context = useRenderContext(),\n { page, item_id, page_config } = useRouteInfo(),\n {\n ScrollView,\n PropertyTable,\n Form,\n SubmitButton,\n Fab,\n HorizontalView,\n View,\n } = useComponents(),\n form = page_config.form || [{ name: 'label' }],\n editUrl = reverse(`${page}_edit`, item_id),\n content_type_id =\n page_config.content_type_id || `sources.${page_config.name}`,\n object_id = item_id;\n\n return (\n <>\n \n \n \n \n \n\n \n Start Data Wizard\n \n \n \n \n {page_config.can_change !== false && (\n \n )}\n \n );\n}\n","import React from 'react';\nimport { useComponents } from '@wq/react';\nimport { useRunInfo } from '../hooks';\n\nexport default function RunAuto() {\n const { id, label, task_id, svc } = useRunInfo(),\n { Typography, Progress, Center } = useComponents(),\n url = `${svc}/datawizard/${id}/status.json?task=${task_id}`;\n return (\n
\n {label}\n \n
\n );\n}\n","import React, { useMemo } from 'react';\nimport { useComponents } from '@wq/react';\nimport { useRunInfo } from '../hooks';\n\nexport default function RunColumns() {\n const {\n id,\n label,\n result: { unknown_count, columns },\n } = useRunInfo(),\n [form, data] = useMemo(() => processFormData(columns), [columns]),\n {\n ScrollView,\n Typography,\n AutoForm,\n TableRow,\n TableCell,\n ContinueForm,\n MappingFieldsetArray,\n } = useComponents();\n\n if (!unknown_count) {\n return (\n \n \n Mapped Columns\n The following columns are mapped.\n \n {data.columns.map(({ id, column, name, mapping }) => (\n \n {column}\n {name}\n {mapping}\n \n ))}\n \n \n \n );\n } else {\n return (\n \n \n {label}\n Unknown Columns\n \n This file contains {unknown_count} column\n {unknown_count > 1 ? 's' : ''} that{' '}\n {unknown_count > 1 ? 'are' : 'is'} not yet recognized by\n this database.\n \n \n \n );\n }\n}\n\nfunction processFormData(columns) {\n const column = (columns || []).find((column) => column.types),\n types = column ? column.types : [],\n mappingChoices = [];\n\n types.forEach(({ name: group, choices }) => {\n choices.forEach(({ id: name, label }) => {\n mappingChoices.push({ name, label, group });\n });\n });\n\n const form = [\n {\n type: 'repeat',\n name: 'columns',\n label: 'Columns',\n control: { appearance: 'mapping-fieldset-array' },\n children: [\n {\n type: 'string',\n name: 'column',\n label: 'Column',\n control: { appearance: 'read-only' },\n },\n {\n type: 'select one',\n name: 'type',\n label: 'Type',\n choices: [\n { name: 'attribute', label: 'EAV Column' },\n { name: 'meta', label: 'Column/Header' },\n { name: 'instance', label: 'FK Value' },\n { name: 'unresolved', label: 'Unresolved' },\n { name: 'unknown', label: 'Unknown' },\n ],\n control: { appearance: 'hidden' },\n },\n {\n type: 'string',\n name: 'name',\n label: 'Spreadsheet Value',\n control: { appearance: 'read-only' },\n },\n {\n type: 'select one',\n name: 'mapping',\n label: 'Mapping',\n choices: mappingChoices,\n control: { appearance: 'mapping-select' },\n },\n ],\n },\n ];\n const data = {\n columns: columns.map(({ rel_id: id, column, type, name, mapping }) => ({\n id,\n column,\n type,\n name,\n mapping,\n })),\n };\n return [form, data];\n}\n","import React from 'react';\nimport { useComponents, useReverse } from '@wq/react';\nimport { useRunInfo } from '../hooks';\n\nexport default function RunDetail() {\n const {\n ScrollView,\n Typography,\n Table,\n TableBody,\n TableRow,\n TableCell,\n Link,\n Center,\n ContinueForm,\n } = useComponents(),\n runInfo = useRunInfo(),\n { id, label, serializer_label, record_count, last_update } = runInfo,\n reverse = useReverse();\n if (record_count !== null) {\n return (\n
\n {label}\n \n \n \n Serializer\n \n {typeof serializer_label === 'function'\n ? serializer_label.call(runInfo)\n : serializer_label}\n \n \n \n Records\n \n \n {record_count} record\n {record_count === 1 ? '' : 's'} imported.\n \n \n \n \n Last Updated\n \n {new Date(last_update).toLocaleString()}\n \n \n \n
\n
\n );\n } else {\n return (\n \n \n \n Click to start the import wizard.\n \n \n \n );\n }\n}\n","import React, { useMemo } from 'react';\nimport { useComponents } from '@wq/react';\nimport { useRunInfo } from '../hooks';\n\nexport default function RunIds() {\n const {\n id,\n label,\n result: { unknown_count, types },\n } = useRunInfo(),\n [form, data] = useMemo(() => processFormData(types), [types]),\n {\n ScrollView,\n Typography,\n AutoForm,\n TableRow,\n TableCell,\n ContinueForm,\n MappingFieldsetArray,\n } = useComponents();\n\n if (!unknown_count) {\n return (\n \n \n Mapped Identifiers\n \n The following identifiers are mapped.\n \n {form.map(({ name, label, children }) => (\n \n {data[name].map(({ id, name, count, mapping }) => (\n \n {name}\n {count}\n {mapping}\n \n ))}\n \n ))}\n \n \n );\n } else {\n return (\n \n \n {label}\n Unknown Identifiers\n \n This file contains {unknown_count} identifier\n {unknown_count > 1 ? 's' : ''} that{' '}\n {unknown_count > 1 ? 'are' : 'is'} not yet recognized by\n this database.\n \n \n \n );\n }\n}\n\nfunction processFormData(types) {\n const form = [],\n data = {};\n\n types.forEach(({ type_id, type_label, ids }) => {\n const fieldName = type_id.replace('.', '_'),\n id = (ids || []).find((id) => id.choices),\n choices = id\n ? id.choices.map(({ id: name, label }) => ({ name, label }))\n : [];\n\n form.push({\n type: 'repeat',\n name: fieldName,\n label: `${type_label} Identifiers`,\n control: { appearance: 'mapping-fieldset-array' },\n children: [\n {\n type: 'string',\n name: 'name',\n label: 'Identifier',\n control: { appearance: 'read-only' },\n },\n {\n type: 'select one',\n name: 'type',\n label: 'Type',\n choices: [\n { name: 'mapped', label: 'Mapped' },\n { name: 'unknown', label: 'Unknown' },\n ],\n control: { appearance: 'hidden' },\n },\n {\n type: 'int',\n name: 'count',\n label: 'Occurrences',\n control: { appearance: 'read-only' },\n },\n {\n type: 'select one',\n name: 'mapping',\n label: type_label,\n choices,\n control: { appearance: 'mapping-select' },\n },\n ],\n });\n\n data[fieldName] = ids.map(\n ({\n ident_id: id,\n value: name,\n count,\n match: mapping,\n unknown,\n }) => ({\n id,\n name,\n type: unknown ? 'unknown' : 'resolved',\n count,\n mapping,\n })\n );\n });\n\n return [form, data];\n}\n","import React from 'react';\nimport { useComponents, useList, useReverse } from '@wq/react';\n\nexport default function RunList() {\n const {\n Typography,\n Link,\n Table,\n TableHead,\n TableBody,\n TableRow,\n TableTitle,\n TableCell,\n Center,\n } = useComponents(),\n { list, empty } = useList(),\n reverse = useReverse();\n\n return (\n
\n Django Data Wizard\n \n \n \n Run\n Serializer\n Records\n Last Update\n \n \n \n {empty && (\n No previous runs.\n )}\n {list.map(\n ({\n id,\n label,\n serializer_label,\n record_count,\n last_update,\n }) => (\n \n \n \n {label}\n \n \n {serializer_label || '-'}\n \n {typeof record_count === 'number'\n ? record_count\n : record_count || '-'}\n \n \n {last_update\n ? new Date(last_update).toLocaleString()\n : '-'}\n \n \n )\n )}\n \n
\n
\n );\n}\n","import React from 'react';\nimport { useComponents } from '@wq/react';\nimport { useRunInfo } from '../hooks';\nimport PropTypes from 'prop-types';\n\nexport default function RunRecords() {\n const {\n Typography,\n Table,\n TableHead,\n TableBody,\n TableRow,\n TableTitle,\n TableCell,\n Center,\n CloseWizard,\n } = useComponents(),\n runInfo = useRunInfo(),\n { label, records } = runInfo,\n hasRecords = records && records.length > 0;\n\n return (\n
\n {label}\n Imported Records\n Import Complete!\n \n \n \n Row\n Record\n \n \n \n {!hasRecords && (\n No records imported.\n )}\n {hasRecords &&\n records.map((record) => (\n \n {record.row}\n \n \n \n \n ))}\n \n
\n \n
\n );\n}\n\nfunction RecordLink({ success, object_url, object_label, fail_reason }) {\n const { Link, Typography } = useComponents();\n if (success) {\n if (object_url) {\n return {object_label};\n } else {\n return object_label;\n }\n } else {\n return (\n \n {fail_reason || 'Unknown Error'}\n \n );\n }\n}\n\nRecordLink.propTypes = {\n success: PropTypes.bool,\n object_url: PropTypes.string,\n object_label: PropTypes.string,\n fail_reason: PropTypes.string,\n};\n","import React, { useMemo } from 'react';\nimport { useComponents } from '@wq/react';\nimport { useRunInfo } from '../hooks';\n\nexport default function RunSerializers() {\n const { id, label, serializer, serializer_label, serializer_choices } =\n useRunInfo(),\n form = useMemo(\n () => [\n {\n type: 'select one',\n name: 'serializer',\n label: 'Select Format',\n choices: serializer_choices,\n control: { appearance: 'radio' },\n },\n ],\n [serializer_choices]\n ),\n { ScrollView, Typography, AutoForm, ContinueForm, Center } =\n useComponents();\n if (serializer) {\n return (\n \n \n Data Format\n \n This dataset will be parsed as “{serializer_label}\n ”.\n \n \n \n );\n } else if (!serializer_choices) {\n return (\n
\n \n No serializers registered.\n \n \n See{' '}\n \n https://github.com/wq/django-data-wizard#target-model-registration\n {' '}\n for more information.\n \n
\n );\n } else {\n return (\n \n \n {label}\n \n Select a format to continue\n \n \n \n );\n }\n}\n","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var _typeof = require(\"@babel/runtime/helpers/typeof\")[\"default\"];\n\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\n\nfunction _interopRequireWildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) {\n return obj;\n }\n\n if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") {\n return {\n \"default\": obj\n };\n }\n\n var cache = _getRequireWildcardCache(nodeInterop);\n\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n\n newObj[\"default\"] = obj;\n\n if (cache) {\n cache.set(obj, newObj);\n }\n\n return newObj;\n}\n\nmodule.exports = _interopRequireWildcard;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n userSelect: 'none',\n width: '1em',\n height: '1em',\n display: 'inline-block',\n fill: 'currentColor',\n flexShrink: 0,\n fontSize: theme.typography.pxToRem(24),\n transition: theme.transitions.create('fill', {\n duration: theme.transitions.duration.shorter\n })\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `color=\"action\"`. */\n colorAction: {\n color: theme.palette.action.active\n },\n\n /* Styles applied to the root element if `color=\"error\"`. */\n colorError: {\n color: theme.palette.error.main\n },\n\n /* Styles applied to the root element if `color=\"disabled\"`. */\n colorDisabled: {\n color: theme.palette.action.disabled\n },\n\n /* Styles applied to the root element if `fontSize=\"inherit\"`. */\n fontSizeInherit: {\n fontSize: 'inherit'\n },\n\n /* Styles applied to the root element if `fontSize=\"small\"`. */\n fontSizeSmall: {\n fontSize: theme.typography.pxToRem(20)\n },\n\n /* Styles applied to the root element if `fontSize=\"large\"`. */\n fontSizeLarge: {\n fontSize: theme.typography.pxToRem(35)\n }\n };\n};\nvar SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'inherit' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'svg' : _props$component,\n _props$fontSize = props.fontSize,\n fontSize = _props$fontSize === void 0 ? 'medium' : _props$fontSize,\n htmlColor = props.htmlColor,\n titleAccess = props.titleAccess,\n _props$viewBox = props.viewBox,\n viewBox = _props$viewBox === void 0 ? '0 0 24 24' : _props$viewBox,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"fontSize\", \"htmlColor\", \"titleAccess\", \"viewBox\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, color !== 'inherit' && classes[\"color\".concat(capitalize(color))], fontSize !== 'default' && fontSize !== 'medium' && classes[\"fontSize\".concat(capitalize(fontSize))]),\n focusable: \"false\",\n viewBox: viewBox,\n color: htmlColor,\n \"aria-hidden\": titleAccess ? undefined : true,\n role: titleAccess ? 'img' : undefined,\n ref: ref\n }, other), children, titleAccess ? /*#__PURE__*/React.createElement(\"title\", null, titleAccess) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? SvgIcon.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Node passed into the SVG element.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * You can use the `htmlColor` prop to apply a color attribute to the SVG element.\n */\n color: PropTypes.oneOf(['action', 'disabled', 'error', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n */\n fontSize: chainPropTypes(PropTypes.oneOf(['default', 'inherit', 'large', 'medium', 'small']), function (props) {\n var fontSize = props.fontSize;\n\n if (fontSize === 'default') {\n throw new Error('Material-UI: `fontSize=\"default\"` is deprecated. Use `fontSize=\"medium\"` instead.');\n }\n\n return null;\n }),\n\n /**\n * Applies a color attribute to the SVG element.\n */\n htmlColor: PropTypes.string,\n\n /**\n * The shape-rendering attribute. The behavior of the different options is described on the\n * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).\n * If you are having issues with blurry icons you should investigate this property.\n */\n shapeRendering: PropTypes.string,\n\n /**\n * Provides a human-readable title for the element that contains it.\n * https://www.w3.org/TR/SVG-access/#Equivalent\n */\n titleAccess: PropTypes.string,\n\n /**\n * Allows you to redefine what the coordinates without units mean inside an SVG element.\n * For example, if the SVG element is 500 (width) by 200 (height),\n * and you pass viewBox=\"0 0 50 20\",\n * this means that the coordinates inside the SVG will go from the top left corner (0,0)\n * to bottom right (50,20) and each unit will be worth 10px.\n */\n viewBox: PropTypes.string\n} : void 0;\nSvgIcon.muiName = 'SvgIcon';\nexport default withStyles(styles, {\n name: 'MuiSvgIcon'\n})(SvgIcon);","export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","// TODO v5: consider to make it private\nexport default function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}","import * as React from 'react';\nvar useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\n/**\n * https://github.com/facebook/react/issues/14099#issuecomment-440013892\n *\n * @param {function} fn\n */\n\nexport default function useEventCallback(fn) {\n var ref = React.useRef(fn);\n useEnhancedEffect(function () {\n ref.current = fn;\n });\n return React.useCallback(function () {\n return (0, ref.current).apply(void 0, arguments);\n }, []);\n}","// based on https://github.com/WICG/focus-visible/blob/v4.1.5/src/focus-visible.js\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nvar hadKeyboardEvent = true;\nvar hadFocusVisibleRecently = false;\nvar hadFocusVisibleRecentlyTimeout = null;\nvar inputTypesWhitelist = {\n text: true,\n search: true,\n url: true,\n tel: true,\n email: true,\n password: true,\n number: true,\n date: true,\n month: true,\n week: true,\n time: true,\n datetime: true,\n 'datetime-local': true\n};\n/**\n * Computes whether the given element should automatically trigger the\n * `focus-visible` class being added, i.e. whether it should always match\n * `:focus-visible` when focused.\n * @param {Element} node\n * @return {boolean}\n */\n\nfunction focusTriggersKeyboardModality(node) {\n var type = node.type,\n tagName = node.tagName;\n\n if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) {\n return true;\n }\n\n if (tagName === 'TEXTAREA' && !node.readOnly) {\n return true;\n }\n\n if (node.isContentEditable) {\n return true;\n }\n\n return false;\n}\n/**\n * Keep track of our keyboard modality state with `hadKeyboardEvent`.\n * If the most recent user interaction was via the keyboard;\n * and the key press did not include a meta, alt/option, or control key;\n * then the modality is keyboard. Otherwise, the modality is not keyboard.\n * @param {KeyboardEvent} event\n */\n\n\nfunction handleKeyDown(event) {\n if (event.metaKey || event.altKey || event.ctrlKey) {\n return;\n }\n\n hadKeyboardEvent = true;\n}\n/**\n * If at any point a user clicks with a pointing device, ensure that we change\n * the modality away from keyboard.\n * This avoids the situation where a user presses a key on an already focused\n * element, and then clicks on a different element, focusing it with a\n * pointing device, while we still think we're in keyboard modality.\n */\n\n\nfunction handlePointerDown() {\n hadKeyboardEvent = false;\n}\n\nfunction handleVisibilityChange() {\n if (this.visibilityState === 'hidden') {\n // If the tab becomes active again, the browser will handle calling focus\n // on the element (Safari actually calls it twice).\n // If this tab change caused a blur on an element with focus-visible,\n // re-apply the class when the user switches back to the tab.\n if (hadFocusVisibleRecently) {\n hadKeyboardEvent = true;\n }\n }\n}\n\nfunction prepare(doc) {\n doc.addEventListener('keydown', handleKeyDown, true);\n doc.addEventListener('mousedown', handlePointerDown, true);\n doc.addEventListener('pointerdown', handlePointerDown, true);\n doc.addEventListener('touchstart', handlePointerDown, true);\n doc.addEventListener('visibilitychange', handleVisibilityChange, true);\n}\n\nexport function teardown(doc) {\n doc.removeEventListener('keydown', handleKeyDown, true);\n doc.removeEventListener('mousedown', handlePointerDown, true);\n doc.removeEventListener('pointerdown', handlePointerDown, true);\n doc.removeEventListener('touchstart', handlePointerDown, true);\n doc.removeEventListener('visibilitychange', handleVisibilityChange, true);\n}\n\nfunction isFocusVisible(event) {\n var target = event.target;\n\n try {\n return target.matches(':focus-visible');\n } catch (error) {} // browsers not implementing :focus-visible will throw a SyntaxError\n // we use our own heuristic for those browsers\n // rethrow might be better if it's not the expected error but do we really\n // want to crash if focus-visible malfunctioned?\n // no need for validFocusTarget check. the user does that by attaching it to\n // focusable events only\n\n\n return hadKeyboardEvent || focusTriggersKeyboardModality(target);\n}\n/**\n * Should be called if a blur event is fired on a focus-visible element\n */\n\n\nfunction handleBlurVisible() {\n // To detect a tab/window switch, we look for a blur event followed\n // rapidly by a visibility change.\n // If we don't see a visibility change within 100ms, it's probably a\n // regular focus change.\n hadFocusVisibleRecently = true;\n window.clearTimeout(hadFocusVisibleRecentlyTimeout);\n hadFocusVisibleRecentlyTimeout = window.setTimeout(function () {\n hadFocusVisibleRecently = false;\n }, 100);\n}\n\nexport default function useIsFocusVisible() {\n var ref = React.useCallback(function (instance) {\n var node = ReactDOM.findDOMNode(instance);\n\n if (node != null) {\n prepare(node.ownerDocument);\n }\n }, []);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(isFocusVisible);\n }\n\n return {\n isFocusVisible: isFocusVisible,\n onBlurVisible: handleBlurVisible,\n ref: ref\n };\n}","/**\n * Safe chained function\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n *\n * @param {function} functions to chain\n * @returns {function|null}\n */\nexport default function createChainedFunction() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n return funcs.reduce(function (acc, func) {\n if (func == null) {\n return acc;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof func !== 'function') {\n console.error('Material-UI: Invalid Argument Type, must only provide functions, undefined, or null.');\n }\n }\n\n return function chainedFunction() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n acc.apply(this, args);\n func.apply(this, args);\n };\n }, function () {});\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React from 'react';\nimport SvgIcon from '../SvgIcon';\n/**\n * Private module reserved for @material-ui/x packages.\n */\n\nexport default function createSvgIcon(path, displayName) {\n var Component = function Component(props, ref) {\n return /*#__PURE__*/React.createElement(SvgIcon, _extends({\n ref: ref\n }, props), path);\n };\n\n if (process.env.NODE_ENV !== 'production') {\n // Need to set `displayName` on the inner component for React.memo.\n // React prior to 16.14 ignores `displayName` on the wrapper.\n Component.displayName = \"\".concat(displayName, \"Icon\");\n }\n\n Component.muiName = SvgIcon.muiName;\n return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component));\n}","// Corresponds to 10 frames at 60 Hz.\n// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.\nexport default function debounce(func) {\n var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 166;\n var timeout;\n\n function debounced() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n // eslint-disable-next-line consistent-this\n var that = this;\n\n var later = function later() {\n func.apply(that, args);\n };\n\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n }\n\n debounced.clear = function () {\n clearTimeout(timeout);\n };\n\n return debounced;\n}","export default function deprecatedPropType(validator, reason) {\n if (process.env.NODE_ENV === 'production') {\n return function () {\n return null;\n };\n }\n\n return function (props, propName, componentName, location, propFullName) {\n var componentNameSafe = componentName || '<>';\n var propFullNameSafe = propFullName || propName;\n\n if (typeof props[propName] !== 'undefined') {\n return new Error(\"The \".concat(location, \" `\").concat(propFullNameSafe, \"` of \") + \"`\".concat(componentNameSafe, \"` is deprecated. \").concat(reason));\n }\n\n return null;\n };\n}","import * as React from 'react';\nexport default function isMuiElement(element, muiNames) {\n return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf(element.type.muiName) !== -1;\n}","import ownerDocument from './ownerDocument';\nexport default function ownerWindow(node) {\n var doc = ownerDocument(node);\n return doc.defaultView || window;\n}","export default function requirePropFactory(componentNameInError) {\n if (process.env.NODE_ENV === 'production') {\n return function () {\n return null;\n };\n }\n\n var requireProp = function requireProp(requiredProp) {\n return function (props, propName, componentName, location, propFullName) {\n var propFullNameSafe = propFullName || propName;\n\n if (typeof props[propName] !== 'undefined' && !props[requiredProp]) {\n return new Error(\"The prop `\".concat(propFullNameSafe, \"` of \") + \"`\".concat(componentNameInError, \"` must be used on `\").concat(requiredProp, \"`.\"));\n }\n\n return null;\n };\n };\n\n return requireProp;\n}","export default function unsupportedProp(props, propName, componentName, location, propFullName) {\n if (process.env.NODE_ENV === 'production') {\n return null;\n }\n\n var propFullNameSafe = propFullName || propName;\n\n if (typeof props[propName] !== 'undefined') {\n return new Error(\"The prop `\".concat(propFullNameSafe, \"` is not supported. Please remove it.\"));\n }\n\n return null;\n}","/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nexport default function useControlled(_ref) {\n var controlled = _ref.controlled,\n defaultProp = _ref.default,\n name = _ref.name,\n _ref$state = _ref.state,\n state = _ref$state === void 0 ? 'value' : _ref$state;\n\n var _React$useRef = React.useRef(controlled !== undefined),\n isControlled = _React$useRef.current;\n\n var _React$useState = React.useState(defaultProp),\n valueState = _React$useState[0],\n setValue = _React$useState[1];\n\n var value = isControlled ? controlled : valueState;\n\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(function () {\n if (isControlled !== (controlled !== undefined)) {\n console.error([\"Material-UI: A component is changing the \".concat(isControlled ? '' : 'un', \"controlled \").concat(state, \" state of \").concat(name, \" to be \").concat(isControlled ? 'un' : '', \"controlled.\"), 'Elements should not switch from uncontrolled to controlled (or vice versa).', \"Decide between using a controlled or uncontrolled \".concat(name, \" \") + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render, it's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [controlled]);\n\n var _React$useRef2 = React.useRef(defaultProp),\n defaultValue = _React$useRef2.current;\n\n React.useEffect(function () {\n if (!isControlled && defaultValue !== defaultProp) {\n console.error([\"Material-UI: A component is changing the default \".concat(state, \" state of an uncontrolled \").concat(name, \" after being initialized. \") + \"To suppress this warning opt to use a controlled \".concat(name, \".\")].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n\n var setValueIfUncontrolled = React.useCallback(function (newValue) {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n return [value, setValueIfUncontrolled];\n}","import * as React from 'react';\nimport setRef from './setRef';\nexport default function useForkRef(refA, refB) {\n /**\n * This will create a new function if the ref props change and are defined.\n * This means react will call the old forkRef with `null` and the new forkRef\n * with the ref. Cleanup naturally emerges from this behavior\n */\n return React.useMemo(function () {\n if (refA == null && refB == null) {\n return null;\n }\n\n return function (refValue) {\n setRef(refA, refValue);\n setRef(refB, refValue);\n };\n }, [refA, refB]);\n}","import * as React from 'react';\n/**\n * Private module reserved for @material-ui/x packages.\n */\n\nexport default function useId(idOverride) {\n var _React$useState = React.useState(idOverride),\n defaultId = _React$useState[0],\n setDefaultId = _React$useState[1];\n\n var id = idOverride || defaultId;\n React.useEffect(function () {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the random value for client-side rendering only.\n // We can't use it server-side.\n setDefaultId(\"mui-\".concat(Math.round(Math.random() * 1e5)));\n }\n }, [defaultId]);\n return id;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function get() {\n return _utils.createSvgIcon;\n }\n});\n\nvar _utils = require(\"@material-ui/core/utils\");","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z\"\n}), 'Replay');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8 5v14l11-7z\"\n}), 'PlayArrow');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z\"\n}), 'Settings');\n\nexports.default = _default;","import * as components from './components/index';\nimport * as inputs from './inputs/index';\nimport * as views from './views/index';\nimport * as icons from './icons';\n\nconst wizard = {\n name: 'wizard',\n components: { ...components },\n inputs: { ...inputs },\n views: { ...views },\n icons: { ...icons },\n async context(ctx, routeInfo) {\n const { page, mode, full_path } = routeInfo;\n if (\n page === 'run' &&\n mode &&\n !['list', 'detail', 'edit', 'auto', 'data'].includes(mode)\n ) {\n const response = await fetch(full_path, {\n headers: { Accept: 'application/json' },\n }),\n data = await response.json();\n return data;\n }\n },\n};\n\nexport default wizard;\nexport * from './components/index';\nexport * from './views/index';\nexport * from './hooks';\n"],"names":["Center","children","ScrollView","style","flex","display","justifyContent","width","maxWidth","padding","boxSizing","propTypes","PropTypes","node","CloseWizard","CancelButton","HorizontalView","View","useComponents","reverse","useReverse","to","variant","color","Progress","constructor","config","interval","this","url","Error","start","_throttle","_throttleCount","_lastProgress","_timer","setInterval","update","stop","clearInterval","data","response","fetch","json","e","onError","done","total","current","onComplete","onIndeterminate","status","onFail","onProgress","location","onNavigate","error","useRunInfo","context","useRenderContext","instance","useModel","id","useProgress","progress","setProgress","useState","value","setValue","setStatus","setError","setData","nav","useNav","useConfig","useEffect","updateStatus","message","err","path","replace","router","base_url","useMemo","ContinueForm","submitLabel","label","Form","Typography","SubmitButton","action","method","backgroundSync","icon","MappingFieldsetArray","subform","Fieldset","Table","TableHead","TableBody","TableRow","TableTitle","filter","field","control","appearance","map","key","name","_extends","Object","assign","target","i","arguments","length","source","prototype","hasOwnProperty","call","apply","_objectWithoutProperties","excluded","sourceKeys","keys","indexOf","objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","toVal","mix","k","y","str","Array","isArray","tmp","x","string","arrayOf","object","TableCell","React","Children","toArray","child","props","capitalize","_formatMuiErrorMessage","charAt","toUpperCase","slice","_defineProperty","obj","defineProperty","enumerable","configurable","writable","createBreakpoints","breakpoints","_breakpoints$values","values","xs","sm","md","lg","xl","_breakpoints$unit","unit","_breakpoints$step","step","other","up","concat","between","end","endIndex","down","upperbound","only","createMixins","spacing","mixins","_toolbar","gutters","styles","undefined","console","warn","join","paddingLeft","paddingRight","toolbar","minHeight","black","white","A100","A200","A400","A700","clamp","min","max","Math","decomposeColor","type","substr","re","RegExp","colors","match","n","index","parseInt","round","hexToRgb","marker","substring","split","parseFloat","recomposeColor","getLuminance","rgb","h","s","l","a","f","push","hslToRgb","val","pow","Number","toFixed","light","text","primary","secondary","disabled","hint","divider","background","paper","common","default","grey","active","hover","hoverOpacity","selected","selectedOpacity","disabledBackground","disabledOpacity","focus","focusOpacity","activatedOpacity","dark","addLightOrDark","intent","direction","shade","tonalOffset","tonalOffsetLight","tonalOffsetDark","coefficient","lighten","main","darken","createPalette","palette","_palette$primary","indigo","_palette$secondary","pink","_palette$error","red","_palette$warning","warning","orange","_palette$info","info","blue","_palette$success","success","green","_palette$type","_palette$contrastThre","contrastThreshold","_palette$tonalOffset","getContrastText","contrastText","foreground","lumA","lumB","getContrastRatio","augmentColor","mainShade","lightShade","darkShade","JSON","stringify","types","deepmerge","roundWithDeprecationWarning","caseAllCaps","textTransform","createTypography","typography","_ref","_ref$fontFamily","fontFamily","_ref$fontSize","fontSize","_ref$fontWeightLight","fontWeightLight","_ref$fontWeightRegula","fontWeightRegular","_ref$fontWeightMedium","fontWeightMedium","_ref$fontWeightBold","fontWeightBold","_ref$htmlFontSize","htmlFontSize","allVariants","pxToRem2","pxToRem","coef","size","buildVariant","fontWeight","lineHeight","letterSpacing","casing","variants","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","button","caption","overline","clone","createShadow","borderRadius","createUnarySpacing","theme","themeSpacing","abs","createSpacing","spacingInput","mui","transform","_len","args","_key","argument","output","get","easing","easeInOut","easeOut","easeIn","sharp","duration","shortest","shorter","short","standard","complex","enteringScreen","leavingScreen","formatMs","milliseconds","create","options","_options$duration","durationOption","_options$easing","easingOption","_options$delay","delay","animatedProp","getAutoHeightDuration","height","constant","mobileStepper","speedDial","appBar","drawer","modal","snackbar","tooltip","_options$breakpoints","breakpointsInput","_options$mixins","mixinsInput","_options$palette","paletteInput","_options$typography","typographyInput","muiTheme","overrides","shadows","shape","transitions","zIndex","reduce","acc","createTheme","LinearProgress","ref","classes","className","_props$color","valueBuffer","_props$variant","useTheme","useThemeWithoutDefault","defaultTheme","rootProps","inlineStyles","bar1","bar2","_transform","clsx","root","determinate","indeterminate","buffer","query","role","dashed","bar","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer","withStyles","getColor","backgroundPrimary","backgroundSecondary","position","overflow","colorAdjust","colorPrimary","backgroundColor","colorSecondary","marginTop","animation","dashedColorPrimary","backgroundImage","backgroundSize","backgroundPosition","dashedColorSecondary","left","bottom","top","transition","transformOrigin","barColorPrimary","barColorSecondary","right","opacity","marginBottom","MappingSelect","useField","Select","ReadOnly","useInputComponents","placeholder","SourceDetail","page","item_id","page_config","useRouteInfo","PropertyTable","Fab","form","editUrl","content_type_id","object_id","can_change","RunAuto","task_id","svc","RunColumns","result","unknown_count","columns","column","find","mappingChoices","forEach","group","choices","rel_id","mapping","processFormData","AutoForm","RunDetail","Link","runInfo","serializer_label","record_count","last_update","Date","toLocaleString","RunIds","type_id","type_label","ids","fieldName","ident_id","count","unknown","RunList","list","empty","useList","colspan","RunRecords","records","hasRecords","record","row","RecordLink","object_url","object_label","fail_reason","RunSerializers","serializer","serializer_choices","href","bool","__esModule","module","exports","_typeof","Symbol","iterator","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","desc","set","SvgIcon","_props$component","component","Component","_props$fontSize","htmlColor","titleAccess","_props$viewBox","viewBox","focusable","muiName","userSelect","fill","flexShrink","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeLarge","ownerDocument","document","setRef","useEnhancedEffect","window","hadKeyboardEvent","hadFocusVisibleRecently","hadFocusVisibleRecentlyTimeout","inputTypesWhitelist","search","tel","email","password","number","date","month","week","time","datetime","handleKeyDown","event","metaKey","altKey","ctrlKey","handlePointerDown","handleVisibilityChange","visibilityState","isFocusVisible","tagName","matches","readOnly","isContentEditable","handleBlurVisible","clearTimeout","setTimeout","funcs","func","_len2","_key2","displayName","createElement","memo","forwardRef","timeout","wait","debounced","that","later","clear","validator","reason","element","muiNames","defaultView","componentNameInError","propName","componentName","propFullName","useControlled","controlled","defaultProp","state","isControlled","_React$useState","valueState","newValue","useEventCallback","fn","useForkRef","refA","refB","refValue","useId","idOverride","defaultId","setDefaultId","random","useIsFocusVisible","onBlurVisible","doc","ReactDOM","addEventListener","_utils","createSvgIcon","_interopRequireDefault","_interopRequireWildcard","_default","d","wizard","components","inputs","views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tH,WAE9Btb,OAAO6C,eAAeqY,GAAS,aAAc,CAC3C7d,OAAO,IAET6d,uBAAkB,EAEdjZ,GAAQ2gB,GAAwBtH,GAIhCuH,IAAW,EAFMF,GAAuBrH,IAEV/S,SAAuBtG,GAAM8d,cAAc,OAAQ,CACnF+C,EAAG,kBACD,aAEJ5H,cAAkB2H,aCjBdF,GAAyBrH,WAEzBsH,GAA0BtH,WAE9Btb,OAAO6C,eAAeqY,GAAS,aAAc,CAC3C7d,OAAO,IAET6d,uBAAkB,EAEdjZ,GAAQ2gB,GAAwBtH,GAIhCuH,IAAW,EAFMF,GAAuBrH,IAEV/S,SAAuBtG,GAAM8d,cAAc,OAAQ,CACnF+C,EAAG,gsBACD,YAEJ5H,cAAkB2H,SCdZE,GAAS,CACXjjB,KAAM,SACNkjB,WAAY,IAAKA,GACjBC,OAAQ,IAAKA,IACbC,MAAO,IAAKA,IACZC,MAAO,2HACOC,EAAKC,SACTpM,KAAEA,EAAFqM,KAAQA,EAARC,UAAcA,GAAcF,KAErB,QAATpM,GACAqM,IACC,CAAC,OAAQ,SAAU,OAAQ,OAAQ,QAAQE,SAASF,GACvD,OACQ3nB,QAAiBC,MAAM2nB,EAAW,CAChCE,QAAS,CAAEC,OAAQ,mCAEV/nB,EAASE"} \ No newline at end of file diff --git a/data_wizard/static/data_wizard/js/progress-element.js b/data_wizard/static/data_wizard/js/progress-element.js index 36e58b9..a4ed90f 100644 --- a/data_wizard/static/data_wizard/js/progress-element.js +++ b/data_wizard/static/data_wizard/js/progress-element.js @@ -227,6 +227,8 @@ class Progress { } onNavigate(data) { + this.stop(); + if (this.config.onNavigate) { this.config.onNavigate(data); } diff --git a/data_wizard/tasks.py b/data_wizard/tasks.py index cbd7b38..83591e8 100644 --- a/data_wizard/tasks.py +++ b/data_wizard/tasks.py @@ -138,7 +138,7 @@ def auto_import(run, user): def get_attribute_field(field): - for cname, cfield in field.child.get_fields().items(): + for cname, cfield in field.child.fields.items(): if isinstance(cfield, serializers.RelatedField): return cname, cfield return None, None @@ -163,7 +163,7 @@ def make_list(choices): def load_fields(serializer, group_name, label_prefix="", name_prefix="", attribute_name=None, attribute_choices=None): - fields = serializer.get_fields().items() + fields = serializer.fields.items() if len(fields) == 1 and isinstance(serializer, NaturalKeySerializer): is_natkey_lookup = True else: @@ -241,7 +241,15 @@ def load_fields(serializer, group_name, root_label = Serializer.Meta.model._meta.verbose_name.title() else: root_label = run.serializer_label - load_fields(Serializer(), root_label) + + serializer = Serializer( + context={ + 'data_wizard': { + 'run': run, + } + } + ) + load_fields(serializer, root_label) field_choices.add( ('Other', '__ignore__', 'Ignore this Column', False, None) diff --git a/packages/progress/src/progress.js b/packages/progress/src/progress.js index 255db60..8306d82 100644 --- a/packages/progress/src/progress.js +++ b/packages/progress/src/progress.js @@ -114,6 +114,7 @@ export class Progress { } onNavigate(data) { + this.stop(); if (this.config.onNavigate) { this.config.onNavigate(data); } diff --git a/packages/wizard/src/components/Progress.js b/packages/wizard/src/components/Progress.js index 9cbda92..f915e52 100644 --- a/packages/wizard/src/components/Progress.js +++ b/packages/wizard/src/components/Progress.js @@ -10,6 +10,7 @@ export default function Progress({ url }) { return ( <> diff --git a/packages/wizard/src/hooks.js b/packages/wizard/src/hooks.js index 9ab68f4..4d2b255 100644 --- a/packages/wizard/src/hooks.js +++ b/packages/wizard/src/hooks.js @@ -1,6 +1,6 @@ import { useState, useEffect, useMemo } from 'react'; import { Progress } from '@wq/progress'; -import { useRenderContext, useModel, useNav } from '@wq/react'; +import { useRenderContext, useModel, useNav, useConfig } from '@wq/react'; export function useRunInfo() { const context = useRenderContext(), @@ -17,7 +17,8 @@ export function useProgress(url) { [status, setStatus] = useState(null), [error, setError] = useState(false), [data, setData] = useState(null), - nav = useNav(); + nav = useNav(), + config = useConfig(); useEffect(() => { const updateStatus = (data) => { @@ -48,7 +49,11 @@ export function useProgress(url) { setStatus('' + err); }, onNavigate(data) { - nav(data.location.slice(1)); + const path = data.location.replace( + config.router.base_url + '/', + '' + ); + nav(path); }, }); progress.start(); diff --git a/packages/wizard/src/views/SourceDetail.js b/packages/wizard/src/views/SourceDetail.js index 061a52d..a572c2e 100644 --- a/packages/wizard/src/views/SourceDetail.js +++ b/packages/wizard/src/views/SourceDetail.js @@ -39,7 +39,7 @@ export default function SourceDetail() { - Start Data Import Wizard + Start Data Wizard