"use strict";
(() => {
var exports = {};
exports.id = 4277;
exports.ids = [4277,7206,9516,5316];
exports.modules = {

/***/ 982072:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ Badge)
/* harmony export */ });
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(920997);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(545725);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(antd__WEBPACK_IMPORTED_MODULE_1__);


function Badge({ count , style  }) {
    return /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(antd__WEBPACK_IMPORTED_MODULE_1__.Badge, {
        overflowCount: 1e8,
        count: count ?? 0,
        style: {
            backgroundColor: "#e6f7ff",
            color: "black",
            minWidth: "30px",
            ...style
        }
    });
}


/***/ }),

/***/ 543128:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ SanitizedMarkdown)
/* harmony export */ });
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(920997);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _cocalc_frontend_lib_file_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(732586);
/* harmony import */ var _cocalc_frontend_editors_slate_static_markdown__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(695379);
/* harmony import */ var _cocalc_frontend_editors_slate_static_markdown__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_cocalc_frontend_editors_slate_static_markdown__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var components_misc_A__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(940981);
/*
 *  This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.
 *  License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details
 */ 



function SanitizedMarkdown({ style , value  }) {
    const ctx = {
        AnchorTagComponent: components_misc_A__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z,
        noSanitize: false
    };
    return /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_cocalc_frontend_lib_file_context__WEBPACK_IMPORTED_MODULE_1__.FileContext.Provider, {
        value: ctx,
        children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx((_cocalc_frontend_editors_slate_static_markdown__WEBPACK_IMPORTED_MODULE_2___default()), {
            value: value,
            style: style
        })
    });
}


/***/ }),

/***/ 702816:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {


// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "Z": () => (/* binding */ PublicPath)
});

// EXTERNAL MODULE: external "react/jsx-runtime"
var jsx_runtime_ = __webpack_require__(920997);
// EXTERNAL MODULE: external "react"
var external_react_ = __webpack_require__(616689);
// EXTERNAL MODULE: external "antd"
var external_antd_ = __webpack_require__(545725);
// EXTERNAL MODULE: ./node_modules/next/link.js
var next_link = __webpack_require__(741664);
var link_default = /*#__PURE__*/__webpack_require__.n(next_link);
// EXTERNAL MODULE: ./components/share/path-contents.tsx + 5 modules
var path_contents = __webpack_require__(329794);
// EXTERNAL MODULE: ./components/share/path-actions.tsx + 13 modules
var path_actions = __webpack_require__(332627);
;// CONCATENATED MODULE: ./components/share/linked-path.tsx
/*
 *  This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
 *  License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details
 */ 

function LinkedPath({ id , path , relativePath , isDir  }) {
    let href = `/share/public_paths/${id}`;
    const first = /*#__PURE__*/ jsx_runtime_.jsx((link_default()), {
        href: href,
        children: /*#__PURE__*/ jsx_runtime_.jsx("a", {
            children: path
        })
    }, href);
    const slash = (key)=>/*#__PURE__*/ jsx_runtime_.jsx("span", {
            children: " / "
        }, "slash" + key);
    const segments = [
        first,
        slash(href)
    ];
    for (const segment of relativePath.split("/")){
        if (!segment) continue;
        href += `/${encodeURIComponent(segment)}`;
        segments.push(/*#__PURE__*/ jsx_runtime_.jsx((link_default()), {
            href: href,
            children: /*#__PURE__*/ jsx_runtime_.jsx("a", {
                children: segment
            })
        }, href));
        segments.push(slash(href));
    }
    if (!isDir) {
        segments.pop();
    }
    return /*#__PURE__*/ jsx_runtime_.jsx(jsx_runtime_.Fragment, {
        children: segments
    });
}

// EXTERNAL MODULE: ./components/share/loading.tsx
var loading = __webpack_require__(976087);
;// CONCATENATED MODULE: ./components/share/license.tsx
/*
 *  This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
 *  License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details
 */ 
function License({ license  }) {
    // TODO: make this more useful later...
    return /*#__PURE__*/ jsx_runtime_.jsx("span", {
        children: license ? license.toUpperCase() : "none"
    });
}

;// CONCATENATED MODULE: ./components/share/project-link.tsx
/*
 *  This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
 *  License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details
 */ 

function ProjectLink({ project_id , title  }) {
    return /*#__PURE__*/ jsx_runtime_.jsx((link_default()), {
        href: `/share/projects/${project_id}`,
        children: /*#__PURE__*/ jsx_runtime_.jsx("a", {
            children: title?.trim() ? title : "A Project"
        })
    });
}

