PageSourceSearch

https://www.politeianet.gr/assets/show.HeELzcHF.js

js politeianet.gr collected 2026-10-01 11:37:45 UTC 16,496 bytes, 49 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/wishlist-api.jqAYIh8d.js","assets/axios.MS0w9iSV.js","assets/common--ubEBI-f.ivqnILd6.js"])))=>i.map(i=>d[i]);
2import{u as j,q as b,U as m,aM as Q,aN as K,P as N,d as E,g as V,r as t,j as e,n as G,T as H,F as P,aO as p,m as v,_ as J,a as X}from"./index-jOxk7ZTv.js";import{P as Y,s as D}from"./ProductCard.djOUVW7q.js";import{u as Z}from"./useFilterState.XCdQf8Pk.js";import{u as $,a as ee}from"./wishlist.b_KW0cKZ.js";import{B as te}from"./Breadcrumb.CjJmxHHJ.js";import se from"./Pagination.tusDPwmV.js";import{P as ie}from"./index.4Zwa9IG2.js";import{SortingBase as ne}from"./Sorting._w0mW_yM.js";import{M as ae}from"./Modal.CzPpFwHS.js";import{T as re}from"./TextInput.o9ddZqYJ.js";import{T as C,S as A}from"./public-icon.pgnNGUhd.js";/* empty css                      */import{S as oe}from"./arrow back.8Y0YSs5-.js";import{S as _}from"./edit icon.fhKb5m-u.js";import"./emotion-element-f0de968e.browser.esm.kF8BHM8e.js";import"./emotion-utils.browser.esm.PLmk2cuA.js";import"./index.0_PZIyQ1.js";import"./my-library.Ju6kevAm.js";import"./FormattedPrice.2tWRY0bO.js";import"./useOpenLoginModal.d3mTyN84.js";import"./GenericStore.ODPN6v_p.js";import"./awardsHelper.l2A6I6d0.js";import"./TeacherBookBadge.U_NBU5Dg.js";import"./warning-sign._sX4G-b2.js";import"./toGreekCaps.nGPKjCu3.js";import"./Default Book.mxlZrDNP.js";import"./Availability.Dbo-BXj2.js";import"./paginationPages.mJ8jI1iQ.js";import"./chevron.IriMYtV-.js";import"./useApplyFilters.gf_9oFas.js";/* empty css                              */import"./ProductCardsSwiper.FiqIpla-.js";import"./react-select.esm.K8gsVN0T.js";import"./memoize-one.esm.sgM6qpEC.js";import"./setPrototypeOf.ahVgEFUp.js";import"./hoist-non-react-statics.cjs.mvhlgDCI.js";import"./react-select-utils.fldikllN.js";import"./variables.w40geAFS.js";import"./useEscapeKey.arlmtc99.js";const F=()=>{const s=j(),a=b({mutationFn:async r=>{m.isAuthenticated()&&await Q(r)},onSuccess:()=>{s.invalidateQueries({queryKey:["wishlists",m.isAuthenticated()?"auth":"guest"]}),s.invalidateQueries({queryKey:["wishlist"]})}});return r=>{a.mutate(r)}},ce=()=>{const s=j(),a=b({mutationFn:r=>{if(m.isAuthenticated())return K(r)},onSuccess:()=>{s.invalidateQueries({queryKey:["wishlists",m.isAuthenticated()?"auth":"guest"]})}});return r=>{a.mutate(r)}},L=({wishlist:s,setOpen:a})=>{const{t:i}=E(),r=V(),[o,h]=t.useState(s==null?void 0:s.nm),u=F(),w=ce(),[n,f]=t.useState((s==null?void 0:s.isPrivate)??!0),c=g=>{if(g.preventDefault(),o.trim().length===0){G(i("editWishlist.nameRequired"));return}u({id:s.id,nm:o,isPrivate:n}),a(!1)},k=()=>{confirm(i("editWishlist.deleteConfirmation"))&&(w(s.id),r(m.isAuthenticated()?"/profile/wishlists":"/guest/wishlists"))};return e.jsx("div",{id:"edit-wishlist-container",children:e.jsx(ae,{setOpen:a,centered:!0,hasCloseButton:!0,className:"edit-wishlist-modal",children:e.jsxs("div",{className:"edit-wishlist-container",children:[e.jsx("b",{className:"title",children:i("editWishlist.title")}),e.jsx("p",{children:i("editWishlist.description")}),e.jsxs("form",{onSubmit:c,children:[e.jsx(re,{type:"text",placeholder:i("editWishlist.listNamePlaceholder"),required:!0,value:o,onChange:g=>h(g.target.value)}),e.jsx(C,{isPrivate:n,setIsPrivate:f})]}),e.jsxs("div",{className:"footer",children:[e.jsx("span",{children:i("editWishlist.deleteWarning")}),e.jsx("button",{className:"outline",onClick:k,children:i("editWishlist.deleteButton")})]}),e.jsx("div",{className:"finish-button-container",children:e.jsx("button",{onClick:c,children:i("editWishlist.saveButton")})})]})})})};L.propTypes={wishlist:N.object,setOpen:N.func};const le=s=>t.createElement("svg",{"xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:cc":"http://creativecommons.org/ns#","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:svg":"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/svg","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd","xmlns:inkscape":"http://www.inkscape.org/namespaces/inkscape",viewBox:"0 -256 1792 1792",id:"svg2989","inkscape:version":"0.48.3.1 r9886",
2width:"100%",height:"100%","sodipodi:docname":"angle_down_font_awesome.svg",...s},t.createElement("metadata",{id:"metadata2999"},t.createElement("rdf:RDF",null,t.createElement("cc:Work",{"rdf:about":""},t.createElement("dc:format",null,"image/svg+xml"),t.createElement("dc:type",{"rdf:resource":"http://purl.org/dc/dcmitype/StillImage"})))),t.createElement("defs",{id:"defs2997"}),t.createElement("sodipodi:namedview",{pagecolor:"#ffffff",bordercolor:"#666666",borderopacity:1,objecttolerance:10,gridtolerance:10,guidetolerance:10,"inkscape:pageopacity":0,"inkscape:pageshadow":2,"inkscape:window-width":640,"inkscape:window-height":480,id:"namedview2995",showgrid:"false","inkscape:zoom":.13169643,"inkscape:cx":896,"inkscape:cy":896,"inkscape:window-x":0,"inkscape:window-y":25,"inkscape:window-maximized":0,"inkscape:current-layer":"svg2989"}),t.createElement("g",{transform:"matrix(1,0,0,-1,288.54238,1255.0508)",id:"g2991"},t.createElement("path",{d:"m 1075,800 q 0,-13 -10,-23 L 599,311 q -10,-10 -23,-10 -13,0 -23,10 L 87,777 q -10,10 -10,23 0,13 10,23 l 50,50 q 10,10 23,10 13,0 23,-10 L 576,480 969,873 q 10,10 23,10 13,0 23,-10 l 50,-50 q 10,-10 10,-23 z",id:"path2993","inkscape:connector-curvature":0,style:{fill:"currentColor"}}))),de=s=>t.createElement("svg",{"xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:cc":"http://creativecommons.org/ns#","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:svg":"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/svg","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd","xmlns:inkscape":"http://www.inkscape.org/namespaces/inkscape",viewBox:"0 -256 1792 1792",id:"svg2","inkscape:version":"0.48.3.1 r9886",width:"100%",height:"100%","sodipodi:docname":"angle_up_font_awesome.svg",...s},t.createElement("metadata",{id:"metadata12"},t.createElement("rdf:RDF",null,t.createElement("cc:Work",{"rdf:about":""},t.createElement("dc:format",null,"image/svg+xml"),t.createElement("dc:type",{"rdf:resource":"http://purl.org/dc/dcmitype/StillImage"})))),t.createElement("defs",{id:"defs10"}),t.createElement("sodipodi:namedview",{pagecolor:"#ffffff",bordercolor:"#666666",borderopacity:1,objecttolerance:10,gridtolerance:10,guidetolerance:10,"inkscape:pageopacity":0,"inkscape:pageshadow":2,"inkscape:window-width":640,"inkscape:window-height":480,id:"namedview8",showgrid:"false","inkscape:zoom":.13169643,"inkscape:cx":896,"inkscape:cy":896,"inkscape:window-x":0,"inkscape:window-y":25,"inkscape:window-maximized":0,"inkscape:current-layer":"svg2"}),t.createElement("g",{transform:"matrix(1,0,0,-1,303.72881,1232.2712)",id:"g4"},t.createElement("path",{d:"m 1075,352 q 0,-13 -10,-23 l -50,-50 q -10,-10 -23,-10 -13,0 -23,10 L 576,672 183,279 q -10,-10 -23,-10 -13,0 -23,10 l -50,50 q -10,10 -10,23 0,13 10,23 l 466,466 q 10,10 23,10 13,0 23,-10 l 466,-466 q 10,-10 10,-23 z",id:"path6","inkscape:connector-curvature":0,style:{fill:"currentColor"}}))),pe=s=>t.createElement("svg",{"xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:cc":"http://creativecommons.org/ns#","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:svg":"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/svg","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd","xmlns:inkscape":"http://www.inkscape.org/namespaces/inkscape",viewBox:"0 -256 1792 1792",id:"svg3025","inkscape:version":"0.48.3.1 r9886",width:"100%",height:"100%","sodipodi:docname":"double_angle_down_font_awesome.svg",...s},t.createElement("metadata",{id:"metadata3035"},t.createElement("rdf:RDF",null,t.createElement("cc:Work",{"rdf:about":""},t.createElement("dc:format",null,"image/svg+xml"),t.createElement("dc:type",{"rdf:resource":"http://purl.org/dc/dcmitype/StillImage"})))),t.createElement("defs",{id:"defs3033"}),t.createElement("sodipodi:namedview",{pagecolor:"#ffffff",bordercolor:"#666666",borderopacity:1,objecttolerance:10,gridtolerance:10,guidetolerance:10,"inkscape:pageopacity":0,"inkscape:pageshadow":2,"inkscape:window-width":640,"inkscape:window-height":480,id:"namedview3031",showgrid:"false","inkscape:zoom":.13169643,"inkscape:cx":896,"inkscape:cy":896,"inkscape:window-x":0,"inkscape:window-y":25,"inkscape:window-maximized":0,"inkscape:current-layer":"svg3025"}),t.createElement("g",{transform:"matrix(1,0,0,-1,296.13559,1285.4237)",id:"g3027"},t.createElement("path",{d:"m 1075,672 q 0,-13 -10,-23 L 599,183 q -10,-10 -23,-10 -13,0 -23,10 L 87,649 q -10,10 -10,23 0,13 10,23 l 50,50 q 10,10 23,10 13,0 23,-10 L 576,352 969,745 q 10,10 23,10 13,0 23,-10 l 50,-50 q 10,-10 10,-23 z m 0,384 q 0,-13 -10,-23 L 599,567 q -10,-10 -23,-10 -13,0 -23,10 L 87,1033 q -10,10 -10,23 0,13 10,23 l 50,50 q 10,10 23,10 13,0 23,-10 l 393,-393 393,393 q 10,10 23,10 13,0 23,-10 l 50,-50 q 10,-10 10,-23 z",id:"path3029","inkscape:connector-curvature":0,style:{fill:"currentColor"}}))),me=s=>t.createElement("svg",{"xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:cc":"http://creativecommons.org/ns#","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:svg":"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/svg","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd","xmlns:inkscape":"http://www.inkscape.org/namespaces/inkscape",viewBox:"0 -256 1792 1792",id:"svg2989","inkscape:version":"0.48.3.1 r9886",
2width:"100%",height:"100%","sodipodi:docname":"double_angle_up_font_awesome.svg",...s},t.createElement("metadata",{id:"metadata2999"},t.createElement("rdf:RDF",null,t.createElement("cc:Work",{"rdf:about":""},t.createElement("dc:format",null,"image/svg+xml"),t.createElement("dc:type",{"rdf:resource":"http://purl.org/dc/dcmitype/StillImage"})))),t.createElement("defs",{id:"defs2997"}),t.createElement("sodipodi:namedview",{pagecolor:"#ffffff",bordercolor:"#666666",borderopacity:1,objecttolerance:10,gridtolerance:10,guidetolerance:10,"inkscape:pageopacity":0,"inkscape:pageshadow":2,"inkscape:window-width":640,"inkscape:window-height":480,id:"namedview2995",showgrid:"false","inkscape:zoom":.13169643,"inkscape:cx":896,"inkscape:cy":896,"inkscape:window-x":0,"inkscape:window-y":25,"inkscape:window-maximized":0,"inkscape:current-layer":"svg2989"}),t.createElement("g",{transform:"matrix(1,0,0,-1,311.32203,1270.2373)",id:"g2991"},t.createElement("path",{d:"m 1075,224 q 0,-13 -10,-23 l -50,-50 q -10,-10 -23,-10 -13,0 -23,10 L 576,544 183,151 q -10,-10 -23,-10 -13,0 -23,10 l -50,50 q -10,10 -10,23 0,13 10,23 l 466,466 q 10,10 23,10 13,0 23,-10 l 466,-466 q 10,-10 10,-23 z m 0,384 q 0,-13 -10,-23 l -50,-50 q -10,-10 -23,-10 -13,0 -23,10 L 576,928 183,535 q -10,-10 -23,-10 -13,0 -23,10 l -50,50 q -10,10 -10,23 0,13 10,23 l 466,466 q 10,10 23,10 13,0 23,-10 l 466,-466 q 10,-10 10,-23 z",id:"path2993","inkscape:connector-curvature":0,style:{fill:"currentColor"}}))),I=[{label:"sorting.custom",value:"custom"},{label:"sorting.newest",value:"cdate desc"},{label:"sorting.oldest",value:"cdate"},{label:"sorting.priceAsc",value:"price"},{label:"sorting.priceDesc",value:"price desc"},{label:"sorting.name",value:"name"},{label:"sorting.nameDesc",value:"name desc"},{label:"sorting.author",value:"contributor:author"},{label:"sorting.publisher",value:"contributor:publisher"},{label:"sorting.category",value:"category"}],ue=async()=>{const{WishlistApiV2:s}=await J(async()=>{const{WishlistApiV2:a}=await import("./wishlist-api.jqAYIh8d.js");return{WishlistApiV2:a}},__vite__mapDeps([0,1,2]));return new s(void 0,void 0,X)},it=()=>{const[s,a]=t.useState(I[0].value),{t:i}=E(),{id:r}=H();var o=parseInt(r||"");const{page:h,viewPerPageOption:u}=Z(),w=j(),{data:n}=$(r),{error:f,data:c,isLoading:k,isFetching:g,refetch:z}=ee(o,null,h,u,s),[T,y]=t.useState(!1),[q,S]=t.useState((n==null?void 0:n.isPrivate)??!0),B=F(),{mutate:M,isPending:R}=b({mutationFn:async l=>{var d=parseInt(r||"");if(isNaN(d)||d<=0)throw new Error("Invalid wishlist ID");var U=await(await ue()).reorderItems(l,d);return U.data},onSuccess:(l,{moveMode:d,value:x})=>{xe({moveMode:d,value:x},i),w.invalidateQueries({queryKey:["wishlists"]}),w.invalidateQueries({queryKey:["wishlist"],exact:!1})}});t.useEffect(()=>{window.scrollTo({top:0,behavior:"smooth"}),z()},[h]),t.useEffect(()=>{(n==null?void 0:n.isPrivate)!==void 0&&S(n.isPrivate)},[n==null?void 0:n.isPrivate]);const W=(c==null?void 0:c.wishlistItems)||[],O=(c==null?void 0:c.totalCount)||0;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{id:"wishlist",children:[e.jsx(te,{breadcrumbItems:[{nm:i("wishlist.backToLists"),eurl:m.isAuthenticated()?"/profile/wishlists":"/guest/wishlists"}],currentName:n==null?void 0:n.nm}),e.jsxs("div",{className:"container content-wrapper",children:[e.jsxs("div",{className:"header",children:[e.jsxs(P,{className:"back",to:m.isAuthenticated()?"/profile/wishlists":"/guest/wishlists",children:[e.jsx("button",{children:e.jsx(oe,{})}),e.jsx("span",{children:i("wishlist.backToLists")})]}),e.jsxs("div",{className:"title-edit-container",children:[e.jsx("h1",{children:n==null?void 0:n.nm}),e.jsx("button",{className:"edit-mobile",onClick:()=>y(!0),children:e.jsx(_,{})})]}),e.jsxs(ge,{children:[e.jsxs("button",{className:"edit",onClick:()=>y(!0),children:[e.jsx("span",{children:i("wishlist.editList")})," ",e.jsx(_,{})]}),e.jsx(ne,{options:I,value:s,onChange:a,translateLabels:!0,"data-test-id":"wishlist-sorting"})]})]}),!q&&e.jsxs("div",{className:"isPublic",children:[e.jsx(A,{}),e.jsx("p",{children:i("wishlist.publicList")})]}),e.jsxs("div",{className:"content",children:[R||g?e.jsx("div",{className:"loading-backdrop"}):null,k?e.jsx("div",{className:"products-container",children:[...Array(u)].map((l,d)=>e.jsx("div",{className:"skeleton-card"},d))}):f?e.jsx(e.Fragment,{}):W.length===0?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"empty-wishlist",children:[e.jsx("h3",{children:i("wishlist.emptyList")}),e.jsx("p",{children:i("wishlist.emptyListMessage")}),e.jsx(P,{to:"/",children:i("wishlist.browseProducts")}),e.jsxs("div",{className:"wishlist-public",children:[e.jsxs("div",{className:"icon-info",children:[e.jsx(A,{}),e.jsx("p",{children:i("wishlist.makePublicInfo")})]}),e.jsx(C,{isPrivate:q,setIsPrivate:S,onPrivacyUpdate:l=>{B({id:n==null?void 0:n.id,nm:n==null?void 0:n.nm,isPrivate:l})}})]})]}),e.jsx(ie,{})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"products-container",children:W.map(l=>e.jsx(he,{onMove:s==="custom"?(d,x)=>M({productId:l.id,...x}):null,children:e.jsx(Y,{product:l})},l.id))}),e.jsx(se,{totalCount:O,forcePageSize:u})]})]})]})]}),T&&e.jsx(L,{wishlist:n,setOpen:y})]})},ge=D.div`
3	display: flex;
4	justify-content: flex-end;
5	align-items: center;
6	flex-direction: row;
7	& :not(:first-child) {
8		margin-left: 4px;
9	}
10`,he=({children:s,onMove:a,className:i})=>{const{t:r}=E();return a?e.jsxs(we,{className:i,children:[e.jsxs("div",{className:"sorting-control
10s",children:[e.jsx("div",{className:"sorting-control sorting-first",onClick:o=>a(o,{moveMode:p.Start}),title:r("sorting.steps.start"),children:e.jsx(me,{})}),e.jsx("div",{className:"sorting-control sorting-up",onClick:o=>a(o,{moveMode:p.Relative,value:-1}),title:r("sorting.steps.up"),children:e.jsx(de,{})}),e.jsx("div",{className:"sorting-control sorting-down",onClick:o=>a(o,{moveMode:p.Relative,value:1}),title:r("sorting.steps.down"),children:e.jsx(le,{})}),e.jsx("div",{className:"sorting-control sorting-last",onClick:o=>a(o,{moveMode:p.End}),title:r("sorting.steps.end"),children:e.jsx(pe,{})})]}),s]}):e.jsx(e.Fragment,{children:s})},we=D.div`
11	position: relative;
12
13	.sorting-controls {
14		position: absolute;
15		display: flex;
16		opacity: 0;
17		flex-direction: column;
18		justify-content: flex-start;
19		top: 36px;
20		right: 5px;
21		z-index: -1;
22		transition:
23			opacity 0.5s ease,
24			z-index 0.5s ease;
25
26		& .sorting-control {
27			margin: 2px;
28			padding: 2px;
29			cursor: pointer;
30			& > * {
31				width: 24px;
32				height: 24px;
33			}
34			background-color: rgba(255, 255, 255, 0.7);
35			border: 1px solid transparent;
36		}
37	}
38
39	&:hover .sorting-controls {
40		display: flex;
41		z-index: 100;
42		opacity: 1;
43		& .sorting-control:hover {
44			background-color: white;
45			border-radius: 8px;
46			border: 1px solid #ccc;
47		}
48	}
49`;function xe({moveMode:s,value:a},i){switch(s){case p.Start:v(i("sorting.stepSuccess.start"));break;case p.End:v(i("sorting.stepSuccess.end"));break;case p.Relative:a===-1?v(i("sorting.stepSuccess.up")):a===1&&v(i("sorting.stepSuccess.down"));break}}export{it as default};

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.