{"version":3,"sources":["webpack://socialDevelop_utils/webpack/bootstrap","webpack://socialDevelop_utils/external \"wp['i18n']\"","webpack://socialDevelop_utils/./lib/options.tsx","webpack://socialDevelop_utils/./lib/helpers.tsx","webpack://socialDevelop_utils/./lib/factory/context.tsx","webpack://socialDevelop_utils/./lib/factory/ajax/routeHttpVerbEnum.tsx","webpack://socialDevelop_utils/./lib/factory/ajax/commonUrlBuilder.tsx","webpack://socialDevelop_utils/./lib/factory/ajax/parseResult.tsx","webpack://socialDevelop_utils/./lib/factory/ajax/commonRequest.tsx","webpack://socialDevelop_utils/./lib/factory/ajax/createRequestFactory.tsx","webpack://socialDevelop_utils/./lib/factory/ajax/corruptRestApi.tsx","webpack://socialDevelop_utils/./lib/factory/i18n.tsx","webpack://socialDevelop_utils/./lib/wp-api/rest.plugin.get.tsx","webpack://socialDevelop_utils/external \"React\"","webpack://socialDevelop_utils/external \"wp\""],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","0","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","wp","BaseOptions","constructor","slug","textDomain","version","restUrl","restNamespace","restRoot","restQuery","restNonce","publicUrl","replace","g","toUpperCase","env","arguments","undefined","slugCamelCase","untrailingslashit","str","endsWith","trailingslashit","createContextFactory","StoreContext","createContext","StoreProvider","_ref","children","React","createElement","Provider","useStores","useContext","RouteHttpVerb","WP_REST_API_USE_GLOBAL_METHOD","commonUrlBuilder","location","params","nonce","options","apiUrl","Url","query","permalinkPath","rest_route","pathname","foundParams","path","match","group","getParams","checkParam","keys","indexOf","usePath","namespace","useThisProtocol","href","protocol","set","_wpnonce","method","GET","_method","deepMerge","all","toString","async","parseResult","url","cloneForFallback","clone","json","e","body","text","lastError","console","warn","line","split","startsWith","JSON","parse","commonRequest","request","routeRequest","settings","POST","allowBody","apiUrlBuilt","fetch","headers","stringify","ok","responseJSON","detectCorrupRestApiFailed","resultAny","createRequestFactory","urlBuilder","passOptions","handleCorrupRestApi","resolve","forceRerequest","setTimeout","document","getElementById","error","createLocalizationFactory","wpi18nLazy","i18n","localeData","setLocaleData","_n","single","plural","count","_len","args","Array","_key","wpi18n","_nx","context","_len2","_key2","_x","_len3","_key3","__","_len4","_key4","_i","translation","components","interpolate","mixedString","locationRestPluginGet"],"mappings":"oCACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EA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AC,IAAJP,EAAIO,EAAA,GAAA9G,UAAA8G,GAChF,OAAOJ,UAAeA,MAAWP,EAAQC,EAAQC,EAAOO,EAASzH,MAAUoH,IA0C7DQ,GA/BlB,SAAYZ,EAAgBS,GAAyC,QAAAI,EAAAhH,UAAAtE,OAArB6K,EAAI,IAAAC,MAAAQ,EAAA,EAAAA,EAAA,KAAAC,EAAA,EAAAA,EAAAD,EAAAC,IAAJV,EAAIU,EAAA,GAAAjH,UAAAiH,GAChD,OAAOP,UAAeA,KAAUP,EAAQS,EAASzH,MAAUoH,IA8BzCW,GAnBtB,SAAYf,GAAwC,QAAAgB,EAAAnH,UAAAtE,OAArB6K,EAAI,IAAAC,MAAAW,EAAA,EAAAA,EAAA,KAAAC,EAAA,EAAAA,EAAAD,EAAAC,IAAJb,EAAIa,EAAA,GAAApH,UAAAoH,GAC/B,OAAOV,UAAeA,KAAUP,EAAQhH,MAAUoH,IAkB5Bc,GAP1B,SAAYC,EAAqBC,GAC7B,OAAOC,IAAY,CACfC,YAAaH,EACbC,iBCxEL,MAAMG,EAAgD,CACzD1F,KAAM,UACNc,OAAQ5B,EAAc6B,M,gBCV1B7F,EAAOD,QAAU4D,O,gBCAjB3D,EAAOD,QAAU+B","file":"index.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t0: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonpsocialDevelop_utils\"] = window[\"webpackJsonpsocialDevelop_utils\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([17,1]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","module.exports = wp['i18n'];","/**\n * See PHP file inc/Assets.php.\n */\nabstract class BaseOptions {\n public slug: string;\n public textDomain: string;\n public version: string;\n public restUrl?: string;\n public restNamespace?: string;\n public restRoot?: string;\n public restQuery?: {};\n public restNonce?: string;\n public publicUrl?: string;\n\n /**\n * Convert a slug like \"my-plugin\" to \"myPlugin\". This can\n * be useful for library naming (window[\"\"] is bad because the hyphens).\n *\n * @param slug\n * @returns\n */\n public static slugCamelCase(slug: string) {\n return slug.replace(/-([a-z])/g, (g) => g[1].toUpperCase());\n }\n\n /**\n * Get the slug from the current process (webpack) instead of the PHP plugin output.\n * For some cases you need to use that.\n *\n * @param env\n * @param camelCase\n */\n public static getPureSlug(env: typeof process.env, camelCase = false) {\n return camelCase ? BaseOptions.slugCamelCase(env.slug) : env.slug;\n }\n}\n\nexport { BaseOptions };\n","const untrailingslashit = (str: string): string =>\n str.endsWith(\"/\") || str.endsWith(\"\\\\\") ? untrailingslashit(str.slice(0, -1)) : str;\nconst trailingslashit = (str: string): string => `${untrailingslashit(str)}/`;\n\n// Allows to make an interface extension and make some properties optional (https://git.io/JeK6J)\ntype AllKeyOf = T extends never ? never : keyof T;\ntype Optional = { [P in Extract]?: T[P] };\ntype WithOptional> = T extends never ? never : Omit & Optional;\n\nexport { untrailingslashit, trailingslashit, AllKeyOf, Optional, WithOptional };\n","import { createContext, FC, useContext } from \"react\";\n\n/* istanbul ignore next: no logic in this factory! */\n/**\n * Create context relevant objects to use within React.\n *\n * @param object\n * @returns\n */\nfunction createContextFactory(object: T) {\n /**\n * MobX stores collection\n */\n const StoreContext = createContext(object);\n\n /**\n * MobX HOC to get the context via hook.\n *\n * @param children\n */\n const StoreProvider: FC<{}> = ({ children }) => (\n {children}\n );\n\n /**\n * Get all the MobX stores via a single hook.\n */\n const useStores = () => useContext(StoreContext);\n\n return { StoreContext, StoreProvider, useStores };\n}\n\nexport { createContextFactory };\n","enum RouteHttpVerb {\n GET = \"GET\",\n POST = \"POST\",\n PUT = \"PUT\",\n DELETE = \"DELETE\",\n PATCH = \"PATCH\"\n}\n\nexport { RouteHttpVerb };\n","import Url from \"url-parse\";\nimport { trailingslashit, untrailingslashit } from \"../../helpers\";\nimport { BaseOptions } from \"../../options\";\nimport { RouteHttpVerb } from \".\";\nimport deepMerge from \"deepmerge\";\n\n// Use _method instead of Http verb\nconst WP_REST_API_USE_GLOBAL_METHOD = true;\n\ninterface RouteLocationInterface {\n path: string;\n namespace?: string;\n method?: RouteHttpVerb;\n}\n\ntype RouteRequestInterface = {}; // POST-Query in JSON-format\ntype RouteParamsInterface = {}; // Parameters in IRouteLocationInterface#path which gets resolved like \"example/:id\", items not found in the URL are appended as GET\ntype RouteResponseInterface = {}; // Result in JSON-format\n\ninterface RequestArgs {\n location: RouteLocationInterface;\n params?: RouteParamsInterface;\n options: {\n restRoot: BaseOptions[\"restRoot\"];\n restNamespace: BaseOptions[\"restNamespace\"];\n restNonce?: BaseOptions[\"restNonce\"];\n restQuery?: BaseOptions[\"restQuery\"];\n };\n}\n\n/**\n * Build an URL for a specific scheme.\n *\n * @param param0\n */\nfunction commonUrlBuilder({\n location,\n params = {},\n nonce = true,\n options\n}: {\n nonce?: boolean;\n} & RequestArgs) {\n const apiUrl = new Url(options.restRoot, true);\n const { query } = apiUrl;\n const permalinkPath = (query.rest_route as string) || apiUrl.pathname; // Determine path from permalink settings\n\n // Find dynamic parameters from URL bindings (like /user/:id)\n const foundParams: string[] = [];\n const path = location.path.replace(/:([A-Za-z0-9-_]+)/g, (match: string, group: string) => {\n foundParams.push(group);\n return (params as any)[group];\n });\n const getParams: any = {};\n\n // Find undeclared body params (which are not bind above) and add it to GET query\n for (const checkParam of Object.keys(params)) {\n if (foundParams.indexOf(checkParam) === -1) {\n getParams[checkParam] = (params as any)[checkParam]; // We do not need `encodeURIComponent` as it is supported by `url-parse` already\n }\n }\n\n const usePath =\n trailingslashit(permalinkPath) + untrailingslashit(location.namespace || options.restNamespace) + path;\n\n // Force protocol from parent location\n const useThisProtocol = new Url(window.location.href).protocol.slice(0, -1);\n apiUrl.set(\"protocol\", useThisProtocol);\n\n // Set path depending on permalink settings\n if (query.rest_route) {\n query.rest_route = usePath; // eslint-disable-line @typescript-eslint/naming-convention\n } else {\n apiUrl.set(\"pathname\", usePath); // Set path\n }\n\n // Append others\n if (nonce && options.restNonce) {\n query._wpnonce = options.restNonce;\n }\n if (WP_REST_API_USE_GLOBAL_METHOD && location.method && location.method !== RouteHttpVerb.GET) {\n query._method = location.method;\n }\n\n return apiUrl.set(\"query\", deepMerge.all([options.restQuery, getParams, query])).toString();\n}\n\nexport {\n WP_REST_API_USE_GLOBAL_METHOD,\n RouteLocationInterface,\n RouteRequestInterface,\n RouteParamsInterface,\n RouteResponseInterface,\n RequestArgs,\n commonUrlBuilder,\n Url\n};\n","import { RouteResponseInterface } from \".\";\n\n/**\n * Get the result of the `Response`. It also handles multiline responses, e. g.\n * a PHP `Notice:` message is output through a conflicting plugin:\n */\nasync function parseResult(url: string, result: Response) {\n const cloneForFallback = result.clone();\n try {\n return (await result.json()) as TResponse;\n } catch (e) {\n // Something went wrong, try each line as result of a JSON string\n const body = await cloneForFallback.text();\n console.warn(`The response of ${url} contains unexpected JSON, try to resolve the JSON line by line...`, {\n body\n });\n let lastError: any;\n for (const line of body.split(\"\\n\")) {\n if (line.startsWith(\"[\") || line.startsWith(\"{\")) {\n try {\n return JSON.parse(line) as TResponse;\n } catch (e) {\n lastError = e;\n }\n }\n }\n throw lastError;\n }\n}\n\nexport { parseResult };\n","import {\n WP_REST_API_USE_GLOBAL_METHOD,\n RouteRequestInterface,\n RouteParamsInterface,\n RouteResponseInterface,\n RequestArgs,\n commonUrlBuilder,\n RouteHttpVerb\n} from \"./\";\nimport deepMerge from \"deepmerge\";\nimport Url from \"url-parse\";\nimport \"whatwg-fetch\"; // window.fetch polyfill\nimport { parseResult } from \".\";\n\n/**\n * Build and execute a specific REST query.\n *\n * @see urlBuilder\n * @returns Result of REST API\n * @throws\n */\nasync function commonRequest<\n TRequest extends RouteRequestInterface,\n TParams extends RouteParamsInterface,\n TResponse extends RouteResponseInterface\n>({\n location,\n options,\n request: routeRequest,\n params,\n settings = {}\n}: {\n request?: TRequest;\n params?: TParams;\n settings?: Partial<{ -readonly [P in keyof Request]: Request[P] }>;\n} & RequestArgs): Promise {\n const url = commonUrlBuilder({ location, params, nonce: false, options });\n\n // Use global parameter (see https://developer.wordpress.org/rest-api/using-the-rest-api/global-parameters/)\n if (WP_REST_API_USE_GLOBAL_METHOD && location.method && location.method !== RouteHttpVerb.GET) {\n settings.method = RouteHttpVerb.POST;\n } else {\n settings.method = RouteHttpVerb.GET;\n }\n\n // Request with GET/HEAD method cannot have body\n const apiUrl = new Url(url, true);\n const allowBody = [\"HEAD\", \"GET\"].indexOf(settings.method) === -1;\n if (!allowBody && routeRequest) {\n apiUrl.set(\"query\", deepMerge(apiUrl.query, routeRequest));\n }\n\n const apiUrlBuilt = apiUrl.toString();\n const result = await window.fetch(\n apiUrlBuilt,\n deepMerge.all([\n settings,\n {\n headers: {\n \"Content-Type\": \"application/json;charset=utf-8\",\n \"X-WP-Nonce\": options.restNonce\n },\n body: allowBody ? JSON.stringify(routeRequest) : undefined\n }\n ])\n );\n\n // `window.fetch` does not throw an error if the server response an error code.\n if (!result.ok) {\n let responseJSON = undefined;\n try {\n responseJSON = await parseResult(apiUrlBuilt, result);\n } catch (e) {\n // Silence is golden.\n }\n\n // Set this request as failing so the endpoint is probably corrupt (see `corrupRestApi.tsx`)\n settings.method === RouteHttpVerb.GET &&\n (window.detectCorrupRestApiFailed = (window.detectCorrupRestApiFailed || 0) + 1);\n\n const resultAny = result as any;\n resultAny.responseJSON = responseJSON;\n throw resultAny;\n }\n\n return parseResult(apiUrlBuilt, result);\n}\n\nexport { commonRequest };\n","import { BaseOptions } from \"../../options\";\nimport { WithOptional } from \"../..\";\nimport {\n commonUrlBuilder,\n RouteRequestInterface,\n RouteParamsInterface,\n RouteResponseInterface,\n commonRequest\n} from \"./\";\n\n/**\n * Create a uri builder and request function for your specific plugin depending\n * on the rest root and additional parameters.\n *\n * @param options\n * @see urlBuilder\n * @see request\n */\nfunction createRequestFactory(options: BaseOptions) {\n const urlBuilder = (passOptions: WithOptional[0], \"options\">) =>\n commonUrlBuilder({\n ...passOptions,\n options: {\n restNamespace: options.restNamespace,\n restNonce: options.restNonce,\n restQuery: options.restQuery,\n restRoot: options.restRoot\n }\n });\n\n const request = <\n Request extends RouteRequestInterface,\n Params extends RouteParamsInterface,\n Response extends RouteResponseInterface\n >(\n passOptions: WithOptional[0], \"options\"> & {\n params?: Params;\n request?: Request;\n }\n ): Promise =>\n commonRequest({\n ...passOptions,\n options: {\n restNamespace: options.restNamespace,\n restNonce: options.restNonce,\n restQuery: options.restQuery,\n restRoot: options.restRoot\n }\n });\n\n return {\n urlBuilder,\n request\n };\n}\n\nexport { createRequestFactory };\n","declare global {\n interface Window {\n /**\n * This number indicates the failed `GET` requests for all REST API calls.\n * See also `commonRequest.tsx`.\n */\n detectCorrupRestApiFailed: number;\n }\n}\n\nconst WAIT_TO_TEST = 10000;\n\nconst NOTICE_ID = \"notice-corrupt-rest-api\";\n\n/**\n * Register a new endpoint which needs to resolve to a valid JSON result. In this way we\n * can detect a corrupt REST API namespace e. g. it is blocked through a security plugin.\n */\nfunction handleCorrupRestApi(resolve: Record Promise>, forceRerequest = false) {\n // Initially set\n window.detectCorrupRestApiFailed = window.detectCorrupRestApiFailed || 0;\n\n setTimeout(async () => {\n const notice = document.getElementById(NOTICE_ID);\n\n // Only in backend and when a corrupt REST API detected\n if (notice && (window.detectCorrupRestApiFailed > 0 || forceRerequest)) {\n for (const namespace of Object.keys(resolve)) {\n try {\n await resolve[namespace]();\n } catch (e) {\n // notice.style.display = \"block\";\n // const li = document.createElement(\"li\");\n // li.innerHTML = `- ${namespace}`;\n // notice.childNodes[1].appendChild(li);\n console.error(`Corrupt REST API detected: ${namespace}`);\n }\n }\n }\n }, WAIT_TO_TEST);\n}\n\nexport { handleCorrupRestApi };\n","// @see https://github.com/Automattic/wp-calypso/blob/master/packages/i18n-calypso/src/index.js\n\nimport { ReactNode, ReactElement } from \"react\";\nimport interpolate from \"interpolate-components\";\nimport * as wpi18n from \"@wordpress/i18n\";\nimport wp from \"wp\";\n\n/**\n * Create multiple functions for a specific plugin so they can be localized.\n *\n * @param slug The slug which you have registered your i18n assets\n * @returns\n */\nfunction createLocalizationFactory(slug: string) {\n const { wpi18nLazy } = window as any;\n if (wpi18nLazy && wpi18nLazy[slug] && wp && wp.i18n) {\n for (const localeData of wpi18nLazy[slug]) {\n wp.i18n.setLocaleData(localeData, slug);\n }\n }\n\n /**\n * Translates and retrieves the singular or plural form based on the supplied number.\n * For arguments sprintf is used, see http://www.diveintojavascript.com/projects/javascript-sprintf for\n * specification and usage.\n *\n * @see https://github.com/WordPress/gutenberg/tree/master/packages/i18n#_n\n * @see https://github.com/WordPress/gutenberg/tree/master/packages/i18n#sprintf\n */\n function _n(single: string, plural: string, count: number, ...args: any[]): string {\n return wpi18n.sprintf(wpi18n._n(single, plural, count, slug), ...args) as string;\n }\n\n /**\n * Translates and retrieves the singular or plural form based on the supplied number, with gettext context.\n * For arguments sprintf is used, see http://www.diveintojavascript.com/projects/javascript-sprintf for\n * specification and usage.\n *\n * @see https://github.com/WordPress/gutenberg/tree/master/packages/i18n#_n\n * @see https://github.com/WordPress/gutenberg/tree/master/packages/i18n#sprintf\n */\n function _nx(single: string, plural: string, count: number, context: string, ...args: any[]): string {\n return wpi18n.sprintf(wpi18n._nx(single, plural, count, context, slug), ...args) as string;\n }\n\n /**\n * Retrieve translated string with gettext context.\n * For arguments sprintf is used, see http://www.diveintojavascript.com/projects/javascript-sprintf for\n * specification and usage.\n *\n * @see https://github.com/WordPress/gutenberg/tree/master/packages/i18n#_n\n * @see https://github.com/WordPress/gutenberg/tree/master/packages/i18n#sprintf\n */\n function _x(single: string, context: string, ...args: any[]): string {\n return wpi18n.sprintf(wpi18n._x(single, context, slug), ...args) as string;\n }\n\n /**\n * Retrieve the translation of text.\n * For arguments sprintf is used, see http://www.diveintojavascript.com/projects/javascript-sprintf for\n * specification and usage.\n *\n * @see https://github.com/WordPress/gutenberg/tree/master/packages/i18n#_n\n * @see https://github.com/WordPress/gutenberg/tree/master/packages/i18n#sprintf\n */\n function __(single: string, ...args: any[]): string {\n return wpi18n.sprintf(wpi18n.__(single, slug), ...args) as string;\n }\n\n /**\n * This function allows you to interpolate react components to your translations.\n * You have to pass an already translated string as argument! For this you can use the other\n * i18n functions like _n() or __().\n *\n * A translation can look like this: \"Hello {{a}}click me{{/a}}.\" and you have to pass\n * a component with key \"a\".\n */\n function _i(translation: string, components?: { [placeholder: string]: ReactElement }): any {\n return interpolate({\n mixedString: translation,\n components\n }) as ReactNode;\n }\n\n return { _n, _nx, _x, __, _i };\n}\n\nexport { createLocalizationFactory };\n","import {\n RouteLocationInterface,\n RouteHttpVerb,\n RouteResponseInterface,\n RouteRequestInterface,\n RouteParamsInterface\n} from \"../factory\";\n\nexport const locationRestPluginGet: RouteLocationInterface = {\n path: \"/plugin\",\n method: RouteHttpVerb.GET\n};\n\nexport type RequestRoutePluginGet = RouteRequestInterface;\n\nexport type ParamsRoutePluginGet = RouteParamsInterface;\n\nexport interface ResponseRoutePluginGet extends RouteResponseInterface {\n Name: string;\n PluginURI: string;\n Version: string;\n Description: string;\n Author: string;\n AuthorURI: string;\n TextDomain: string;\n DomainPath: string;\n Network: boolean;\n Title: string;\n AuthorName: string;\n}\n","module.exports = React;","module.exports = wp;"],"sourceRoot":""}