// EXTERNAL MODULE: ./lib/share/counter.ts
var share_counter = __webpack_require__(403066);
// EXTERNAL MODULE: ./components/share/layout.tsx + 1 modules
var layout = __webpack_require__(216284);
// EXTERNAL MODULE: ./lib/share/customize.tsx
var share_customize = __webpack_require__(158742);
// EXTERNAL MODULE: ./lib/share/util.ts
var util = __webpack_require__(809774);
// EXTERNAL MODULE: ./components/misc/sanitized-markdown.tsx
var sanitized_markdown = __webpack_require__(543128);
// EXTERNAL MODULE: ./components/misc/badge.tsx
var misc_badge = __webpack_require__(982072);
// EXTERNAL MODULE: ../frontend/dist/components/icon.js
var icon = __webpack_require__(807772);
// EXTERNAL MODULE: ../util/dist/consts/ui.js
var ui = __webpack_require__(883996);
// EXTERNAL MODULE: ./lib/api/post.ts
var post = __webpack_require__(194184);
// EXTERNAL MODULE: ./components/auth/in-place-sign-in-or-up.tsx
var in_place_sign_in_or_up = __webpack_require__(438572);
// EXTERNAL MODULE: external "next/router"
var router_ = __webpack_require__(371853);
// EXTERNAL MODULE: ./components/share/proxy/avatar.tsx
var avatar = __webpack_require__(623825);
// EXTERNAL MODULE: ./components/misc/A.tsx
var A = __webpack_require__(940981);
// EXTERNAL MODULE: external "path"
var external_path_ = __webpack_require__(371017);
;// CONCATENATED MODULE: ./components/path/path.tsx
/*
 *  This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
 *  License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details
 */ 























