"use strict";(globalThis.webpackChunksuperset=globalThis.webpackChunksuperset||[]).push([[3157],{11950:(e,t,n)=>{var r=n(64836),i=n(16338);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.HOOK_MARK=void 0;var a=i(n(67294)),o=r(n(45520));t.HOOK_MARK="RC_FORM_INTERNAL_HOOKS";var u=function(){(0,o.default)(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},l=a.createContext({getFieldValue:u,getFieldsValue:u,getFieldError:u,getFieldsError:u,isFieldsTouched:u,isFieldTouched:u,isFieldValidating:u,isFieldsValidating:u,resetFields:u,setFields:u,setFieldsValue:u,validateFields:u,submit:u,getInternalHooks:function(){return u(),{dispatch:u,initEntityValue:u,registerField:u,useSubscribe:u,setInitialValues:u,setCallbacks:u,getFields:u,setValidateMessages:u,setPreserve:u}}});t.default=l},67265:(e,t,n)=>{var r=n(16338).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=i.useRef({});return"value"in r.current&&!n(r.current.condition,t)||(r.current.value=e(),r.current.condition=t),r.current.value};var i=r(n(67294))},64543:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){return+setTimeout(e,16)},r=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(n=function(e){return window.requestAnimationFrame(e)},r=function(e){return window.cancelAnimationFrame(e)});var i=0,a=new Map;function o(e){a.delete(e)}var u=function(e){var t=i+=1;return function r(i){if(0===i)o(t),e();else{var u=n((function(){r(i-1)}));a.set(t,u)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};u.cancel=function(e){var t=a.get(e);return o(e),r(t)},t.default=u},75531:(e,t,n)=>{var r=n(64836).default;Object.defineProperty(t,"__esModule",{value:!0}),t.composeRef=s,t.fillRef=l,t.supportNodeRef=function(e){return!!(0,a.isValidElement)(e)&&(!(0,o.isFragment)(e)&&d(e))},t.supportRef=d,t.useComposeRef=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,u.default)((function(){return s.apply(void 0,t)}),t,(function(e,t){return e.length!==t.length||e.every((function(e,n){return e!==t[n]}))}))};var i=r(n(18698)),a=n(67294),o=n(11805),u=r(n(67265));function l(e,t){"function"==typeof e?e(t):"object"===(0,i.default)(e)&&e&&"current"in e&&(e.current=t)}function s(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter((function(e){return e}));return r.length<=1?r[0]:function(e){t.forEach((function(t){l(t,e)}))}}function d(e){var t,n,r=(0,o.isMemo)(e)?e.type.type:e.type;return!!("function"!=typeof r||null!==(t=r.prototype)&&void 0!==t&&t.render)&&!!("function"!=typeof e||null!==(n=e.prototype)&&void 0!==n&&n.render)}},4591:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(97538);const i=(0,n(51995).iK)(r.Z.Item)`
  ${({theme:e})=>`\n    .ant-form-item-label {\n      padding-bottom: ${e.gridUnit}px;\n      & > label {\n        text-transform: uppercase;\n        font-size: ${e.typography.sizes.s}px;\n        color: ${e.colors.grayscale.base};\n\n        &.ant-form-item-required:not(.ant-form-item-required-mark-optional) {\n          &::before {\n            display: none;\n          }\n          &::after {\n            display: inline-block;\n            color: ${e.colors.error.base};\n            font-size: ${e.typography.sizes.s}px;\n            content: '*';\n          }\n        }\n      }\n    }\n  `}
`},81948:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(73126),i=n(55786),a=n(61988),o=n(67294),u=n(4715),l=n(74448),s=n(11965);function d(e){const{data:t,formData:n,height:d,width:c,setDataMask:f,setHoveredFilter:v,unsetHoveredFilter:p,setFocusedFilter:g,unsetFocusedFilter:m,setFilterActive:h,filterState:F,inputRef:y}=e,{defaultValue:b}=n,[w,M]=(0,o.useState)(null!=b?b:[]),_=(0,o.useMemo)((()=>t.reduce(((e,{duration:t,name:n})=>({...e,[t]:n})),{})),[JSON.stringify(t)]),O=e=>{const t=(0,i.Z)(e),[n]=t,r=n?_[n]:void 0,a={};n&&(a.time_grain_sqla=n),M(t),f({extraFormData:a,filterState:{label:r,value:t.length?t:null}})};(0,o.useEffect)((()=>{O(null!=b?b:[])}),[JSON.stringify(b)]),(0,o.useEffect)((()=>{var e;O(null!=(e=F.value)?e:[])}),[JSON.stringify(F.value)]);const R=0===(t||[]).length?(0,a.t)("No data"):(0,a.tn)("%s option","%s options",t.length,t.length),A={};F.validateMessage&&(A.extra=(0,s.tZ)(l.Am,{status:F.validateStatus},F.validateMessage));const C=(t||[]).map((e=>{const{name:t,duration:n}=e;return{label:t,value:n}}));return(0,s.tZ)(l.un,{height:d,width:c},(0,s.tZ)(l.jp,(0,r.Z)({validateStatus:F.validateStatus},A),(0,s.tZ)(u.Ph,{allowClear:!0,value:w,placeholder:R,onChange:O,onBlur:m,onFocus:g,onMouseEnter:v,onMouseLeave:p,ref:y,options:C,onDropdownVisibleChange:h})))}},74448:(e,t,n)=>{n.d(t,{Am:()=>l,h2:()=>a,jp:()=>u,un:()=>o});var r=n(51995),i=n(4591);const a=0,o=r.iK.div`
  min-height: ${({height:e})=>e}px;
  width: ${({width:e})=>e===a?"100%":`${e}px`};
`,u=(0,r.iK)(i.Z)`
  &.ant-row.ant-form-item {
    margin: 0;
  }
`,l=r.iK.div`
  color: ${({theme:e,status:t="error"})=>{var n;return null==(n=e.colors[t])?void 0:n.base}};
`}}]);
//# sourceMappingURL=8b79dc7a0924c0face79.chunk.js.map