芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/www/wp-content/plugins/elementor-pro/assets/js/form-submission-admin.min.js
/*! elementor-pro - v3.21.0 - 20-05-2024 */ (()=>{var e,t,r,a,n={927:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Link:()=>G,Location:()=>N,LocationProvider:()=>D,Match:()=>z,Redirect:()=>K,Router:()=>W,ServerLocation:()=>q,createHistory:()=>O,createMemorySource:()=>w,globalHistory:()=>T,isRedirect:()=>Q,matchPath:()=>d,navigate:()=>S,redirectTo:()=>X,useLocation:()=>J,useMatch:()=>te,useNavigate:()=>Z,useParams:()=>ee});var a=r(7363),n=r.n(a),o=r(3996),l=r.n(o),s=r(5629),i=r.n(s);function componentWillMount(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function componentWillReceiveProps(e){this.setState(function updater(t){var r=this.constructor.getDerivedStateFromProps(e,t);return null!=r?r:null}.bind(this))}function componentWillUpdate(e,t){try{var r=this.props,a=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,a)}finally{this.props=r,this.state=a}}componentWillMount.__suppressDeprecationWarning=!0,componentWillReceiveProps.__suppressDeprecationWarning=!0,componentWillUpdate.__suppressDeprecationWarning=!0;var u=function startsWith(e,t){return e.substr(0,t.length)===t},c=function pick(e,t){for(var r=void 0,a=void 0,n=t.split("?")[0],o=y(n),s=""===o[0],i=_(e),u=0,c=i.length;u
t.score?-1:e.index-t.index}))},y=function segmentize(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")},g=function addQuery(e){for(var t=arguments.length,r=Array(t>1?t-1:0),a=1;a
0})))&&r.length>0?"?"+r.join("&"):"")},E=["uri","path"],C=Object.assign||function(e){for(var t=1;t
1&&void 0!==arguments[1]?arguments[1]:{},s=l.state,i=l.replace,u=void 0!==i&&i;if("number"==typeof t)e.history.go(t);else{s=C({},s,{key:Date.now()+""});try{n||u?e.history.replaceState(s,null,t):e.history.pushState(s,null,t)}catch(r){e.location[u?"replace":"assign"](t)}}a=P(e),n=!0;var c=new Promise((function(e){return o=e}));return r.forEach((function(e){return e({location:a,action:"PUSH"})})),c}}},w=function createMemorySource(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=e.indexOf("?"),r={pathname:t>-1?e.substr(0,t):e,search:t>-1?e.substr(t):""},a=0,n=[r],o=[null];return{get location(){return n[a]},addEventListener:function addEventListener(e,t){},removeEventListener:function removeEventListener(e,t){},history:{get entries(){return n},get index(){return a},get state(){return o[a]},pushState:function pushState(e,t,r){var l=r.split("?"),s=l[0],i=l[1],u=void 0===i?"":i;a++,n.push({pathname:s,search:u.length?"?"+u:u}),o.push(e)},replaceState:function replaceState(e,t,r){var l=r.split("?"),s=l[0],i=l[1],u=void 0===i?"":i;n[a]={pathname:s,search:u},o[a]=e},go:function go(e){var t=a+e;t<0||t>o.length-1||(a=t)}}}},R=!("undefined"==typeof window||!window.document||!window.document.createElement),T=O(function getSource(){return R?window:w()}()),S=T.navigate,x=Object.assign||function(e){for(var t=1;t
=0||Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a]);return r}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var j=function createNamedContext(e,t){var r=i()(t);return r.displayName=e,r},M=j("Location"),N=function Location(e){var t=e.children;return n().createElement(M.Consumer,null,(function(e){return e?t(e):n().createElement(D,null,t)}))},D=function(e){function LocationProvider(){var t,r;_classCallCheck(this,LocationProvider);for(var a=arguments.length,n=Array(a),o=0;o
-1?(o=t.substring(0,a),l=t.substring(a)):o=t,n().createElement(M.Provider,{value:{location:{pathname:o,search:l,hash:""},navigate:function navigate(){throw new Error("You can't call navigate on the server.")}}},r)},A=j("Base",{baseuri:"/",basepath:"/"}),W=function Router(e){return n().createElement(A.Consumer,null,(function(t){return n().createElement(N,null,(function(r){return n().createElement(F,x({},t,r,e))}))}))},F=function(e){function RouterImpl(){return _classCallCheck(this,RouterImpl),_possibleConstructorReturn(this,e.apply(this,arguments))}return _inherits(RouterImpl,e),RouterImpl.prototype.render=function render(){var e=this.props,t=e.location,r=e.navigate,a=e.basepath,o=e.primary,l=e.children,s=(e.baseuri,e.component),i=void 0===s?"div":s,u=_objectWithoutProperties(e,["location","navigate","basepath","primary","children","baseuri","component"]),d=n().Children.toArray(l).reduce((function(e,t){var r=ae(a)(t);return e.concat(r)}),[]),f=t.pathname,m=c(d,f);if(m){var h=m.params,v=m.uri,b=m.route,_=m.route.value;a=b.default?a:b.path.replace(/\*$/,"");var y=x({},h,{uri:v,location:t,navigate:function navigate(e,t){return r(p(e,v),t)}}),g=n().cloneElement(_,y,_.props.children?n().createElement(W,{location:t,primary:o},_.props.children):void 0),E=o?U:i,C=o?x({uri:v,location:t,component:i},u):u;return n().createElement(A.Provider,{value:{baseuri:v,basepath:a}},n().createElement(E,C,g))}return null},RouterImpl}(n().PureComponent);F.defaultProps={primary:!0};var L=j("Focus"),U=function FocusHandler(e){var t=e.uri,r=e.location,a=e.component,o=_objectWithoutProperties(e,["uri","location","component"]);return n().createElement(L.Consumer,null,(function(e){return n().createElement(B,x({},o,{component:a,requestFocus:e,uri:t,location:r}))}))},I=!0,$=0,B=function(e){function FocusHandlerImpl(){var t,r;_classCallCheck(this,FocusHandlerImpl);for(var a=arguments.length,n=Array(a),o=0;o
{"use strict";t.__esModule=!0;var a=r(7363),n=(_interopRequireDefault(a),_interopRequireDefault(r(3615))),o=_interopRequireDefault(r(1230));_interopRequireDefault(r(1895));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=1073741823;t.default=function createReactContext(e,t){var r,s,i="__create-react-context-"+(0,o.default)()+"__",u=function(e){function Provider(){var t,r;_classCallCheck(this,Provider);for(var a=arguments.length,n=Array(a),o=0;o
{"use strict";t.__esModule=!0;var a=_interopRequireDefault(r(7363)),n=_interopRequireDefault(r(7996));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}t.default=a.default.createContext||n.default,e.exports=t.default},6094:(e,t,r)=>{"use strict";var a=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function App(){return n.default.createElement("div",{id:"elementor-form-submissions"},n.default.createElement(s.SettingsProvider,{value:window.elementorSubmissionsConfig},n.default.createElement(l.NoticesProvider,null,n.default.createElement(i.default,null),n.default.createElement(o.LocationProvider,{history:p},n.default.createElement(o.Router,null,n.default.createElement(c.default,{path:"/"}),n.default.createElement(u.default,{path:"/:id"}))))))};var n=a(r(7363)),o=r(927),l=r(2081),s=r(6693),i=a(r(9597)),u=a(r(7874)),c=a(r(9247)),d=r(2634);const p=(0,o.createHistory)((0,d.createHashSource)())},813:(e,t,r)=>{"use strict";var a=r(8003).__,n=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.BulkActionSelect=BulkActionSelect;var o=n(r(7363)),l=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=_getRequireWildcardCache(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=n?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(a,o,l):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(r(3615));function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(_getRequireWildcardCache=function(e){return e?r:t})(e)}const{useState:s,useCallback:i}=o.default;function BulkActionSelect(e){const[t,r]=s(""),n=i((a=>{a.preventDefault();const n=e.actions.find((e=>e.value===t));n&&(n.onApply(),r(""))}),[t,e.actions]);return o.default.createElement("form",{className:`actions bulkactions ${e.className}`,onSubmit:n},o.default.createElement("label",{htmlFor:"bulk-action-selector-top",className:"screen-reader-text"},a("Select bulk action","elementor-pro")),o.default.createElement("select",{name:"action",value:t,onChange:e=>r(e.target.value)},o.default.createElement("option",{value:"",disabled:!0},a("Bulk actions","elementor-pro")),e.actions.map((e=>o.default.createElement("option",{key:e.value,value:e.value},e.label)))),o.default.createElement("input",{type:"submit",className:"button action",value:a("Apply","elementor-pro")}))}BulkActionSelect.propTypes={className:l.string,actions:l.arrayOf(l.shape({label:l.string.isRequired,value:l.string.isRequired,onApply:l.func.isRequired})).isRequired},BulkActionSelect.defaultProps={className:""}},1147:(e,t,r)=>{"use strict";var a=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Bulk;var n=a(r(7363)),o=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=_getRequireWildcardCache(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=n?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(a,o,l):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(r(3615));function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(_getRequireWildcardCache=function(e){return e?r:t})(e)}const{useCallback:l}=n.default;function Bulk(e){const t=l((t=>{const r=t.target.checked?[...e.allValues]:[];e.onChange(r)}),[e.onChange,e.checkedGroup,e.allValues]);return n.default.createElement("input",{type:"checkbox",checked:e.checkedGroup.length===e.allValues.length&&e.allValues.length>0,onChange:t})}Bulk.propTypes={checkedGroup:o.array.isRequired,allValues:o.array.isRequired,onChange:o.func.isRequired}},8099:(e,t,r)=>{"use strict";var a=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Checkbox;var n=a(r(7363)),o=a(r(1147)),l=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=_getRequireWildcardCache(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=n?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(a,o,l):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(r(3615));function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(_getRequireWildcardCache=function(e){return e?r:t})(e)}const{useCallback:s}=n.default;function Checkbox(e){const t=s((t=>{const r=t.target.checked?[...e.checkedGroup,e.value]:e.checkedGroup.filter((t=>t!==e.value));e.onChange(r)}),[e.onChange,e.checkedGroup,e.value]);return n.default.createElement("input",{type:"checkbox",checked:e.checkedGroup.includes(e.value),onChange:t})}Checkbox.propTypes={checkedGroup:l.array.isRequired,value:l.number.isRequired,onChange:l.func.isRequired},Checkbox.Bulk=o.default},9470:(e,t,r)=>{"use strict";var a=r(8003).__,n=r(3615),o=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=DateFilter;var l=o(r(7363));const{useState:s,useMemo:i,useCallback:u}=l.default;function DateFilter(e){const[t,r]=s(!1),n=i((()=>{const format=e=>wp.date.date("Y-m-d",e),e=new Date,t=new Date(e),r=new Date(e),n=new Date(e);return t.setDate(t.getDate()-1),r.setDate(r.getDate()-7),n.setDate(n.getDate()-30),[{label:a("All Time","elementor-pro"),value:"all",filter:{before:null,after:null}},{label:a("Today","elementor-pro"),value:"today",filter:{before:null,after:format(e)}},{label:a("Yesterday","elementor-pro"),value:"yesterday",filter:{before:format(t),after:format(t)}},{label:a("Last 7 days","elementor-pro"),value:"last7",filter:{before:null,after:format(r)}},{label:a("Last 30 days","elementor-pro"),value:"last_30",filter:{before:null,after:format(n)}},{label:a("Custom","elementor-pro"),value:"custom",filter:{before:null,after:null}}]}),[]),o=i((()=>{if(t)return"custom";const r=n.find((t=>t.filter.after===e.value.after&&t.filter.before===e.value.before));return r?r.value:"custom"}),[n,e.value,t]),c=u((({target:{value:t}})=>{const a=n.find((e=>e.value===t));r("custom"===a.value),e.onChange(a.filter)}),[n]),d=u((t=>{"custom"===o&&e.onChange(t)}),[o]);return l.default.createElement(l.default.Fragment,null,e.label&&l.default.createElement("label",{htmlFor:`filter-by-${e.name}`,className:"screen-reader-text"},e.label),l.default.createElement("select",{id:`filter-by-${e.name}`,value:o,onChange:c},n.map((({value:e,label:t})=>l.default.createElement("option",{key:e,value:e}," ",t," ")))),"custom"===o&&l.default.createElement(l.default.Fragment,null,l.default.createElement("input",{type:"date","aria-label":a("Start Date","elementor-pro"),value:e.value.after||"",onChange:({target:{value:e}})=>d({after:e})})," - ",l.default.createElement("input",{type:"date","aria-label":a("End Date","elementor-pro"),value:e.value.before||"",onChange:({target:{value:e}})=>d({before:e})})))}DateFilter.propTypes={value:n.shape({after:n.string,before:n.string}),label:n.string,onChange:n.func.isRequired,name:n.string.isRequired},DateFilter.defaultProps={value:{after:null,before:null},options:[]}},9047:(e,t,r)=>{"use strict";var a=r(8003).__,n=r(3615),o=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=ExportButton;var l=o(r(7363)),s=r(2877);const{useMemo:i}=l.default,u={[s.EXPORT_MODE_ALL]:a("Export All to CSV","elementor-pro"),[s.EXPORT_MODE_FILTERED]:a("Export Filtered to CSV","elementor-pro"),[s.EXPORT_MODE_SELECTED]:a("Export Selected to CSV","elementor-pro")};function ExportButton(e){const t=i((()=>{if(!e.progress)return 0;const{count:t,success:r}=e.progress;return 0===t||0===r?0:Math.round(r/t*100)}),[e.progress]);return l.default.createElement("button",{className:"button button-primary e-export-button",onClick:()=>!e.disabled&&e.onClick(),disabled:e.disabled},e.isLoading?l.default.createElement(l.default.Fragment,null,l.default.createElement("i",{className:"eicon-loading eicon-animation-spin"})," ",l.default.createElement("span",null," ",t,"% ")," ",a("Click to Cancel","elementor-pro")):u[e.mode])}ExportButton.propTypes={onClick:n.func.isRequired,isLoading:n.bool,mode:n.oneOf([s.EXPORT_MODE_ALL,s.EXPORT_MODE_SELECTED,s.EXPORT_MODE_FILTERED]),disabled:n.bool,progress:n.shape({count:n.number,success:n.number})},ExportButton.defaultProps={isLoading:!1,hasSelected:!1,disabled:!1}},7450:(e,t,r)=>{"use strict";var a=r(8003).__,n=r(3615),o=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=FormActionsLog;var l=o(r(7363)),s=o(r(5321)),i=r(3998),u=o(r(6644));function FormActionsLog(e){return l.default.createElement(s.default,{header:l.default.createElement("h2",null,a("Actions Log","elementor-pro"))},0===e.actions.length&&l.default.createElement("div",{className:"inside"},l.default.createElement("p",{style:{margin:0}}," ",a("No form actions.","elementor-pro")," ")),e.actions.map((e=>l.default.createElement("div",{className:"inside e-form-submissions-action-log e-form-submissions-action-log--"+("success"===e.status?"success":"error"),key:e.name},l.default.createElement("p",null,l.default.createElement("strong",{className:"e-form-submissions-action-log__label"}," ",e.label," "),l.default.createElement("i",{className:("success"===e.status?"eicon-success eicon-check-circle-o":"eicon-error eicon-warning")+" e-form-submissions-action-log__icon"}),l.default.createElement("span",{className:"e-form-submissions-action-log__date"}," ",(0,i.formatToLocalDateTime)(e.created_at)," ")),l.default.createElement("p",{className:"e-form-submissions-action-log__message"},e.log||u.default.actionLogs[e.status]())))))}FormActionsLog.propTypes={actions:n.arrayOf(n.shape({status:n.oneOf(["success","failed"]),name:n.string,label:n.string,created_at:n.string,log:n.string})).isRequired}},7238:(e,t,r)=>{"use strict";var a=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Link;var n=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=_getRequireWildcardCache(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=n?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(a,o,l):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(r(7363)),o=a(r(3119)),l=r(927);function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(_getRequireWildcardCache=function(e){return e?r:t})(e)}function Link(e){const t=(0,n.useRef)();return(0,n.useEffect)((()=>{t.current&&t.current.setAttribute("href",`${location.href.split("#")[0]}#${e.to}`)}),[e.to,t.current]),n.default.createElement(l.Link,(0,o.default)({},e,{ref:t}))}Link.propTypes={...l.Link.propTypes}},1695:(e,t,r)=>{"use strict";var a=r(3615),n=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=LinksFilter;var o=n(r(7363));const{useCallback:l,useMemo:s}=o.default;function LinksFilter(e){const t=l(((t,r)=>{t.preventDefault(),e.onChange&&e.onChange(r)}),[]),r=s((()=>e.options.filter((e=>e.shouldShow))),[e.options]);return o.default.createElement("ul",{className:"subsubsub"},r.map(((a,n)=>{const l=n+1===r.length;return o.default.createElement("li",{key:a.value}," ",o.default.createElement("a",{href:"#",className:a.value===e.value?"current":"",onClick:e=>t(e,a.value)},a.label,void 0!==a.count&&o.default.createElement("span",{className:"count"}," (",a.count,")"))," ",l?"":"|")})))}LinksFilter.propTypes={options:a.arrayOf(a.shape({value:a.string,label:a.string,count:a.number,shouldShow:a.bool})),value:a.string,onChange:a.func}},5128:(e,t,r)=>{"use strict";var a=r(8003).__,n=r(3615),o=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Notice;var l=o(r(7363)),s=r(2081);function Notice(e){return l.default.createElement("div",{className:`notice notice-${e.model.type} ${e.model.dismissible?"is-dismissible":""}`},l.default.createElement("p",null,e.model.message,e.model.undoAction&&l.default.createElement(l.default.Fragment,null," ",l.default.createElement("a",{href:"#",onClick:t=>{t.preventDefault(),e.model.undoAction()}},a("Undo","elementor-pro")))),e.model.dismissible&&l.default.createElement("button",{type:"button",className:"notice-dismiss",onClick:e.dismiss},l.default.createElement("span",{className:"screen-reader-text"},a("Dismiss this notice.","elementor-pro"))))}Notice.propTypes={model:n.shape({key:n.number.isRequired,message:n.string.isRequired,type:n.oneOf([s.NOTICE_TYPE_SUCCESS,s.NOTICE_TYPE_ERROR]).isRequired,dismissible:n.bool,undoAction:n.func}),dismiss:n.func}},9597:(e,t,r)=>{"use strict";var a=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function Notices(){const{notices:e,dismiss:t}=(0,o.useNoticesContext)();return e.map((e=>n.default.createElement(l.default,{key:e.key,model:e,dismiss:()=>t(e.key)})))};var n=a(r(7363)),o=r(2081),l=a(r(5128))},2506:(e,t,r)=>{"use strict";var a=r(8003).__,n=r(3615),o=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Pagination;var l=o(r(7363));const{useCallback:s,useMemo:i}=l.default;function Pagination(e){const t=i((()=>1!==e.currentPage),[e.currentPage]),r=i((()=>e.lastPage>e.currentPage),[e.currentPage,e.lastPage]),n=t?"a":"span",o=r?"a":"span",u=s(((t,r,a)=>{t.preventDefault(),r&&e.onChange(a)}),[e.onChange]);return e.currentPage?l.default.createElement("div",{className:`tablenav-pages ${e.lastPage<=1&&"one-page"}`},l.default.createElement("span",{className:"displaying-num"},e.total," ",a("items","elementor-pro")),1
u(e,t,1)},"«")," ",l.default.createElement(n,{className:`tablenav-pages-navspan button ${!t&&"disabled"}`,onClick:r=>u(r,t,e.currentPage-1)},"‹"),l.default.createElement("span",{className:"paging-input"},l.default.createElement("span",{className:"screen-reader-text"},a("Current Page","elementor-pro")),l.default.createElement("span",{className:"paging-input",style:{margin:"0 6px"}},l.default.createElement("span",{className:"tablenav-paging-text"},e.currentPage," ",a("of","elementor-pro"),l.default.createElement("span",{className:"total-pages",style:{margin:"0"}}," ",e.lastPage)))),l.default.createElement(o,{className:`tablenav-pages-navspan button ${!r&&"disabled"}`,onClick:t=>u(t,r,e.currentPage+1)},"›")," ",l.default.createElement(o,{className:`tablenav-pages-navspan button ${!r&&"disabled"}`,onClick:t=>u(t,r,e.lastPage)},"»"))):""}Pagination.propTypes={currentPage:n.number,total:n.number,lastPage:n.number,perPage:n.number,onChange:n.func.isRequired}},5321:(e,t,r)=>{"use strict";var a=r(3615),n=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=PostBox;var o=n(r(7363));function PostBox(e){return o.default.createElement("div",{className:"postbox"},o.default.createElement("div",{className:"postbox-header"},e.header),o.default.createElement("div",{className:"inner"},e.children))}PostBox.propTypes={header:a.oneOfType([a.string,a.node,a.arrayOf(a.node)]),children:a.oneOfType([a.node,a.arrayOf(a.node)])}},4415:(e,t,r)=>{"use strict";var a=r(8003).__,n=r(3615),o=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=RefererFilter;var l=o(r(7363));const{useEffect:s,useRef:i,useState:u}=l.default;function renderSelect2(e,t){jQuery(e).select2({allowClear:!0,placeholder:a("All Pages","elementor-pro"),dir:elementorCommon.config.isRTL?"rtl":"ltr",ajax:{delay:400,transport:({data:{search:e}},t,r)=>$e.data.get("form-submissions/referer",{search:e},{refresh:!0}).then(t).catch(r),data:e=>({search:e.term}),processResults:({data:e})=>({results:e.data.map((({value:e,label:t})=>({id:encodeURIComponent(e),text:t})))}),cache:!0},minimumInputLength:3}).on("select2:select select2:unselect",(e=>{t(e.target.value)}))}function RefererFilter(e){const[t,r]=u([{value:"",label:a("All Pages","elementor-pro")}]),n=i();return s((()=>{let t=null;return e.value?$e.data.get("form-submissions/referer",{value:e.value},{refresh:!0}).then((({data:e})=>r((t=>[...t,...e.data])))).then((()=>t=renderSelect2(n.current,e.onChange))):t=renderSelect2(n.current,e.onChange),()=>{t&&t.select2("destroy").off("select2:select select2:unselect")}}),[]),l.default.createElement(l.default.Fragment,null,l.default.createElement("label",{htmlFor:"filter-by-referer",className:"screen-reader-text"},a("Filter by Page","elementor-pro")),l.default.createElement("select",{ref:n,id:"filter-by-referer",value:e.value},t.map((({value:e,label:t})=>l.default.createElement("option",{key:e,value:encodeURIComponent(e)}," ",t," ")))))}RefererFilter.propTypes={value:n.string,onChange:n.func.isRequired},RefererFilter.defaultProps={value:""}},3773:(e,t,r)=>{"use strict";var a=r(3615),n=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=ResourceFilter;var o=n(r(7363));const{useState:l,useEffect:s}=o.default;function ResourceFilter(e){const[t,r]=l([]);return s((()=>{$e.data.get(e.resourceOptions.command,e.resourceOptions.args,{refresh:!0}).then((e=>r(e.data.data)))}),[]),o.default.createElement(o.default.Fragment,null,e.label&&o.default.createElement("label",{htmlFor:`filter-by-${e.name}`,className:"screen-reader-text"},e.label),o.default.createElement("select",{id:`filter-by-${e.name}`,value:e.value,onChange:t=>e.onChange(t.target.value)},[...e.options,...t].map((({value:e,label:t})=>o.default.createElement("option",{key:e,value:e}," ",t," ")))))}ResourceFilter.propTypes={value:a.string,onChange:a.func.isRequired,label:a.string,name:a.string.isRequired,options:a.arrayOf(a.shape({label:a.string,value:a.string})),resourceOptions:a.shape({command:a.string,args:a.object})},ResourceFilter.defaultProps={value:"",options:[]}},8843:(e,t,r)=>{"use strict";var a=r(8003).__,n=r(3615),o=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=SearchBox;var l=o(r(7363));const{useState:s,useRef:i,useCallback:u}=l.default;function SearchBox(e){const[t,r]=s(e.value||""),n=i(null),o=u((t=>{n.current&&clearTimeout(n.current);const a=t.target.value;r(a),n.current=setTimeout((()=>e.onChange(a)),e.debounceTimeout)}),[]);return l.default.createElement("p",{className:"search-box e-form-submissions-search"},e.label&&l.default.createElement("label",{className:"screen-reader-text",htmlFor:"search-input"},e.label),e.isSearching&&l.default.createElement("span",{className:"e-form-submissions-search__spinner"},l.default.createElement("i",{className:"eicon-loading eicon-animation-spin"})),l.default.createElement("input",{type:"search",id:"search-input",name:"s",value:t,onChange:o,placeholder:a("Search...","elementor-pro")}))}SearchBox.propTypes={value:n.string,onChange:n.func.isRequired,label:n.string,debounceTimeout:n.number,isSearching:n.bool},SearchBox.defaultProps={debounceTimeout:600,isSearching:!1}},5180:(e,t,r)=>{"use strict";var a=r(8003).__,n=r(3615),o=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=SubmissionRow;var l=o(r(7363)),s=o(r(7238)),i=o(r(6637)),u=r(3998);const{useState:c}=l.default;function SubmissionRow(e){const[t,r]=c(!1),n=e.item?.main?.value||a("Unknown","elementor-pro");return l.default.createElement(i.default.Row,{className:t?"is-expanded":"",style:{fontWeight:e.item.is_read?"inherit":"bold"}},l.default.createElement(i.default.Cell,{component:"th",className:"check-column"},e.checkBoxComponent),l.default.createElement(i.default.Cell,{className:"has-row-actions column-primary"},"trash"===e.item.status?n:l.default.createElement(s.default,{to:`/${e.item.id}`,"aria-label":"View"},n),e.rowActionComponent,l.default.createElement("button",{type:"button",className:"toggle-row",onClick:()=>r((e=>!e))},l.default.createElement("span",{className:"screen-reader-text"},a("Show more details","elementor-pro")))),l.default.createElement(i.default.Cell,{className:"column-actions",colName:e.tableTitles.actions_log_status.label},e.item.actions_count>0&&l.default.createElement("i",{className:""+(e.item.actions_count===e.item.actions_succeeded_count?"eicon-success eicon-check-circle-o":"eicon-error eicon-warning"),title:`${e.item.actions_succeeded_count}/${e.item.actions_count} ${a("Succeed","elementor-pro")}`})),l.default.createElement(i.default.Cell,{className:"column-form",colName:e.tableTitles.form.label},e.item.post&&l.default.createElement("a",{href:e.item.post.edit_url,target:"_blank",rel:"noreferrer"},e.item.form.name," (",e.item.form.element_id,")")),l.default.createElement(i.default.Cell,{className:"column-page",colName:e.tableTitles.page.label},l.default.createElement("a",{href:e.item.referer,target:"_blank",rel:"noreferrer",title:e.item.referer_title},e.item.referer_title||l.default.createElement("i",{className:"eicon-editor-external-link e-form-submissions-referer-icon"}))),l.default.createElement(i.default.Cell,{className:"column-id",colName:e.tableTitles.id.label},e.item.id),l.default.createElement(i.default.Cell,{className:"column-date",colName:e.tableTitles.created_at.label},(0,u.formatToLocalDateTime)(e.item.created_at)))}SubmissionRow.propTypes={item:n.object.isRequired,tableTitles:n.objectOf(n.shape({label:n.string})),rowActionComponent:n.node,checkBoxComponent:n.node}},8346:(e,t,r)=>{"use strict";var a=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Acceptance;var n=a(r(7363)),o=r(699);const{useState:l}=n.default;function Acceptance(e){const[t,r]=l(e.value),a=e.field.id+"-"+e.value;return n.default.createElement("label",{className:"e-form-submissions-value-label",htmlFor:a},n.default.createElement("input",{id:a,type:"checkbox",value:"on",checked:e.isEditMode?"on"===t:"on"===e.value,onChange:t=>{const a=t.target.checked?"on":"";r(a),e.onChange(a)},disabled:!e.isEditMode}))}Acceptance.propTypes={...o.basePropTypes}},558:(e,t,r)=>{"use strict";var a=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Checkbox;var n=a(r(7363)),o=r(699),l=a(r(2222)),s=a(r(7525));const{useState:i,useMemo:u}=n.default;function Checkbox(e){const t=u((()=>e.value.split(", ")),[e.value]),[r,a]=i(t);(0,l.default)((()=>e.onChange(r.join(", "))),[r]);return(0,s.default)(e.field.options).map((o=>{const l=e.field.id+"-"+o.value;return n.default.createElement("label",{className:"e-form-submissions-value-label",key:o.value,htmlFor:l},n.default.createElement("input",{id:l,type:"checkbox",value:o.value,checked:e.isEditMode?r.includes(o.value):t.includes(o.value),onChange:e=>{const t=e.target.checked;a((e=>e=t?[...e,o.value]:e.filter((e=>e!==o.value))))},disabled:!e.isEditMode}),o.label)}))}Checkbox.propTypes={...o.basePropTypes}},3876:(e,t,r)=>{"use strict";var a=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Date;var n=a(r(7363)),o=r(699),l=a(r(9121)),s=r(3998);function Date(e){return n.default.createElement(l.default,{value:e.value,isEditMode:e.isEditMode,onChange:e.onChange,field:e.field},e.value&&(0,s.formatToLocalDate)(e.value))}Date.propTypes={...o.basePropTypes}},5148:(e,t,r)=>{"use strict";var a=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Email;var n=a(r(7363)),o=r(699),l=a(r(9121));function Email(e){return n.default.createElement(l.default,{value:e.value,isEditMode:e.isEditMode,onChange:e.onChange,field:e.field},e.value&&n.default.createElement("a",{href:`mailto:${e.value}`},e.value))}Email.propTypes={...o.basePropTypes}},699:(e,t,r)=>{"use strict";var a=r(3615),n=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.basePropTypes=void 0,t.default=SubmissionValue;var o=n(r(7363)),l=n(r(9121)),s=n(r(5148)),i=n(r(9084)),u=n(r(5380)),c=n(r(8776)),d=n(r(7686)),p=n(r(558)),f=n(r(8346)),m=n(r(9946)),h=n(r(3876)),v=n(r(4540)),b=n(r(8523));const{useMemo:_}=o.default,y=l.default,g=Object.entries({Email:s.default,Tel:i.default,Url:u.default,Radio:c.default,Select:d.default,Checkbox:p.default,Acceptance:f.default,Upload:m.default,Date:h.default,Time:v.default,Textarea:b.default,Text:l.default}).reduce(((e,[t,r])=>({...e,[t.toLowerCase()]:r})),{}),E=t.basePropTypes={value:a.string,isEditMode:a.bool,onChange:a.func.isRequired,field:a.shape({id:a.string.isRequired,type:a.string,options:a.arrayOf(a.string),is_multiple:a.bool})};function SubmissionValue(e){const t=_((()=>{const t=e.field?.type;return Object.prototype.hasOwnProperty.call(g,t)?g[t]:y}),[e.field,e.value]);return o.default.createElement(t,{value:e.value,field:e.field,isEditMode:e.isEditMode,onChange:t=>e.onChange(e.field.id,t)})}SubmissionValue.propTypes={...E},SubmissionValue.defaultProps={isEditMode:!1}},8776:(e,t,r)=>{"use strict";var a=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Radio;var n=a(r(7363)),o=r(699),l=a(r(7525));const{useState:s}=n.default;function Radio(e){const[t,r]=s(e.value);return(0,l.default)(e.field.options).map((a=>{const o=e.field.id+"-"+a.value;return n.default.createElement("label",{className:"e-form-submissions-value-label",key:a.value,htmlFor:o},n.default.createElement("input",{id:o,type:"radio",value:a.value,checked:e.isEditMode?a.value===t:a.value===e.value,onChange:()=>{r(a.value),e.onChange(a.value)},disabled:!e.isEditMode}),a.label)}))}Radio.propTypes={...o.basePropTypes}},7686:(e,t,r)=>{"use strict";var a=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Select;var n=a(r(7363)),o=r(699),l=a(r(7525));const{useState:s}=n.default;function Select(e){const t=e.field.is_multiple?e.value.split(", "):e.value,[r,a]=s(t),o=(0,l.default)(e.field.options);return n.default.createElement("select",{value:e.isEditMode?r:t,multiple:e.field.is_multiple,onChange:t=>{const r=Array.from(t.target.selectedOptions,(e=>e.value));a(e.field.is_multiple?r:r[0]),e.onChange(r.join(", "))},disabled:!e.isEditMode},o.map((e=>n.default.createElement("option",{value:e.value,key:e.value},e.label))))}Select.propTypes={...o.basePropTypes}},9084:(e,t,r)=>{"use strict";var a=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Tel;var n=a(r(7363)),o=r(699),l=a(r(9121));function Tel(e){return n.default.createElement(l.default,{value:e.value,isEditMode:e.isEditMode,onChange:e.onChange,field:e.field},e.value&&n.default.createElement("a",{href:`tel:${e.value}`},e.value))}Tel.propTypes={...o.basePropTypes}},9121:(e,t,r)=>{"use strict";var a=r(3615),n=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Text;var o=n(r(7363)),l=r(699);const{useState:s,useMemo:i}=o.default,u={email:"email",date:"date",time:"time",tel:"tel",url:"url",number:"number",text:"text"},c=u.text;function Text(e){const[t,r]=s(e.value),a=i((()=>Object.prototype.hasOwnProperty.call(u,e.field?.type)?u[e.field.type]:c),[e.field]);return e.isEditMode?o.default.createElement("input",{type:a,value:t,onChange:({target:{value:t}})=>{r(t),e.onChange(t)}}):e.children||e.value}Text.propTypes={children:a.oneOfType([a.node,a.string]),...l.basePropTypes}},8523:(e,t,r)=>{"use strict";var a=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Textarea;var n=a(r(7363)),o=r(699);const{useState:l}=n.default;function Textarea(e){const[t,r]=l(e.value);return e.isEditMode?n.default.createElement("textarea",{value:e.isEditMode?t:e.value,rows:"4",onChange:t=>{const a=t.target.value;r(a),e.onChange(a)}}):e.value}Textarea.propTypes={...o.basePropTypes}},4540:(e,t,r)=>{"use strict";var a=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Time;var n=a(r(7363)),o=r(699),l=a(r(9121)),s=r(3998);function Time(e){return n.default.createElement(l.default,{value:e.value,isEditMode:e.isEditMode,onChange:e.onChange,field:e.field},e.value&&(0,s.formatToLocalTime)(`2000-01-01 ${e.value}`))}Time.propTypes={...o.basePropTypes}},9946:(e,t,r)=>{"use strict";var a=r(8003).__,n=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Upload;var o=n(r(7363)),l=r(699);function Upload(e){const t=e.value.split(" , ");if("attached"===t[0]){const e=t.length>1?a("Attachments to email won't be saved.","elementor-pro"):a("Attachment to email won't be saved.","elementor-pro");return o.default.createElement("span",null,e)}return t.map((e=>o.default.createElement("div",{key:e},o.default.createElement("a",{href:e,target:"_blank",rel:"noreferrer"},e))))}Upload.propTypes={...l.basePropTypes}},5380:(e,t,r)=>{"use strict";var a=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Url;var n=a(r(7363)),o=r(699),l=a(r(9121));function Url(e){return n.default.createElement(l.default,{value:e.value,isEditMode:e.isEditMode,onChange:e.onChange,field:e.field},e.value&&n.default.createElement("a",{href:e.value,target:"_blank",rel:"noreferrer"},e.value))}Url.propTypes={...o.basePropTypes}},5580:(e,t,r)=>{"use strict";var a=r(3615),n=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Body;var o=n(r(7363));function Body(e){return o.default.createElement("tbody",{id:"the-list"},e.children)}Body.propTypes={children:a.any}},9436:(e,t,r)=>{"use strict";var a=r(3615),n=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Cell;var o=n(r(7363));function Cell(e){const t=e.component;return o.default.createElement(t,{className:e.className,style:e.style,"data-colname":e.colName,colSpan:e.colSpan},e.children)}Cell.propTypes={component:a.string,children:a.any,className:a.string,style:a.object,colName:a.string,colSpan:a.number},Cell.defaultProps={component:"td",className:""}},4880:(e,t,r)=>{"use strict";var a=r(3615),n=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Footer;var o=n(r(7363));function Footer(e){return o.default.createElement("tfoot",null,e.children)}Footer.propTypes={children:a.any}},3915:(e,t,r)=>{"use strict";var a=r(3615),n=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Header;var o=n(r(7363));function Header(e){return o.default.createElement("thead",null,e.children)}Header.propTypes={children:a.any}},6637:(e,t,r)=>{"use strict";var a=r(3615),n=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=WpTable;var o=n(r(7363)),l=n(r(3915)),s=n(r(5580)),i=n(r(4880)),u=n(r(6370)),c=n(r(9436)),d=n(r(1587)),p=n(r(7530));function WpTable(e){return o.default.createElement("table",{className:`wp-list-table widefat fixed table-view-list ${e.className}`,style:e.style},e.children)}WpTable.propTypes={children:a.any,style:a.object,className:a.string},WpTable.defaultProps={className:""},WpTable.Header=l.default,WpTable.Body=s.default,WpTable.Footer=i.default,WpTable.Row=u.default,WpTable.Cell=c.default,WpTable.OrderableCell=d.default,WpTable.RowActions=p.default},1587:(e,t,r)=>{"use strict";var a=r(3615),n=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=OrderableCell;var o=n(r(7363)),l=n(r(9436));function OrderableCell(e){const t=`${e.className} sortable ${e.order.current.by===e.order.key&&`sorted ${e.order.current.direction}`}`;return o.default.createElement(l.default,{component:e.component,style:e.style,className:t},o.default.createElement("a",{href:"#",onClick:()=>e.order.onChange({by:e.order.key,direction:e.order.key===e.order.current.by&&"asc"===e.order.current.direction?"desc":"asc"})},o.default.createElement("span",null,e.children),o.default.createElement("span",{className:"sorting-indicator"})))}OrderableCell.propTypes={...l.default.propTypes,order:a.shape({key:a.string.isRequired,current:a.shape({by:a.string,direction:a.oneOf(["asc","desc"])}).isRequired,onChange:a.func.isRequired}).isRequired},OrderableCell.defaultProps={...l.default.defaultProps,component:"th"}},7530:(e,t,r)=>{"use strict";var a=r(3615),n=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=RowActions;var o=n(r(7363)),l=n(r(3119));function RowActions(e){return o.default.createElement("div",{className:"row-actions",style:{fontWeight:"normal"}},e.actions.map(((t,r)=>{const a=r+1===e.actions.length,n=t.component||"a";return o.default.createElement("span",{key:t.key,className:t.className},o.default.createElement(n,(0,l.default)({href:"#","aria-label":t.label,onClick:r=>{r.preventDefault(),t.onApply(e.item)}},t.props?t.props(e.item):{}),t.label),!a&&o.default.createElement("span",null," | "))})))}RowActions.propTypes={actions:a.arrayOf(a.shape({key:a.string.isRequired,label:a.string.isRequired,onApply:a.func,className:a.string,props:a.func,component:a.any})),item:a.object}},6370:(e,t,r)=>{"use strict";var a=r(3615),n=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Row;var o=n(r(7363));function Row(e){return o.default.createElement("tr",{style:e.style,className:e.className},e.children)}Row.propTypes={children:a.any,style:a.object,className:a.string},Row.defaultProps={style:{},className:""}},2081:(e,t,r)=>{"use strict";var a=r(3615),n=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.NOTICE_TYPE_SUCCESS=t.NOTICE_TYPE_ERROR=void 0,t.NoticesProvider=NoticesProvider,t.useNoticesContext=function useNoticesContext(){return u(p)};var o=n(r(7363));const{createContext:l,useState:s,useCallback:i,useContext:u}=o.default,c=t.NOTICE_TYPE_SUCCESS="success",d=t.NOTICE_TYPE_ERROR="error",p=l({notices:[]});function NoticesProvider(e){const[t,r]=s([]),a=i((e=>{r((t=>t.filter((t=>t.key!==e))))}),[]),n=i((({message:t,undoAction:n,type:o,dismissible:l=!0})=>{if(!t)return;const s=Date.now()+Math.random();r((e=>[{key:s,message:t,type:o,undoAction:n,dismissible:l},...e])),e.dismissTimeout&&setTimeout((()=>a(s)),e.dismissTimeout)}),[]),l=i((e=>{n({message:e,type:d})}),[n]),u=i(((e,t)=>{n({message:e,undoAction:t,type:c})}),[n]);return o.default.createElement(p.Provider,{value:{notices:t,notify:n,notifyError:l,notifySuccess:u,dismiss:a}},e.children)}NoticesProvider.propTypes={children:a.any,dismissTimeout:a.number},NoticesProvider.defaultProps={dismissTimeout:4e3}},6693:(e,t,r)=>{"use strict";var a=r(3615),n=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsProvider=SettingsProvider,t.useSettingsContext=function useSettingsContext(){return s(i)};var o=n(r(7363));const{createContext:l,useContext:s}=o.default,i=l({});function SettingsProvider(e){return o.default.createElement(i.Provider,{value:e.value},e.children)}SettingsProvider.propTypes={children:a.any,value:a.object.isRequired}},6042:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Export=void 0;class Export extends $e.modules.CommandData{static getEndpointFormat(){return"form-submissions/export/{id}"}onCatchApply(){}}t.Export=Export},4505:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Index=void 0;class Index extends $e.modules.CommandData{static getEndpointFormat(){return"forms/{id}"}}t.Index=Index},4665:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Export",{enumerable:!0,get:function(){return n.Export}}),t.Index=void 0,Object.defineProperty(t,"Referer",{enumerable:!0,get:function(){return o.Referer}}),Object.defineProperty(t,"Restore",{enumerable:!0,get:function(){return a.Restore}});var a=r(8958),n=r(6042),o=r(6857);class Index extends $e.modules.CommandData{static getEndpointFormat(){return"form-submissions/{id}"}}t.Index=Index},6857:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Referer=void 0;class Referer extends $e.modules.CommandData{static getEndpointFormat(){return"form-submissions/referer/{id}"}}t.Referer=Referer},8958:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Restore=void 0;class Restore extends $e.modules.CommandData{static getEndpointFormat(){return"form-submissions/restore/{id}"}}t.Restore=Restore},7670:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=_getRequireWildcardCache(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=n?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(a,o,l):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(r(4665));function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(_getRequireWildcardCache=function(e){return e?r:t})(e)}class Component extends $e.modules.ComponentBase{getNamespace(){return"form-submissions"}defaultData(){return this.importCommands(a)}}t.default=Component},3042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=_getRequireWildcardCache(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=n?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(a,o,l):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(r(4505));function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(_getRequireWildcardCache=function(e){return e?r:t})(e)}class FormsComponent extends $e.modules.ComponentBase{static namespace="forms";getNamespace(){return this.constructor.namespace}defaultData(){return this.importCommands(a)}}t.default=FormsComponent},4430:(e,t,r)=>{"use strict";var a=r(7363);Object.defineProperty(t,"__esModule",{value:!0}),t.STATUS_SUCCESS=t.STATUS_LOADING=t.STATUS_IDLE=t.STATUS_ERROR=void 0,t.default=function useDataAction(e,t=[]){const r=n(),[a,p]=l(i),f=s((()=>[...t,a]),[t,a]);return[o(((...t)=>(r.current&&r.current.abort(),r.current=new AbortController,p(u),e(t,{abortController:r.current,status:a}).then((e=>(p(c),e))).catch((e=>(p(d),Promise.reject(e)))))),[f]),{abortController:r.current,status:a}]};const{useRef:n,useCallback:o,useState:l,useMemo:s}=a,i=t.STATUS_IDLE="idle",u=t.STATUS_LOADING="loading",c=t.STATUS_SUCCESS="success",d=t.STATUS_ERROR="error"},2877:(e,t,r)=>{"use strict";var a=r(7363),n=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.EXPORT_MODE_SELECTED=t.EXPORT_MODE_FILTERED=t.EXPORT_MODE_ALL=void 0,t.useExport=function useExport(e){const t=p((()=>({...h,...e})),[e]),{notifyError:a}=(0,s.useNoticesContext)(),[n,v]=d({count:0,success:0}),b=p((()=>{if(t.checked.length>0)return u;const e=Object.fromEntries(Object.entries(t.filter).filter((([,e])=>e)));return 1===Object.keys(e).length&&"all"===e.status?i:c}),[t.checked,t.filter]),[_,{status:y}]=(0,o.default)((([e,n],{abortController:s,status:i})=>{if(i===o.STATUS_LOADING&&s)return s.abort(),Promise.reject({message:"Aborted"});const u=Math.ceil(n/t.maxRowsPerRequest);let c={},d=Promise.resolve();v({count:u,success:0});for(let r=1;r<=u;r++)d=d.then((()=>$e.data.get("form-submissions/export",{...e,per_page:t.maxRowsPerRequest,page:r},{refresh:!0,signal:s.signal}))).then((e=>{const t=1===r;c=mergeFormExportData(e.data.data,c,t),v((e=>({...e,success:r})))}));return d.then((()=>function downloadExportsResults(e){const t=wp.date.date("Y-m-d"),a=e.map((e=>function transformFormResultIntoBlob(e,t){return{filename:m.replace("{FORM_LABEL}",e.form_label).replace("{DATE}",t).concat(`.${e.extension}`),blob:new Blob(["\ufeff",e.content],{type:e.mimetype})}}(e,t)));if(1===a.length)return void(0,l.default)(a[0].blob,a[0].filename);r.e(972).then(r.t.bind(r,2858,23)).then((({default:e})=>{const t=new e;return a.forEach((({filename:e,blob:r})=>t.file(e,r))),t.generateAsync({type:"blob"})})).then((e=>{(0,l.default)(e,f.replace("{DATE}",t))}))}(Object.values(c)))).catch((e=>a(e.message)))}),[t.maxRowsPerRequest]);return[_,{mode:b,progress:n,status:y}]};var o=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=_getRequireWildcardCache(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=n?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(a,o,l):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(r(4430)),l=n(r(2534)),s=r(2081);function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(_getRequireWildcardCache=function(e){return e?r:t})(e)}const i=t.EXPORT_MODE_ALL="all",u=t.EXPORT_MODE_SELECTED="selected",c=t.EXPORT_MODE_FILTERED="filtered",{useState:d,useMemo:p}=a,f="elementor-submissions-export-{DATE}",m="elementor-submissions-export-{FORM_LABEL}-{DATE}",h={maxRowsPerRequest:1e4,checked:[],filter:{}};function mergeFormExportData(e,t,r){return e.forEach((e=>{r||delete e.content[0],t={...t,[e.id]:{...e,content:(t[e.id]?.content||"")+e.content.join("\n")}}})),t}},7525:(e,t,r)=>{"use strict";var a=r(7363);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function useFormFieldOptions(e){return n((()=>e.map((e=>{const[t,r]=e.split("|");return{label:t,value:void 0===r?t:r}}))),[e])};const{useMemo:n}=a},9307:(e,t,r)=>{"use strict";var a=r(7363);function generateActions(e,t){return Object.keys(e).reduce(((e,r)=>({...e,[r]:e=>t({type:r,payload:e})})),{})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function useMethodsReducer(e,t,r=void 0){const[n,o]=a.useReducer(((t,r)=>{if(!Object.prototype.hasOwnProperty.call(e,r.type))throw Error(`The action type ${r.type} is not exists`);return e[r.type](t,r.payload)}),t,r);return[n,generateActions(e,o),o]}},597:(e,t,r)=>{"use strict";var a=r(7363),n=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function useRestDataList(e,t={}){t={...d,...t};const r=[...p,...t.allowedFilters],[{data:a,meta:n},m]=i({data:[],meta:{}}),{query:h,flatQuery:v,actions:{setFilter:b,setPage:_,setOrder:y,setInitial:g}}=function useQuery(){const[e,t]=(0,o.default)({setFilter:(e,t)=>({...e,page:1,filter:{...e.filter,...t}}),setPage:(e,t)=>({...e,page:t}),setPerPage:(e,t)=>({...e,page:1,perPage:t}),setOrder:(e,t)=>({...e,order:t}),setInitial:(e,t)=>({...e,...t,ready:!0})},{ready:!1,filter:{},page:1,perPage:null,order:{by:"id",direction:"desc"}}),r=c((()=>Object.fromEntries(Object.entries({...e.filter,page:e.page,per_page:e.perPage,order:e.order.direction,order_by:e.order.by}).filter((([,e])=>(!Array.isArray(e)||0!==e.length)&&!!e)))),[e]);return{query:e,flatQuery:r,actions:t}}(),[E,C]=(0,l.default)(r);f=v;const[P,{status:O}]=(0,s.default)(((r,{abortController:a})=>$e.data.get(e,f,{refresh:!0,signal:a.signal}).then((e=>m(e.data))).then((()=>t.hooks.afterFetch()))),[e,v]);return u((()=>{const e=t.useRouterQueryString?E:{};g({filter:{search:e?.search||null,status:e?.status||"all",form:e?.form||null,referer:e?.referer||null,after:e?.after||null,before:e?.before||null},page:e.page||1,perPage:e.per_page||50,order:{by:e.order_by||"created_at",direction:e.order||"desc"}})}),[]),u((()=>{h.ready&&(t.useRouterQueryString&&C(v),P())}),[v]),{data:a,meta:n,query:h,flatQuery:v,fetchData:P,statuses:{fetchDataStatus:O},actions:{setFilter:b,setOrder:y,setPage:_}}};var o=n(r(9307)),l=n(r(9396)),s=n(r(4430));const{useState:i,useEffect:u,useMemo:c}=a,d={allowedFilters:[],useRouterQueryString:!1,hooks:{afterFetch:()=>{}}},p=["order","order_by","page","per_page"];let f={}},9396:(e,t,r)=>{"use strict";var a=r(7363);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function useRouterQueryString(e=[]){const t=(0,n.useLocation)(),[r,a]=l(!1),[s,i]=l(!1);return o((()=>{if(!t?.pathname||r)return;const n=e.reduce(((e,r)=>{const a=wp.url.getQueryArg(t.pathname,r);return void 0===a?e:{...e,[r]:a}}),{});i(n),a(!0)}),[t]),o((()=>{if(!s)return;const e=t.pathname.split("?")[0]||"/";history.pushState(void 0,void 0,`#${wp.url.addQueryArgs(e,s)}`)}),[s]),[s,i]};var n=r(927);const{useEffect:o,useState:l}=a},2222:(e,t,r)=>{"use strict";var a=r(7363);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function useWatch(e,t){const r=o(!0);n((()=>{r.current?r.current=!1:e()}),t)};const{useEffect:n,useRef:o}=a},6644:(e,t,r)=>{"use strict";var a=r(8003).__;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(8003);const generalError=()=>a("Something went wrong, please try again later.","elementor-pro");t.default={trashed:{success:(e=1)=>(0,n.sprintf)((0,n._n)("%d submission moved to Trash.","%d submissions moved to Trash.",e,"elementor-pro"),e),error:generalError},deleted:{success:(e=1)=>(0,n.sprintf)((0,n._n)("%d submission permanently deleted.","%d submissions permanently deleted.",e,"elementor-pro"),e),error:generalError},updated:{success:(e=1)=>(0,n.sprintf)((0,n._n)("Submission has been successfully updated.","%d submissions have been successfully updated.",e,"elementor-pro"),e),error:generalError},restored:{success:(e=1)=>(0,n.sprintf)((0,n._n)("%d submission restored from Trash.","%d submissions restored from Trash.",e,"elementor-pro"),e),error:generalError},markedAsRead:{success:()=>null,error:generalError},markedAsUnread:{success:()=>null,error:generalError},actionLogs:{success:()=>a("Action completed successfully.","elementor-pro"),failed:()=>a("Action failed to run, please check your integration.","elementor-pro")}}},9247:(e,t,r)=>{"use strict";var a=r(8003).__,n=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function Index(){const{notifyError:e,notifySuccess:t}=(0,P.useNoticesContext)(),{isTrashEnabled:r}=(0,O.useSettingsContext)(),[n,x]=R([]),{data:j,meta:M,fetchData:N,flatQuery:D,query:{order:q,filter:A},statuses:{fetchDataStatus:W},actions:{setFilter:F,setOrder:L,setPage:U}}=(0,y.default)("form-submissions/index",{allowedFilters:["search","status","form","referer","after","before"],useRouterQueryString:!0,hooks:{afterFetch:()=>x([])}}),I=w((()=>"trash"===A.status),[A.status]),[$,B]=(0,C.useExport)({checked:n,filter:A}),[H]=(0,_.default)((([r,a],{abortController:n})=>{if(!validateRestAction(r))return Promise.reject();const o=p.default[a?"markedAsRead":"markedAsUnread"];return $e.data.update("form-submissions/index",{is_read:a},r,{signal:n.signal}).then((e=>t(o.success(e.data.meta?.affected||1)))).then(N).catch((()=>e(o.error())))})),[V]=(0,_.default)((([r],{abortController:a})=>validateRestAction(r)?$e.data.update("form-submissions/restore",{},r,{signal:a.signal}).then((e=>t(p.default.restored.success(e.data.meta?.affected||1)))).then(N).catch((()=>e(p.default.restored.error()))):Promise.reject())),[G]=(0,_.default)((([r],{abortController:a})=>{if(!validateRestAction(r))return Promise.reject();const n=p.default[r.force?"deleted":"trashed"];return $e.data.delete("form-submissions/index",r,{signal:a.signal}).then((e=>t(n.success(e.data.meta?.affected||1),r.force?null:()=>V(r)))).then(N).catch((()=>e(n.error())))})),Q=w((()=>[{key:"view",label:a("View","elementor-pro"),shouldShow:e=>"trash"!==e.status,props:e=>({to:`/${e.id}`,onClick:void 0}),component:c.default},{key:"restore",label:a("Restore","elementor-pro"),onApply:e=>V({id:e.id}),shouldShow:e=>"trash"===e.status},{key:"trash",label:a("Trash","elementor-pro"),onApply:e=>G({id:e.id}),shouldShow:e=>"trash"!==e.status&&r,className:"trash"},{key:"delete",label:a("Delete Permanently","elementor-pro"),onApply:e=>G({id:e.id,force:1}),shouldShow:e=>"trash"===e.status||!r,className:"trash"},{key:"read",label:a("Mark as Read","elementor-pro"),onApply:e=>H({id:e.id},!0),shouldShow:e=>"trash"!==e.status&&!e.is_read},{key:"unread",label:a("Mark as Unread","elementor-pro"),onApply:e=>H({id:e.id},!1),shouldShow:e=>"trash"!==e.status&&e.is_read}]),[]),X=w((()=>[{label:a("Mark as Read","elementor-pro"),value:"read",onApply:()=>H({ids:n},!0),shouldShow:()=>!I},{label:a("Mark as Unread","elementor-pro"),value:"unread",onApply:()=>H({ids:n},!1),shouldShow:()=>!I},{label:a("Move to Trash","elementor-pro"),value:"trash",onApply:()=>G({ids:n}),shouldShow:()=>!I&&r},{label:a("Delete Permanently","elementor-pro"),value:"delete",onApply:()=>G({ids:n,force:1}),shouldShow:()=>I||!r},{label:a("Restore","elementor-pro"),value:"restore",onApply:()=>V({ids:n}),shouldShow:()=>I}].filter((e=>e.shouldShow()))),[n,I]),Y=w((()=>({main_meta_id:{label:a("Main","elementor-pro"),className:"column-primary"},actions_log_status:{label:a("Actions Status","elementor-pro"),className:"column-actions"},form:{label:a("Form","elementor-pro"),className:"column-form"},page:{label:a("Page","elementor-pro"),className:"column-page"},id:{label:a("ID","elementor-pro"),className:"column-id"},created_at:{label:a("Submission Date","elementor-pro"),className:"column-date"}})),[]),K=o.default.createElement(g.default.Row,null,o.default.createElement(g.default.Cell,{className:"manage-column bulk-checkbox-column"},o.default.createElement(s.default.Bulk,{checkedGroup:n,onChange:x,allValues:j.map((e=>e.id))})),Object.entries(Y).map((([e,t])=>{const r={component:"th",className:`manage-column ${t.className||""}`};return T.includes(e)?o.default.createElement(g.default.OrderableCell,(0,l.default)({},r,{key:e,order:{key:e,current:q,onChange:e=>L(e)}}),t.label):o.default.createElement(g.default.Cell,(0,l.default)({key:e},r),t.label)}))),z=o.default.createElement("div",{className:"alignright"},o.default.createElement(u.default,{onClick:()=>{$(C.EXPORT_MODE_SELECTED===B.mode?{ids:n}:{...D},n.length||M.pagination?.total)},isLoading:_.STATUS_LOADING===B.status,progress:B.progress,mode:B.mode,disabled:!M.pagination?.total&&_.STATUS_LOADING!==B.status})),J=M.pagination&&o.default.createElement(f.default,{total:M.pagination.total,currentPage:M.pagination.current_page,lastPage:M.pagination.last_page,perPage:M.pagination.per_page,onChange:e=>U(e)});return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",null,o.default.createElement(v.default,{key:"search",value:A.search,onChange:e=>F({search:e}),isSearching:!!A.search&&W===_.STATUS_LOADING}),o.default.createElement(d.default,{options:S.map((({value:e,label:t})=>({value:e,label:t,count:M.count?.[e],shouldShow:"all"===e||M.count?.[e]>0}))),value:A.status,onChange:e=>F({status:e})}),o.default.createElement("div",{className:"clear"}),o.default.createElement("div",{className:"tablenav top"},o.default.createElement(E.BulkActionSelect,{actions:X,className:"alignleft"}),o.default.createElement("div",{className:"alignleft actions"},o.default.createElement(m.default,{value:A.referer||"",onChange:e=>F({referer:e})}),o.default.createElement(h.default,{value:A.form||"",onChange:e=>F({form:e}),options:[{value:"",label:a("All Forms","elementor-pro")}],resourceOptions:{type:"resource",command:"forms/index",args:{context:"options"}},name:"form",label:a("Filter by form","elementor-pro")}),o.default.createElement(i.default,{value:{after:A.after,before:A.before},onChange:({after:e,before:t})=>{F({...void 0!==e?{after:e}:{},...void 0!==t?{before:t}:{}})},label:a("Filter by date","elementor-pro"),name:"date"})),z,J),o.default.createElement(g.default,{className:"e-form-submissions-list-table striped table-view-list"},K&&o.default.createElement(g.default.Header,null,K),o.default.createElement(g.default.Body,null,!["loading","idle"].includes(W)&&0===j.length&&o.default.createElement(g.default.Row,{className:"no-items"},o.default.createElement(g.default.Cell,{className:"colspanchange",colSpan:7},a("No submissions found.","elementor-pro"))),j.map((e=>{const t=Q.filter((t=>t.shouldShow(e)));return o.default.createElement(b.default,{key:e.id,item:e,tableTitles:Y,checkBoxComponent:o.default.createElement(s.default,{checkedGroup:n,onChange:x,value:e.id}),rowActionComponent:o.default.createElement(g.default.RowActions,{actions:t,item:e})})}))),K&&o.default.createElement(g.default.Footer,null,K)),o.default.createElement("div",{className:"tablenav bottom"},o.default.createElement(E.BulkActionSelect,{actions:X,className:"alignleft"}),z,J)))};var o=n(r(7363)),l=n(r(3119)),s=n(r(8099)),i=n(r(9470)),u=n(r(9047)),c=n(r(7238)),d=n(r(1695)),p=n(r(6644)),f=n(r(2506)),m=n(r(4415)),h=n(r(3773)),v=n(r(8843)),b=n(r(5180)),_=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=_getRequireWildcardCache(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=n?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(a,o,l):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(r(4430)),y=n(r(597)),g=n(r(6637)),E=r(813),C=r(2877),P=r(2081),O=r(6693);function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(_getRequireWildcardCache=function(e){return e?r:t})(e)}const{useMemo:w,useState:R}=o.default,T=["id","created_at","main_meta_id"],S=[{value:"all",label:a("All","elementor-pro")},{value:"unread",label:a("Unread","elementor-pro")},{value:"read",label:a("Read","elementor-pro")},{value:"trash",label:a("Trash","elementor-pro")}];function validateRestAction(e){return e.id||e.ids&&e.ids.length>0}},7874:(e,t,r)=>{"use strict";var a=r(8003).__,n=r(3615),o=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Item;var l=o(r(7363)),s=o(r(6637)),i=r(927),u=r(2081),c=o(r(5321)),d=o(r(7450)),p=o(r(6644)),f=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=_getRequireWildcardCache(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=n?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(a,o,l):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(r(4430)),m=r(3998),h=o(r(699)),v=r(6693);function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(_getRequireWildcardCache=function(e){return e?r:t})(e)}const{useEffect:b,useState:_,useMemo:y}=l.default;function Item(e){const[{data:t},r]=_({data:{},meta:{}}),[n,o]=_(null),[g,E]=_(!1),[C,P]=_({}),O=(0,i.useNavigate)(),{notifySuccess:w,notifyError:R}=(0,u.useNoticesContext)(),{isTrashEnabled:T}=(0,v.useSettingsContext)(),S=y((()=>t.form?.fields.reduce(((e,t)=>({...e,[t.id]:t})),{})),[t.form?.fields]);b((()=>{$e.data.get("form-submissions/index",{id:e.id},{refresh:!0}).then((e=>(r(e.data),e.data))).then((t=>{t.data.is_read||$e.data.update("form-submissions/index",{is_read:!0},{id:e.id})})).catch((e=>o(e)))}),[]);const[x]=(0,f.default)((([t={}],{abortController:r})=>{const a=p.default[t.force?"deleted":"trashed"];return $e.data.delete("form-submissions/index",{id:e.id,...t},{signal:r.signal}).then((()=>w(a.success(1)))).then((()=>O("/"))).catch((()=>R(a.error())))}),[e.id]),[j,{status:M}]=(0,f.default)((([t])=>$e.data.update("form-submissions/index",{values:t},{id:e.id}).then((e=>r(e.data))).then((()=>{E(!1),P({})})).then((()=>w(p.default.updated.success(1)))).catch((()=>R(p.default.updated.error())))),[e.id]);return Object.keys(t).length?l.default.createElement("div",{id:"poststuff"},l.default.createElement("form",{id:"post-body",className:"metabox-holder columns-2",onSubmit:e=>{e.preventDefault(),g&&M!==f.STATUS_LOADING&&j(C)}},l.default.createElement("div",{id:"post-body-content"},l.default.createElement("div",{className:"e-form-submissions-main"},l.default.createElement(c.default,{header:l.default.createElement("div",{className:"e-form-submissions-main__header"},l.default.createElement("h2",null,a("Submission","elementor-pro")," #",t.id),l.default.createElement("button",{onClick:e=>{e.preventDefault(),M!==f.STATUS_LOADING&&E((e=>!e))},className:"button button-secondary",type:"button",disabled:M===f.STATUS_LOADING},a(g?"Cancel":"Edit","elementor-pro")))},l.default.createElement(s.default,{className:"e-form-submissions-item-table"},l.default.createElement(s.default.Body,null,t.values?.length>0?t.values.map((e=>l.default.createElement(s.default.Row,{key:e.id},l.default.createElement(s.default.Cell,null,S?.[e.key]?.label||e.key),l.default.createElement(s.default.Cell,null,l.default.createElement(h.default,{value:e.value,field:S?.[e.key]||{id:e.key,type:"text"},isEditMode:g,onChange:(e,t)=>P((r=>({...r,[e]:t})))}))))):l.default.createElement(s.default.Row,null,l.default.createElement(s.default.Cell,{colSpan:"2"},a("No data","elementor-pro"))))))),t.form_actions_log&&l.default.createElement(d.default,{actions:t.form_actions_log})),l.default.createElement("div",{className:"postbox-container",id:"postbox-container-1"},l.default.createElement(c.default,{header:l.default.createElement("h2",null,a("Additional Info","elementor-pro")," ")},l.default.createElement("div",{className:"submitbox"},l.default.createElement("div",{id:"misc-publishing-actions"},t.post&&l.default.createElement("div",{className:"misc-pub-section"},a("Form:","elementor-pro")," ",l.default.createElement("a",{href:t.post.edit_url,target:"_blank",rel:"noreferrer"},t.form.name," (#",t.form.element_id,")")),l.default.createElement("div",{className:"misc-pub-section"},a("Page:","elementor-pro")," ",l.default.createElement("a",{href:t.referer,target:"_blank",rel:"noreferrer"},t.referer_title||l.default.createElement("i",{className:"eicon-editor-external-link e-form-submissions-referer-icon"}))),l.default.createElement("div",{className:"misc-pub-section"},a("Create Date:","elementor-pro")," ",l.default.createElement("strong",null,(0,m.formatToLocalDateTime)(t.created_at))),l.default.createElement("div",{className:"misc-pub-section"},a("Update Date:","elementor-pro")," ",l.default.createElement("strong",null,(0,m.formatToLocalDateTime)(t.updated_at))),t.user_name&&l.default.createElement("div",{className:"misc-pub-section"},a("User Name:","elementor-pro")," ",l.default.createElement("strong",null,t.user_name)),l.default.createElement("div",{className:"misc-pub-section"},a("User IP:","elementor-pro")," ",l.default.createElement("strong",null,t.user_ip)),l.default.createElement("div",{className:"misc-pub-section"},a("User Agent:","elementor-pro")," ",l.default.createElement("strong",null,t.user_agent))),l.default.createElement("div",{id:"major-publishing-actions"},l.default.createElement("div",{id:"delete-action"},l.default.createElement("a",{className:"submitdelete deletion",href:"#",onClick:e=>{e.preventDefault(),x({force:T?0:1})}},a(T?"Move to Trash":"Delete Permanently","elementor-pro"))),l.default.createElement("div",{id:"publishing-action"},l.default.createElement("button",{type:"submit",name:"save",id:"publish",className:"button button-primary button-large",disabled:!g||M===f.STATUS_LOADING},a("Update","elementor-pro"))),l.default.createElement("div",{className:"clear"})))))),l.default.createElement("br",{className:"clear"})):n?l.default.createElement("p",null," ",n.message||a("Not Found","elementor-pro")," "):a("Loading...","elementor-pro")}Item.propTypes={id:n.string}},3998:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatToLocalDate=formatToLocalDate,t.formatToLocalDateTime=function formatToLocalDateTime(e){return`${formatToLocalDate(e)} ${formatToLocalTime(e)}`},t.formatToLocalTime=formatToLocalTime;const r=moment.localeData();function formatToLocalDate(e){return wp.date.format(r.longDateFormat("LL"),e)}function formatToLocalTime(e){return wp.date.format(r.longDateFormat("LT"),e)}},2534:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function downloadBlob(e,t=""){const r=document.createElement("a");r.setAttribute("href",URL.createObjectURL(e)),r.style.visibility="hidden",t&&r.setAttribute("download",t);document.body.appendChild(r),r.click(),document.body.removeChild(r)}},1230:(e,t,r)=>{"use strict";var a="__global_unique_id__";e.exports=function(){return r.g[a]=(r.g[a]||0)+1}},3996:e=>{"use strict";e.exports=function(e,t,r,a,n,o,l,s){if(!e){var i;if(void 0===t)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,a,n,o,l,s],c=0;(i=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw i.framesToPop=1,i}}},8772:(e,t,r)=>{"use strict";var a=r(331);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,t,r,n,o,l){if(l!==a){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},3615:(e,t,r)=>{e.exports=r(8772)()},331:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2634:(e,t,r)=>{"use strict";function getHashPath(){const e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}r.r(t),r.d(t,{createHashSource:()=>createHashSource});let createHashSource=(e="/")=>({get location(){return{pathname:getHashPath(),search:""}},addEventListener(e,t){"popstate"===e&&window.addEventListener("hashchange",t)},removeEventListener(e,t){"popstate"===e&&window.addEventListener("hashchange",t)},history:{get entries(){return[{pathname:getHashPath(),search:""}]},get index(){return 0},get state(){},pushState(e,t,r){!function pushHashPath(e){window.location.hash="#"+e}(r)},replaceState(e,t,r){!function replaceHashPath(e){const t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,t>=0?t:0)+"#"+e)}(r)}}})},1895:e=>{"use strict";var warning=function(){};e.exports=warning},7363:e=>{"use strict";e.exports=React},8003:e=>{"use strict";e.exports=wp.i18n},3119:e=>{function _extends(){return e.exports=_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t
{e.exports=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}},o={};function __webpack_require__(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.m=n,__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,__webpack_require__.t=function(r,a){if(1&a&&(r=this(r)),8&a)return r;if("object"==typeof r&&r){if(4&a&&r.__esModule)return r;if(16&a&&"function"==typeof r.then)return r}var n=Object.create(null);__webpack_require__.r(n);var o={};e=e||[null,t({}),t([]),t(t)];for(var l=2&a&&r;"object"==typeof l&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach((e=>o[e]=()=>r[e]));return o.default=()=>r,__webpack_require__.d(n,o),n},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce(((t,r)=>(__webpack_require__.f[r](e,t),t)),[])),__webpack_require__.u=e=>{if(972===e)return"jszip.vendor.99a5b769619f50a6cb60.bundle.min.js"},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},a="elementor-pro:",__webpack_require__.l=(e,t,n,o)=>{if(r[e])r[e].push(t);else{var l,s;if(void 0!==n)for(var i=document.getElementsByTagName("script"),u=0;u
{l.onerror=l.onload=null,clearTimeout(d);var n=r[e];if(delete r[e],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach((e=>e(a))),t)return t(a)},d=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=onScriptComplete.bind(null,l.onerror),l.onload=onScriptComplete.bind(null,l.onload),s&&document.head.appendChild(l)}},__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;__webpack_require__.g.importScripts&&(e=__webpack_require__.g.location+"");var t=__webpack_require__.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var a=r.length-1;a>-1&&!e;)e=r[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=e})(),(()=>{var e={294:0};__webpack_require__.f.j=(t,r)=>{var a=__webpack_require__.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else{var n=new Promise(((r,n)=>a=e[t]=[r,n]));r.push(a[2]=n);var o=__webpack_require__.p+__webpack_require__.u(t),l=new Error;__webpack_require__.l(o,(r=>{if(__webpack_require__.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var n=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+n+": "+o+")",l.name="ChunkLoadError",l.type=n,l.request=o,a[1](l)}}),"chunk-"+t,t)}};var webpackJsonpCallback=(t,r)=>{var a,n,[o,l,s]=r,i=0;if(o.some((t=>0!==e[t]))){for(a in l)__webpack_require__.o(l,a)&&(__webpack_require__.m[a]=l[a]);if(s)s(__webpack_require__)}for(t&&t(r);i
{"use strict";var e=__webpack_require__(3203),t=e(__webpack_require__(7363)),r=e(__webpack_require__(7670)),a=e(__webpack_require__(3042)),n=e(__webpack_require__(6094));$e.components.register(new r.default),$e.components.register(new a.default);const o=elementorCommon.config.isDebug?t.default.StrictMode:t.default.Fragment;ReactDOM.render(t.default.createElement(o,null,t.default.createElement(n.default,null)),document.getElementById("e-form-submissions"))})()})();