function PublicPath({ id , path , url , project_id , projectTitle , relativePath ="" , description , counter , compute_image , license , contents , error , customize , disabled , unlisted , authenticated , stars =0 , isStarred: isStarred0 , githubOrg , githubRepo , projectAvatarImage , redirect  }) {
    (0,share_counter/* default */.Z)(id);
    const { 0: numStars , 1: setNumStars  } = (0,external_react_.useState)(stars);
    const { 0: isStarred , 1: setIsStarred  } = (0,external_react_.useState)(isStarred0 ?? null);
    (0,external_react_.useEffect)(()=>{
        setIsStarred(isStarred0);
    }, [
        isStarred0
    ]);
    const { 0: signingUp , 1: setSigningUp  } = (0,external_react_.useState)(false);
    const router = (0,router_.useRouter)();
    (0,external_react_.useEffect)(()=>{
        if (redirect) {
            router.replace(redirect);
        }
    }, [
        redirect
    ]);
    if (id == null) return /*#__PURE__*/ jsx_runtime_.jsx(loading/* default */.Z, {
        style: {
            fontSize: "30px"
        }
    });
    function visibility_explanation() {
        if (disabled) {
            return /*#__PURE__*/ (0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
                children: [
                    /*#__PURE__*/ jsx_runtime_.jsx(icon.Icon, {
                        name: "lock"
                    }),
                    " Private (only visible to collaborators on the project)"
                ]
            });
        }
        if (unlisted) {
            return /*#__PURE__*/ (0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
                children: [
                    /*#__PURE__*/ jsx_runtime_.jsx(icon.Icon, {
                        name: "eye-slash"
                    }),
                    " Unlisted (only visible to those who know the link)"
                ]
            });
        }
        if (authenticated) {
            return /*#__PURE__*/ (0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
                children: [
                    /*#__PURE__*/ jsx_runtime_.jsx(icon.Icon, {
                        name: ui/* SHARE_AUTHENTICATED_ICON */.rD
                    }),
                    " Authenticated (",
                    ui/* SHARE_AUTHENTICATED_EXPLANATION */.h1,
                    ")"
                ]
            });
        }
    }
    function visibility() {
        if (unlisted || disabled || authenticated) {
            return /*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", {
                children: [
                    /*#__PURE__*/ jsx_runtime_.jsx("b", {
                        children: "Visibility:"
                    }),
                    " ",
                    visibility_explanation()
                ]
            });
        }
    }
    async function star() {
        setIsStarred(true);
        setNumStars(numStars + 1);
        // Actually do the api call after changing state, so it is
        // maximally snappy.  Also, being absolutely certain that star/unstar
        // actually worked is not important.
        await (0,post/* default */.Z)("/public-paths/star", {
            id
        });
    }
    async function unstar() {
        setIsStarred(false);
        setNumStars(numStars - 1);
        await (0,post/* default */.Z)("/public-paths/unstar", {
            id
        });
    }
    function renderStar() {
        const badge = /*#__PURE__*/ jsx_runtime_.jsx(misc_badge/* default */.Z, {
            count: numStars,
            style: {
                marginLeft: "10px",
                marginTop: "-2.5px"
            }
        });
        if (isStarred == null) {
            // not signed in ==> isStarred is null or undefined.
            return /*#__PURE__*/ (0,jsx_runtime_.jsxs)(external_antd_.Button, {
                onClick: ()=>{
                    setSigningUp(!signingUp);
                },
                title: "Sign in to star",
                children: [
                    /*#__PURE__*/ jsx_runtime_.jsx(icon.Icon, {
                        name: "star"
                    }),
                    " Star ",
                    badge
                ]
            });
        }
        // Signed in so isStarred is true or false.
        let btn;
        if (isStarred == true) {
            btn = /*#__PURE__*/ (0,jsx_runtime_.jsxs)(external_antd_.Button, {
                onClick: unstar,
                children: [
                    /*#__PURE__*/ jsx_runtime_.jsx(icon.Icon, {
                        name: "star-filled",
                        style: {
                            color: "#eac54f"
                        }
                    }),
                    " Starred",
                    " ",
                    badge
                ]
            });
        } else {
            btn = /*#__PURE__*/ (0,jsx_runtime_.jsxs)(external_antd_.Button, {
                onClick: star,
                children: [
                    /*#__PURE__*/ jsx_runtime_.jsx(icon.Icon, {
                        name: "star"
                    }),
                    " Star ",
                    badge
                ]
            });
        }
        return /*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", {
            style: {
                textAlign: "center"
            },
            children: [
                btn,
                /*#__PURE__*/ jsx_runtime_.jsx("br", {}),
                /*#__PURE__*/ jsx_runtime_.jsx(A/* default */.Z, {
                    href: "/stars",
                    children: "Your stars..."
                })
            ]
        });
    }
    function renderProjectLink() {
        if (githubOrg && githubRepo) {
            return /*#__PURE__*/ (0,jsx_runtime_.jsxs)(external_antd_.Tooltip, {
                title: "Go to the top level of the repository.",
                placement: "right",
                children: [
                    /*#__PURE__*/ (0,jsx_runtime_.jsxs)("b", {
                        children: [
                            /*#__PURE__*/ jsx_runtime_.jsx(icon.Icon, {
                                name: "home"
                            }),
                            " GitHub Repository:",
                            " "
                        ]
                    }),
                    /*#__PURE__*/ (0,jsx_runtime_.jsxs)(A/* default */.Z, {
                        href: `/github/${githubOrg}/${githubRepo}`,
                        children: [
                            githubOrg,
                            "/",
                            githubRepo
                        ]
                    }),
                    /*#__PURE__*/ jsx_runtime_.jsx("br", {})
                ]
            });
        }
        if (url) {
            let name, target;
            const i = url.indexOf("/");
            if (url.startsWith("gist")) {
                target = `https://gist.github.com/${url.slice(i + 1)}`;
                name = "GitHub Gist";
            } else {
                target = "https://" + url.slice(i + 1);
                name = "URL";
            }
            // NOTE: it could conceivable only be http:// display will work, but this
            // link will be wrong. I'm not going to worry about that.
            return /*#__PURE__*/ (0,jsx_runtime_.jsxs)(external_antd_.Tooltip, {
                placement: "right",
                title: `This file is hosted at ${target}. Click to open in a new tab.`,
                children: [
                    /*#__PURE__*/ (0,jsx_runtime_.jsxs)("b", {
                        children: [
                            /*#__PURE__*/ jsx_runtime_.jsx(icon.Icon, {
                                name: "external-link"
                            }),
                            " ",
                            name,
                            ":",
                            " "
                        ]
                    }),
                    /*#__PURE__*/ jsx_runtime_.jsx(A/* default */.Z, {
                        href: target,
                        children: target
                    }),
                    /*#__PURE__*/ jsx_runtime_.jsx("br", {})
                ]
            });
        }
        return /*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", {
            children: [
                /*#__PURE__*/ jsx_runtime_.jsx("b", {
                    children: "Project:"
                }),
                " ",
                /*#__PURE__*/ jsx_runtime_.jsx(ProjectLink, {
                    project_id: project_id,
                    title: projectTitle
                }),
                /*#__PURE__*/ jsx_runtime_.jsx("br", {})
            ]
        });
    }
    function renderPathLink() {
        if (githubRepo) {
            const segments = url.split("/");
            return /*#__PURE__*/ (0,jsx_runtime_.jsxs)(external_antd_.Tooltip, {
                placement: "right",
                title: "This is hosted on GitHub. Click to open GitHub in a new tab.",
                children: [
                    /*#__PURE__*/ (0,jsx_runtime_.jsxs)("b", {
                        children: [
                            /*#__PURE__*/ jsx_runtime_.jsx(icon.Icon, {
                                name: "external-link"
                            }),
                            " Path:",
                            " "
                        ]
                    }),
                    /*#__PURE__*/ jsx_runtime_.jsx(A/* default */.Z, {
                        href: `https://github.com/${(0,external_path_.join)(...segments.slice(1))}`,
                        children: segments.length > 3 ? (0,external_path_.join)(...segments.slice(3)) : (0,external_path_.join)(...segments.slice(1))
                    }),
                    /*#__PURE__*/ jsx_runtime_.jsx("br", {})
                ]
            });
        }
        if (url) return;
        return /*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", {
            children: [
                /*#__PURE__*/ jsx_runtime_.jsx("b", {
                    children: "Path: "
                }),
                /*#__PURE__*/ jsx_runtime_.jsx(LinkedPath, {
                    path: path,
                    relativePath: relativePath,
                    id: id,
                    isDir: contents?.isdir
                }),
                /*#__PURE__*/ jsx_runtime_.jsx("br", {})
            ]
        });
    }
    return /*#__PURE__*/ jsx_runtime_.jsx(share_customize/* Customize */.l, {
        value: customize,
        children: /*#__PURE__*/ (0,jsx_runtime_.jsxs)(layout/* Layout */.A, {
            title: (0,util/* getTitle */.YQ)({
                path,
                relativePath
            }),
            top: projectAvatarImage ? /*#__PURE__*/ jsx_runtime_.jsx(external_antd_.Avatar, {
                shape: "square",
                size: 160,
                icon: /*#__PURE__*/ jsx_runtime_.jsx("img", {
                    src: projectAvatarImage
                }),
                style: {
                    float: "left",
                    margin: "10px"
                }
            }) : undefined,
            children: [
                githubOrg && /*#__PURE__*/ jsx_runtime_.jsx(avatar/* default */.Z, {
                    size: 96,
                    name: githubOrg,
                    style: {
                        float: "right",
                        marginLeft: "15px"
                    }
                }),
                /*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", {
                    children: [
                        /*#__PURE__*/ jsx_runtime_.jsx("div", {
                            style: {
                                float: "right"
                            },
                            children: renderStar()
                        }),
                        signingUp && /*#__PURE__*/ jsx_runtime_.jsx(external_antd_.Alert, {
                            style: {
                                margin: "0 auto",
                                maxWidth: "400px"
                            },
                            type: "warning",
                            message: /*#__PURE__*/ jsx_runtime_.jsx(in_place_sign_in_or_up/* default */.Z, {
                                title: "Star Shared Files",
                                why: "to star this",
                                onSuccess: ()=>{
                                    star();
                                    setSigningUp(false);
                                    router.reload();
                                }
                            })
                        }),
                        description?.trim() && /*#__PURE__*/ jsx_runtime_.jsx(sanitized_markdown/* default */.Z, {
                            style: {
                                marginBottom: "-1em"
                            } /* -1em to undo it being a paragraph */ ,
                            value: description
                        }),
                        renderProjectLink(),
                        renderPathLink(),
                        counter && /*#__PURE__*/ (0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
                            children: [
                                /*#__PURE__*/ (0,jsx_runtime_.jsxs)("b", {
                                    children: [
                                        /*#__PURE__*/ jsx_runtime_.jsx(icon.Icon, {
                                            name: "eye"
                                        }),
                                        " Views:"
                                    ]
                                }),
                                " ",
                                /*#__PURE__*/ jsx_runtime_.jsx(misc_badge/* default */.Z, {
                                    count: counter
                                }),
                                /*#__PURE__*/ jsx_runtime_.jsx("br", {})
                            ]
                        }),
                        license && /*#__PURE__*/ (0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
                            children: [
                                /*#__PURE__*/ jsx_runtime_.jsx("b", {
                                    children: "License:"
                                }),
                                " ",
                                /*#__PURE__*/ jsx_runtime_.jsx(License, {
                                    license: license
                                }),
                                /*#__PURE__*/ jsx_runtime_.jsx("br", {})
                            ]
                        }),
                        visibility(),
                        compute_image && /*#__PURE__*/ (0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
                            children: [
                                /*#__PURE__*/ jsx_runtime_.jsx("b", {
                                    children: "Image:"
                                }),
                                " ",
                                compute_image,
                                /*#__PURE__*/ jsx_runtime_.jsx("br", {})
                            ]
                        }),
                        /*#__PURE__*/ jsx_runtime_.jsx(path_actions/* default */.Z, {
                            id: id,
                            path: path,
                            url: url,
                            relativePath: relativePath,
                            isDir: contents?.isdir,
                            exclude: new Set([
                                "hosted"
                            ]),
                            project_id: project_id,
                            image: compute_image,
                            description: description
                        })
                    ]
                }),
                /*#__PURE__*/ jsx_runtime_.jsx(external_antd_.Divider, {}),
                error != null && /*#__PURE__*/ jsx_runtime_.jsx(external_antd_.Alert, {
                    showIcon: true,
                    type: "error",
                    style: {
                        maxWidth: "700px",
                        margin: "30px auto"
                    },
                    message: "Error loading file",
                    description: /*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", {
                        children: [
                            "There was a problem loading",
                            " ",
                            relativePath ? relativePath : "this file",
                            " in",
                            " ",
                            /*#__PURE__*/ jsx_runtime_.jsx((link_default()), {
                                href: `/share/public_paths/${id}`,
                                children: /*#__PURE__*/ (0,jsx_runtime_.jsxs)("a", {
                                    children: [
                                        path,
                                        "."
                                    ]
                                })
                            }),
                            /*#__PURE__*/ jsx_runtime_.jsx("br", {}),
                            /*#__PURE__*/ jsx_runtime_.jsx("br", {}),
                            error
                        ]
                    })
                }),
                contents != null && /*#__PURE__*/ jsx_runtime_.jsx(path_contents/* default */.Z, {
                    id: id,
                    relativePath: relativePath,
                    path: path,
                    ...contents
                })
            ]
        })
    });
}


/***/ }),

/***/ 623825:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ GithubAvatar)
/* harmony export */ });
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(920997);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(545725);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(antd__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var components_misc_A__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(940981);
/* harmony import */ var _cocalc_frontend_components_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(807772);
/* harmony import */ var _cocalc_util_misc__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(477389);
/* harmony import */ var _cocalc_util_misc__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_cocalc_util_misc__WEBPACK_IMPORTED_MODULE_4__);





function GithubAvatar({ style , size =195 / 2 , name  }) {
    const url = `https://github.com/${name}`;
    return /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(antd__WEBPACK_IMPORTED_MODULE_1__.Tooltip, {
        title: `Open the GitHub pag ${url} in a new tab.`,
        placement: "left",
        children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
            style: {
                textAlign: "center",
                ...style
            },
            children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(components_misc_A__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, {
                href: url,
                children: [
                    /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(antd__WEBPACK_IMPORTED_MODULE_1__.Avatar, {
                        style: {
                            borderRadius: "7.5px",
                            border: "1px solid #eee"
                        },
                        shape: "square",
                        size: size,
                        icon: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("img", {
                            src: `https://avatars.githubusercontent.com/${name}`
                        })
                    }),
                    /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
                        children: [
                            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_cocalc_frontend_components_icon__WEBPACK_IMPORTED_MODULE_3__.Icon, {
                                name: "external-link"
                            }),
                            " ",
                            (0,_cocalc_util_misc__WEBPACK_IMPORTED_MODULE_4__.trunc)(name, 28),
                            " ",
                            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_cocalc_frontend_components_icon__WEBPACK_IMPORTED_MODULE_3__.Icon, {
                                name: "github"
                            })
                        ]
                    })
                ]
            })
        })
    });
}


/***/ }),

/***/ 215316:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ getOwner),
/* harmony export */   "g": () => (/* binding */ getOwnerName)
/* harmony export */ });
/* harmony import */ var _cocalc_database_pool__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17763);
/* harmony import */ var _cocalc_database_pool__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_cocalc_database_pool__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _cocalc_util_db_schema_name_rules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(988772);
/* Get basic information about a user or organization
from the database.  This should be enough to render
a nice "homepage" for that user or organization.
*/ 

async function getOwner(owner) {
    if ((0,_cocalc_util_db_schema_name_rules__WEBPACK_IMPORTED_MODULE_1__.isReserved)(owner)) {
        // can't be so save us the trouble of consulting database; these are common
        // so this is a good win.
        throw Error(`no such owner '${owner}'- reserved name`);
    }
    const pool = _cocalc_database_pool__WEBPACK_IMPORTED_MODULE_0___default()("long");
    // Is it an account?
    let result = await pool.query("SELECT account_id FROM accounts WHERE LOWER(name)=$1", [
        owner.toLowerCase()
    ]);
    if (result.rows.length > 0) {
        return {
            type: "account",
            owner_id: result.rows[0].account_id
        };
    }
    // Is it an organization?
    result = await pool.query("SELECT title, description, organization_id FROM organizations WHERE LOWER(name)=$1", [
        owner.toLowerCase()
    ]);
    if (result.rows.length > 0) {
        return {
            type: "organization",
            owner_id: result.rows[0].organization_id
        };
    }
    throw Error(`no account or organization '${owner}'`);
}
async function getOwnerName(owner_id) {
    const pool = _cocalc_database_pool__WEBPACK_IMPORTED_MODULE_0___default()("long");
    let result = await pool.query("SELECT name FROM accounts WHERE account_id=$1", [
        owner_id
    ]);
    if (result.rows.length > 0) {
        const { name  } = result.rows[0];
        if (!name) return;
        return name;
    }
    result = await pool.query("SELECT name FROM organizations WHERE organization_id=$1", [
        owner_id
    ]);
    if (result.rows.length > 0) {
        const { name: name1  } = result.rows[0];
        if (!name1) return;
        return name1;
    }
}


/***/ }),

/***/ 368422:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ getProjectId)
/* harmony export */ });
/* harmony import */ var _cocalc_database_pool__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17763);
/* harmony import */ var _cocalc_database_pool__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_cocalc_database_pool__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _owner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215316);
/* harmony import */ var lib_share_proxy_project__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41524);
/*
Get basic information about a user or organization
from the database.  This should be enough to render
a nice "homepage" for that user or organization.

*/ 


// Throws an exception if there is no project with this name.
// TODO: take into account redirects for when name is changed.
async function getProjectId(owner, project) {
    if (owner == "github") {
        return await (0,lib_share_proxy_project__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)();
    }
    const { owner_id  } = await (0,_owner__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(owner);
    const pool = _cocalc_database_pool__WEBPACK_IMPORTED_MODULE_0___default()("long"); // map from owner/project --> project_id unlikely to change and when it does, stale data is ok.
    // NOTE: it's not enough that owner is a collab on the project -- they have to be the owner.
    // We do users ? $2 also, since it's fast/indexed, then dig in to the JSON...
    // Note that we have put owner_id in the query string explicitly (as far as I know),
    // though it is NOT user supplied so that's safe.
    const result = await pool.query(`SELECT project_id FROM projects WHERE LOWER(name)=$1 AND users ? $2 AND users#>>'{${owner_id},group}' = 'owner'`, [
        project.toLowerCase(),
        owner_id
    ]);
    if (result.rows.length > 0) {
        return result.rows[0].project_id;
    }
    throw Error(`no project ${owner}/${project}`);
}


/***/ }),

/***/ 115226:
/***/ ((module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "G": () => (/* binding */ getPublicPathNames),
/* harmony export */   "Z": () => (/* binding */ getPublicPathId)
/* harmony export */ });
/* harmony import */ var _cocalc_database_pool__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17763);
/* harmony import */ var _cocalc_database_pool__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_cocalc_database_pool__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _project__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(368422);
/* harmony import */ var lib_names_owner__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(215316);
/* harmony import */ var lib_share_proxy_get_public_path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10249);
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(371017);
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_4__);
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([lib_share_proxy_get_public_path__WEBPACK_IMPORTED_MODULE_3__]);
lib_share_proxy_get_public_path__WEBPACK_IMPORTED_MODULE_3__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
/*
 *  This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
 *  License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details
 */ /* Get basic information about a user or organization
from the database.  This should be enough to render
a nice "homepage" for that user or organization.
*/ 




async function getPublicPathId(owner, project, public_path // this is the entire actual path
) {
    if ((0,lib_share_proxy_get_public_path__WEBPACK_IMPORTED_MODULE_3__/* .shouldUseProxy */ ._)(owner)) {
        // special case -- proxy urls...
        const { id  } = await (0,lib_share_proxy_get_public_path__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)({
            url: (0,path__WEBPACK_IMPORTED_MODULE_4__.join)(owner, project, ...public_path)
        });
        return id;
    }
    const project_id = await (0,_project__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(owner, project);
    const pool = _cocalc_database_pool__WEBPACK_IMPORTED_MODULE_0___default()("long");
    const result = await pool.query("SELECT id FROM public_paths WHERE LOWER(name)=$1 AND project_id=$2", [
        public_path[0]?.toLowerCase() ?? "",
        project_id
    ]);
    if (result.rows.length > 0) {
        return result.rows[0].id;
    }
    throw Error(`no public_path ${owner}/${project}/${public_path[0]}`);
}
// Given the id of a public path, returns owner name, project name, and public_path name
// if they are all defined and nonempty. Otherwise returns undefined.
async function getPublicPathNames(id) {
    const pool = _cocalc_database_pool__WEBPACK_IMPORTED_MODULE_0___default()("medium");
    let result = await pool.query("SELECT project_id, name FROM public_paths WHERE id=$1", [
        id
    ]);
    if (result.rows.length == 0) return;
    const { project_id , name: public_path  } = result.rows[0];
    if (!public_path) return;
    // Having to get users is pretty stupid -- see comment in lib/project/get-owner.ts
    result = await pool.query("SELECT name, users FROM projects WHERE project_id=$1 AND name IS NOT NULL AND name != ''", [
        project_id
    ]);
    if (result.rows.length == 0) return;
    const { name: project , users  } = result.rows[0];
    let owner_id = "";
    for(const account_id in users){
        if (users[account_id].group == "owner") {
            owner_id = account_id;
            break;
        }
    }
    if (!owner_id) return; // shouldn't be possible
    const owner = await (0,lib_names_owner__WEBPACK_IMPORTED_MODULE_2__/* .getOwnerName */ .g)(owner_id);
    if (!owner) return;
    return {
        owner,
        project,
        public_path
    };
}

__webpack_async_result__();
} catch(e) { __webpack_async_result__(e); } });

/***/ }),

/***/ 10249:
/***/ ((module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ getProxyPublicPath),
/* harmony export */   "_": () => (/* binding */ shouldUseProxy)
/* harmony export */ });
/* harmony import */ var lib_share_proxy_project__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41524);
/* harmony import */ var _cocalc_database_pool__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17763);
/* harmony import */ var _cocalc_database_pool__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_cocalc_database_pool__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var sha1__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(766702);
/* harmony import */ var sha1__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(sha1__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(404672);
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_api__WEBPACK_IMPORTED_MODULE_3__]);
_api__WEBPACK_IMPORTED_MODULE_3__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
/*
Supported proxy schema should be mostly consistent with (and an extension of) nbviewer.org:

`url/example.com/thingy...` or `gist/user/id` or `github/owner/repo...`, etc.

Three options handled right now; anything else is an error.  The path must uniquely determine
what is publicly shared (at some unit), and it's nice if it is useful (e.g., for url's and gists).

- github/cocalc/sagemathinc/... --> 'github/cocalc/sagemathinc'; i.e., the github repo maps 1:1 to cocalc public path.
- gist/darribas/4121857 --> 'gist/4121857/guardian_gaza.ipynb'; here guardian_gaza.ipynb is the first filename hosted
  in the gist, and requires api call to github to get it. This uniquely determines the gist *and* tells us what type of file
  it contains so we can render it.
- url/wstein.org/Tables/modjac/curves.txt --> 'url/wstein.org/Tables/modjac/curves.txt'; path equals the url, since this is
  completely generic and there is nothing further we could do.

*/ 



function shouldUseProxy(owner) {
    return owner == "github" || owner == "gist";
}
const QUERY = `SELECT id, project_id, path, url, description, counter::INT, last_edited,
    (SELECT COUNT(*)::INT FROM public_path_stars WHERE public_path_id=id) AS stars
    FROM public_paths WHERE `;
async function getProxyPublicPath({ id , project_id , path , url , description  }) {
    const pool = _cocalc_database_pool__WEBPACK_IMPORTED_MODULE_1___default()("short");
    if (id != null) {
        // id is given, so return public_path with that id, if there is one.
        const { rows  } = await pool.query(QUERY + " id = $1", [
            id
        ]);
        if (rows.length > 0) {
            return rows[0];
        }
    }
    if (url != null) {
        // url is given, so return public_path with that url, if already known.
        const { rows: rows1  } = await pool.query(QUERY + " url = $1", [
            url
        ]);
        if (rows1.length > 0) {
            return rows1[0];
        }
    }
    if (project_id == null) {
        // this is the unique project used for all url proxying functionality; if not given,
        // we just look it up for convenience.
        project_id = await (0,lib_share_proxy_project__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)();
    }
    if (id == null && path != null) {
        // if id not given but path is, then we can compute the id from project_id and path, since it's derived from them.
        id = sha1__WEBPACK_IMPORTED_MODULE_2__(project_id + path);
        // try based on the id, which we now know:
        const { rows: rows2  } = await pool.query(QUERY + " id = $1", [
            id
        ]);
        if (rows2.length > 0) {
            return rows2[0];
        }
    }
    // We need to create this public_path and return that.
    if (!url) {
        // There is no possible way to create a public_path associated to
        // proxying a URL without knowing the URL.
        throw Error("url must be specified in order to create public_path");
    }
    // We can assume url is known.
    if (path == null) {
        path = await getPath(url);
    }
    if (id == null) {
        id = sha1__WEBPACK_IMPORTED_MODULE_2__(project_id + path);
    }
    if (id == null) throw Error("bug"); // not possible.
    // It could still be that the path with this id is in the database.
    // Example is gist/4121857 and gist/darribas/4121857 resolve to same record,
    // but initial search for 'gist/4121857' does not find anything.
    // id is given, so return public_path with that id, if there is one.
    const { rows: rows3  } = await pool.query(QUERY + " id = $1", [
        id
    ]);
    if (rows3.length > 0) {
        return rows3[0];
    }
    let publicPathUrl;
    if (url.startsWith("github/")) {
        // URL to the repository, not the exact path being requested.
        publicPathUrl = url.split("/").slice(0, 3).join("/");
    } else {
        publicPathUrl = url;
    }
    const now = new Date();
    await pool.query("INSERT INTO public_paths (id, url, project_id, path, description, last_edited, last_saved, created) VALUES($1, $2, $3, $4, $5, $6, $7, $8)", [
        id,
        publicPathUrl,
        project_id,
        path,
        description,
        now,
        now,
        now
    ]);
    return {
        id,
        url,
        project_id,
        path,
        description,
        last_edited: now,
        counter: 0,
        stars: 0
    };
}
async function getPath(url) {
    if (url.startsWith("github/")) {
        const v = url.split("/");
        if (v.length < 3) {
            throw Error(`invalid url - ${url} - must at least specify repo`);
        }
        return v.slice(0, 3).join("/");
    }
    if (url.startsWith("url/")) {
        return url;
    }
    if (url.startsWith("gist/")) {
        const v1 = url.split("/");
        return await (0,_api__WEBPACK_IMPORTED_MODULE_3__/* .fileInGist */ .br)(v1.length >= 3 ? v1[2] : v1[1]);
    }
    throw Error(`unknown proxy url schema -- ${url}`);
}

__webpack_async_result__();
} catch(e) { __webpack_async_result__(e); } });

/***/ }),

/***/ 41524:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ getProxyProjectId)
/* harmony export */ });
/* harmony import */ var _cocalc_database_pool__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17763);
/* harmony import */ var _cocalc_database_pool__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_cocalc_database_pool__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _cocalc_util_misc__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(477389);
/* harmony import */ var _cocalc_util_misc__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_cocalc_util_misc__WEBPACK_IMPORTED_MODULE_1__);


async function getProxyProjectId() {
    const pool = _cocalc_database_pool__WEBPACK_IMPORTED_MODULE_0___default()("long");
    const { rows  } = await pool.query("SELECT value FROM server_settings WHERE name='github_project_id'");
    if (rows.length == 0 || !(0,_cocalc_util_misc__WEBPACK_IMPORTED_MODULE_1__.isValidUUID)(rows[0].value)) {
        throw Error("github_project_id is not configured");
    }
    return rows[0].value;
}


/***/ }),

/***/ 31901:
/***/ ((module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__),
/* harmony export */   "getServerSideProps": () => (/* binding */ getServerSideProps)
/* harmony export */ });
/* harmony import */ var lib_names_public_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(115226);
/* harmony import */ var lib_share_get_public_path_info__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(974889);
/* harmony import */ var lib_with_customize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(601880);
/* harmony import */ var components_path_path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(702816);
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([lib_names_public_path__WEBPACK_IMPORTED_MODULE_0__, lib_share_get_public_path_info__WEBPACK_IMPORTED_MODULE_1__]);
([lib_names_public_path__WEBPACK_IMPORTED_MODULE_0__, lib_share_get_public_path_info__WEBPACK_IMPORTED_MODULE_1__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
/*
 *  This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
 *  License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details
 */ // Page for a project that is owned by a named account
// or organization.




/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (components_path_path__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z);
async function getServerSideProps(context) {
    const { owner , project , public_path  } = context.params;
    try {
        const id = await (0,lib_names_public_path__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(owner, project, public_path);
        const props = await (0,lib_share_get_public_path_info__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)({
            id,
            public_path,
            req: context.req
        });
        return await (0,lib_with_customize__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)({
            context,
            props
        });
    } catch (_err) {
        console.log(_err);
        return {
            notFound: true
        };
    }
}

__webpack_async_result__();
} catch(e) { __webpack_async_result__(e); } });

/***/ }),

/***/ 545725:
/***/ ((module) => {

module.exports = require("antd");

/***/ }),

/***/ 102574:
/***/ ((module) => {

module.exports = require("base-64");

/***/ }),

