Liferay.Loader.define("segments-web@3.0.68/js/utils/contributors.es",["module","exports","require","./constants.es","./odata.es"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.initialContributorsToContributors=function(e,t){const n={conjunctionId:r.CONJUNCTIONS.AND},{conjunctionId:i}=e.find((e=>e.conjunctionId))||n;return e.map((e=>{const n=t&&t.find((t=>e.propertyKey===t.propertyKey));return{conjunctionId:e.conjunctionId||i,conjunctionInputId:e.conjunctionInputId,criteriaMap:e.initialQuery||null,entityName:n&&n.entityName,inputId:e.inputId,modelLabel:n&&n.name,properties:n&&n.properties,propertyKey:e.propertyKey,query:e.initialQuery?(0,o.buildQueryString)([e.initialQuery],e.conjunctionId||i,n&&n.properties):""}}))},t.applyCriteriaChangeToContributors=function(e,t){return e.map((e=>{const{conjunctionId:n,properties:r,propertyKey:i}=e;return t.propertyKey===i?c(c({},e),{},{criteriaMap:t.criteriaChange,query:(0,o.buildQueryString)([t.criteriaChange],n,r)}):e}))},t.applyConjunctionChangeToContributor=function(e,t){if(-1===r.SUPPORTED_CONJUNCTIONS.findIndex((e=>e.name===t)))return e;return e.map((e=>c(c({},e),{},{conjunctionId:t})))};var r=n("./constants.es"),o=n("./odata.es");function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}}}));
//# sourceMappingURL=contributors.es.js.map