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EC,cAAe,CAAC;IAC5BC,UAAU,CAAC,CAAC;EACb,CAAC;EAED,MAAMD,cAAc,GAAGA,CAAEe,CAAI,EAAEC,CAAI,KAAM;IAAA,IAAAC,QAAA,EAAAC,QAAA;IACxC,IAAKH,CAAC,CAACxB,KAAK,KAAKyB,CAAC,CAACzB,KAAK,EAAG;MAC1B,OAAOwB,CAAC,CAACvB,QAAQ,GAAIwB,CAAC,CAACxB,QAAS;IACjC;IAEA,MAAM2B,WAAW,GAAK5B,KAAc;MAAA,IAAA6B,qBAAA;MAAA,OACnC7B,KAAK,IAAA6B,qBAAA,GAAGvC,WAAW,CAAEU,KAAK,CAAE,EAAEC,QAAQ,cAAA4B,qBAAA,cAAAA,qBAAA,GAAI,EAAE,GAAGC,QAAQ;IAAA;IAExD,MAAMC,SAAS,GAAGH,WAAW,CAAEJ,CAAC,CAACxB,KAAM,CAAC;IACxC,MAAMgC,SAAS,GAAGJ,WAAW,CAAEH,CAAC,CAACzB,KAAM,CAAC;IAExC,OACC+B,SAAS,GAAGC,SAAS,IACrB,EAAAN,QAAA,GAAEF,CAAC,CAACxB,KAAK,cAAA0B,QAAA,cAAAA,QAAA,GAAI,MAAM,EAAGO,aAAa,EAAAN,QAAA,GAAEF,CAAC,CAACzB,KAAK,cAAA2B,QAAA,cAAAA,QAAA,GAAI,MAAO,CAAC;EAE1D,CAAC;EAED,MAAMO,KAAK,GAAGA,CAAA,KAAM;IACnB3C,KAAK,GAAG,EAAE;IACVmB,UAAU,CAAC,CAAC;EACb,CAAC;EAED,MAAMyB,OAAO,GAAG;IACfhD,IAAI;IACJQ,QAAQ;IACR0B,aAAa;IACbV,QAAQ;IACRC,QAAQ;IACRM,MAAM;IACNR,UAAU;IACVwB;EACD,CAAC;EAED,OAAOC,OAAO;AACf,C","sources":["webpack://popup-maker/core/external window [\"wp\",\"element\"]?","webpack://popup-maker/core/webpack/bootstrap?","webpack://popup-maker/core/webpack/runtime/compat get default export?","webpack://popup-maker/core/webpack/runtime/define property getters?","webpack://popup-maker/core/webpack/runtime/hasOwnProperty shorthand?","webpack://popup-maker/core/webpack/runtime/make namespace object?","webpack://popup-maker/core/./packages/registry/src/index.ts?"],"sourcesContent":["module.exports = window[\"wp\"][\"element\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { useSyncExternalStore } from '@wordpress/element';\n\nexport declare namespace PopupMaker {\n\texport interface RegistryGroup {\n\t\tpriority: number;\n\t\tlabel?: string;\n\t}\n\n\texport interface RegistryItem {\n\t\t/** Unique identifier for the item */\n\t\tid: string;\n\t\t/** Numeric priority for sorting (lower numbers come first) */\n\t\tpriority?: number;\n\t\t/** Group for sorting */\n\t\tgroup?: string;\n\t}\n\n\texport type RegistryConfig = {\n\t\t/** Unique name for the registry */\n\t\tname: string;\n\t\t/**\n\t\t * Group configuration with priorities (merged with core and global groups)\n\t\t * Use numbers between 0-99 to insert around core groups (10-30)\n\t\t */\n\t\tgroups?: Record< string, RegistryGroup >;\n\n\t\t/**\n\t\t * Default group for items that don't specify a group\n\t\t */\n\t\tdefaultGroup?: string;\n\t};\n}\n\n/**\n * Creates a type-safe registry with priority-based sorting\n * @param {PopupMaker.RegistryConfig<T>} config\n */\nexport function createRegistry< T extends PopupMaker.RegistryItem >(\n\tconfig: PopupMaker.RegistryConfig\n) {\n\tconst { name, groups = {}, defaultGroup = '' } = config;\n\tlet groupConfig = { ...groups };\n\tlet items: T[] = [];\n\tconst defaultPriority = 10;\n\n\t// Create a Set to track subscribers\n\tconst subscribers = new Set< () => void >();\n\n\t/**\n\t * Registers a new item with the registry\n\t * @param {T} item\n\t */\n\tconst register = ( item: T ) => {\n\t\tconst newItem = {\n\t\t\t...item,\n\t\t\tgroup: item.group ?? defaultGroup,\n\t\t\tpriority: item.priority ?? defaultPriority,\n\t\t} as T;\n\n\t\t// Using the unique id, group and priority, check if the item already exists.\n\t\tconst existingItem = items.find(\n\t\t\t( { id, group } ) => id === newItem.id && group === newItem.group\n\t\t);\n\n\t\t// If the item already exists, replace it.\n\t\tif ( existingItem ) {\n\t\t\titems = items.map( ( _item ) =>\n\t\t\t\t_item.id === newItem.id ? newItem : _item\n\t\t\t);\n\t\t} else {\n\t\t\titems.push( newItem );\n\t\t}\n\n\t\t// New sorting logic using configured group priorities\n\t\titems.sort( sortComparator );\n\n\t\t// Notify subscribers when items change\n\t\temitChange();\n\t};\n\n\t/**\n\t * Retrieves all items sorted by priority\n\t */\n\tconst getItems = () => [ ...items ];\n\n\t/**\n\t * React hook version of getItems\n\t */\n\t/**\n\t * React hook to access registry items with automatic re-renders\n\t * @return {T[]} Sorted registry items\n\t */\n\tconst useItems = (): T[] => {\n\t\tconst subscribe = ( listener: () => void ) => {\n\t\t\tsubscribers.add( listener );\n\t\t\treturn () => subscribers.delete( listener );\n\t\t};\n\n\t\tconst getSnapshot = () => items;\n\n\t\treturn useSyncExternalStore(\n\t\t\tsubscribe,\n\t\t\tgetSnapshot,\n\t\t\tgetSnapshot // Fallback for SSR\n\t\t);\n\t};\n\n\t/**\n\t * Filter items with a custom predicate\n\t * @param {Function} predicate\n\t */\n\tconst filter = ( predicate: ( item: T ) => boolean ) =>\n\t\titems.filter( predicate );\n\n\t/**\n\t * Emits a change event to all subscribers\n\t */\n\tconst emitChange = () => {\n\t\tsubscribers.forEach( ( listener ) => listener() );\n\t};\n\n\tconst registerGroup = (\n\t\tgroupName: string,\n\t\tgroupOptions: PopupMaker.RegistryGroup\n\t) => {\n\t\tgroupConfig = { ...groupConfig, [ groupName ]: groupOptions };\n\t\t// Re-sort existing items with new group configuration\n\t\titems.sort( sortComparator );\n\t\temitChange();\n\t};\n\n\tconst sortComparator = ( a: T, b: T ) => {\n\t\tif ( a.group === b.group ) {\n\t\t\treturn a.priority! - b.priority!;\n\t\t}\n\n\t\tconst getPriority = ( group?: string ) =>\n\t\t\tgroup ? groupConfig[ group ]?.priority ?? 50 : Infinity;\n\n\t\tconst aPriority = getPriority( a.group );\n\t\tconst bPriority = getPriority( b.group );\n\n\t\treturn (\n\t\t\taPriority - bPriority ||\n\t\t\t( a.group ?? 'zzzz' ).localeCompare( b.group ?? 'zzzz' )\n\t\t);\n\t};\n\n\tconst clear = () => {\n\t\titems = [];\n\t\temitChange();\n\t};\n\n\tconst context = {\n\t\tname,\n\t\tregister,\n\t\tregisterGroup,\n\t\tgetItems,\n\t\tuseItems,\n\t\tfilter,\n\t\temitChange,\n\t\tclear,\n\t};\n\n\treturn context;\n}\n"],"names":["useSyncExternalStore","createRegistry","config","name","groups","defaultGroup","groupConfig","items","defaultPriority","subscribers","Set","register","item","_item$group","_item$priority","newItem","group","priority","existingItem","find","id","map","_item","push","sort","sortComparator","emitChange","getItems","useItems","subscribe","listener","add","delete","getSnapshot","filter","predicate","forEach","registerGroup","groupName","groupOptions","a","b","_a$group","_b$group","getPriority","_groupConfig$group$pr","Infinity","aPriority","bPriority","localeCompare","clear","context"],"sourceRoot":""}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists