1import{am as a}from"./uZB5FNSR.js";function n(e){const t={},r=String(e.locale||"").trim(),i=String(e.country||"").trim().toUpperCase();return r&&(t["X-Locale"]=r),i&&(t["X-Country"]=i),t}function c(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function s(e){if(e?.code!==0||!c(e.data)||!Array.isArray(e.data.categories))throw new Error(e?.errmsg||"creation_agent_categories_invalid_response");return e}function l(e){const t=e?.data;if(e?.code!==0||!c(t)||!Array.isArray(t.templates)||!Number.isFinite(Number(t.selected_category_id))||!Number.isFinite(Number(t.page))||typeof t.has_more!="boolean")throw new Error(e?.errmsg||"creation_agent_templates_invalid_response");return e}async function m(e){const t=new URLSearchParams({locale:e.locale}),r=await a(`/v1/ai/editor/pg_agent_template_category_list?${t.toString()}`,null,"GET",void 0,n(e));return s(r)}async function d(e){const t=Math.max(1,Math.floor(Number(e.page)||1)),r=Math.min(50,Math.max(1,Math.floor(Number(e.page_size)||20))),i=new URLSearchParams({page:String(t),page_size:String(r),platform:e.platform});Number(e.category_id)>0&&i.set("category_id",String(e.category_id));const o=String(e.keyword||"").trim();o&&i.set("keyword",o);const g=await a(`/v1/ai/editor/pg_agent_template_list?${i.toString()}`,null,"GET",void 0,n(e));return l(g)}function f(e={}){const t=Math.max(1,Math.floor(Number(e.page)||1)),r=Math.min(100,Math.max(1,Math.floor(Number(e.page_size)||20))),i=new URLSearchParams({page:String(t),page_size:String(r)});return a(`/v1/ai/web/upload/originals?${i.toString()}`,null,"GET")}function h(e){return a("/v2/ai-product/tasks/batch-delete",e,"POST","JSON")}function p(e){return a("/v1/ai/web/aihug/batch-delete",e,"POST","JSON")}function S(e){return a("/v1/ai/web/aihug/update_title",e,"POST","JSON")}function _(e){return a("/v1/ai-avatar/my/tasks/batch-delete",e,"POST","JSON")}function y(e){const t=new URLSearchParams({page:String(e.page??1),size:String(e.size)});return a(`/v1/ai-avatar/ecommerce/templates?${t.toString()}`,null,"GET",void 0,n(e))}function b(e){const t=new URLSearchParams({page:String(e.page??1),size:String(e.size??20),platform:String(e.platform||"web").trim()||"web"});return a(`/v1/ai/image_prompt/all_prompt_list?${t.toString()}`,null,"GET",void 0,n(e))}export{m as a,d as b,h as c,p as d,_ as e,b as f,f as g,y as h,S as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.