/***/ 546517:
/***/ ((module) => {

module.exports = require("lodash");

/***/ }),

/***/ 65680:
/***/ ((module) => {

module.exports = require("lru-cache");

/***/ }),

/***/ 903280:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/app-router-context.js");

/***/ }),

/***/ 492796:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/head-manager-context.js");

/***/ }),

/***/ 294957:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/head.js");

/***/ }),

/***/ 703539:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/i18n/detect-domain-locale.js");

/***/ }),

/***/ 734014:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/i18n/normalize-locale-path.js");

/***/ }),

/***/ 450744:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/image-config-context.js");

/***/ }),

/***/ 435843:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/image-config.js");

/***/ }),

/***/ 278524:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/is-plain-object.js");

/***/ }),

/***/ 878020:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/mitt.js");

/***/ }),

/***/ 664406:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/page-path/denormalize-page-path.js");

/***/ }),

/***/ 424964:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router-context.js");

/***/ }),

/***/ 493431:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/add-locale.js");

/***/ }),

/***/ 611751:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/add-path-prefix.js");

/***/ }),

/***/ 746220:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/compare-states.js");

/***/ }),

/***/ 110299:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/format-next-pathname-info.js");

/***/ }),

/***/ 623938:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/format-url.js");

/***/ }),

/***/ 329565:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/get-asset-path-from-route.js");

/***/ }),

/***/ 735789:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/get-next-pathname-info.js");

/***/ }),

/***/ 801897:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/is-bot.js");

/***/ }),

/***/ 901428:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/is-dynamic.js");

/***/ }),

/***/ 528854:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/parse-path.js");

/***/ }),

/***/ 491292:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/parse-relative-url.js");

/***/ }),

/***/ 734567:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/path-has-prefix.js");

/***/ }),

/***/ 980979:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/querystring.js");

/***/ }),

/***/ 393297:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/remove-trailing-slash.js");

/***/ }),

/***/ 836052:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/resolve-rewrites.js");

/***/ }),

/***/ 584226:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/route-matcher.js");

/***/ }),

/***/ 95052:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/router/utils/route-regex.js");

/***/ }),

/***/ 359232:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/utils.js");

/***/ }),

/***/ 40968:
/***/ ((module) => {

module.exports = require("next/head");

/***/ }),

/***/ 371853:
/***/ ((module) => {

module.exports = require("next/router");

/***/ }),

/***/ 616689:
/***/ ((module) => {

module.exports = require("react");

/***/ }),

/***/ 566405:
/***/ ((module) => {

module.exports = require("react-dom");

/***/ }),

/***/ 271704:
/***/ ((module) => {

module.exports = require("react-google-recaptcha-v3");

/***/ }),

/***/ 920997:
/***/ ((module) => {

module.exports = require("react/jsx-runtime");

/***/ }),

/***/ 766702:
/***/ ((module) => {

module.exports = require("sha1");

/***/ }),

/***/ 96544:
/***/ ((module) => {

module.exports = import("node-fetch");;

/***/ }),

/***/ 439491:
/***/ ((module) => {

module.exports = require("assert");

/***/ }),

/***/ 714300:
/***/ ((module) => {

module.exports = require("buffer");

/***/ }),

/***/ 706113:
/***/ ((module) => {

module.exports = require("crypto");

/***/ }),

/***/ 809523:
/***/ ((module) => {

module.exports = require("dns");

/***/ }),

/***/ 582361:
/***/ ((module) => {

module.exports = require("events");

/***/ }),

/***/ 657147:
/***/ ((module) => {

module.exports = require("fs");

/***/ }),

/***/ 773292:
/***/ ((module) => {

module.exports = require("fs/promises");

/***/ }),

/***/ 113685:
/***/ ((module) => {

module.exports = require("http");

/***/ }),

/***/ 241808:
/***/ ((module) => {

module.exports = require("net");

/***/ }),

/***/ 822037:
/***/ ((module) => {

module.exports = require("os");

/***/ }),

/***/ 371017:
/***/ ((module) => {

module.exports = require("path");

/***/ }),

/***/ 677282:
/***/ ((module) => {

module.exports = require("process");

/***/ }),

/***/ 285477:
/***/ ((module) => {

module.exports = require("punycode");

/***/ }),

/***/ 12781:
/***/ ((module) => {

module.exports = require("stream");

/***/ }),

/***/ 371576:
/***/ ((module) => {

module.exports = require("string_decoder");

/***/ }),

/***/ 924404:
/***/ ((module) => {

module.exports = require("tls");

/***/ }),

/***/ 76224:
/***/ ((module) => {

module.exports = require("tty");

/***/ }),

/***/ 257310:
/***/ ((module) => {

module.exports = require("url");

/***/ }),

/***/ 473837:
/***/ ((module) => {

module.exports = require("util");

/***/ })

};
;

// load runtime
var __webpack_require__ = require("../../../webpack-runtime.js");
__webpack_require__.C(exports);
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
var __webpack_exports__ = __webpack_require__.X(0, [6918,1199,676,1746,1664,7545,3854,3734,5654,6975,7951,401,8759,2003,9066,981,5997,9580,722,9924,5379,6087,6009,6952,5863,8572,4868,5123,2881], () => (__webpack_exec__(31901)));
module.exports = __webpack_exports__;

})();